Browse Source

As pointed out by Richard Guenther our definition

of NULL was incorrect for c++ compilers that aren't
gcc (or pretend to be gcc like clang).
ok miod@
OPENBSD_5_0
jsg 13 years ago
parent
commit
a76303a0c4
9 changed files with 27 additions and 9 deletions
  1. +3
    -1
      src/include/dirent.h
  2. +3
    -1
      src/include/locale.h
  3. +3
    -1
      src/include/stddef.h
  4. +3
    -1
      src/include/stdio.h
  5. +3
    -1
      src/include/stdlib.h
  6. +3
    -1
      src/include/string.h
  7. +3
    -1
      src/include/time.h
  8. +3
    -1
      src/include/unistd.h
  9. +3
    -1
      src/include/wchar.h

+ 3
- 1
src/include/dirent.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: dirent.h,v 1.21 2011/04/06 11:39:42 miod Exp $ */
/* $OpenBSD: dirent.h,v 1.22 2011/07/03 18:51:01 jsg Exp $ */
/* $NetBSD: dirent.h,v 1.9 1995/03/26 20:13:37 jtc Exp $ */ /* $NetBSD: dirent.h,v 1.9 1995/03/26 20:13:37 jtc Exp $ */
/*- /*-
@ -84,6 +84,8 @@ typedef struct _dirdesc {
#ifndef NULL #ifndef NULL
#ifdef __GNUG__ #ifdef __GNUG__
#define NULL __null #define NULL __null
#elif defined(__cplusplus)
#define NULL 0L
#else #else
#define NULL ((void *)0) #define NULL ((void *)0)
#endif /* __GNUG__ */ #endif /* __GNUG__ */


+ 3
- 1
src/include/locale.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: locale.h,v 1.7 2011/04/06 11:39:42 miod Exp $ */
/* $OpenBSD: locale.h,v 1.8 2011/07/03 18:51:01 jsg Exp $ */
/* $NetBSD: locale.h,v 1.6 1994/10/26 00:56:02 cgd Exp $ */ /* $NetBSD: locale.h,v 1.6 1994/10/26 00:56:02 cgd Exp $ */
/* /*
@ -59,6 +59,8 @@ struct lconv {
#ifndef NULL #ifndef NULL
#ifdef __GNUG__ #ifdef __GNUG__
#define NULL __null #define NULL __null
#elif defined(__cplusplus)
#define NULL 0L
#else #else
#define NULL ((void *)0) #define NULL ((void *)0)
#endif #endif


+ 3
- 1
src/include/stddef.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: stddef.h,v 1.11 2011/04/06 11:39:42 miod Exp $ */
/* $OpenBSD: stddef.h,v 1.12 2011/07/03 18:51:01 jsg Exp $ */
/* $NetBSD: stddef.h,v 1.4 1994/10/26 00:56:26 cgd Exp $ */ /* $NetBSD: stddef.h,v 1.4 1994/10/26 00:56:26 cgd Exp $ */
/*- /*-
@ -67,6 +67,8 @@ typedef __mbstate_t mbstate_t;
#ifndef NULL #ifndef NULL
#ifdef __GNUG__ #ifdef __GNUG__
#define NULL __null #define NULL __null
#elif defined(__cplusplus)
#define NULL 0L
#else #else
#define NULL ((void *)0) #define NULL ((void *)0)
#endif #endif


+ 3
- 1
src/include/stdio.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: stdio.h,v 1.39 2011/04/06 11:39:42 miod Exp $ */
/* $OpenBSD: stdio.h,v 1.40 2011/07/03 18:51:01 jsg Exp $ */
/* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */ /* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */
/*- /*-
@ -58,6 +58,8 @@ typedef __off_t off_t;
#ifndef NULL #ifndef NULL
#ifdef __GNUG__ #ifdef __GNUG__
#define NULL __null #define NULL __null
#elif defined(__cplusplus)
#define NULL 0L
#else #else
#define NULL ((void *)0) #define NULL ((void *)0)
#endif #endif


+ 3
- 1
src/include/stdlib.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: stdlib.h,v 1.48 2011/04/06 11:39:42 miod Exp $ */
/* $OpenBSD: stdlib.h,v 1.49 2011/07/03 18:51:01 jsg Exp $ */
/* $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $ */ /* $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $ */
/*- /*-
@ -80,6 +80,8 @@ typedef struct {
#ifndef NULL #ifndef NULL
#ifdef __GNUG__ #ifdef __GNUG__
#define NULL __null #define NULL __null
#elif defined(__cplusplus)
#define NULL 0L
#else #else
#define NULL ((void *)0) #define NULL ((void *)0)
#endif #endif


+ 3
- 1
src/include/string.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: string.h,v 1.21 2011/04/06 11:39:42 miod Exp $ */
/* $OpenBSD: string.h,v 1.22 2011/07/03 18:51:01 jsg Exp $ */
/* $NetBSD: string.h,v 1.6 1994/10/26 00:56:30 cgd Exp $ */ /* $NetBSD: string.h,v 1.6 1994/10/26 00:56:30 cgd Exp $ */
/*- /*-
@ -46,6 +46,8 @@ typedef __size_t size_t;
#ifndef NULL #ifndef NULL
#ifdef __GNUG__ #ifdef __GNUG__
#define NULL __null #define NULL __null
#elif defined(__cplusplus)
#define NULL 0L
#else #else
#define NULL ((void *)0) #define NULL ((void *)0)
#endif #endif


+ 3
- 1
src/include/time.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: time.h,v 1.19 2011/04/06 11:39:42 miod Exp $ */
/* $OpenBSD: time.h,v 1.20 2011/07/03 18:51:01 jsg Exp $ */
/* $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $ */ /* $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $ */
/* /*
@ -47,6 +47,8 @@
#ifndef NULL #ifndef NULL
#ifdef __GNUG__ #ifdef __GNUG__
#define NULL __null #define NULL __null
#elif defined(__cplusplus)
#define NULL 0L
#else #else
#define NULL ((void *)0) #define NULL ((void *)0)
#endif #endif


+ 3
- 1
src/include/unistd.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: unistd.h,v 1.63 2011/04/06 11:39:42 miod Exp $ */
/* $OpenBSD: unistd.h,v 1.64 2011/07/03 18:51:01 jsg Exp $ */
/* $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ */ /* $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ */
/*- /*-
@ -58,6 +58,8 @@
#ifndef NULL #ifndef NULL
#ifdef __GNUG__ #ifdef __GNUG__
#define NULL __null #define NULL __null
#elif defined(__cplusplus)
#define NULL 0L
#else #else
#define NULL ((void *)0) #define NULL ((void *)0)
#endif #endif


+ 3
- 1
src/include/wchar.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: wchar.h,v 1.17 2011/06/01 16:39:07 millert Exp $ */
/* $OpenBSD: wchar.h,v 1.18 2011/07/03 18:51:01 jsg Exp $ */
/* $NetBSD: wchar.h,v 1.16 2003/03/07 07:11:35 tshiozak Exp $ */ /* $NetBSD: wchar.h,v 1.16 2003/03/07 07:11:35 tshiozak Exp $ */
/*- /*-
@ -65,6 +65,8 @@
#ifndef NULL #ifndef NULL
#ifdef __GNUG__ #ifdef __GNUG__
#define NULL __null #define NULL __null
#elif defined(__cplusplus)
#define NULL 0L
#else #else
#define NULL ((void *)0) #define NULL ((void *)0)
#endif #endif


Loading…
Cancel
Save