openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/glib-2.0/1_2.60.3-r0/glib-2.60.3/glib/gstdio.c
int g_stat(const gchar* filename, GStatBuf* buf)
{
#ifdef G_OS_WIN32
    GWin32PrivateStat w32_buf;
    int retval = g_win32_stat_utf8(filename, &w32_buf);

    buf->st_dev = w32_buf.st_dev;
    buf->st_ino = w32_buf.st_ino;
    buf->st_mode = w32_buf.st_mode;
    buf->st_nlink = w32_buf.st_nlink;
    buf->st_uid = w32_buf.st_uid;
    buf->st_gid = w32_buf.st_gid;
    buf->st_rdev = w32_buf.st_dev;
    buf->st_size = w32_buf.st_size;
    buf->st_atime = w32_buf.st_atime;
    buf->st_mtime = w32_buf.st_mtime;
    buf->st_ctime = w32_buf.st_ctime;

    return retval;
#else
    return stat(filename, buf);
#endif
}
/**
 * g_stat:
 * @filename: (type filename): a pathname in the GLib file name encoding
 *     (UTF-8 on Windows)
 * @buf: a pointer to a stat struct, which will be filled with the file
 *     information
 *
 * A wrapper for the POSIX stat() function. The stat() function
 * returns information about a file. On Windows the stat() function in
 * the C library checks only the FAT-style READONLY attribute and does
 * not look at the ACL at all. Thus on Windows the protection bits in
 * the @st_mode field are a fabrication of little use.
 *
 * On Windows the Microsoft C libraries have several variants of the
 * stat struct and stat() function with names like _stat(), _stat32(),
 * _stat32i64() and _stat64i32(). The one used here is for 32-bit code
 * the one with 32-bit size and time fields, specifically called _stat32().
 *
 * In Microsoft's compiler, by default struct stat means one with
 * 64-bit time fields while in MinGW struct stat is the legacy one
 * with 32-bit fields. To hopefully clear up this messs, the gstdio.h
 * header defines a type #GStatBuf which is the appropriate struct type
 * depending on the platform and/or compiler being used. On POSIX it
 * is just struct stat, but note that even on POSIX platforms, stat()
 * might be a macro.
 *
 * See your C library manual for more details about stat().
 *
 * Returns: 0 if the information was successfully retrieved,
 *     -1 if an error occurred
 *
 * Since: 2.6
 */
@filename: (type filename): a pathname in the GLib file name encoding
(UTF-8 on Windows)
@buf: a pointer to a stat struct, which will be filled with the file
information

A wrapper for the POSIX stat() function. The stat() function
returns information about a file. On Windows the stat() function in
the C library checks only the FAT-style READONLY attribute and does
not look at the ACL at all. Thus on Windows the protection bits in
the @st_mode field are a fabrication of little use.

On Windows the Microsoft C libraries have several variants of the
stat struct and stat() function with names like _stat(), _stat32(),
_stat32i64() and _stat64i32(). The one used here is for 32-bit code
the one with 32-bit size and time fields, specifically called _stat32().

In Microsoft's compiler, by default struct stat means one with
64-bit time fields while in MinGW struct stat is the legacy one
with 32-bit fields. To hopefully clear up this messs, the gstdio.h
header defines a type #GStatBuf which is the appropriate struct type
depending on the platform and/or compiler being used. On POSIX it
is just struct stat, but note that even on POSIX platforms, stat()
might be a macro.

See your C library manual for more details about stat().

0 if the information was successfully retrieved,
-1 if an error occurred


@filename : ( type filename ) : a pathname in the GLib file name encoding ( UTF - 8 on Windows ) @buf : a pointer to a stat struct which will be filled with the file information A wrapper for the POSIX stat () function . The stat () function returns information about a file . On Windows the stat () function in the C library checks only the FAT - style READONLY attribute and does not look at the ACL at all . Thus on Windows the protection bits in the @st_mode field are a fabrication of little use . On Windows the Microsoft C libraries have several variants of the stat struct and stat () function with names like _stat () _stat32 () _stat32i64 () and _stat64i32 () . The one used here is for 32 - bit code the one with 32 - bit size and time fields specifically called _stat32 () . In Microsoft ' s compiler by default struct stat means one with 64 - bit time fields while in MinGW struct stat is the legacy one with 32 - bit fields . To hopefully clear up this messs the gstdio . h header defines a type #GStatBuf which is the appropriate struct type depending on the platform and / or compiler being used . On POSIX it is just struct stat but note that even on POSIX platforms stat () might be a macro . See your C library manual for more details about stat () . 0 if the information was successfully retrieved - 1 if an error occurred
int g_stat(const gchar* filename, GStatBuf* buf)
{
#ifdef G_OS_WIN32
    GWin32PrivateStat w32_buf;
    int retval = g_win32_stat_utf8(filename, &w32_buf);
    buf->st_dev = w32_buf.st_dev;
    buf->st_ino = w32_buf.st_ino;
    buf->st_mode = w32_buf.st_mode;
    buf->st_nlink = w32_buf.st_nlink;
    buf->st_uid = w32_buf.st_uid;
    buf->st_gid = w32_buf.st_gid;
    buf->st_rdev = w32_buf.st_dev;
    buf->st_size = w32_buf.st_size;
    buf->st_atime = w32_buf.st_atime;
    buf->st_mtime = w32_buf.st_mtime;
    buf->st_ctime = w32_buf.st_ctime;
    return retval;
#else
    return stat(filename, buf);
#endif
}
int g_stat ( const gchar * filename , GStatBuf * buf ) { #ifdef G_OS_WIN32 GWin32PrivateStat w32_buf ; int retval = g_win32_stat_utf8 ( filename , & w32_buf ) ; buf -> st_dev = w32_buf . st_dev ; buf -> st_ino = w32_buf . st_ino ; buf -> st_mode = w32_buf . st_mode ; buf -> st_nlink = w32_buf . st_nlink ; buf -> st_uid = w32_buf . st_uid ; buf -> st_gid = w32_buf . st_gid ; buf -> st_rdev = w32_buf . st_dev ; buf -> st_size = w32_buf . st_size ; buf -> st_atime = w32_buf . st_atime ; buf -> st_mtime = w32_buf . st_mtime ; buf -> st_ctime = w32_buf . st_ctime ; return retval ; #else return stat ( filename , buf ) ; #endif }
g_stat:
 @filename: (type filename): a pathname in the GLib file name encoding
     (UTF-8 on Windows)
 @buf: a pointer to a stat struct, which will be filled with the file
     information
g_stat : @filename : ( type filename ) : a pathname in the GLib file name encoding ( UTF - 8 on Windows ) @buf : a pointer to a stat struct which will be filled with the file information