The `offsetof` macro is part of the ANSI C standard, so redefining it is
not needed since it's always present.
(dc)->comparf = (cmpf), (dc)->hashf = (hshf), \
(dc)->memoryf = (memf), (dc)->eventf = (evf) )
-#ifdef offsetof
-#define DTOFFSET(struct_s, member) offsetof(struct_s, member)
-#else
-#define DTOFFSET(struct_s, member) ((int)(&((struct_s*)0)->member))
-#endif
-
/* the dictionary structure itself */
struct _dt_s
{ Dtsearch_f searchf;/* search function */
#ifndef streq
#define streq(s,t) ((*s == *t) && !strcmp((s),(t)))
#endif
-#ifdef offsetof
-#undef offsetof
-#endif
-#ifdef HAVE_INTPTR_T
-#define offsetof(typ,fld) ((intptr_t)(&(((typ*)0)->fld)))
-#else
-#define offsetof(typ,fld) ((int)(&(((typ*)0)->fld)))
-#endif
#define NOTUSED(var) (void) var
#define NILgraph NIL(Agraph_t*)
return cp;
}
-#ifndef offsetof
-#define offsetof(typ,fld) ((int)(&(((typ*)0)->fld)))
-#endif
-
-
static int ijcmpf(Dt_t * d, gridpt * p1, gridpt * p2, Dtdisc_t * disc)
{
int diff;