diff options
author | Marc Espie <espie@cvs.openbsd.org> | 1999-06-11 22:47:49 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 1999-06-11 22:47:49 +0000 |
commit | 25018aae1e7a8c2288f61c32416e8d3c083a479f (patch) | |
tree | 1c6ccf39bfe7ab1508da3896c13a7920df0f267b /include/dirent.h | |
parent | 5d30b9dd685cc89d485c7ec3f358e239e00bfe45 (diff) |
Define NULL to be __null for C++: better quality of implementation.
__null is a magic constant of integral type that converts to a null pointer
as should be, but warns for ambiguity when used to resolved an overload
between an integral type and a pointer type.
Diffstat (limited to 'include/dirent.h')
-rw-r--r-- | include/dirent.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/dirent.h b/include/dirent.h index 6023a5db842..89718362331 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dirent.h,v 1.4 1998/11/20 11:18:25 d Exp $ */ +/* $OpenBSD: dirent.h,v 1.5 1999/06/11 22:47:48 espie Exp $ */ /* $NetBSD: dirent.h,v 1.9 1995/03/26 20:13:37 jtc Exp $ */ /*- @@ -82,8 +82,12 @@ typedef struct _dirdesc { #define __DTF_READALL 0x0008 /* everything has been read */ #ifndef NULL +#ifdef __GNUG__ +#define NULL __null +#else #define NULL 0 #endif +#endif #endif /* _POSIX_SOURCE */ |