Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Move <null.h> to <sys/null.h> for the purpose of avoiding co...



details:   https://anonhg.NetBSD.org/src/rev/d8a603396ac7
branches:  trunk
changeset: 480388:d8a603396ac7
user:      kleink <kleink%NetBSD.org@localhost>
date:      Mon Jan 10 16:58:38 2000 +0000

description:
Move <null.h> to <sys/null.h> for the purpose of avoiding conflicts due to
std C headers including it, and a kernel module written in C++ would benfit
as well.

diffstat:

 include/stddef.h  |   4 ++--
 include/stdio.h   |   4 ++--
 include/stdlib.h  |   4 ++--
 include/string.h  |   4 ++--
 include/strings.h |   4 ++--
 include/time.h    |   4 ++--
 include/unistd.h  |   4 ++--
 sys/sys/Makefile  |  19 ++++++++++---------
 sys/sys/null.h    |   9 +++++++++
 sys/sys/param.h   |  10 ++--------
 10 files changed, 35 insertions(+), 31 deletions(-)

diffs (196 lines):

diff -r 4097a6d8a7ac -r d8a603396ac7 include/stddef.h
--- a/include/stddef.h  Mon Jan 10 16:58:37 2000 +0000
+++ b/include/stddef.h  Mon Jan 10 16:58:38 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: stddef.h,v 1.6 1999/12/22 21:26:18 kleink Exp $        */
+/*     $NetBSD: stddef.h,v 1.7 2000/01/10 16:58:38 kleink Exp $        */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -52,7 +52,7 @@
 #undef _BSD_WCHAR_T_
 #endif
 
-#include <null.h>
+#include <sys/null.h>
 
 #define        offsetof(type, member)  ((size_t)(&((type *)0)->member))
 
diff -r 4097a6d8a7ac -r d8a603396ac7 include/stdio.h
--- a/include/stdio.h   Mon Jan 10 16:58:37 2000 +0000
+++ b/include/stdio.h   Mon Jan 10 16:58:38 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: stdio.h,v 1.31 1999/12/22 21:26:18 kleink Exp $        */
+/*     $NetBSD: stdio.h,v 1.32 2000/01/10 16:58:38 kleink Exp $        */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -54,7 +54,7 @@
 #undef _BSD_SIZE_T_
 #endif
 
-#include <null.h>
+#include <sys/null.h>
 
 /*      
  * This is fairly grotesque, but pure ANSI code must not inspect the
diff -r 4097a6d8a7ac -r d8a603396ac7 include/stdlib.h
--- a/include/stdlib.h  Mon Jan 10 16:58:37 2000 +0000
+++ b/include/stdlib.h  Mon Jan 10 16:58:38 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: stdlib.h,v 1.43 1999/12/22 21:26:19 kleink Exp $       */
+/*     $NetBSD: stdlib.h,v 1.44 2000/01/10 16:58:38 kleink Exp $       */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -77,7 +77,7 @@
 #endif
 
 
-#include <null.h>
+#include <sys/null.h>
 
 #define        EXIT_FAILURE    1
 #define        EXIT_SUCCESS    0
diff -r 4097a6d8a7ac -r d8a603396ac7 include/string.h
--- a/include/string.h  Mon Jan 10 16:58:37 2000 +0000
+++ b/include/string.h  Mon Jan 10 16:58:38 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: string.h,v 1.21 1999/12/22 21:26:19 kleink Exp $       */
+/*     $NetBSD: string.h,v 1.22 2000/01/10 16:58:38 kleink Exp $       */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -44,7 +44,7 @@
 #undef _BSD_SIZE_T_
 #endif
 
-#include <null.h>
+#include <sys/null.h>
 
 #include <sys/cdefs.h>
 #include <sys/featuretest.h>
diff -r 4097a6d8a7ac -r d8a603396ac7 include/strings.h
--- a/include/strings.h Mon Jan 10 16:58:37 2000 +0000
+++ b/include/strings.h Mon Jan 10 16:58:38 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: strings.h,v 1.7 1999/12/22 21:26:19 kleink Exp $       */
+/*     $NetBSD: strings.h,v 1.8 2000/01/10 16:58:38 kleink Exp $       */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
 #endif
 
 #ifndef        _XOPEN_SOURCE
-#include <null.h>
+#include <sys/null.h>
 #endif
 
 #include <sys/cdefs.h>
diff -r 4097a6d8a7ac -r d8a603396ac7 include/time.h
--- a/include/time.h    Mon Jan 10 16:58:37 2000 +0000
+++ b/include/time.h    Mon Jan 10 16:58:38 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: time.h,v 1.23 1999/12/22 21:26:20 kleink Exp $ */
+/*     $NetBSD: time.h,v 1.24 2000/01/10 16:58:38 kleink Exp $ */
 
 /*
  * Copyright (c) 1989, 1993
@@ -48,7 +48,7 @@
 #include <machine/ansi.h>
 #include <machine/limits.h>    /* Include file containing CLK_TCK. */
 
