summaryrefslogtreecommitdiff
path: root/usr/src/head
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2016-02-07 18:36:13 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2016-02-07 18:36:13 +0000
commitc4f6fbdceaec2d64d6bb7dba46d91ef61c0983ca (patch)
treeae4c2c23f880a979e356abde0b48b22eebc9d0e7 /usr/src/head
parenta07632cea359a68576961f7b45238a6a37a82945 (diff)
parent6d6fcbbb256ba9a8fe3e6076ae8a1f493b1f1a99 (diff)
downloadillumos-joyent-c4f6fbdceaec2d64d6bb7dba46d91ef61c0983ca.tar.gz
[illumos-gate merge]
commit 6d6fcbbb256ba9a8fe3e6076ae8a1f493b1f1a99 6600 cmd/fm should use the msgfmt(1) that Makefile.master tells it to commit aeac2d873b68a43f6650e0d0f021c02f5a653a21 6606 pysolaris has no translations but pretends otherwise commit f3b6506e5de00944c5a877f02a83b5e850f37ef5 6564 F_FLOCKW and F_FLOCK are undefined symbols in SPARC build commit 238d8f47d92b5b99a374f9639e0704420d3aef77 6601 Various GLD drivers return EINVAL instead of ENOTSUP for unused mac_prop_id_t's commit 4870e0a7381ec2ec57437062574e6ddc3dd48d7f 6582 initial reorg adding sys/null.h for 5218 6487 clean up __STDC__ ifdefs in rpcsvc/dbm.h 6563 fmtmsg.h should be simplified and neither define NULL nor _NULL Conflicts: usr/src/lib/Makefile
Diffstat (limited to 'usr/src/head')
-rw-r--r--usr/src/head/fmtmsg.h26
-rw-r--r--usr/src/head/iso/locale_iso.h10
-rw-r--r--usr/src/head/iso/stddef_iso.h15
-rw-r--r--usr/src/head/iso/stdio_iso.h10
-rw-r--r--usr/src/head/iso/stdlib_iso.h10
-rw-r--r--usr/src/head/iso/string_iso.h10
-rw-r--r--usr/src/head/iso/time_iso.h10
-rw-r--r--usr/src/head/iso/wchar_iso.h10
-rw-r--r--usr/src/head/mon.h11
-rw-r--r--usr/src/head/rpcsvc/dbm.h18
-rw-r--r--usr/src/head/unistd.h10
11 files changed, 31 insertions, 109 deletions
diff --git a/usr/src/head/fmtmsg.h b/usr/src/head/fmtmsg.h
index 209439f066..8fcbf9405e 100644
--- a/usr/src/head/fmtmsg.h
+++ b/usr/src/head/fmtmsg.h
@@ -25,6 +25,7 @@
/*
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ * Copyright 2014-2015 PALO, Richard.
*
* Copyright 1996-2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -49,23 +50,6 @@ extern "C" {
*/
/*
- * Define the value "NULL" if it hasn't been defined already.
- * NULL breaks namespace so we define _NULL
- */
-#if defined(_LP64)
-#define _NULL 0L
-#else
-#define _NULL 0
-#endif
-
-#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
-#ifndef NULL
-#define NULL _NULL
-#endif
-#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
-
-
-/*
* Constraint definitions:
* MM_MXLABELLN Maximum size of a "label" in a message
* MM_MXTAGLN Maximum size of a "tag" in a message
@@ -174,12 +158,12 @@ extern "C" {
* MM_NULLTAG Null value for the tag-component
*/
-#define MM_NULLLBL ((char *)_NULL)
+#define MM_NULLLBL ((char *)0)
#define MM_NULLSEV MM_NOSEV
#define MM_NULLMC MM_NULL
-#define MM_NULLTXT ((char *)_NULL)
-#define MM_NULLACT ((char *)_NULL)
-#define MM_NULLTAG ((char *)_NULL)
+#define MM_NULLTXT ((char *)0)
+#define MM_NULLACT ((char *)0)
+#define MM_NULLTAG ((char *)0)
/*
* Values returned by fmtmsg()
diff --git a/usr/src/head/iso/locale_iso.h b/usr/src/head/iso/locale_iso.h
index 4b410c838a..5ef1a4e9d0 100644
--- a/usr/src/head/iso/locale_iso.h
+++ b/usr/src/head/iso/locale_iso.h
@@ -21,6 +21,7 @@
*/
/*
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ * Copyright 2014 PALO, Richard.
*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -46,6 +47,7 @@
#define _ISO_LOCALE_ISO_H
#include <sys/feature_tests.h>
+#include <sys/null.h>
#ifdef __cplusplus
extern "C" {
@@ -99,14 +101,6 @@ struct lconv {
#define LC_MESSAGES 5
#define LC_ALL 6
-#ifndef NULL
-#if defined(_LP64)
-#define NULL 0L
-#else
-#define NULL 0
-#endif
-#endif
-
extern char *setlocale(int, const char *);
extern struct lconv *localeconv(void);
diff --git a/usr/src/head/iso/stddef_iso.h b/usr/src/head/iso/stddef_iso.h
index 48a7ed6875..ce422a71e0 100644
--- a/usr/src/head/iso/stddef_iso.h
+++ b/usr/src/head/iso/stddef_iso.h
@@ -29,6 +29,10 @@
*/
/*
+ * Copyright 2014 PALO, Richard.
+ */
+
+/*
* An application should not include this header directly. Instead it
* should be included only through the inclusion of other Sun headers.
*
@@ -43,9 +47,8 @@
#ifndef _ISO_STDDEF_ISO_H
#define _ISO_STDDEF_ISO_H
-#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.5 */
-
#include <sys/isa_defs.h>
+#include <sys/null.h>
#ifdef __cplusplus
extern "C" {
@@ -55,14 +58,6 @@ extern "C" {
namespace std {
#endif
-#ifndef NULL
-#if defined(_LP64)
-#define NULL 0L
-#else
-#define NULL 0
-#endif
-#endif
-
#if !defined(_PTRDIFF_T) || __cplusplus >= 199711L
#define _PTRDIFF_T
#if defined(_LP64) || defined(_I32LPx)
diff --git a/usr/src/head/iso/stdio_iso.h b/usr/src/head/iso/stdio_iso.h
index 1dec847790..d09c982a9c 100644
--- a/usr/src/head/iso/stdio_iso.h
+++ b/usr/src/head/iso/stdio_iso.h
@@ -21,6 +21,7 @@
*/
/*
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ * Copyright 2014 PALO, Richard.
*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -49,6 +50,7 @@
#define _ISO_STDIO_ISO_H
#include <sys/feature_tests.h>
+#include <sys/null.h>
#include <sys/va_list.h>
#include <stdio_tag.h>
#include <stdio_impl.h>
@@ -110,14 +112,6 @@ typedef __longlong_t fpos_t;
}
#endif /* end of namespace std */
-#ifndef NULL
-#if defined(_LP64)
-#define NULL 0L
-#else
-#define NULL 0
-#endif
-#endif
-
#define BUFSIZ 1024
/*
diff --git a/usr/src/head/iso/stdlib_iso.h b/usr/src/head/iso/stdlib_iso.h
index a2752ca421..2caa289e35 100644
--- a/usr/src/head/iso/stdlib_iso.h
+++ b/usr/src/head/iso/stdlib_iso.h
@@ -21,6 +21,7 @@
*/
/*
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ * Copyright 2014 PALO, Richard.
*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -46,6 +47,7 @@
#define _ISO_STDLIB_ISO_H
#include <sys/feature_tests.h>
+#include <sys/null.h>
#ifdef __cplusplus
extern "C" {
@@ -79,14 +81,6 @@ typedef unsigned int size_t; /* (historical version) */
#endif
#endif /* !_SIZE_T */
-#ifndef NULL
-#if defined(_LP64)
-#define NULL 0L
-#else
-#define NULL 0
-#endif
-#endif
-
#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0
#define RAND_MAX 32767
diff --git a/usr/src/head/iso/string_iso.h b/usr/src/head/iso/string_iso.h
index e1cae79472..7ed67d2240 100644
--- a/usr/src/head/iso/string_iso.h
+++ b/usr/src/head/iso/string_iso.h
@@ -25,6 +25,7 @@
/*
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ * Copyright 2014 PALO, Richard.
*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -46,6 +47,7 @@
#define _ISO_STRING_ISO_H
#include <sys/feature_tests.h>
+#include <sys/null.h>
#ifdef __cplusplus
extern "C" {
@@ -64,14 +66,6 @@ typedef unsigned int size_t; /* (historical version) */
#endif
#endif /* !_SIZE_T */
-#ifndef NULL
-#if defined(_LP64)
-#define NULL 0L
-#else
-#define NULL 0
-#endif
-#endif
-
extern int memcmp(const void *, const void *, size_t);
extern void *memcpy(void *_RESTRICT_KYWD, const void *_RESTRICT_KYWD, size_t);
extern void *memmove(void *, const void *, size_t);
diff --git a/usr/src/head/iso/time_iso.h b/usr/src/head/iso/time_iso.h
index bc94ec8995..511e3cf6b4 100644
--- a/usr/src/head/iso/time_iso.h
+++ b/usr/src/head/iso/time_iso.h
@@ -24,6 +24,7 @@
/*
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ * Copyright 2014 PALO, Richard.
*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -45,6 +46,7 @@
#define _ISO_TIME_ISO_H
#include <sys/feature_tests.h>
+#include <sys/null.h>
#ifdef __cplusplus
extern "C" {
@@ -54,14 +56,6 @@ extern "C" {
namespace std {
#endif
-#ifndef NULL
-#if defined(_LP64)
-#define NULL 0L
-#else
-#define NULL 0
-#endif
-#endif
-
#if !defined(_SIZE_T) || __cplusplus >= 199711L
#define _SIZE_T
#if defined(_LP64) || defined(_I32LPx)
diff --git a/usr/src/head/iso/wchar_iso.h b/usr/src/head/iso/wchar_iso.h
index 14763f0165..d7f35066d2 100644
--- a/usr/src/head/iso/wchar_iso.h
+++ b/usr/src/head/iso/wchar_iso.h
@@ -21,6 +21,7 @@
/*
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ * Copyright 2014 PALO, Richard.
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -42,6 +43,7 @@
#define _ISO_WCHAR_ISO_H
#include <sys/feature_tests.h>
+#include <sys/null.h>
#include <stdio_tag.h>
#include <wchar_impl.h>
#include <iso/time_iso.h>
@@ -109,14 +111,6 @@ typedef unsigned int size_t; /* (historical version) */
#endif
#endif /* !defined(_SIZE_T) || __cplusplus >= 199711L */
-#ifndef NULL
-#if defined(_LP64)
-#define NULL 0L
-#else
-#define NULL 0
-#endif
-#endif /* !NULL */
-
#ifndef WEOF
#if __cplusplus >= 199711L
#define WEOF ((std::wint_t)(-1))
diff --git a/usr/src/head/mon.h b/usr/src/head/mon.h
index 9150b7ac87..26061153b5 100644
--- a/usr/src/head/mon.h
+++ b/usr/src/head/mon.h
@@ -24,6 +24,7 @@
/*
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
+ * Copyright 2014 PALO, Richard.
*
* Copyright 1997-2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -32,6 +33,8 @@
#ifndef _MON_H
#define _MON_H
+#include <sys/null.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -66,14 +69,6 @@ typedef unsigned short WORD;
#define MPROGS0 (150 * sizeof (WORD)) /* 300 for pdp11, 600 for 32-bits */
#define MSCALE0 4
-#ifndef NULL
-#if defined(_LP64)
-#define NULL 0L
-#else
-#define NULL 0
-#endif
-#endif
-
extern void monitor(int (*)(void), int (*)(void), WORD *, size_t, size_t);
#ifdef __cplusplus
diff --git a/usr/src/head/rpcsvc/dbm.h b/usr/src/head/rpcsvc/dbm.h
index 110d8b990d..1a1092b89f 100644
--- a/usr/src/head/rpcsvc/dbm.h
+++ b/usr/src/head/rpcsvc/dbm.h
@@ -20,6 +20,8 @@
* CDDL HEADER END
*/
/*
+ * Copyright 2014, 2016 PALO, Richard.
+ *
* Copyright 1989 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -35,7 +37,8 @@
#ifndef _RPCSVC_DBM_H
#define _RPCSVC_DBM_H
-#pragma ident "%Z%%M% %I% %E% SMI"
+#include <sys/isa_defs.h>
+#include <sys/null.h>
#ifdef __cplusplus
extern "C" {
@@ -44,9 +47,6 @@ extern "C" {
#define PBLKSIZ 1024
#define DBLKSIZ 4096
#define BYTESIZ 8
-#ifndef NULL
-#define NULL ((char *)0)
-#endif
long bitno;
long maxbno;
@@ -66,7 +66,6 @@ typedef struct
int dsize;
} datum;
-#ifdef __STDC_
datum fetch(datum);
datum makdatum(char *, int);
datum firstkey(void);
@@ -74,15 +73,6 @@ datum nextkey(datum);
datum firsthash(long);
long calchash(datum);
long hashinc(long);
-#else
-datum fetch();
-datum makdatum();
-datum firstkey();
-datum nextkey();
-datum firsthash();
-long calchash();
-long hashinc();
-#endif
#ifdef __cplusplus
}
diff --git a/usr/src/head/unistd.h b/usr/src/head/unistd.h
index a25da31d15..967c8179bc 100644
--- a/usr/src/head/unistd.h
+++ b/usr/src/head/unistd.h
@@ -20,6 +20,7 @@
*/
/*
+ * Copyright 2014 PALO, Richard.
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
* Copyright (c) 2013 Gary Mills
*
@@ -36,6 +37,7 @@
#include <sys/feature_tests.h>
+#include <sys/null.h>
#include <sys/types.h>
#include <sys/unistd.h>
@@ -178,14 +180,6 @@ extern "C" {
#define _POSIX_VDISABLE 0
#endif
-#ifndef NULL
-#if defined(_LP64)
-#define NULL 0L
-#else
-#define NULL 0
-#endif
-#endif
-
#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2