diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2016-02-07 18:36:13 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2016-02-07 18:36:13 +0000 |
commit | c4f6fbdceaec2d64d6bb7dba46d91ef61c0983ca (patch) | |
tree | ae4c2c23f880a979e356abde0b48b22eebc9d0e7 /usr/src | |
parent | a07632cea359a68576961f7b45238a6a37a82945 (diff) | |
parent | 6d6fcbbb256ba9a8fe3e6076ae8a1f493b1f1a99 (diff) | |
download | illumos-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')
48 files changed, 170 insertions, 325 deletions
diff --git a/usr/src/cmd/backup/dump/lftw.c b/usr/src/cmd/backup/dump/lftw.c index 8dfcf7db70..d0a9da65ce 100644 --- a/usr/src/cmd/backup/dump/lftw.c +++ b/usr/src/cmd/backup/dump/lftw.c @@ -26,8 +26,6 @@ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* LINTLIBRARY */ /* * ftw - file tree walk @@ -101,8 +99,6 @@ #include <unistd.h> #include <ftw.h> -#define NULL 0 - static int pwdfd; static int lf_xftw( diff --git a/usr/src/cmd/cron/elm.c b/usr/src/cmd/cron/elm.c index a61ced60ad..7956a0f26b 100644 --- a/usr/src/cmd/cron/elm.c +++ b/usr/src/cmd/cron/elm.c @@ -63,7 +63,6 @@ extern void *xmalloc(size_t); #define INFINITY 2147483647L /* upper bound on time */ -#define NULL 0 /* a null pointer */ #define TRUE 1 #define FALSE 0 diff --git a/usr/src/cmd/fm/dicts/Makefile b/usr/src/cmd/fm/dicts/Makefile index 8e0bbd1545..22bebd3ae8 100644 --- a/usr/src/cmd/fm/dicts/Makefile +++ b/usr/src/cmd/fm/dicts/Makefile @@ -101,7 +101,7 @@ $(ROOTLCDIR)/%: % $(INS.file) %.mo: %.po - msgfmt -s -o $@ $< + $(MSGFMT) -o $@ $< lint: @for name in $(DCNAMES); do\ diff --git a/usr/src/cmd/lvm/rpc.metamedd/med_hash.h b/usr/src/cmd/lvm/rpc.metamedd/med_hash.h index 4886770354..e378fa154d 100644 --- a/usr/src/cmd/lvm/rpc.metamedd/med_hash.h +++ b/usr/src/cmd/lvm/rpc.metamedd/med_hash.h @@ -27,16 +27,10 @@ #ifndef _MED_HASH_H #define _MED_HASH_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif -#ifndef NULL -#define NULL 0 -#endif /* NULL */ - typedef struct item_t { void *key; int keyl; diff --git a/usr/src/cmd/mdb/common/libstand/sys/salib.h b/usr/src/cmd/mdb/common/libstand/sys/salib.h index c46cdabd26..131efc5b57 100644 --- a/usr/src/cmd/mdb/common/libstand/sys/salib.h +++ b/usr/src/cmd/mdb/common/libstand/sys/salib.h @@ -27,9 +27,8 @@ #ifndef _SYS_SALIB_H #define _SYS_SALIB_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> +#include <sys/null.h> #include <time.h> #ifdef __cplusplus @@ -78,10 +77,6 @@ extern size_t strspn(const char *, const char *); extern char *strpbrk(const char *, const char *); extern char *strtok(char *, const char *); -#ifndef NULL -#define NULL (0) -#endif - #ifdef __cplusplus } #endif diff --git a/usr/src/cmd/mdb/common/mdb/mdb_modapi.h b/usr/src/cmd/mdb/common/mdb/mdb_modapi.h index c6b4956b3b..f9a2baa323 100644 --- a/usr/src/cmd/mdb/common/mdb/mdb_modapi.h +++ b/usr/src/cmd/mdb/common/mdb/mdb_modapi.h @@ -37,6 +37,7 @@ */ #include <sys/types.h> +#include <sys/null.h> #include <gelf.h> #ifdef __cplusplus @@ -44,16 +45,10 @@ extern "C" { #endif /* - * Make sure that NULL, TRUE, FALSE, MIN, and MAX have the usual definitions + * Make sure that TRUE, FALSE, MIN, and MAX have the usual definitions * so module writers can depend on these macros and defines. + * Make sure NULL is available to module writers by including <sys/null.h>. */ -#ifndef NULL -#if defined(_LP64) && !defined(__cplusplus) -#define NULL 0L -#else -#define NULL 0 -#endif -#endif #ifndef TRUE #define TRUE 1 diff --git a/usr/src/cmd/print/Makefile b/usr/src/cmd/print/Makefile index c22b11279c..d8c55ef13a 100644 --- a/usr/src/cmd/print/Makefile +++ b/usr/src/cmd/print/Makefile @@ -22,7 +22,6 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" # # cmd/print/Makefile # @@ -89,7 +88,7 @@ _msg_test: scripts @/bin/cat messages.po scripts/scripts.po | sed '/domain/d' > $(POFILE) echo 'domain "SUNW_OST_OSCMD"' > SUNW_OST_OSCMD.po cat $(POFILE) >> SUNW_OST_OSCMD.po - msgfmt SUNW_OST_OSCMD.po + $(MSGFMT) SUNW_OST_OSCMD.po @$(RM) messages.po $(POFILE) SUNW_OST_OSCMD.po clean strip cstyle lint: $(SUBDIRS) diff --git a/usr/src/cmd/sgs/messages/Makefile.com b/usr/src/cmd/sgs/messages/Makefile.com index 8a57a7094b..0dd50a2a08 100644 --- a/usr/src/cmd/sgs/messages/Makefile.com +++ b/usr/src/cmd/sgs/messages/Makefile.com @@ -33,8 +33,6 @@ TEXT_DOMAIN= SUNW_OST_SGS POFILE= sgs.po -MSGFMT= msgfmt - # The following message files are generated as part of each utilites build via # sgsmsg(1l). By default each file is formatted as a portable object file # (.po) - see msgfmt(1). If the sgsmsg -C option has been employed, each file diff --git a/usr/src/cmd/sgs/rtld/common/_a.out.h b/usr/src/cmd/sgs/rtld/common/_a.out.h index 36d5993c9b..0924f01af0 100644 --- a/usr/src/cmd/sgs/rtld/common/_a.out.h +++ b/usr/src/cmd/sgs/rtld/common/_a.out.h @@ -26,6 +26,7 @@ #define _A_DOT_OUT_DOT_H #include <sys/types.h> +#include <sys/null.h> #include <sys/mman.h> #include <a.out.h> #include <_rtld.h> @@ -63,9 +64,6 @@ typedef struct _rt_aout_private { /* * Special defines for a.out format file class. */ -#ifndef NULL -#define NULL 0 -#endif #define N_UNDF 0x0 /* undefined */ #define N_ABS 0x2 /* absolute */ #define N_COMM 0x12 /* common (internal to ld) */ diff --git a/usr/src/cmd/sh/pwd.c b/usr/src/cmd/sh/pwd.c index d6e06074fd..631434454d 100644 --- a/usr/src/cmd/sh/pwd.c +++ b/usr/src/cmd/sh/pwd.c @@ -20,6 +20,10 @@ */ /* + * Copyright 2015 PALO, Richard. + */ + +/* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -28,8 +32,7 @@ /* All Rights Reserved */ -#pragma ident "%Z%%M% %I% %E% SMI" -/* +/* * UNIX shell */ @@ -41,11 +44,11 @@ #include "defs.h" #define DOT '.' -#define NULL 0 -#define SLASH '/' -#define PARTLY 2 +#define NULLCHAR '\0' +#define SLASH '/' +#define PARTLY 2 -static void rmslash(); +static void rmslash(unsigned char *string); #ifdef __STDC__ extern const char longpwd[]; #else @@ -70,27 +73,25 @@ cwd(unsigned char *dir) /* Now remove any .'s */ pdir = dir; - if(*dir == SLASH) + if (*dir == SLASH) pdir++; - while(*pdir) /* remove /./ by itself */ - { - if((*pdir==DOT) && (*(pdir+1)==SLASH)) - { + while (*pdir) { /* remove /./ by itself */ + if ((*pdir == DOT) && (*(pdir+1) == SLASH)) { movstr(pdir+2, pdir); continue; } pdir++; - while ((*pdir) && (*pdir != SLASH)) + while ((*pdir) && (*pdir != SLASH)) pdir++; - if (*pdir) + if (*pdir) pdir++; } /* take care of trailing /. */ - if(*(--pdir)==DOT && pdir > dir && *(--pdir)==SLASH) { - if(pdir > dir) { - *pdir = NULL; + if (*(--pdir) == DOT && pdir > dir && *(--pdir) == SLASH) { + if (pdir > dir) { + *pdir = NULLCHAR; } else { - *(pdir+1) = NULL; + *(pdir+1) = NULLCHAR; } } @@ -101,14 +102,12 @@ cwd(unsigned char *dir) /* Now that the dir is canonicalized, process it */ - if(*dir==DOT && *(dir+1)==NULL) - { + if (*dir == DOT && *(dir+1) == NULLCHAR) { return; } - if(*dir==SLASH) - { + if (*dir == SLASH) { /* Absolute path */ pcwd = cwdname; @@ -119,73 +118,62 @@ cwd(unsigned char *dir) { /* Relative path */ - if (didpwd == FALSE) + if (didpwd == FALSE) return; - didpwd = PARTLY; + didpwd = PARTLY; pcwd = cwdname + length(cwdname) - 1; - if(pcwd != cwdname+1) + if (pcwd != cwdname+1) *pcwd++ = SLASH; } - while(*dir) - { - if(*dir==DOT && - *(dir+1)==DOT && - (*(dir+2)==SLASH || *(dir+2)==NULL)) - { + while (*dir) { + if (*dir == DOT && + *(dir+1) == DOT && + (*(dir+2) == SLASH || *(dir+2) == NULLCHAR)) { /* Parent directory, so backup one */ - if( pcwd > cwdname+2 ) + if (pcwd > cwdname+2) --pcwd; - while(*(--pcwd) != SLASH) + while (*(--pcwd) != SLASH) ; pcwd++; dir += 2; - if(*dir==SLASH) - { + if (*dir == SLASH) { dir++; } continue; } - if (pcwd >= &cwdname[PATH_MAX+1]) - { - didpwd=FALSE; + if (pcwd >= &cwdname[PATH_MAX+1]) { + didpwd = FALSE; return; } *pcwd++ = *dir++; - while((*dir) && (*dir != SLASH)) - { - if (pcwd >= &cwdname[PATH_MAX+1]) - { - didpwd=FALSE; + while ((*dir) && (*dir != SLASH)) { + if (pcwd >= &cwdname[PATH_MAX+1]) { + didpwd = FALSE; return; } *pcwd++ = *dir++; - } - if (*dir) - { - if (pcwd >= &cwdname[PATH_MAX+1]) - { - didpwd=FALSE; + } + if (*dir) { + if (pcwd >= &cwdname[PATH_MAX+1]) { + didpwd = FALSE; return; } *pcwd++ = *dir++; } } - if (pcwd >= &cwdname[PATH_MAX+1]) - { - didpwd=FALSE; + if (pcwd >= &cwdname[PATH_MAX+1]) { + didpwd = FALSE; return; } - *pcwd = NULL; + *pcwd = NULLCHAR; --pcwd; - if(pcwd>cwdname && *pcwd==SLASH) - { + if (pcwd > cwdname && *pcwd == SLASH) { /* Remove trailing / */ - *pcwd = NULL; + *pcwd = NULLCHAR; } - return; } void @@ -195,27 +183,28 @@ cwd2() unsigned char *pcwd; /* check if there are any symbolic links in pathname */ - if(didpwd == FALSE) + if (didpwd == FALSE) return; pcwd = cwdname + 1; - if(didpwd == PARTLY) { - while (*pcwd) - { + if (didpwd == PARTLY) { + while (*pcwd) { char c; - while((c = *pcwd++) != SLASH && c != '\0'); - *--pcwd = '\0'; - if (lstat((char *)cwdname, &stat1) == -1 - || (stat1.st_mode & S_IFMT) == S_IFLNK) { + do { + c = *pcwd++; + } while (c != SLASH && c != NULLCHAR); + *--pcwd = NULLCHAR; + if (lstat((char *)cwdname, &stat1) == -1 || + (stat1.st_mode & S_IFMT) == S_IFLNK) { didpwd = FALSE; *pcwd = c; return; } *pcwd = c; - if(c) + if (c) pcwd++; } didpwd = TRUE; - } else + } else if (stat((char *)cwdname, &stat1) == -1) { didpwd = FALSE; return; @@ -225,11 +214,10 @@ cwd2() * consist of symbolic links with ".." */ - if (stat(".", &stat2) == -1 - || stat1.st_dev != stat2.st_dev - || stat1.st_ino != stat2.st_ino) + if (stat(".", &stat2) == -1 || + stat1.st_dev != stat2.st_dev || + stat1.st_ino != stat2.st_ino) didpwd = FALSE; - return; } unsigned char * @@ -238,9 +226,9 @@ cwdget() cwd2(); if (didpwd == FALSE) { if (getcwd((char *)cwdname, PATH_MAX+1) == NULL) - *cwdname = 0; + *cwdname = NULLCHAR; didpwd = TRUE; - } + } return (cwdname); } @@ -265,11 +253,10 @@ cwdprint(void) } for (cp = cwdname; *cp; cp++) { - prc_buff(*cp); + prc_buff(*cp); } prc_buff(NL); - return; } /* @@ -277,16 +264,13 @@ cwdprint(void) */ static void -rmslash(string) - unsigned char *string; +rmslash(unsigned char *string) { unsigned char *pstring; pstring = string; - while(*pstring) - { - if(*pstring==SLASH && *(pstring+1)==SLASH) - { + while (*pstring) { + if (*pstring == SLASH && *(pstring+1) == SLASH) { /* Remove repeated SLASH's */ movstr(pstring+1, pstring); @@ -296,11 +280,9 @@ rmslash(string) } --pstring; - if(pstring>string && *pstring==SLASH) - { + if (pstring > string && *pstring == SLASH) { /* Remove trailing / */ - *pstring = NULL; + *pstring = NULLCHAR; } - return; } diff --git a/usr/src/cmd/svr4pkg/libinst/pathdup.c b/usr/src/cmd/svr4pkg/libinst/pathdup.c index 950d8bc5ed..39c92ce2ce 100644 --- a/usr/src/cmd/svr4pkg/libinst/pathdup.c +++ b/usr/src/cmd/svr4pkg/libinst/pathdup.c @@ -46,7 +46,6 @@ * memory fragmentation to 12.5% */ #define MEMSIZ PATH_MAX*8 -#define NULL 0 struct dup { char mem[MEMSIZ]; diff --git a/usr/src/cmd/ypcmd/ypxfr.c b/usr/src/cmd/ypcmd/ypxfr.c index 15846cbc28..c6a8d403aa 100644 --- a/usr/src/cmd/ypcmd/ypxfr.c +++ b/usr/src/cmd/ypcmd/ypxfr.c @@ -32,8 +32,6 @@ * California. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This is a user command which gets a NIS data base from some running * server, and gets it to the local site by using the normal NIS client @@ -72,7 +70,6 @@ */ #include <ndbm.h> -#undef NULL #define DATUM #include <stdio.h> diff --git a/usr/src/common/net/dhcp/octet.c b/usr/src/common/net/dhcp/octet.c index 973381b033..d8367bbf0b 100644 --- a/usr/src/common/net/dhcp/octet.c +++ b/usr/src/common/net/dhcp/octet.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* LINTLIBRARY */ #if !defined(_BOOT) && !defined(_KERNEL) @@ -34,10 +32,10 @@ #include <stdlib.h> #endif /* _BOOT && _KERNEL */ #include <sys/types.h> +#include <sys/null.h> #include <sys/errno.h> #if defined(_BOOT) || defined(_KERNEL) -#define NULL 0 #define isdigit(c) ((c) >= '0' && c <= '9') #define isxdigit(c) (isdigit(c) || (((c) >= 'a') && ((c) <= 'f')) || \ (((c) >= 'A') && ((c) <= 'F'))) diff --git a/usr/src/common/util/getoptstr.c b/usr/src/common/util/getoptstr.c index 75a16c8860..541a287058 100644 --- a/usr/src/common/util/getoptstr.c +++ b/usr/src/common/util/getoptstr.c @@ -28,8 +28,6 @@ /* All Rights Reserved */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This file contains getoptstr(), which is getopt() for strings of arguments * (not arrays of strings). It is used by the bootloader ({*fs,inet}boot) and @@ -38,6 +36,7 @@ #include "getoptstr.h" +#include <sys/null.h> /* @@ -46,8 +45,6 @@ char *strchr(const char *s, int c); -#define NULL ((void *)0) - #define ISNTWORDCH(c) ((c) == '\0' || ISSPACE(c)) diff --git a/usr/src/common/util/string.c b/usr/src/common/util/string.c index 80a076c436..1388f5772e 100644 --- a/usr/src/common/util/string.c +++ b/usr/src/common/util/string.c @@ -31,6 +31,7 @@ */ #include <sys/types.h> +#include <sys/null.h> #include <sys/varargs.h> #if defined(_KERNEL) @@ -40,10 +41,6 @@ #include <string.h> #endif -#ifndef NULL -#define NULL 0l -#endif - #include "memcpy.h" #include "string.h" 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 diff --git a/usr/src/lib/Makefile b/usr/src/lib/Makefile index 9c2ae475c9..e08cd2755d 100644 --- a/usr/src/lib/Makefile +++ b/usr/src/lib/Makefile @@ -357,6 +357,7 @@ MSGSUBDIRS= \ madv \ mpss \ pam_modules \ + pyzfs \ rpcsec_gss \ $($(MACH)_MSGSUBDIRS) diff --git a/usr/src/lib/libbc/inc/include/sys/fcntlcom.h b/usr/src/lib/libbc/inc/include/sys/fcntlcom.h index 8a843c900f..8caf65e2a3 100644 --- a/usr/src/lib/libbc/inc/include/sys/fcntlcom.h +++ b/usr/src/lib/libbc/inc/include/sys/fcntlcom.h @@ -20,6 +20,7 @@ */ /* + * Copyright 2016 Gary Mills * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -134,6 +135,10 @@ extern "C" { #define F_CNVT 12 /* Convert a fhandle to an open fd */ #endif /* !_POSIX_SOURCE */ +/* Needed by flock.c */ +#define F_FLOCKW F_SETLKW +#define F_FLOCK F_SETLK + /* fcntl(2) flags (l_type field of flock structure) */ #define F_RDLCK 1 /* read lock */ #define F_WRLCK 2 /* write lock */ diff --git a/usr/src/lib/pysolaris/Makefile b/usr/src/lib/pysolaris/Makefile index 7c018260b7..df3d21faa4 100644 --- a/usr/src/lib/pysolaris/Makefile +++ b/usr/src/lib/pysolaris/Makefile @@ -26,8 +26,6 @@ include ../Makefile.lib SUBDIRS= $(MACH) -XGETTEXT= $(GNUXGETTEXT) -XGETFLAGS= $(GNUXGETFLAGS) all := TARGET= all install := TARGET= install @@ -35,21 +33,14 @@ clean := TARGET= clean clobber := TARGET= clobber lint := TARGET= lint -MSGFIND = $(FIND) . -name '*.py' -o -name '*.c' -MSGFILES = $(MSGFIND:sh) PYCFIND = $(FIND) . -name '*.pyc' PYCFILES = $(PYCFIND:sh) -POFILE = pysolaris.po .KEEP_STATE: all install clean lint: $(SUBDIRS) clobber: $(SUBDIRS) - $(RM) $(POFILE) $(PYCFILES) - -$(POFILE): pofile_MSGFILES - -_msg: $(MSGDOMAINPOFILE) + $(RM) $(PYCFILES) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/lib/pysolaris/common/misc.c b/usr/src/lib/pysolaris/common/misc.c index da7bb0075f..13280d461f 100644 --- a/usr/src/lib/pysolaris/common/misc.c +++ b/usr/src/lib/pysolaris/common/misc.c @@ -29,12 +29,6 @@ #include <idmap.h> #include <directory.h> -#ifdef __lint -#define dgettext(x, y) y -#endif - -#define _(s) dgettext(TEXT_DOMAIN, s) - extern int sid_to_id(char *sid, boolean_t user, uid_t *id); static PyObject * @@ -130,8 +124,5 @@ static PyMethodDef solarismethods[] = { void initmisc(void) { - char *noop; - - noop = _("noop"); PyObject *solaris_misc = Py_InitModule("solaris.misc", solarismethods); } diff --git a/usr/src/pkg/manifests/system-header.mf b/usr/src/pkg/manifests/system-header.mf index b152b2179e..72efa63d8e 100644 --- a/usr/src/pkg/manifests/system-header.mf +++ b/usr/src/pkg/manifests/system-header.mf @@ -1263,6 +1263,7 @@ file path=usr/include/sys/neti.h file path=usr/include/sys/netstack.h file path=usr/include/sys/nexusdefs.h file path=usr/include/sys/note.h +file path=usr/include/sys/null.h file path=usr/include/sys/nvpair.h file path=usr/include/sys/nvpair_impl.h file path=usr/include/sys/objfs.h diff --git a/usr/src/ucbhead/dbm.h b/usr/src/ucbhead/dbm.h index da9110584b..4cbff5d309 100644 --- a/usr/src/ucbhead/dbm.h +++ b/usr/src/ucbhead/dbm.h @@ -40,7 +40,8 @@ #ifndef _DBM_H #define _DBM_H -#pragma ident "%Z%%M% %I% %E% SMI" +#include <sys/isa_defs.h> +#include <sys/null.h> #ifdef __cplusplus extern "C" { @@ -50,10 +51,6 @@ extern "C" { #define DBLKSIZ 4096 #define BYTESIZ 8 -#ifndef NULL -#define NULL ((char *) 0) -#endif - long bitno; long maxbno; long blkno; diff --git a/usr/src/ucbhead/stdio.h b/usr/src/ucbhead/stdio.h index dd6cc3bce9..1ba873295e 100644 --- a/usr/src/ucbhead/stdio.h +++ b/usr/src/ucbhead/stdio.h @@ -48,6 +48,7 @@ #include <sys/va_list.h> #include <stdio_tag.h> #include <stdio_impl.h> +#include <sys/null.h> #ifdef __cplusplus extern "C" { @@ -77,10 +78,6 @@ typedef long ssize_t; typedef long fpos_t; -#ifndef NULL -#define NULL 0 -#endif - #define BUFSIZ 1024 #if defined(__i386) diff --git a/usr/src/ucbhead/sys/param.h b/usr/src/ucbhead/sys/param.h index dfd47aeb9d..b3927a6132 100644 --- a/usr/src/ucbhead/sys/param.h +++ b/usr/src/ucbhead/sys/param.h @@ -40,8 +40,6 @@ #ifndef _SYS_PARAM_H #define _SYS_PARAM_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Fundamental variables; don't change too often. @@ -128,12 +126,6 @@ extern "C" { #define NBPS 0x20000 /* Number of bytes per segment */ #define NBPW sizeof (int) /* number of bytes in an integer */ -#if defined(_LP64) && !defined(__cplusplus) -#define NULL 0L -#else -#define NULL 0 -#endif - #define CMASK 0 /* default mask for file creation */ #define CDLIMIT (1L<<11) /* default max write address */ #define NODEV (dev_t)(-1) diff --git a/usr/src/ucbhead/unistd.h b/usr/src/ucbhead/unistd.h index 420e070285..a527305094 100644 --- a/usr/src/ucbhead/unistd.h +++ b/usr/src/ucbhead/unistd.h @@ -40,9 +40,8 @@ #ifndef _UNISTD_H #define _UNISTD_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/fcntl.h> +#include <sys/null.h> #ifdef __cplusplus extern "C" { diff --git a/usr/src/uts/common/fs/nfs/nfs_strerror.c b/usr/src/uts/common/fs/nfs/nfs_strerror.c index 8fa36b5e93..40fdf070b0 100644 --- a/usr/src/uts/common/fs/nfs/nfs_strerror.c +++ b/usr/src/uts/common/fs/nfs/nfs_strerror.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This file contains code to support better NFS error messages. Death to * integer codes in user error messages! @@ -35,15 +33,12 @@ */ #include <nfs/nfs.h> +#include <sys/null.h> #include <sys/systm.h> #include <sys/cmn_err.h> #include <sys/errno.h> #include <sys/varargs.h> -#ifndef NULL -#define NULL 0 -#endif - /* size of a temporary printf format buffer. */ #define FMT_BUF_SIZE 1024 diff --git a/usr/src/uts/common/io/hxge/hxge_main.c b/usr/src/uts/common/io/hxge/hxge_main.c index 12e43ecedb..102b7cb285 100644 --- a/usr/src/uts/common/io/hxge/hxge_main.c +++ b/usr/src/uts/common/io/hxge/hxge_main.c @@ -22,6 +22,7 @@ * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * Copyright 2012 Milan Jurik. All rights reserved. + * Copyright 2016 OmniTI Computer Consulting, Inc. All rights reserved. */ /* @@ -3321,7 +3322,7 @@ hxge_m_getprop(void *barg, const char *pr_name, mac_prop_id_t pr_num, break; default: - err = EINVAL; + err = ENOTSUP; break; } @@ -3433,7 +3434,7 @@ hxge_set_priv_prop(p_hxge_t hxgep, const char *pr_name, uint_t pr_valsize, err = hxge_param_set_ip_opt(hxgep, NULL, NULL, (char *)pr_val, (caddr_t)¶m_arr[param_class_opt_ipv6_sctp]); } else { - err = EINVAL; + err = ENOTSUP; } HXGE_DEBUG_MSG((hxgep, DLADM_CTL, @@ -3503,7 +3504,7 @@ hxge_get_priv_prop(p_hxge_t hxgep, const char *pr_name, uint_t pr_valsize, value = (int)param_arr[param_class_opt_ipv6_sctp].value; } else { - err = EINVAL; + err = ENOTSUP; } if (err == 0) { diff --git a/usr/src/uts/common/io/igb/igb_gld.c b/usr/src/uts/common/io/igb/igb_gld.c index a97dc5aee1..d754c79949 100644 --- a/usr/src/uts/common/io/igb/igb_gld.c +++ b/usr/src/uts/common/io/igb/igb_gld.c @@ -27,6 +27,7 @@ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2013, Nexenta Systems, Inc. All rights reserved. * Copyright 2014 Pluribus Networks Inc. + * Copyright 2016 OmniTI Computer Consulting, Inc. All rights reserved. */ #include "igb_sw.h" @@ -1116,7 +1117,7 @@ setup_link: err = igb_set_priv_prop(igb, pr_name, pr_valsize, pr_val); break; default: - err = EINVAL; + err = ENOTSUP; break; } @@ -1218,7 +1219,7 @@ igb_m_getprop(void *arg, const char *pr_name, mac_prop_id_t pr_num, err = igb_get_priv_prop(igb, pr_name, pr_valsize, pr_val); break; default: - err = EINVAL; + err = ENOTSUP; break; } return (err); diff --git a/usr/src/uts/common/io/ixgbe/ixgbe_gld.c b/usr/src/uts/common/io/ixgbe/ixgbe_gld.c index bfce23ddd9..4501451d99 100644 --- a/usr/src/uts/common/io/ixgbe/ixgbe_gld.c +++ b/usr/src/uts/common/io/ixgbe/ixgbe_gld.c @@ -26,6 +26,7 @@ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2012 Nexenta Systems, Inc. All rights reserved. + * Copyright 2016 OmniTI Computer Consulting, Inc. All rights reserved. */ #include "ixgbe_sw.h" @@ -431,7 +432,7 @@ setup_link: err = ixgbe_set_priv_prop(ixgbe, pr_name, pr_valsize, pr_val); break; default: - err = EINVAL; + err = ENOTSUP; break; } mutex_exit(&ixgbe->gen_lock); @@ -504,7 +505,7 @@ ixgbe_m_getprop(void *arg, const char *pr_name, mac_prop_id_t pr_num, pr_valsize, pr_val); break; default: - err = EINVAL; + err = ENOTSUP; break; } return (err); diff --git a/usr/src/uts/common/io/nxge/nxge_main.c b/usr/src/uts/common/io/nxge/nxge_main.c index e07682c932..a2ef343c76 100644 --- a/usr/src/uts/common/io/nxge/nxge_main.c +++ b/usr/src/uts/common/io/nxge/nxge_main.c @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2016 OmniTI Computer Consulting, Inc. All rights reserved. */ /* @@ -5136,7 +5137,7 @@ nxge_set_priv_prop(p_nxge_t nxgep, const char *pr_name, uint_t pr_valsize, return (err); } - return (EINVAL); + return (ENOTSUP); } static int @@ -5145,7 +5146,7 @@ nxge_get_priv_prop(p_nxge_t nxgep, const char *pr_name, uint_t pr_valsize, { p_nxge_param_t param_arr = nxgep->param_arr; char valstr[MAXNAMELEN]; - int err = EINVAL; + int err = ENOTSUP; uint_t strsize; NXGE_DEBUG_MSG((nxgep, NXGE_CTL, diff --git a/usr/src/uts/common/io/vnic/vnic_dev.c b/usr/src/uts/common/io/vnic/vnic_dev.c index 8d5af8af84..3cb7e7660a 100644 --- a/usr/src/uts/common/io/vnic/vnic_dev.c +++ b/usr/src/uts/common/io/vnic/vnic_dev.c @@ -21,6 +21,7 @@ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2015 Joyent, Inc. + * Copyright 2016 OmniTI Computer Consulting, Inc. All rights reserved. */ #include <sys/types.h> @@ -1159,7 +1160,7 @@ vnic_m_getprop(void *arg, const char *pr_name, mac_prop_id_t pr_num, (void) snprintf(pr_val, pr_valsize, "%d", vn->vn_ls); break; default: - ret = EINVAL; + ret = ENOTSUP; break; } diff --git a/usr/src/uts/common/os/iscsiboot_prop.c b/usr/src/uts/common/os/iscsiboot_prop.c index e803fefc0f..6510c343bd 100644 --- a/usr/src/uts/common/os/iscsiboot_prop.c +++ b/usr/src/uts/common/os/iscsiboot_prop.c @@ -29,6 +29,7 @@ */ #include <sys/types.h> +#include <sys/null.h> #include <sys/bootprops.h> #include <sys/cmn_err.h> #include <sys/socket.h> @@ -46,10 +47,6 @@ int iscsi_print_bootprop = 0; #define ISCSI_BOOTPROP_BUFLEN 256 -#ifndef NULL -#define NULL 0 -#endif - static int replace_sp_c(unsigned char *dst, unsigned char *source, size_t n); static void diff --git a/usr/src/uts/common/rpc/types.h b/usr/src/uts/common/rpc/types.h index 59258793e4..2378e8c9af 100644 --- a/usr/src/uts/common/rpc/types.h +++ b/usr/src/uts/common/rpc/types.h @@ -35,12 +35,11 @@ #ifndef _RPC_TYPES_H #define _RPC_TYPES_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Rpc additions to <sys/types.h> */ #include <sys/types.h> +#include <sys/null.h> #ifdef __cplusplus extern "C" { @@ -83,10 +82,6 @@ typedef long rpc_inline_t; #define TRUE (1) #endif -#ifndef NULL -#define NULL 0 -#endif - #ifndef _KERNEL #define mem_alloc(bsize) malloc(bsize) #define mem_free(ptr, bsize) free(ptr) diff --git a/usr/src/uts/common/sys/Makefile b/usr/src/uts/common/sys/Makefile index 779e388f83..abc0c72941 100644 --- a/usr/src/uts/common/sys/Makefile +++ b/usr/src/uts/common/sys/Makefile @@ -419,6 +419,7 @@ CHKHDRS= \ netstack.h \ nexusdefs.h \ note.h \ + null.h \ nvpair.h \ nvpair_impl.h \ objfs.h \ diff --git a/usr/src/uts/common/sys/null.h b/usr/src/uts/common/sys/null.h new file mode 100644 index 0000000000..da580d05c4 --- /dev/null +++ b/usr/src/uts/common/sys/null.h @@ -0,0 +1,29 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright 2014-2016 PALO, Richard. + */ + +#ifndef _SYS_NULL_H +#define _SYS_NULL_H + +#ifndef NULL + +#if defined(_LP64) +#define NULL 0L +#else +#define NULL 0 +#endif + +#endif /* NULL */ + +#endif /* _SYS_NULL_H */ diff --git a/usr/src/uts/common/sys/param.h b/usr/src/uts/common/sys/param.h index 12bdc29079..ea2fdfd886 100644 --- a/usr/src/uts/common/sys/param.h +++ b/usr/src/uts/common/sys/param.h @@ -45,6 +45,7 @@ #include <sys/isa_defs.h> #endif /* _ASM */ +#include <sys/null.h> #ifdef __cplusplus extern "C" { @@ -147,14 +148,6 @@ extern "C" { #define NBPW sizeof (int) /* number of bytes in an integer */ -#ifndef NULL -#if defined(_LP64) -#define NULL 0L -#else -#define NULL 0 -#endif -#endif - #define CMASK 022 /* default mask for file creation */ #define CDLIMIT (1L<<11) /* default max write address */ #define NBPS 0x20000 /* Number of bytes per segment */ diff --git a/usr/src/uts/common/sys/sysevent.h b/usr/src/uts/common/sys/sysevent.h index 5dcaa69c6d..255e98b871 100644 --- a/usr/src/uts/common/sys/sysevent.h +++ b/usr/src/uts/common/sys/sysevent.h @@ -28,19 +28,12 @@ #define _SYS_SYSEVENT_H #include <sys/nvpair.h> +#include <sys/null.h> #ifdef __cplusplus extern "C" { #endif -#ifndef NULL -#if defined(_LP64) && !defined(__cplusplus) -#define NULL 0L -#else -#define NULL 0 -#endif -#endif - /* Internal registration class and subclass */ #define EC_ALL "register_all_classes" #define EC_SUB_ALL "register_all_subclasses" diff --git a/usr/src/uts/i86pc/os/ibft.c b/usr/src/uts/i86pc/os/ibft.c index bcb8c06d58..fab1324787 100644 --- a/usr/src/uts/i86pc/os/ibft.c +++ b/usr/src/uts/i86pc/os/ibft.c @@ -30,6 +30,7 @@ */ #include <sys/types.h> +#include <sys/null.h> #include <sys/cmn_err.h> #include <sys/socket.h> #include <netinet/in.h> @@ -40,10 +41,6 @@ #include <sys/bootconf.h> #include <sys/reboot.h> -#ifndef NULL -#define NULL 0 -#endif - typedef enum ibft_structure_type { Reserved = 0, Control = 1, |