-#include <null.h>
+#include <sys/null.h>
 
 #ifdef _BSD_CLOCK_T_
 typedef        _BSD_CLOCK_T_   clock_t;
diff -r 4097a6d8a7ac -r d8a603396ac7 include/unistd.h
--- a/include/unistd.h  Mon Jan 10 16:58:37 2000 +0000
+++ b/include/unistd.h  Mon Jan 10 16:58:38 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: unistd.h,v 1.79 1999/12/22 21:26:20 kleink Exp $       */
+/*     $NetBSD: unistd.h,v 1.80 2000/01/10 16:58:38 kleink Exp $       */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -88,7 +88,7 @@
 #define        STDOUT_FILENO   1       /* standard output file descriptor */
 #define        STDERR_FILENO   2       /* standard error file descriptor */
 
-#include <null.h>
+#include <sys/null.h>
 
 __BEGIN_DECLS
 __dead  void _exit __P((int)) __attribute__((__noreturn__));
diff -r 4097a6d8a7ac -r d8a603396ac7 sys/sys/Makefile
--- a/sys/sys/Makefile  Mon Jan 10 16:58:37 2000 +0000
+++ b/sys/sys/Makefile  Mon Jan 10 16:58:38 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.17 2000/01/02 13:43:00 msaitoh Exp $
+#      $NetBSD: Makefile,v 1.18 2000/01/10 16:58:39 kleink Exp $
 
 KDIR=  /sys/sys
 INCSDIR= /usr/include/sys
@@ -12,14 +12,15 @@
        featuretest.h file.h filedesc.h filio.h gmon.h inttypes.h ioccom.h \
        ioctl.h ioctl_compat.h ipc.h kcore.h kernel.h kgdb.h ktrace.h lkm.h \
        localedef.h lock.h lockf.h malloc.h map.h mbuf.h md5.h midiio.h \
-       mman.h mount.h msg.h msgbuf.h mtio.h namei.h param.h poll.h pool.h \
-       proc.h protosw.h ptrace.h queue.h reboot.h resource.h resourcevar.h \
-       rnd.h scanio.h sched.h scsiio.h select.h sem.h sha1.h shm.h signal.h \
-       signalvar.h socket.h socketvar.h sockio.h stat.h syscall.h \
-       syscallargs.h sysctl.h swap.h syslimits.h syslog.h systm.h tablet.h \
-       termios.h time.h timeb.h timepps.h times.h timex.h tprintf.h trace.h \
-       tty.h ttychars.h ttycom.h ttydefaults.h ttydev.h types.h ucred.h uio.h \
-       un.h unistd.h unpcb.h user.h utsname.h vadvise.h vmmeter.h vnode.h \
+       mman.h mount.h msg.h msgbuf.h mtio.h namei.h null.h param.h poll.h \
+       pool.h proc.h protosw.h ptrace.h queue.h reboot.h resource.h \
+       resourcevar.h rnd.h scanio.h sched.h scsiio.h select.h sem.h sha1.h \
+       shm.h signal.h signalvar.h socket.h socketvar.h sockio.h stat.h \
+       syscall.h syscallargs.h sysctl.h swap.h syslimits.h syslog.h systm.h \
+       tablet.h termios.h time.h timeb.h timepps.h times.h timex.h tprintf.h \
+       trace.h tty.h ttychars.h ttycom.h ttydefaults.h ttydev.h types.h \
+       ucred.h uio.h \
+       ucred.h uio.h un.h unistd.h unpcb.h user.h utsname.h vadvise.h vmmeter.h vnode.h \
        vnode_if.h vsio.h wait.h
 
 SYMLINKS= sys/exec_elf.h /usr/include/elf.h \
diff -r 4097a6d8a7ac -r d8a603396ac7 sys/sys/null.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/sys/null.h    Mon Jan 10 16:58:38 2000 +0000
@@ -0,0 +1,9 @@
+/*     $NetBSD: null.h,v 1.1 2000/01/10 16:58:39 kleink Exp $  */
+
+#ifndef        NULL
+#if !defined(__GNUG__) || __GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 90)
+#define        NULL    0
+#else
+#define        NULL    __null
+#endif
+#endif
diff -r 4097a6d8a7ac -r d8a603396ac7 sys/sys/param.h
--- a/sys/sys/param.h   Mon Jan 10 16:58:37 2000 +0000
+++ b/sys/sys/param.h   Mon Jan 10 16:58:38 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.82 1999/12/23 15:23:52 tron Exp $  */
+/*     $NetBSD: param.h,v 1.83 2000/01/10 16:58:39 kleink Exp $        */
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -81,13 +81,7 @@
 
 #define NetBSD 199905          /* NetBSD version (year & month). */
 
-#if defined(_KERNEL) || defined(_STANDALONE)
-#ifndef NULL
-#define        NULL    0
-#endif /* NULL */
-#else
-#include <null.h>
-#endif /* _KERNEL */
+#include <sys/null.h>
 
 #ifndef _LOCORE
 #include <sys/inttypes.h>



Home | Main Index | Thread Index | Old Index