From 25018aae1e7a8c2288f61c32416e8d3c083a479f Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Fri, 11 Jun 1999 22:47:49 +0000 Subject: 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. --- include/dirent.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/dirent.h') 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 */ -- cgit v1.2.3