#include #include #include #include int main (void) { struct stat s1; GStatBuf s2; int ofs1 = G_STRUCT_OFFSET (struct stat, st_ctime); int ofs2 = G_STRUCT_OFFSET (GStatBuf, st_ctime); printf ("\"struct stat::st_ctime\" at ofs %d, \"GStatBuf::st_ctime\" at ofs %d\n", ofs1, ofs2); if (sizeof(s1) != sizeof(s2)) printf ("Warning: mismatching sizes of 'struct stat' and 'GStatBuf'." " %u vs. %u bytes.\n", sizeof(s1), sizeof(s2)); else puts ("'struct stat' and 'GStatBuf' matches"); return (0); }