X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fcast.h;h=00e42d6603cc68963f498c6d5ce0ab780c1b19f6;hb=49c02dd0d35698fd43528c4422b3b5202b481a11;hp=5c64fac864a8e1eb78588dcc7558177d759ce0e1;hpb=535b3ff175221bf40a3e009930e4121e6d093f24;p=pspp diff --git a/src/libpspp/cast.h b/src/libpspp/cast.h index 5c64fac864..00e42d6603 100644 --- a/src/libpspp/cast.h +++ b/src/libpspp/cast.h @@ -112,4 +112,11 @@ (CHECK_POINTER_COMPATIBILITY (&((STRUCT *) 0)->MEMBER, POINTER), \ (STRUCT *) ((char *) (POINTER) - offsetof (STRUCT, MEMBER))) +/* A null pointer constant suitable for use in a varargs parameter list. + + This is useful because a literal 0 may not have the same width as a null + pointer. NULL by itself is also insufficient because in C it may expand to + simply 0. */ +#define NULL_SENTINEL ((void *) NULL) + #endif /* libpspp/cast.h */