static PyObject* test_config(PyObject *self) { #define CHECK_SIZEOF(FATNAME, TYPE) \ if (FATNAME != sizeof(TYPE)) \ return sizeof_error(#FATNAME, #TYPE, FATNAME, sizeof(TYPE)) CHECK_SIZEOF(SIZEOF_SHORT, short); CHECK_SIZEOF(SIZEOF_INT, int); CHECK_SIZEOF(SIZEOF_LONG, long); CHECK_SIZEOF(SIZEOF_VOID_P, void*); CHECK_SIZEOF(SIZEOF_TIME_T, time_t); #ifdef HAVE_LONG_LONG CHECK_SIZEOF(SIZEOF_LONG_LONG, PY_LONG_LONG); #endif #undef CHECK_SIZEOF Py_INCREF(Py_None); return Py_None; }
int main (int argc, const char *argv[]) { unsigned fail = 0, pass = 0; /* <cdio/types.h> */ CHECK_SIZEOF(msf_t); /* "iso9660_private.h" */ CHECK_SIZEOF(iso_volume_descriptor_t); CHECK_SIZEOF(iso9660_pvd_t); CHECK_SIZEOF(iso_path_table_t); CHECK_SIZEOF(iso9660_dir_t); #define iso9660_xa_t_SIZEOF 14 /* xa.h */ CHECK_SIZEOF(iso9660_xa_t); if (fail) return 1; return 0; }