diff options
author | Garrett D'Amore <garrett@damore.org> | 2014-08-02 18:23:32 -0700 |
---|---|---|
committer | Garrett D'Amore <garrett@damore.org> | 2014-08-15 11:49:54 -0700 |
commit | ba3594ba9b5dd4c846c472a8d657edcb7c8109ac (patch) | |
tree | 1e072a76d8376217ff49110ecdc09171d2d8a07c | |
parent | d8ccf998f9c944b8cf27ed840c376f9b79ebce5c (diff) | |
download | illumos-joyent-ba3594ba9b5dd4c846c472a8d657edcb7c8109ac.tar.gz |
5066 remove support for non-ANSI compilation
5068 Remove SCCSID() macro from <macros.h>
Reviewed by: Keith Wesolowski <keith.wesolowski@joyent.com>
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Approved by: Robert Mustacchi <rm@joyent.com>
200 files changed, 431 insertions, 4604 deletions
diff --git a/usr/src/head/aio.h b/usr/src/head/aio.h index 0a6d035461..ee2fb776ee 100644 --- a/usr/src/head/aio.h +++ b/usr/src/head/aio.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _AIO_H #define _AIO_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/feature_tests.h> #include <sys/types.h> #include <sys/fcntl.h> @@ -104,7 +104,6 @@ extern "C" { /* * function prototypes */ -#if defined(__STDC__) extern int aio_read(aiocb_t *); extern int aio_write(aiocb_t *); extern int lio_listio(int, @@ -137,32 +136,6 @@ extern int aio_waitn64(aiocb64_t *[], uint_t, uint_t *, const struct timespec *); #endif /* _LARGEFILE64_SOURCE */ -#else -extern int aio_read(); -extern int aio_write(); -extern int lio_listio(); -extern int aio_error(); -extern ssize_t aio_return(); -extern int aio_cancel(); -extern int aio_suspend(); -extern int aio_fsync(); -extern int aio_waitn(); - -#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ - !defined(__PRAGMA_REDEFINE_EXTNAME)) -extern int aio_read64(); -extern int aio_write64(); -extern int lio_listio64(); -extern int aio_error64(); -extern ssize_t aio_return64(); -extern int aio_cancel64(); -extern int aio_suspend64(); -extern int aio_fsync64(); -extern int aio_waitn64(); -#endif /* _LARGEFILE64_SOURCE */ - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/alloca.h b/usr/src/head/alloca.h index 29fe0fed76..23e890d8e8 100644 --- a/usr/src/head/alloca.h +++ b/usr/src/head/alloca.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _ALLOCA_H #define _ALLOCA_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #ifdef __cplusplus @@ -56,19 +56,11 @@ extern "C" { defined(__sparc) || defined(__i386) || defined(__amd64) #define alloca(x) __builtin_alloca(x) -#ifdef __STDC__ extern void *__builtin_alloca(size_t); -#else -extern void *__builtin_alloca(); -#endif #else -#ifdef __STDC__ extern void *alloca(size_t); -#else -extern void *alloca(); -#endif #endif /* defined(__BUILTIN_VA_ARG_INCR) || defined(__sparc) ... */ diff --git a/usr/src/head/apptrace_impl.h b/usr/src/head/apptrace_impl.h index cf92bb2b2e..e39c71b937 100644 --- a/usr/src/head/apptrace_impl.h +++ b/usr/src/head/apptrace_impl.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -26,8 +28,6 @@ #ifndef _APPTRACE_IMPL_H #define _APPTRACE_IMPL_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -46,8 +46,6 @@ extern struct liblist *__abi_pflib_list; extern sigset_t abisigset; -#ifdef __STDC__ - extern void abilock(sigset_t *); extern void abiunlock(sigset_t *); @@ -60,20 +58,6 @@ extern int (*abi_sigaction)(int, const struct sigaction *, struct sigaction *); extern int (*abi_mutex_lock)(mutex_t *); extern int (*abi_mutex_unlock)(mutex_t *); -#else /* __STDC__ */ - -extern void abilock(); -extern void abiunlock(); -extern int is_empty_string(); -extern int (*abi_thr_main)(); -extern thread_t (*abi_thr_self)(); -extern int (*abi_sigsetmask)(); -extern int (*abi_sigaction)(); -extern int (*abi_mutex_lock)(); -extern int (*abi_mutex_unlock)(); - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/arpa/inet.h b/usr/src/head/arpa/inet.h index be7074c68e..2d6b843946 100644 --- a/usr/src/head/arpa/inet.h +++ b/usr/src/head/arpa/inet.h @@ -18,6 +18,8 @@ * * CDDL HEADER END * + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * @@ -54,7 +56,6 @@ extern "C" { * External definitions for * functions in inet(3N) */ -#ifdef __STDC__ #if !defined(_XPG4_2) || defined(__EXTENSIONS__) extern int inet_net_pton(int, const char *, void *, size_t); extern boolean_t inet_matchaddr(const void *, const char *); @@ -88,24 +89,6 @@ extern int inet_aton(const char *, struct in_addr *); extern uint_t inet_nsap_addr(const char *, uchar_t *, int); extern char *inet_nsap_ntoa(int, const uchar_t *, char *); -#else -unsigned long inet_addr(); -char *inet_ntoa(); -/* - * With the introduction of CIDR the - * following 4 routines are now considered to be Obsolete - */ -struct in_addr inet_makeaddr(); -unsigned long inet_network(); -extern unsigned long inet_lnaof(); -extern unsigned long inet_netof(); - -extern int inet_pton(); -extern const char *inet_ntop(); -extern int inet_aton(); - -#endif - #ifdef __cplusplus } #endif diff --git a/usr/src/head/assert.h b/usr/src/head/assert.h index b088033ef6..4a8d36a282 100644 --- a/usr/src/head/assert.h +++ b/usr/src/head/assert.h @@ -22,8 +22,9 @@ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ - /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,21 +32,15 @@ #ifndef _ASSERT_H #define _ASSERT_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.6.1.4 */ - #ifdef __cplusplus extern "C" { #endif -#if defined(__STDC__) #if __STDC_VERSION__ - 0 >= 199901L extern void __assert_c99(const char *, const char *, int, const char *); #else extern void __assert(const char *, const char *, int); #endif /* __STDC_VERSION__ - 0 >= 199901L */ -#else -extern void _assert(); -#endif #ifdef __cplusplus } @@ -68,15 +63,11 @@ extern void _assert(); #else -#if defined(__STDC__) #if __STDC_VERSION__ - 0 >= 199901L #define assert(EX) (void)((EX) || \ (__assert_c99(#EX, __FILE__, __LINE__, __func__), 0)) #else #define assert(EX) (void)((EX) || (__assert(#EX, __FILE__, __LINE__), 0)) #endif /* __STDC_VERSION__ - 0 >= 199901L */ -#else -#define assert(EX) (void)((EX) || (_assert("EX", __FILE__, __LINE__), 0)) -#endif /* __STDC__ */ #endif /* NDEBUG */ diff --git a/usr/src/head/attr.h b/usr/src/head/attr.h index 9c394412a1..bca7fbcb47 100644 --- a/usr/src/head/attr.h +++ b/usr/src/head/attr.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -26,8 +28,6 @@ #ifndef _ATTR_H #define _ATTR_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.6.1.7 */ - #include <sys/types.h> #include <sys/nvpair.h> #include <sys/attr.h> @@ -36,22 +36,11 @@ extern "C" { #endif -#if defined(__STDC__) - extern int getattrat(int, xattr_view_t, const char *, nvlist_t **); extern int fgetattr(int, xattr_view_t, nvlist_t **); extern int setattrat(int, xattr_view_t, const char *, nvlist_t *); extern int fsetattr(int, xattr_view_t, nvlist_t *); -#else /* defined(__STDC__) */ - -extern int getattrat(); -extern int fgetattr(); -extern int setattrat(); -extern int fsetattr(); - -#endif /* defined(__STDC__) */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/auth_attr.h b/usr/src/head/auth_attr.h index eee56faaac..32be62f9d2 100644 --- a/usr/src/head/auth_attr.h +++ b/usr/src/head/auth_attr.h @@ -20,14 +20,13 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> * Copyright (c) 1999 by Sun Microsystems, Inc. All rights reserved. */ #ifndef _AUTH_ATTR_H #define _AUTH_ATTR_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -90,7 +89,6 @@ typedef struct authattr_s { kva_t *attr; /* array of key-value pair attributes */ } authattr_t; -#ifdef __STDC__ extern authattr_t *getauthnam(const char *); extern authattr_t *getauthattr(void); extern void setauthattr(void); @@ -98,16 +96,6 @@ extern void endauthattr(void); extern void free_authattr(authattr_t *); extern int chkauthattr(const char *, const char *); -#else /* not __STDC__ */ - -extern authattr_t *getauthnam(); -extern authattr_t *getauthattr(); -extern void setauthattr(); -extern void endauthattr(); -extern void free_authattr(); -extern int chkauthattr(); -#endif - #ifdef __cplusplus } #endif diff --git a/usr/src/head/config_admin.h b/usr/src/head/config_admin.h index aec3197179..b9ec606ace 100644 --- a/usr/src/head/config_admin.h +++ b/usr/src/head/config_admin.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 1998-2002 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _SYS_CONFIG_ADMIN_H #define _SYS_CONFIG_ADMIN_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * config_admin.h * @@ -176,8 +176,6 @@ typedef enum { } cfga_err_t; -#if defined(__STDC__) - /* * config_admin.3x library interfaces */ @@ -256,13 +254,6 @@ cfga_err_t cfga_list(const char *, struct cfga_stat_data **, int *, #endif /* CFGA_PLUGIN_LIB */ -#else /* !defined __STDC__ */ - -extern const char *config_strerror(); -extern int config_ap_id_cmp(); - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/crypt.h b/usr/src/head/crypt.h index eed8448f96..e434886083 100644 --- a/usr/src/head/crypt.h +++ b/usr/src/head/crypt.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,8 +32,6 @@ #ifndef _CRYPT_H #define _CRYPT_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - #include <pwd.h> #ifdef __cplusplus @@ -42,7 +42,6 @@ extern "C" { #define CRYPT_MAXCIPHERTEXTLEN 512 -#if defined(__STDC__) extern char *crypt(const char *, const char *); extern char *crypt_gensalt(const char *, const struct passwd *); extern char *crypt_genhash_impl(char *, size_t, const char *, @@ -57,20 +56,6 @@ extern void encrypt(char *, int); extern int run_crypt(long, char *, unsigned, int *); extern int run_setkey(int *, const char *); extern void setkey(const char *); -#else -extern char *crypt(); -extern char *crypt_gensalt(); -extern char *crypt_genhash_impl(); -extern char *crytp_gensalt_impl(); -extern int crypt_close(); -extern char *des_crypt(); -extern void des_encrypt(); -extern void des_setkey(); -extern void encrypt(); -extern int run_crypt(); -extern int run_setkey(); -extern void setkey(); -#endif #ifdef __cplusplus } diff --git a/usr/src/head/ctype.h b/usr/src/head/ctype.h index 213bcb9582..47e0d8894f 100644 --- a/usr/src/head/ctype.h +++ b/usr/src/head/ctype.h @@ -24,12 +24,11 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -/* - * Copyright 2014 Garrett D'Amore <garrett@damore.org> - */ #ifndef _CTYPE_H #define _CTYPE_H @@ -64,8 +63,6 @@ using std::isblank; extern "C" { #endif -#if defined(__STDC__) - #if defined(__EXTENSIONS__) || \ ((!defined(_STRICT_STDC) && !defined(_POSIX_C_SOURCE)) || \ defined(_XOPEN_SOURCE)) @@ -113,19 +110,6 @@ extern int isxdigit_l(int, locale_t); #endif /* defined(_XPG7) || !defined(_STRICT_SYMBOLS) */ -#else /* defined(__STDC__) */ - -#if !defined(__lint) - -#define isascii(c) (!(((int)(c)) & ~0177)) -#define _toupper(c) (isascii(c) ? __trans_upper[(int)(c)] : toupper(c)) -#define _tolower(c) (isascii(c) ? __trans_lower[(int)(c)] : tolower(c)) -#define toascii(c) (((int)(c)) & 0177) - -#endif /* !defined(__lint) */ - -#endif /* defined(__STDC__) */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/deflt.h b/usr/src/head/deflt.h index 61941f6404..f680b16cc8 100644 --- a/usr/src/head/deflt.h +++ b/usr/src/head/deflt.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -59,7 +61,6 @@ extern "C" { #define DC_STD ((0) | (DC_CASE)) -#ifdef __STDC__ extern int defcntl(int, int); extern int defopen(char *); extern char *defread(char *); @@ -68,16 +69,6 @@ extern int defcntl_r(int, int, void *); extern void *defopen_r(const char *); extern char *defread_r(const char *, void *); extern void defclose_r(void *); -#else -extern int defcntl(); -extern int defopen(); -extern char *defread(); - -extern int defcntl_r(); -extern void *defopen_r(); -extern char *defread_r(); -extern void defclose_r(); -#endif #define TURNON(flags, mask) ((flags) |= (mask)) #define TURNOFF(flags, mask) ((flags) &= ~(mask)) diff --git a/usr/src/head/dial.h b/usr/src/head/dial.h index d3cb004644..d173427139 100644 --- a/usr/src/head/dial.h +++ b/usr/src/head/dial.h @@ -19,15 +19,15 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - #ifndef _DIAL_H #define _DIAL_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */ - #ifndef IUCLC #include <sys/termio.h> #endif @@ -76,18 +76,9 @@ typedef struct { int dev_len; /* unused */ } CALL; -#if defined(__STDC__) - extern int dial(CALL); extern void undial(int); -#else - -extern int dial(); -extern void undial(); - -#endif - #ifdef __cplusplus } #endif diff --git a/usr/src/head/dirent.h b/usr/src/head/dirent.h index 56bbc4f018..a9370f84b2 100644 --- a/usr/src/head/dirent.h +++ b/usr/src/head/dirent.h @@ -20,6 +20,8 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,8 +32,6 @@ #ifndef _DIRENT_H #define _DIRENT_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.6.1.5 */ - #include <sys/feature_tests.h> #include <sys/types.h> @@ -69,8 +69,6 @@ typedef struct { #endif /* !defined(__XOPEN_OR_POSIX) */ -#if defined(__STDC__) - /* large file compilation environment setup */ #if !defined(_LP64) && _FILE_OFFSET_BITS == 64 #ifdef __PRAGMA_REDEFINE_EXTNAME @@ -133,31 +131,6 @@ extern int alphasort64(const struct dirent64 **, const struct dirent64 **); #endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) */ #endif -#else - -extern DIR *opendir(); -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ - defined(_ATFILE_SOURCE) -extern DIR *fdopendir(); -extern int dirfd(); -#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ -extern struct dirent *readdir(); -#if defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) || \ - defined(_XOPEN_SOURCE) -extern long telldir(); -extern void seekdir(); -#endif /* defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) ... */ -extern void rewinddir(); -extern int closedir(); - -/* transitional large file interface */ -#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ - !defined(__PRAGMA_REDEFINE_EXTNAME)) -extern struct dirent64 *readdir64(); -#endif - -#endif - #if defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) || \ defined(_XOPEN_SOURCE) #define rewinddir(dirp) seekdir(dirp, 0L) @@ -182,8 +155,6 @@ extern struct dirent64 *readdir64(); !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE - 0 >= 199506L) || \ defined(_POSIX_PTHREAD_SEMANTICS) -#if defined(__STDC__) - #if !defined(_LP64) && _FILE_OFFSET_BITS == 32 #if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) @@ -243,66 +214,6 @@ extern int readdir64_r(DIR *_RESTRICT_KYWD, struct dirent64 *_RESTRICT_KYWD, struct dirent64 **_RESTRICT_KYWD); #endif -#else /* __STDC__ */ - -#if !defined(_LP64) && _FILE_OFFSET_BITS == 32 - -#if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) - -#ifdef __PRAGMA_REDEFINE_EXTNAME -#pragma redefine_extname readdir_r __posix_readdir_r -extern int readdir_r(); -#else /* __PRAGMA_REDEFINE_EXTNAME */ - -extern int __posix_readdir_r(); - -#ifdef __lint -#define readdir_r __posix_readdir_r -#else /* !__lint */ - -static int -readdir_r(DIR *_RESTRICT_KYWD __dp, struct dirent *_RESTRICT_KYWD __ent, - struct dirent **_RESTRICT_KYWD __res) -{ - return (__posix_readdir_r(__dp, __ent, __res)); -} - -#endif /* !__lint */ -#endif /* __PRAGMA_REDEFINE_EXTNAME */ - -#else /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ - -extern struct dirent *readdir_r(); - -#endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ - -#else /* !_LP64 && _FILE_OFFSET_BITS == 32 */ - -#if defined(_LP64) -#ifdef __PRAGMA_REDEFINE_EXTNAME -#pragma redefine_extname readdir64_r readdir_r -#else -#define readdir64_r readdir -#endif -#else /* _LP64 */ -#ifdef __PRAGMA_REDEFINE_EXTNAME -#pragma redefine_extname readdir_r readdir64_r -#else -#define readdir_r readdir64_r -#endif -#endif /* _LP64 */ -extern int readdir_r(); - -#endif /* !_LP64 && _FILE_OFFSET_BITS == 32 */ - -#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ - !defined(__PRAGMA_REDEFINE_EXTNAME)) -/* transitional large file interface */ -extern int readdir64_r(); -#endif - -#endif /* __STDC__ */ - #endif /* defined(__EXTENSIONS__) || defined(_REENTRANT)... */ #ifdef __cplusplus diff --git a/usr/src/head/dlfcn.h b/usr/src/head/dlfcn.h index 5dd3a6b3aa..c3309f7817 100644 --- a/usr/src/head/dlfcn.h +++ b/usr/src/head/dlfcn.h @@ -19,6 +19,7 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. * * Copyright (c) 1989 AT&T @@ -44,21 +45,12 @@ extern "C" { * Information structures for various dlinfo() requests. */ #if !defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__) -#ifdef __STDC__ typedef struct dl_info { const char *dli_fname; /* file containing address range */ void *dli_fbase; /* base address of file image */ const char *dli_sname; /* symbol name */ void *dli_saddr; /* symbol address */ } Dl_info; -#else -typedef struct dl_info { - char *dli_fname; - void *dli_fbase; - char *dli_sname; - void *dli_saddr; -} Dl_info; -#endif /* __STDC__ */ typedef Dl_info Dl_info_t; typedef struct dl_serpath { @@ -114,7 +106,6 @@ typedef ulong_t Lmid_t; /* * Declarations used for dynamic linking support routines. */ -#ifdef __STDC__ extern void *dlopen(const char *, int); extern void *dlsym(void *_RESTRICT_KYWD, const char *_RESTRICT_KYWD); extern int dlclose(void *); @@ -127,20 +118,6 @@ extern int dldump(const char *, const char *, int); extern int dlinfo(void *, int, void *); extern Dl_amd64_unwindinfo *dlamd64getunwind(void *, Dl_amd64_unwindinfo *); #endif /* !defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__) */ -#else -extern void *dlopen(); -extern void *dlsym(); -extern int dlclose(); -extern char *dlerror(); -#if !defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__) -extern void *dlmopen(); -extern int dladdr(); -extern int dladdr1(); -extern int dldump(); -extern int dlinfo(); -extern Dl_amd64_unwindinfo *dlamd64getunwind(); -#endif /* !defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__) */ -#endif /* __STDC__ */ #pragma unknown_control_flow(dlopen, dlsym, dlclose, dlerror) #if !defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__) diff --git a/usr/src/head/euc.h b/usr/src/head/euc.h index 4e6d4f90a9..ff4194eda4 100644 --- a/usr/src/head/euc.h +++ b/usr/src/head/euc.h @@ -19,6 +19,9 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ @@ -26,24 +29,17 @@ #ifndef _EUC_H #define _EUC_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/euc.h> #ifdef __cplusplus extern "C" { #endif -#ifdef __STDC__ extern int csetcol(int n); /* Returns # of columns for codeset n. */ extern int csetlen(int n); /* Returns # of bytes excluding SSx. */ extern int euclen(const unsigned char *s); extern int euccol(const unsigned char *s); extern int eucscol(const unsigned char *str); -#else /* __STDC__ */ -extern int csetlen(), csetcol(); -extern int euclen(), euccol(), eucscol(); -#endif /* __STDC__ */ /* Returns code set number for the first byte of an EUC char. */ #define csetno(c) \ @@ -52,7 +48,6 @@ extern int euclen(), euccol(), eucscol(); /* * Copied from _wchar.h of SVR4 */ -#if defined(__STDC__) #define multibyte (__ctype[520] > 1) #define eucw1 __ctype[514] #define eucw2 __ctype[515] @@ -60,15 +55,6 @@ extern int euclen(), euccol(), eucscol(); #define scrw1 __ctype[517] #define scrw2 __ctype[518] #define scrw3 __ctype[519] -#else -#define multibyte (_ctype[520] > 1) -#define eucw1 _ctype[514] -#define eucw2 _ctype[515] -#define eucw3 _ctype[516] -#define scrw1 _ctype[517] -#define scrw2 _ctype[518] -#define scrw3 _ctype[519] -#endif #ifdef __cplusplus } diff --git a/usr/src/head/exec_attr.h b/usr/src/head/exec_attr.h index 8c3eb38331..c3660de425 100644 --- a/usr/src/head/exec_attr.h +++ b/usr/src/head/exec_attr.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -129,7 +131,6 @@ typedef struct __private_execattr { } _priv_execattr; /* Un-supported. For Sun internal use only */ -#ifdef __STDC__ extern execattr_t *getexecattr(void); extern execattr_t *getexecuser(const char *, const char *, const char *, int); extern execattr_t *getexecprof(const char *, const char *, const char *, int); @@ -139,17 +140,6 @@ extern void free_execattr(execattr_t *); extern void setexecattr(void); extern void endexecattr(void); -#else /* not __STDC__ */ - -extern execattr_t *getexecattr(); -extern execattr_t *getexecuser(); -extern execattr_t *getexecprof(); -extern execattr_t *match_execattr(); -extern void setexecattr(); -extern void endexecattr(); -extern void free_execattr(); -#endif - #ifdef __cplusplus } #endif diff --git a/usr/src/head/execinfo.h b/usr/src/head/execinfo.h index 10aa4cb346..c4e954b773 100644 --- a/usr/src/head/execinfo.h +++ b/usr/src/head/execinfo.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -26,8 +28,6 @@ #ifndef _EXECINFO_H #define _EXECINFO_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * These functions provide glibc-compatible backtrace functionality. * Improved functionality is available using Solaris-specific APIs; @@ -37,15 +37,9 @@ extern "C" { #endif -#if defined(__STDC__) extern int backtrace(void **, int); extern char **backtrace_symbols(void *const *, int); extern void backtrace_symbols_fd(void *const *, int, int); -#else -extern int backtrace(); -extern char **backtrace_symbols(); -extern void backtrace_symbols_fd(); -#endif #ifdef __cplusplus } diff --git a/usr/src/head/fcntl.h b/usr/src/head/fcntl.h index 862981d001..f3f76d5205 100644 --- a/usr/src/head/fcntl.h +++ b/usr/src/head/fcntl.h @@ -20,6 +20,8 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,8 +32,6 @@ #ifndef _FCNTL_H #define _FCNTL_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.6.1.7 */ - #include <sys/feature_tests.h> #if defined(__EXTENSIONS__) || defined(_XPG4) #include <sys/stat.h> @@ -128,8 +128,6 @@ extern "C" { #endif #endif /* _LP64 && _LARGEFILE64_SOURCE */ -#if defined(__STDC__) - extern int fcntl(int, int, ...); extern int open(const char *, int, ...); extern int creat(const char *, mode_t); @@ -162,43 +160,6 @@ extern int attropen64(const char *, const char *, int, ...); #endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ #endif -#else /* defined(__STDC__) */ - -extern int fcntl(); -extern int open(); -extern int creat(); -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__) -extern int posix_fadvise(); -extern int posix_fallocate(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || ... */ -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ - defined(_ATFILE_SOURCE) -extern int openat(); -extern int attropen(); -#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ - -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) -extern int directio(); -#endif - -/* transitional large file interface versions */ -#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ - !defined(__PRAGMA_REDEFINE_EXTNAME)) -extern int open64(); -extern int creat64(); -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__) -extern int posix_fadvise64(); -extern int posix_fallocate64(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || ... */ -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ - defined(_ATFILE_SOURCE) -extern int openat64(); -extern int attropen64(); -#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ -#endif - -#endif /* defined(__STDC__) */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/float.h b/usr/src/head/float.h index a3e2dd6c4f..9e0fe24f80 100644 --- a/usr/src/head/float.h +++ b/usr/src/head/float.h @@ -24,6 +24,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,8 +33,6 @@ #ifndef _FLOAT_H #define _FLOAT_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/feature_tests.h> #ifdef __cplusplus @@ -41,20 +41,13 @@ extern "C" { #if defined(__sparc) -#if defined(__STDC__) extern int __flt_rounds(void); -#else /* defined(__STDC__) */ -extern int __flt_rounds(); -#endif /* defined(__STDC__) */ #define FLT_ROUNDS __flt_rounds() #else /* defined(__sparc) */ -#if defined(__STDC__) extern int __fltrounds(void); -#else /* defined (__STDC__) */ -extern int __fltrounds(); -#endif /* defined(__STDC__) */ + #if defined(__amd64) #define FLT_ROUNDS __fltrounds() #else /* defined(__amd64) */ diff --git a/usr/src/head/fmtmsg.h b/usr/src/head/fmtmsg.h index de78bc53a9..209439f066 100644 --- a/usr/src/head/fmtmsg.h +++ b/usr/src/head/fmtmsg.h @@ -24,6 +24,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 1996-2003 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,8 +33,6 @@ #ifndef _FMTMSG_H #define _FMTMSG_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3 */ - #include <sys/feature_tests.h> #ifdef __cplusplus @@ -197,19 +197,11 @@ extern "C" { /* Function definition */ #if !defined(_XPG4_2) || defined(__EXTENSIONS__) -#if defined(__STDC__) int addseverity(int, const char *); -#else /* __STDC__ */ -int addseverity(); -#endif /* __STDC__ */ #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ -#if defined(__STDC__) int fmtmsg(long, const char *, int, const char *, const char *, const char *); -#else /* __STDC__ */ -int fmtmsg(); -#endif /* __STDC__ */ #ifdef __cplusplus } diff --git a/usr/src/head/fnmatch.h b/usr/src/head/fnmatch.h index b03dda5470..bfb4b925c0 100644 --- a/usr/src/head/fnmatch.h +++ b/usr/src/head/fnmatch.h @@ -20,6 +20,7 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> * Copyright (c) 1994 by Sun Microsystems, Inc. * Copyright 1985, 1994 by Mortice Kern Systems Inc. All rights reserved. */ @@ -27,8 +28,6 @@ #ifndef _FNMATCH_H #define _FNMATCH_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -43,11 +42,7 @@ extern "C" { #define FNM_ERROR 2 /* error occured */ #define FNM_NOSYS 3 /* Function (XPG4) not supported */ -#if defined(__STDC__) extern int fnmatch(const char *, const char *, int); -#else -extern int fnmatch(); -#endif #ifdef __cplusplus } diff --git a/usr/src/head/ftw.h b/usr/src/head/ftw.h index 2ff6c4a243..b3afc676f0 100644 --- a/usr/src/head/ftw.h +++ b/usr/src/head/ftw.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,8 +32,6 @@ #ifndef _FTW_H #define _FTW_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/feature_tests.h> #include <sys/types.h> @@ -122,8 +122,6 @@ struct FTW #endif /* __PRAGMA_REDEFINE_EXTNAME */ #endif /* _LP64 && _LARGEFILE64_SOURCE */ -#if defined(__STDC__) - extern int ftw(const char *, int (*)(const char *, const struct stat *, int), int); extern int _xftw(int, const char *, @@ -150,26 +148,6 @@ extern int nftw64(const char *, #endif /* !defined(_XOPEN_SOURCE) */ #endif /* _LARGEFILE64_SOURCE .. */ -#else /* __STDC__ */ - -extern int ftw(), _xftw(); - -#if defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) || defined(_XPG4_2) -extern int nftw(); -#endif /* defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) ... */ - -/* transitional large file interface versions */ -#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ - !defined(__PRAGMA_REDEFINE_EXTNAME)) -extern int ftw64(); -extern int _xftw64(); -#if !defined(_XOPEN_SOURCE) -extern int nftw64(); -#endif /* !defined(_XOPEN_SOURCE) */ -#endif /* _LARGEFILE64_SOURCE .. */ - -#endif /* __STDC__ */ - #define _XFTWVER 2 /* version of file tree walk */ #define ftw(path, fn, depth) _xftw(_XFTWVER, (path), (fn), (depth)) diff --git a/usr/src/head/getopt.h b/usr/src/head/getopt.h index c8b6db4f75..adf98d096c 100644 --- a/usr/src/head/getopt.h +++ b/usr/src/head/getopt.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -32,8 +34,6 @@ #ifndef _GETOPT_H #define _GETOPT_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -67,18 +67,12 @@ extern int optopt; /* * The use of getopt_long_only in new development is strongly discouraged. */ -#ifdef __STDC__ extern int getopt_long(int, char * const *, const char *, const struct option *, int *); extern int getopt_long_only(int, char * const *, const char *, const struct option *, int *); extern int getopt_clip(int, char * const *, const char *, const struct option *, int *); -#else /* __STDC__ */ -extern int getopt_long(); -extern int getopt_long_only(); -extern int getopt_clip(); -#endif /* __STDC__ */ #ifdef __cplusplus } diff --git a/usr/src/head/getwidth.h b/usr/src/head/getwidth.h index c127422841..7e3ca84e30 100644 --- a/usr/src/head/getwidth.h +++ b/usr/src/head/getwidth.h @@ -21,6 +21,8 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 1989 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,19 +33,13 @@ #ifndef _GETWIDTH_H #define _GETWIDTH_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <euc.h> #ifdef __cplusplus extern "C" { #endif -#ifdef __STDC__ extern void getwidth(eucwidth_t *); -#else /* __STDC__ */ -extern void getwidth(); -#endif /* __STDC__ */ #ifdef __cplusplus } diff --git a/usr/src/head/glob.h b/usr/src/head/glob.h index 9468d5f6dd..6396682cbf 100644 --- a/usr/src/head/glob.h +++ b/usr/src/head/glob.h @@ -21,6 +21,7 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> * Copyright 1985, 1992 by Mortice Kern Systems Inc. All rights reserved. */ @@ -159,19 +160,10 @@ typedef struct glob_t { #define globfree _globfree_ext #endif /* __PRAGMA_REDEFINE_EXTNAME */ -#if defined(__STDC__) - extern int glob(const char *_RESTRICT_KYWD, int, int(*)(const char *, int), glob_t *_RESTRICT_KYWD); extern void globfree(glob_t *); -#else /* __STDC__ */ - -extern int glob(); -extern void globfree(); - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/grp.h b/usr/src/head/grp.h index 947328f912..6bfda78d5b 100644 --- a/usr/src/head/grp.h +++ b/usr/src/head/grp.h @@ -24,6 +24,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,8 +33,6 @@ #ifndef _GRP_H #define _GRP_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3.3.1 */ - #include <sys/feature_tests.h> #include <sys/types.h> @@ -52,8 +52,6 @@ struct group { /* see getgrent(3C) */ char **gr_mem; }; -#if defined(__STDC__) - extern struct group *getgrgid(gid_t); /* MT-unsafe */ extern struct group *getgrnam(const char *); /* MT-unsafe */ @@ -72,28 +70,6 @@ extern void setgrent(void); extern struct group *getgrent(void); /* MT-unsafe */ #endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)... */ -#else - -extern struct group *getgrgid(); /* MT-unsafe */ -extern struct group *getgrnam(); /* MT-unsafe */ - -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) -extern struct group *getgrent_r(); -extern struct group *fgetgrent_r(); - -extern struct group *fgetgrent(); /* MT-unsafe */ -extern int initgroups(); -#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) */ - -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) -extern void endgrent(); -extern void setgrent(); -extern struct group *getgrent(); /* MT-unsafe */ -#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)... */ - -#endif /* __STDC__ */ - - /* * getgrgid_r() & getgrnam_r() prototypes are defined here. */ @@ -133,8 +109,6 @@ extern struct group *getgrent(); /* MT-unsafe */ #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) -#if defined(__STDC__) - #if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) #ifdef __PRAGMA_REDEFINE_EXTNAME @@ -180,60 +154,6 @@ extern struct group *getgrnam_r(const char *, struct group *, char *, int); #endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ -#else /* __STDC__ */ - -#if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) - -#ifdef __PRAGMA_REDEFINE_EXTNAME -#pragma redefine_extname getgrgid_r __posix_getgrgid_r -#pragma redefine_extname getgrnam_r __posix_getgrnam_r -extern int getgrgid_r(); -extern int getgrnam_r(); -#else /* __PRAGMA_REDEFINE_EXTNAME */ - -extern int __posix_getgrgid_r(); -extern int __posix_getgrnam_r(); - -#ifdef __lint - -#define getgrgid_r __posix_getgrgid_r -#define getgrnam_r __posix_getgrnam_r - -#else /* !__lint */ - -static int -getgrgid_r(__gid, __grp, __buf, __len, __res) - gid_t __gid; - struct group *__grp; - char *__buf; - int __len; - struct group **__res; -{ - return (__posix_getgrgid_r(__gid, __grp, __buf, __len, __res)); -} -static int -getgrnam_r(__cb, __grp, __buf, __len, __res) - char *__cb; - struct group *__grp; - char *__buf; - int __len; - struct group **__res; -{ - return (__posix_getgrnam_r(__cb, __grp, __buf, __len, __res)); -} - -#endif /* !__lint */ -#endif /* __PRAGMA_REDEFINE_EXTNAME */ - -#else /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ - -extern struct group *getgrgid_r(); -extern struct group *getgrnam_r(); - -#endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ - -#endif /* __STDC__ */ - #endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)... */ #ifdef __cplusplus diff --git a/usr/src/head/iconv.h b/usr/src/head/iconv.h index 9fb7e62d77..7d6230a47a 100644 --- a/usr/src/head/iconv.h +++ b/usr/src/head/iconv.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _ICONV_H #define _ICONV_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/feature_tests.h> #include <sys/types.h> @@ -38,7 +38,6 @@ extern "C" { typedef struct _iconv_info *iconv_t; -#if defined(__STDC__) extern iconv_t iconv_open(const char *, const char *); #ifdef _XPG6 extern size_t iconv(iconv_t, char **_RESTRICT_KYWD, @@ -50,11 +49,6 @@ extern size_t iconv(iconv_t, const char **_RESTRICT_KYWD, size_t *_RESTRICT_KYWD); #endif extern int iconv_close(iconv_t); -#else /* __STDC__ */ -extern iconv_t iconv_open(); -extern size_t iconv(); -extern int iconv_close(); -#endif #ifdef __cplusplus } diff --git a/usr/src/head/ieeefp.h b/usr/src/head/ieeefp.h index ab582df519..0c19be3233 100644 --- a/usr/src/head/ieeefp.h +++ b/usr/src/head/ieeefp.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,8 +33,6 @@ #ifndef _IEEEFP_H #define _IEEEFP_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -69,13 +69,9 @@ typedef enum fpclass_t { FP_PNORM = 9 /* positive normalized non-zero */ } fpclass_t; -#if defined(__STDC__) extern fpclass_t fpclass(double); /* get class of double value */ extern int finite(double); extern int unordered(double, double); -#else -extern fpclass_t fpclass(); /* get class of double value */ -#endif /* * ROUNDING CONTROL ****************************************** @@ -114,16 +110,9 @@ typedef enum fp_rnd { #endif -#if defined(__STDC__) extern fp_rnd fpsetround(fp_rnd); /* set rounding mode, return previous */ extern fp_rnd fpgetround(void); /* return current rounding mode */ -#else -extern fp_rnd fpsetround(); /* set rounding mode, return previous */ -extern fp_rnd fpgetround(); /* return current rounding mode */ - -#endif - /* * EXCEPTION CONTROL ***************************************** * @@ -182,34 +171,18 @@ extern fp_rnd fpgetround(); /* return current rounding mode */ #endif -#if defined(__STDC__) extern fp_except fpgetmask(void); /* current exception mask */ extern fp_except fpsetmask(fp_except); /* set mask, return previous */ extern fp_except fpgetsticky(void); /* return logged exceptions */ extern fp_except fpsetsticky(fp_except); /* change logged exceptions */ -#else -extern fp_except fpgetmask(); /* current exception mask */ -extern fp_except fpsetmask(); /* set mask, return previous */ -extern fp_except fpgetsticky(); /* return logged exceptions */ -extern fp_except fpsetsticky(); /* change logged exceptions */ - -#endif - /* * UTILITY MACROS ******************************************** */ -#if defined(__STDC__) extern int isnanf(float); extern int isnand(double); -#else -extern int isnand(); -#define isnanf(x) (((*(long *)&(x) & 0x7f800000L) == 0x7f800000L) && \ - ((*(long *)&(x) & 0x007fffffL) != 0x00000000L)) -#endif - #if defined(__i386) || defined(__amd64) /* diff --git a/usr/src/head/inttypes.h b/usr/src/head/inttypes.h index e6137d6f93..125fe4e498 100644 --- a/usr/src/head/inttypes.h +++ b/usr/src/head/inttypes.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _INTTYPES_H #define _INTTYPES_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This file, <inttypes.h>, is specified by the ISO C standard, * standard, ISO/IEC 9899:1999 Programming language - C and is @@ -105,7 +105,6 @@ typedef struct { #if (!defined(_XOPEN_SOURCE) || defined(_XPG6)) || defined(_STDC_C99) || \ defined(__EXTENSIONS__) -#ifdef __STDC__ extern intmax_t imaxabs(intmax_t); extern imaxdiv_t imaxdiv(intmax_t, intmax_t); extern intmax_t strtoimax(const char *_RESTRICT_KYWD, char **_RESTRICT_KYWD, @@ -116,14 +115,6 @@ extern intmax_t wcstoimax(const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD, int); extern uintmax_t wcstoumax(const wchar_t *_RESTRICT_KYWD, wchar_t **_RESTRICT_KYWD, int); -#else -extern intmax_t imaxabs(); -extern imaxdiv_t imaxdiv(); -extern intmax_t strtoimax(); -extern uintmax_t strtoumax(); -extern intmax_t wcstoimax(); -extern uintmax_t wcstoumax(); -#endif #endif /* (!defined(_XOPEN_SOURCE) || defined(_XPG6)) ... */ diff --git a/usr/src/head/iso/ctype_iso.h b/usr/src/head/iso/ctype_iso.h index dc736473fd..4df3cd478c 100644 --- a/usr/src/head/iso/ctype_iso.h +++ b/usr/src/head/iso/ctype_iso.h @@ -22,14 +22,12 @@ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ - /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -/* - * Copyright 2013 Garrett D'Amore <garrett@damore.org> - */ /* * An application should not include this header directly. Instead it @@ -79,8 +77,6 @@ extern unsigned int *__ctype_mask; extern int *__trans_upper; extern int *__trans_lower; -#if defined(__STDC__) - #if __cplusplus >= 199711L namespace std { #endif @@ -114,27 +110,6 @@ extern int toupper(int); } /* end of namespace std */ #endif -#else /* defined(__STDC__) */ - -#if !defined(__lint) - -extern int isalpha(); -extern int isupper(); -extern int islower(); -extern int isdigit(); -extern int isxdigit(); -extern int isalnum(); -extern int isspace(); -extern int ispunct(); -extern int isprint(); -extern int isgraph(); -extern int iscntrl(); -extern int isblank(); - -#endif /* !defined(__lint) */ - -#endif /* defined(__STDC__) */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/iso/locale_iso.h b/usr/src/head/iso/locale_iso.h index 36a3d083f1..4b410c838a 100644 --- a/usr/src/head/iso/locale_iso.h +++ b/usr/src/head/iso/locale_iso.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -43,8 +45,6 @@ #ifndef _ISO_LOCALE_ISO_H #define _ISO_LOCALE_ISO_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/feature_tests.h> #ifdef __cplusplus @@ -107,13 +107,8 @@ struct lconv { #endif #endif -#if defined(__STDC__) extern char *setlocale(int, const char *); extern struct lconv *localeconv(void); -#else -extern char *setlocale(); -extern struct lconv *localeconv(); -#endif #if __cplusplus >= 199711L } diff --git a/usr/src/head/iso/setjmp_iso.h b/usr/src/head/iso/setjmp_iso.h index d22c4b4e0e..6462ee717a 100644 --- a/usr/src/head/iso/setjmp_iso.h +++ b/usr/src/head/iso/setjmp_iso.h @@ -22,8 +22,9 @@ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ - /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -87,8 +88,6 @@ typedef int jmp_buf[_JBLEN]; #error "ISA not supported" #endif -#if defined(__STDC__) - extern int setjmp(jmp_buf) __RETURNS_TWICE; #pragma unknown_control_flow(setjmp) extern int _setjmp(jmp_buf) __RETURNS_TWICE; @@ -96,17 +95,6 @@ extern int _setjmp(jmp_buf) __RETURNS_TWICE; extern void longjmp(jmp_buf, int) __NORETURN; extern void _longjmp(jmp_buf, int) __NORETURN; -#else - -extern int setjmp() __RETURNS_TWICE; -#pragma unknown_control_flow(setjmp) -extern int _setjmp() __RETURNS_TWICE; -#pragma unknown_control_flow(_setjmp) -extern void longjmp(); -extern void _longjmp(); - -#endif /* __STDC__ */ - #if __cplusplus >= 199711L } #endif /* end of namespace std */ diff --git a/usr/src/head/iso/signal_iso.h b/usr/src/head/iso/signal_iso.h index 592da4585b..ba5996b814 100644 --- a/usr/src/head/iso/signal_iso.h +++ b/usr/src/head/iso/signal_iso.h @@ -24,6 +24,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright (c) 1998-1999, by Sun Microsystems, Inc. * All rights reserved. */ @@ -43,9 +45,6 @@ #ifndef _ISO_SIGNAL_ISO_H #define _ISO_SIGNAL_ISO_H -#pragma ident "%Z%%M% %I% %E% SMI" -/* SVr4.0 1.5.3.4 */ - #include <sys/iso/signal_iso.h> #ifdef __cplusplus @@ -58,8 +57,6 @@ namespace std { typedef int sig_atomic_t; -#if defined(__STDC__) - #ifdef __cplusplus extern "C" SIG_PF signal(int, SIG_PF); #else @@ -67,13 +64,6 @@ extern void (*signal(int, void (*)(int)))(int); #endif extern int raise(int); -#else /* __STDC__ */ - -extern void(*signal())(); -extern int raise(); - -#endif /* __STDC__ */ - #if __cplusplus >= 199711L } #endif /* end of namespace std */ diff --git a/usr/src/head/iso/stdio_c99.h b/usr/src/head/iso/stdio_c99.h index 59a6dda327..8004ff514d 100644 --- a/usr/src/head/iso/stdio_c99.h +++ b/usr/src/head/iso/stdio_c99.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -38,8 +40,6 @@ #ifndef _ISO_STDIO_C99_H #define _ISO_STDIO_C99_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -71,29 +71,18 @@ extern "C" { #endif #endif /* !defined(_LP64) && !defined(_LONGLONG_TYPE) */ -#ifdef __STDC__ extern int vfscanf(FILE *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, __va_list); extern int vscanf(const char *_RESTRICT_KYWD, __va_list); extern int vsscanf(const char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, __va_list); -#else -extern int vfscanf(); -extern int vscanf(); -extern int vsscanf(); -#endif /* __STDC__ */ #endif /* defined(__EXTENSIONS__) ... */ #if defined(__EXTENSIONS__) || defined(_STDC_C99) || \ (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ defined(_XPG5) -#ifdef __STDC__ extern int snprintf(char *_RESTRICT_KYWD, size_t, const char *_RESTRICT_KYWD, ...); extern int vsnprintf(char *_RESTRICT_KYWD, size_t, const char *_RESTRICT_KYWD, __va_list); -#else -extern int snprintf(); -extern int vsnprintf(); -#endif /* __STDC__ */ #endif /* defined(__EXTENSIONS__) || defined(_STDC_C99) ... */ diff --git a/usr/src/head/iso/stdio_iso.h b/usr/src/head/iso/stdio_iso.h index f974ad5b08..1dec847790 100644 --- a/usr/src/head/iso/stdio_iso.h +++ b/usr/src/head/iso/stdio_iso.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -157,17 +159,10 @@ typedef __longlong_t fpos_t; #define L_tmpnam 25 /* (sizeof(P_tmpdir) + 15) */ -#if defined(__STDC__) extern __FILE __iob[_NFILE]; #define stdin (&__iob[0]) #define stdout (&__iob[1]) #define stderr (&__iob[2]) -#else -extern __FILE _iob[_NFILE]; -#define stdin (&_iob[0]) -#define stdout (&_iob[1]) -#define stderr (&_iob[2]) -#endif /* __STDC__ */ #if __cplusplus >= 199711L namespace std { @@ -199,8 +194,6 @@ namespace std { #endif /* !defined(_LP64) && !defined(_LONGLONG_TYPE) */ -#if defined(__STDC__) - extern int remove(const char *); extern int rename(const char *, const char *); extern FILE *tmpfile(void); @@ -272,57 +265,6 @@ extern int __filbuf(FILE *); extern int __flsbuf(int, FILE *); #endif /* _LP64 */ -#else /* !defined __STDC__ */ - -extern int remove(); -extern int rename(); -extern FILE *tmpfile(); -extern char *tmpnam(); -extern int fclose(); -extern int fflush(); -extern FILE *fopen(); -extern FILE *freopen(); -extern void setbuf(); -extern int setvbuf(); -extern int fprintf(); -extern int fscanf(); -extern int printf(); -extern int scanf(); -extern int sprintf(); -extern int sscanf(); -extern int vfprintf(); -extern int vprintf(); -extern int vsprintf(); -extern int fgetc(); -extern char *fgets(); -extern int fputc(); -extern int fputs(); -extern int getc(); -extern int getchar(); -extern char *gets(); -extern int putc(); -extern int putchar(); -extern int puts(); -extern int ungetc(); -extern size_t fread(); -extern size_t fwrite(); -extern int fgetpos(); -extern int fseek(); -extern int fsetpos(); -extern long ftell(); -extern void rewind(); -extern void clearerr(); -extern int feof(); -extern int ferror(); -extern void perror(); - -#ifndef _LP64 -extern int _filbuf(); -extern int _flsbuf(); -#endif /* _LP64 */ - -#endif /* __STDC__ */ - #if __cplusplus >= 199711L } #endif /* end of namespace std */ @@ -331,7 +273,6 @@ extern int _flsbuf(); #if !defined(_REENTRANT) && !defined(_LP64) -#ifdef __STDC__ #if __cplusplus >= 199711L namespace std { inline int getc(FILE *_p) { @@ -345,11 +286,6 @@ inline int putc(int _x, FILE *_p) { #define putc(x, p) (--(p)->_cnt < 0 ? __flsbuf((x), (p)) \ : (int)(*(p)->_ptr++ = (unsigned char) (x))) #endif /* __cplusplus >= 199711L */ -#else /* __STDC__ */ -#define getc(p) (--(p)->_cnt < 0 ? _filbuf(p) : (int)*(p)->_ptr++) -#define putc(x, p) (--(p)->_cnt < 0 ? _flsbuf((x), (p)) : \ - (int)(*(p)->_ptr++ = (unsigned char) (x))) -#endif /* __STDC__ */ #endif /* !defined(_REENTRANT) && !defined(_LP64) */ diff --git a/usr/src/head/iso/stdlib_c99.h b/usr/src/head/iso/stdlib_c99.h index 7877c21e38..29aafa3ec0 100644 --- a/usr/src/head/iso/stdlib_c99.h +++ b/usr/src/head/iso/stdlib_c99.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -38,8 +40,6 @@ #ifndef _ISO_STDLIB_C99_H #define _ISO_STDLIB_C99_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -59,8 +59,6 @@ typedef struct { } lldiv_t; #endif /* defined(_LONGLONG_TYPE) */ -#ifdef __STDC__ - #if (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ defined(_STDC_C99) || defined(__EXTENSIONS__) @@ -80,26 +78,6 @@ extern unsigned long long strtoull(const char *_RESTRICT_KYWD, #endif /* (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) ... */ -#else /* __STDC__ */ - -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__) - -extern void _Exit(); -extern float strtof(); -extern long double strtold(); - -#if defined(_LONGLONG_TYPE) -extern long long atoll(); -extern long long llabs(); -extern lldiv_t lldiv(); -extern long long strtoll(); -extern unsigned long long strtoull(); -#endif /* defined(_LONGLONG_TYPE) */ - -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG6)... */ - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/iso/stdlib_iso.h b/usr/src/head/iso/stdlib_iso.h index 5b958873c4..a2752ca421 100644 --- a/usr/src/head/iso/stdlib_iso.h +++ b/usr/src/head/iso/stdlib_iso.h @@ -20,12 +20,11 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -/* - * Copyright 2013 Garrett D'Amore <garrett@damore.org> - */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ @@ -52,11 +51,7 @@ extern "C" { #endif -#if defined(__STDC__) unsigned char __mb_cur_max(void); -#else -unsigned char __mb_cur_max(); -#endif #ifndef MB_CUR_MAX #define MB_CUR_MAX (__mb_cur_max()) #endif @@ -120,8 +115,6 @@ typedef long wchar_t; #endif /* !_WCHAR_T */ #endif /* !defined(__cplusplus) ... */ -#if defined(__STDC__) - extern void abort(void) __NORETURN; extern int abs(int); extern int atexit(void (*)(void)); @@ -174,39 +167,6 @@ extern "C++" { } #endif /* __cplusplus */ -#else /* not __STDC__ */ - -extern void abort(); -extern int abs(); -extern int atexit(); -extern double atof(); -extern int atoi(); -extern long int atol(); -extern void *bsearch(); -extern void *calloc(); -extern div_t div(); -extern void exit(); -extern void free(); -extern char *getenv(); -extern long int labs(); -extern ldiv_t ldiv(); -extern void *malloc(); -extern int mblen(); -extern size_t mbstowcs(); -extern int mbtowc(); -extern void qsort(); -extern int rand(); -extern void *realloc(); -extern void srand(); -extern double strtod(); -extern long int strtol(); -extern unsigned long strtoul(); -extern int system(); -extern int wctomb(); -extern size_t wcstombs(); - -#endif /* __STDC__ */ - #if __cplusplus >= 199711L } #endif /* end of namespace std */ diff --git a/usr/src/head/iso/string_iso.h b/usr/src/head/iso/string_iso.h index 02b4c59b7c..e1cae79472 100644 --- a/usr/src/head/iso/string_iso.h +++ b/usr/src/head/iso/string_iso.h @@ -24,6 +24,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -43,8 +45,6 @@ #ifndef _ISO_STRING_ISO_H #define _ISO_STRING_ISO_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/feature_tests.h> #ifdef __cplusplus @@ -72,8 +72,6 @@ typedef unsigned int size_t; /* (historical version) */ #endif #endif -#if defined(__STDC__) - 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); @@ -151,33 +149,6 @@ extern char *strrchr(const char *, int); extern char *strstr(const char *, const char *); #endif /* __cplusplus >= 199711L */ -#else /* __STDC__ */ - -extern void *memchr(); -extern int memcmp(); -extern void *memcpy(); -extern void *memmove(); -extern void *memset(); -extern char *strcat(); -extern char *strchr(); -extern int strcmp(); -extern int strcoll(); -extern char *strcpy(); -extern size_t strcspn(); -extern char *strerror(); -extern size_t strlen(); -extern char *strncat(); -extern int strncmp(); -extern char *strncpy(); -extern char *strpbrk(); -extern char *strrchr(); -extern size_t strspn(); -extern char *strstr(); -extern char *strtok(); -extern size_t strxfrm(); - -#endif /* __STDC__ */ - #if __cplusplus >= 199711L } #endif /* end of namespace std */ diff --git a/usr/src/head/iso/time_iso.h b/usr/src/head/iso/time_iso.h index 07baaa5ccd..bc94ec8995 100644 --- a/usr/src/head/iso/time_iso.h +++ b/usr/src/head/iso/time_iso.h @@ -22,8 +22,9 @@ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ - /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -43,8 +44,6 @@ #ifndef _ISO_TIME_ISO_H #define _ISO_TIME_ISO_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.18 */ - #include <sys/feature_tests.h> #ifdef __cplusplus @@ -97,8 +96,6 @@ struct tm { /* see ctime(3) */ }; -#if defined(__STDC__) - extern char *asctime(const struct tm *); extern clock_t clock(void); extern char *ctime(const time_t *); @@ -110,20 +107,6 @@ extern time_t time(time_t *); extern size_t strftime(char *_RESTRICT_KYWD, size_t, const char *_RESTRICT_KYWD, const struct tm *_RESTRICT_KYWD); -#else /* __STDC__ */ - -extern char *asctime(); -extern clock_t clock(); -extern char *ctime(); -extern double difftime(); -extern struct tm *gmtime(); -extern struct tm *localtime(); -extern time_t mktime(); -extern time_t time(); -extern size_t strftime(); - -#endif /* __STDC__ */ - #if __cplusplus >= 199711L } #endif /* end of namespace std */ diff --git a/usr/src/head/iso/wchar_c99.h b/usr/src/head/iso/wchar_c99.h index 5234eb1adf..25db569d6c 100644 --- a/usr/src/head/iso/wchar_c99.h +++ b/usr/src/head/iso/wchar_c99.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -38,8 +40,6 @@ #ifndef _ISO_WCHAR_C99_H #define _ISO_WCHAR_C99_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -58,8 +58,6 @@ extern "C" { #endif #endif /* !defined(_LP64) && !defined(_LONGLONG_TYPE) */ -#ifdef __STDC__ - #if defined(_STDC_C99) || \ (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ defined(_XPG6) || defined(__EXTENSIONS__) @@ -81,20 +79,6 @@ extern unsigned long long wcstoull(const wchar_t *_RESTRICT_KYWD, #endif /* defined(_STDC_C99) || (!defined(_STRICT_STDC)... */ -#else /* __STDC__ */ - -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__) -extern int vfwscanf(); -extern int vswscanf(); -extern int vwscanf(); -extern float wcstof(); -extern long double wcstold(); -extern long int wcstoll(); -extern long int wcstoull(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG6) ... */ - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/iso/wchar_iso.h b/usr/src/head/iso/wchar_iso.h index 6830794381..14763f0165 100644 --- a/usr/src/head/iso/wchar_iso.h +++ b/usr/src/head/iso/wchar_iso.h @@ -20,15 +20,13 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* - * Copyright 2014 Garrett D'Amore <garrett@damore.org> - */ - -/* * An application should not include this header directly. Instead it * should be included only through the inclusion of other Sun headers. * @@ -187,7 +185,6 @@ typedef __FILE FILE; #pragma redefine_extname fputws __fputws_xpg5 #pragma redefine_extname ungetwc __ungetwc_xpg5 #else /* __PRAGMA_REDEFINE_EXTNAME */ -#ifdef __STDC__ extern wint_t __fgetwc_xpg5(__FILE *); extern wint_t __getwc_xpg5(__FILE *); extern wint_t __getwchar_xpg5(void); @@ -198,17 +195,6 @@ extern wchar_t *__fgetws_xpg5(wchar_t *_RESTRICT_KYWD, int, __FILE *_RESTRICT_KYWD); extern int __fputws_xpg5(const wchar_t *_RESTRICT_KYWD, __FILE *_RESTRICT_KYWD); extern wint_t __ungetwc_xpg5(wint_t, __FILE *); -#else -extern wint_t __fgetwc_xpg5(); -extern wint_t __getwc_xpg5(); -extern wint_t __getwchar_xpg5(); -extern wint_t __fputwc_xpg5(); -extern wint_t __putwc_xpg5(); -extern wint_t __putwchar_xpg5(); -extern wchar_t *__fgetws_xpg5(); -extern int __fputws_xpg5(); -extern wint_t __ungetwc_xpg5(); -#endif /* __STDC__ */ #define fgetwc __fgetwc_xpg5 #define getwc __getwc_xpg5 #define getwchar __getwchar_xpg5 @@ -222,8 +208,6 @@ extern wint_t __ungetwc_xpg5(); #endif /* not XPG4 and not XPG4v2 */ #endif /* defined(_MSE_INT_H) */ -#ifdef __STDC__ - extern wint_t fgetwc(__FILE *); extern wchar_t *fgetws(wchar_t *_RESTRICT_KYWD, int, __FILE *_RESTRICT_KYWD); extern wint_t fputwc(wint_t, __FILE *); @@ -360,89 +344,6 @@ extern wchar_t *wmemchr(const wchar_t *, wchar_t, size_t); #endif /* __cplusplus >= 199711L */ #endif /* not XPG4 and not XPG4v2 */ -#else /* __STDC__ */ - -extern wint_t fgetwc(); -extern wchar_t *fgetws(); -extern wint_t fputwc(); -extern int fputws(); -extern wint_t ungetwc(); -extern wint_t getwc(); -extern wint_t getwchar(); -extern wint_t putwc(); -extern wint_t putwchar(); -extern wint_t ungetwc(); -extern double wcstod(); -extern long wcstol(); -extern unsigned long wcstoul(); -extern wchar_t *wcscat(); -extern wchar_t *wcschr(); -extern int wcscmp(); -extern int wcscoll(); -extern wchar_t *wcscpy(); -extern size_t wcscspn(); -extern size_t wcslen(); -extern wchar_t *wcsncat(); -extern int wcsncmp(); -extern wchar_t *wcsncpy(); -extern wchar_t *wcspbrk(); -extern wchar_t *wcsrchr(); -extern size_t wcsspn(); -extern size_t wcsxfrm(); - -#if (!defined(_MSE_INT_H)) -#if defined(_XPG4) && !defined(_XPG5) /* XPG4 or XPG4v2 */ -extern wchar_t *wcstok(); -extern size_t wcsftime(); -#else /* XPG4 or XPG4v2 */ -#ifdef __PRAGMA_REDEFINE_EXTNAME -#pragma redefine_extname wcstok __wcstok_xpg5 -#pragma redefine_extname wcsftime __wcsftime_xpg5 -extern wchar_t *wcstok(); -extern size_t wcsftime(); -#else /* __PRAGMA_REDEFINE_EXTNAME */ -extern wchar_t *__wcstok_xpg5(); -extern size_t __wcsftime_xpg5(); -#define wcstok __wcstok_xpg5 -#define wcsftime __wcsftime_xpg5 -#endif /* __PRAGMA_REDEFINE_EXTNAME */ -#endif /* XPG4 or XPG4v2 */ -#endif /* defined(_MSE_INT_H) */ - -/* not XPG4 and not XPG4v2 */ -#if (!defined(_XPG4) && !defined(_XPG4_2) || defined(_XPG5)) -extern wint_t btowc(); -extern int fwprintf(); -extern int fwscanf(); -extern int fwide(); -extern int mbsinit(); -extern size_t mbrlen(); -extern size_t mbrtowc(); -extern size_t mbsrtowcs(); -extern int swprintf(); -extern int swscanf(); -extern int vfwprintf(); -extern int vwprintf(); -extern int vswprintf(); -extern size_t wcrtomb(); -extern size_t wcsrtombs(); -#if defined(_XPG7) || !defined(_STRICT_SYMBOLS) -extern size_t wcsnrtombs(); -#endif - -extern wchar_t *wcsstr(); -extern int wctob(); -extern wchar_t *wmemchr(); -extern int wmemcmp(); -extern wchar_t *wmemcpy(); -extern wchar_t *wmemmove(); -extern wchar_t *wmemset(); -extern int wprintf(); -extern int wscanf(); -#endif /* not XPG4 and not XPG4v2 */ - -#endif /* __STDC__ */ - #if __cplusplus >= 199711L } #endif /* end of namespace std */ diff --git a/usr/src/head/iso/wctype_iso.h b/usr/src/head/iso/wctype_iso.h index 450cb6a34a..04ba7a94f7 100644 --- a/usr/src/head/iso/wctype_iso.h +++ b/usr/src/head/iso/wctype_iso.h @@ -24,12 +24,11 @@ /* definitions for international functions */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -/* - * Copyright 2014 Garrett D'Amore <garrett@damore.org> - */ /* * An application should not include this header directly. Instead it @@ -83,7 +82,6 @@ typedef unsigned int wctrans_t; #endif /* WEOF */ #endif /* not XPG4 and not XPG4v2 */ -#ifdef __STDC__ extern int iswalnum(wint_t); extern int iswalpha(wint_t); extern int iswcntrl(wint_t); @@ -108,29 +106,6 @@ extern wctrans_t wctrans(const char *); extern wint_t towctrans(wint_t, wctrans_t); extern int iswctype(wint_t, wctype_t); extern wctype_t wctype(const char *); -#else /* __STDC__ */ -extern int iswalnum(); -extern int iswalpha(); -extern int iswcntrl(); -extern int iswdigit(); -extern int iswgraph(); -extern int iswlower(); -extern int iswprint(); -extern int iswpunct(); -extern int iswspace(); -extern int iswupper(); -extern int iswxdigit(); -/* tow* also become functions */ -extern wint_t towlower(); -extern wint_t towupper(); -extern wctrans_t wctrans(); -extern wint_t towctrans(); -extern int iswctype(); -extern wctype_t wctype(); -#if defined(_XPG6) || !defined(_STRICT_SYMBOLS) -extern int iswblank(); -#endif -#endif /* __STDC__ */ /* bit definition for character class */ diff --git a/usr/src/head/langinfo.h b/usr/src/head/langinfo.h index e5aa92dfc9..32bd68e83b 100644 --- a/usr/src/head/langinfo.h +++ b/usr/src/head/langinfo.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,10 +29,6 @@ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ -/* - * Copyright 2014 Garrett D'Amore <garrett@damore.org> - */ - #ifndef _LANGINFO_H #define _LANGINFO_H @@ -146,11 +144,7 @@ extern "C" { /* * and the definitions of functions langinfo(3C) */ -#if defined(__STDC__) char *nl_langinfo(nl_item); /* get a string from the database */ -#else -char *nl_langinfo(); /* get a string from the database */ -#endif #if defined(_XPG7) || !defined(_STRICT_SYMBOLS) #ifndef _LOCALE_T @@ -158,11 +152,7 @@ char *nl_langinfo(); /* get a string from the database */ typedef struct _locale *locale_t; #endif -#if defined(__STDC__) char *nl_langinfo_l(nl_item, locale_t); -#else -char *nl_langinfo_l(); -#endif #endif #ifdef __cplusplus diff --git a/usr/src/head/libgen.h b/usr/src/head/libgen.h index bded08539a..130536c786 100644 --- a/usr/src/head/libgen.h +++ b/usr/src/head/libgen.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -35,8 +37,6 @@ #ifndef _LIBGEN_H #define _LIBGEN_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 2.4.2.8 */ - #include <sys/feature_tests.h> #include <sys/types.h> @@ -49,41 +49,16 @@ extern "C" { #endif -#ifdef __STDC__ extern char *basename(char *); -#else -extern char *basename(); -#endif - -#ifdef __STDC__ extern char *dirname(char *); -#else -extern char *dirname(); -#endif #if !defined(_XPG6) || defined(__EXTENSIONS__) - -#ifdef __STDC__ extern char *regcmp(const char *, ...); -#else -extern char *regcmp(); -#endif - -#ifdef __STDC__ extern char *regex(const char *, const char *, ...); -#else -extern char *regex(); #endif -#endif /* !defined(_XPG6) || defined(__EXTENSIONS__) */ - #ifdef _REENTRANT - -#ifdef __STDC__ extern char **____loc1(void); -#else -extern char **____loc1(); -#endif /* __STDC__ */ #define __loc1 (*(____loc1())) #elif !defined(_XPG6) || defined(__EXTENSIONS__) extern char *__loc1; /* Marked LEGACY in XPG5 and removed in XPG6 */ @@ -91,17 +66,8 @@ extern char *__loc1; /* Marked LEGACY in XPG5 and removed in XPG6 */ #if !defined(_XPG4_2) || defined(__EXTENSIONS__) -#ifdef __STDC__ extern char *bgets(char *, size_t, FILE *, char *); -#else -extern char *bgets(); -#endif - -#ifdef __STDC__ extern size_t bufsplit(char *, size_t, char **); -#else -extern size_t bufsplit(); -#endif #if !defined(_LP64) && _FILE_OFFSET_BITS == 64 #ifdef __PRAGMA_REDEFINE_EXTNAME @@ -119,63 +85,19 @@ extern size_t bufsplit(); #endif #endif /* _LP64 && _LARGEFILE64_SOURCE */ -#ifdef __STDC__ extern char *copylist(const char *, off_t *); #if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ !defined(__PRAGMA_REDEFINE_EXTNAME)) extern char *copylist64(const char *, off64_t *); #endif /* _LARGEFILE64_SOURCE... */ -#else -extern char *copylist(); -#ifdef _LARGEFILE64_SOURCE -#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ - !defined(__PRAGMA_REDEFINE_EXTNAME)) -extern char *copylist64(); -#endif /* _LARGEFILE64_SOURCE... */ -#endif -#endif -#ifdef __STDC__ extern int eaccess(const char *, int); -#else -extern int eaccess(); -#endif - -#ifdef __STDC__ extern int gmatch(const char *, const char *); -#else -extern int gmatch(); -#endif - -#ifdef __STDC__ extern int isencrypt(const char *, size_t); -#else -extern int isencrypt(); -#endif - -#ifdef __STDC__ extern int mkdirp(const char *, mode_t); -#else -extern int mkdirp(); -#endif - -#ifdef __STDC__ extern int p2open(const char *, FILE *[2]); -#else -extern int p2open(); -#endif - -#ifdef __STDC__ extern int p2close(FILE *[2]); -#else -extern int p2close(); -#endif - -#ifdef __STDC__ extern char *pathfind(const char *, const char *, const char *); -#else -extern char *pathfind(); -#endif #ifdef _REENTRANT #define __i_size (*(___i_size())) @@ -183,53 +105,14 @@ extern char *pathfind(); extern int __i_size; #endif -#ifdef __STDC__ extern int rmdirp(char *, char *); -#else -extern int rmdirp(); -#endif - -#ifdef __STDC__ extern char *strcadd(char *, const char *); -#else -extern char *strcadd(); -#endif - -#ifdef __STDC__ extern char *strccpy(char *, const char *); -#else -extern char *strccpy(); -#endif - -#ifdef __STDC__ extern char *streadd(char *, const char *, const char *); -#else -extern char *streadd(); -#endif - -#ifdef __STDC__ extern char *strecpy(char *, const char *, const char *); -#else -extern char *strecpy(); -#endif - -#ifdef __STDC__ extern int strfind(const char *, const char *); -#else -extern int strfind(); -#endif - -#ifdef __STDC__ extern char *strrspn(const char *, const char *); -#else -extern char *strrspn(); -#endif - -#ifdef __STDC__ extern char *strtrns(const char *, const char *, const char *, char *); -#else -extern char *strtrns(); -#endif #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ diff --git a/usr/src/head/libintl.h b/usr/src/head/libintl.h index e649668e12..262fa89a17 100644 --- a/usr/src/head/libintl.h +++ b/usr/src/head/libintl.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _LIBINTL_H #define _LIBINTL_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/isa_defs.h> #ifdef __cplusplus @@ -64,7 +64,6 @@ typedef long wchar_t; #define __GNU_GETTEXT_SUPPORTED_REVISION(m) \ ((((m) == 0) || ((m) == 1)) ? 1 : -1) -#ifdef __STDC__ extern char *dcgettext(const char *, const char *, const int); extern char *dgettext(const char *, const char *); extern char *gettext(const char *); @@ -91,33 +90,6 @@ extern wchar_t *wddelim(wchar_t, wchar_t, int); extern wchar_t mcfiller(void); extern int mcwrap(void); -#else -extern char *dcgettext(); -extern char *dgettext(); -extern char *gettext(); -extern char *textdomain(); -extern char *bindtextdomain(); - -/* - * LI18NUX 2000 Globalization Specification Version 1.0 - * with Amendment 2 - */ -extern char *dcngettext(); -extern char *dngettext(); -extern char *ngettext(); -extern char *bind_textdomain_codeset(); - -/* Word handling functions --- requires dynamic linking */ -/* Warning: these are experimental and subject to change. */ -extern int wdinit(); -extern int wdchkind(); -extern int wdbindf(); -extern wchar_t *wddelim(); -extern wchar_t mcfiller(); -extern int mcwrap(); - -#endif - #ifdef __cplusplus } #endif diff --git a/usr/src/head/libw.h b/usr/src/head/libw.h index 5203bb2ef5..7b317ca38c 100644 --- a/usr/src/head/libw.h +++ b/usr/src/head/libw.h @@ -19,15 +19,15 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - #ifndef _LIBW_H #define _LIBW_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - #include <stdlib.h> #ifdef __cplusplus @@ -44,11 +44,7 @@ typedef struct { } eucwidth_t; #endif -#ifdef __STDC__ void getwidth(eucwidth_t *); -#else -void getwidth(); -#endif /* __STDC__ */ #ifdef __cplusplus } diff --git a/usr/src/head/link.h b/usr/src/head/link.h index b47273d265..13a3332ea9 100644 --- a/usr/src/head/link.h +++ b/usr/src/head/link.h @@ -19,6 +19,7 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -46,7 +47,6 @@ extern "C" { * 32bit, or not in the large file environment. */ #if !defined(_ILP32) || _FILE_OFFSET_BITS != 64 -#ifdef __STDC__ #include <libelf.h> extern uint_t ld_version(uint_t); extern void ld_input_done(uint_t *); @@ -73,27 +73,6 @@ extern void ld_section64(const char *, Elf64_Shdr *, Elf64_Word, Elf_Data *, Elf *); #endif /* (defined(_LP64) || defined(_LONGLONG_TYPE) */ -#else -extern void ld_version(); -extern void ld_input_done(); - -extern void ld_start(); -extern void ld_atexit(); -extern void ld_open(); -extern void ld_file(); -extern void ld_input_section(); -extern void ld_section(); - -#if defined(_LP64) || defined(_LONGLONG_TYPE) -extern void ld_start64(); -extern void ld_atexit64(); -extern void ld_open64(); -extern void ld_file64(); -extern void ld_input_section64(); -extern void ld_section64(); - -#endif /* (defined(_LP64) || defined(_LONGLONG_TYPE) */ -#endif /* __STDC__ */ #endif /* !defined(_ILP32) || _FILE_OFFSET_BITS != 64 */ /* @@ -224,7 +203,6 @@ typedef unsigned int uintptr_t; #endif -#ifdef __STDC__ extern uint_t la_version(uint_t); extern void la_activity(uintptr_t *, uint_t); extern void la_preinit(uintptr_t *); @@ -254,25 +232,7 @@ extern uintptr_t la_i86_pltenter(Elf32_Sym *, uint_t, uintptr_t *, extern uintptr_t la_pltexit(Elf32_Sym *, uint_t, uintptr_t *, uintptr_t *, uintptr_t); #endif /* _LP64 */ -#else /* __STDC__ */ -extern uint_t la_version(); -extern void la_preinit(); -extern uint_t la_objopen(); -extern uint_t la_objclose(); -extern int la_objfilter(); -#if defined(_LP64) -extern uintptr_t la_sparcv9_pltenter(); -extern uintptr_t la_pltexit64(); -extern uintptr_t la_symbind64(); -#else /* _ILP32 */ -extern uintptr_t la_sparcv8_pltenter(); -extern uintptr_t la_i86_pltenter(); -extern uintptr_t la_pltexit(); -extern uintptr_t la_symbind32(); -#endif /* _LP64 */ -#endif /* __STDC__ */ -#ifdef __STDC__ /* * The ElfW() macro is a GNU/Linux feature, provided as support for * the dl_phdr_info structure used by dl_phdr_iterate(), which also @@ -326,7 +286,6 @@ struct dl_phdr_info { extern int dl_iterate_phdr(int (*)(struct dl_phdr_info *, size_t, void *), void *); -#endif /* __STDC__ */ #endif /* _ASM */ #endif /* _KERNEL */ diff --git a/usr/src/head/locale.h b/usr/src/head/locale.h index 8fd6773bb5..1b46677155 100644 --- a/usr/src/head/locale.h +++ b/usr/src/head/locale.h @@ -25,7 +25,7 @@ */ /* - * Copyright 2013 Garrett D'Amore <garrett@damore.org> + * Copyright 2014 Garrett D'Amore <garrett@damore.org> * * Portions of this file developed by Garrett D'Amore are licensed * under the terms of the Common Development and Distribution License (CDDL) @@ -84,17 +84,10 @@ extern "C" { typedef struct _locale *locale_t; #endif -#if defined(__STDC__) extern locale_t duplocale(locale_t); extern void freelocale(locale_t); extern locale_t newlocale(int, const char *, locale_t); extern locale_t uselocale(locale_t); -#else /* __STDC__ */ -extern locale_t duplocale(); -extern void freelocale(); -extern locale_t newlocale(); -extern locale_t uselocale(); -#endif /* __STDC__ */ #define LC_GLOBAL_LOCALE (__global_locale()) extern locale_t __global_locale(void); diff --git a/usr/src/head/macros.h b/usr/src/head/macros.h index 6f85520caa..6c16437648 100644 --- a/usr/src/head/macros.h +++ b/usr/src/head/macros.h @@ -19,6 +19,9 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ @@ -26,8 +29,6 @@ #ifndef _MACROS_H #define _MACROS_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3.1.7 */ - #include <sys/types.h> #include <sys/stat.h> @@ -70,17 +71,8 @@ extern struct stat Statbuf; /* * Use: DEBUG(sum,d) which becomes fprintf(stderr,"sum = %d\n",sum) - * - * Note: Sccsid[] strings are still supported but not the prefered - * method of labeling files. Use #ident. */ -#ifdef __STDC__ #define DEBUG(var, type) fprintf(stderr, #var "= %" #type "\n", var) -#define SCCSID(arg) static char Sccsid[] = #arg -#else -#define DEBUG(var, type) fprintf(stderr, "var = %type\n", var) -#define SCCSID(arg) static char Sccsid[] = "arg" -#endif /* * Use of ERRABORT() will cause libS.a internal diff --git a/usr/src/head/malloc.h b/usr/src/head/malloc.h index 8325420861..3c04bb2bf9 100644 --- a/usr/src/head/malloc.h +++ b/usr/src/head/malloc.h @@ -19,10 +19,12 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ - #ifndef _MALLOC_H #define _MALLOC_H @@ -57,8 +59,6 @@ struct mallinfo { unsigned long keepcost; /* cost of enabling keep option */ }; -#if defined(__STDC__) - #if (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ defined(_XPG3) #if __cplusplus >= 199711L @@ -83,17 +83,6 @@ using std::calloc; int mallopt(int, int); struct mallinfo mallinfo(void); -#else - -void *malloc(); -void free(); -void *realloc(); -void *calloc(); -int mallopt(); -struct mallinfo mallinfo(); - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/memory.h b/usr/src/head/memory.h index a3d873719c..58694225bb 100644 --- a/usr/src/head/memory.h +++ b/usr/src/head/memory.h @@ -19,22 +19,21 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ - #ifndef _MEMORY_H #define _MEMORY_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.4.1.2 */ - #include <sys/types.h> #ifdef __cplusplus extern "C" { #endif -#if defined(__STDC__) extern void *memccpy(void *, const void *, int, size_t); #if __cplusplus >= 199711L namespace std { @@ -55,13 +54,6 @@ extern void *memchr(const void *, int, size_t); extern void *memcpy(void *, const void *, size_t); extern void *memset(void *, int, size_t); extern int memcmp(const void *, const void *, size_t); -#else -extern void *memccpy(); -extern void *memchr(); -extern void *memcpy(); -extern void *memset(); -extern int memcmp(); -#endif #ifdef __cplusplus } diff --git a/usr/src/head/mon.h b/usr/src/head/mon.h index 4b9264cc66..9150b7ac87 100644 --- a/usr/src/head/mon.h +++ b/usr/src/head/mon.h @@ -22,8 +22,9 @@ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ - /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 1997-2003 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,8 +32,6 @@ #ifndef _MON_H #define _MON_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -75,11 +74,7 @@ typedef unsigned short WORD; #endif #endif -#if defined(__STDC__) extern void monitor(int (*)(void), int (*)(void), WORD *, size_t, size_t); -#else -extern void monitor(); -#endif #ifdef __cplusplus } diff --git a/usr/src/head/monetary.h b/usr/src/head/monetary.h index e33002c7e0..6dbf32cf40 100644 --- a/usr/src/head/monetary.h +++ b/usr/src/head/monetary.h @@ -20,12 +20,11 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -/* - * Copyright 2013 Garrett D'Amore <garrett@damore.org> - */ #ifndef _MONETARY_H #define _MONETARY_H @@ -37,7 +36,6 @@ extern "C" { #endif -#if defined(__STDC__) extern ssize_t strfmon(char *_RESTRICT_KYWD, size_t, const char *_RESTRICT_KYWD, ...); @@ -52,11 +50,6 @@ extern ssize_t strfmon_l(char *_RESTRICT_KYWD, size_t, locale_t, const char *_RESTRICT_KYWD, ...); #endif -#else -extern ssize_t strfmon(); -extern ssize_t strfmon_l(); -#endif - #ifdef __cplusplus } #endif diff --git a/usr/src/head/mp.h b/usr/src/head/mp.h index 4360a3f62f..7a7689a3e9 100644 --- a/usr/src/head/mp.h +++ b/usr/src/head/mp.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 1989 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -35,8 +37,6 @@ #ifndef _MP_H #define _MP_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -48,7 +48,6 @@ struct mint { typedef struct mint MINT; -#ifdef __STDC__ extern void mp_gcd(MINT *, MINT *, MINT *); extern void mp_madd(MINT *, MINT *, MINT *); extern void mp_msub(MINT *, MINT *, MINT *); @@ -65,24 +64,6 @@ extern int mp_mcmp(MINT *, MINT *); extern MINT *mp_xtom(char *); extern char *mp_mtox(MINT *); extern void mp_mfree(MINT *); -#else -extern void mp_gcd(); -extern void mp_madd(); -extern void mp_msub(); -extern void mp_mdiv(); -extern void mp_sdiv(); -extern int mp_min(); -extern void mp_mout(); -extern int mp_msqrt(); -extern void mp_mult(); -extern void mp_pow(); -extern void mp_rpow(); -extern MINT *mp_itom(); -extern int mp_mcmp(); -extern MINT *mp_xtom(); -extern char *mp_mtox(); -extern void mp_mfree(); -#endif #define FREE(x) _mp_xfree(&(x)) /* Compatibility */ diff --git a/usr/src/head/mqueue.h b/usr/src/head/mqueue.h index b56a6242be..caa5d45326 100644 --- a/usr/src/head/mqueue.h +++ b/usr/src/head/mqueue.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _MQUEUE_H #define _MQUEUE_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/feature_tests.h> #include <sys/types.h> #include <sys/fcntl.h> @@ -53,7 +53,6 @@ struct mq_attr { /* * function prototypes */ -#if defined(__STDC__) #if (_POSIX_C_SOURCE - 0 > 0) && (_POSIX_C_SOURCE - 0 <= 2) #error "POSIX Message Passing is not supported in POSIX.1-1990" #endif @@ -77,20 +76,6 @@ int mq_notify(mqd_t, const struct sigevent *); int mq_getattr(mqd_t, struct mq_attr *); int mq_setattr(mqd_t, const struct mq_attr *_RESTRICT_KYWD, struct mq_attr *_RESTRICT_KYWD); -#else -mqd_t mq_open(); -int mq_close(); -int mq_unlink(); -int mq_send(); -int mq_timedsend(); -int mq_reltimedsend_np(); -ssize_t mq_receive(); -ssize_t mq_timedreceive(); -ssize_t mq_reltimedreceive_np(); -int mq_notify(); -int mq_getattr(); -int mq_setattr(); -#endif /* __STDC__ */ #ifdef __cplusplus } diff --git a/usr/src/head/nan.h b/usr/src/head/nan.h index 52f870b859..b45358839f 100644 --- a/usr/src/head/nan.h +++ b/usr/src/head/nan.h @@ -24,6 +24,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright (c) 1996, by Sun Microsystems, Inc. * All Rights Reserved */ @@ -31,8 +33,6 @@ #ifndef _NAN_H #define _NAN_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Handling of Not_a_Number's (only in IEEE floating-point standard) */ @@ -120,11 +120,7 @@ typedef union #define GETNaNPC(dval) (((dnan *)&(dval))->inf_parts.bits << 12 | \ ((dnan *)&(dval))->nan_parts.fraction_low >> 20) -#if defined(__STDC__) #define KILLFPE() (void) _kill(_getpid(), 8) -#else -#define KILLFPE() (void) kill(getpid(), 8) -#endif #define NaN(X) (((dnan *)&(X))->nan_parts.exponent == 0x7ff) #define KILLNaN(X) if (NaN(X)) KILLFPE() diff --git a/usr/src/head/ndbm.h b/usr/src/head/ndbm.h index 8fa2b8666f..a1eb8cf1b7 100644 --- a/usr/src/head/ndbm.h +++ b/usr/src/head/ndbm.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 1989 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -39,8 +41,6 @@ #ifndef _NDBM_H #define _NDBM_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/feature_tests.h> #include <sys/types.h> @@ -90,7 +90,6 @@ typedef struct { } datum; #endif -#ifdef __STDC__ DBM *dbm_open(const char *, int, mode_t); void dbm_close(DBM *); datum dbm_fetch(DBM *, datum); @@ -100,17 +99,6 @@ int dbm_delete(DBM *, datum); int dbm_store(DBM *, datum, datum, int); int dbm_clearerr(DBM *); int dbm_error(DBM *); -#else -DBM *dbm_open(); -void dbm_close(); -datum dbm_fetch(); -datum dbm_firstkey(); -datum dbm_nextkey(); -int dbm_delete(); -int dbm_store(); -int dbm_clearerr(); -int dbm_error(); -#endif #define _DBM_RDONLY 0x1 /* data base open read-only */ #define _DBM_IOERR 0x2 /* data base I/O error */ diff --git a/usr/src/head/netdb.h b/usr/src/head/netdb.h index 8c912d3ffa..b26c26d40b 100644 --- a/usr/src/head/netdb.h +++ b/usr/src/head/netdb.h @@ -1,4 +1,6 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -229,7 +231,6 @@ struct servent { char *s_proto; /* protocol to use */ }; -#ifdef __STDC__ #if !defined(_XPG4_2) || defined(__EXTENSIONS__) struct hostent *gethostbyname_r (const char *, struct hostent *, char *, int, int *h_errnop); @@ -353,81 +354,6 @@ void freeipsecalgent(struct ipsecalgent *ptr); /* END IPsec algorithm prototype definitions */ #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ -#else /* __STDC__ */ -struct hostent *gethostbyname_r(); -struct hostent *gethostbyaddr_r(); -struct hostent *getipnodebyname(); -struct hostent *getipnodebyaddr(); -void freehostent(); -struct hostent *gethostent_r(); -struct servent *getservbyname_r(); -struct servent *getservbyport_r(); -struct servent *getservent_r(); -struct netent *getnetbyname_r(); -struct netent *getnetbyaddr_r(); -struct netent *getnetent_r(); -struct protoent *getprotobyname_r(); -struct protoent *getprotobynumber_r(); -struct protoent *getprotoent_r(); -int getnetgrent_r(); -int innetgr(); - -/* Old interfaces that return a pointer to a static area; MT-unsafe */ -struct hostent *gethostbyname(); -struct hostent *gethostbyaddr(); -struct hostent *gethostent(); -struct netent *getnetbyname(); -struct netent *getnetbyaddr(); -struct netent *getnetent(); -struct servent *getservbyname(); -struct servent *getservbyport(); -struct servent *getservent(); -struct protoent *getprotobyname(); -struct protoent *getprotobynumber(); -struct protoent *getprotoent(); -int getnetgrent(); - -int sethostent(); -int endhostent(); -int setnetent(); -int endnetent(); -int setservent(); -int endservent(); -int setprotoent(); -int endprotoent(); -int setnetgrent(); -int endnetgrent(); -int rcmd(); -int rcmd_af(); -int rexec(); -int rexec_af(); -int rresvport(); -int rresvport_af(); -int rresvport_addr(); -int ruserok(); -/* BIND */ -struct hostent *gethostbyname2(); -void herror(); -char *hstrerror(); -/* IPv6 prototype definitons */ -int getaddrinfo(); -void freeaddrinfo(); -const char *gai_strerror(); -int getnameinfo(); -/* END IPv6 prototype definitions */ -/* End BIND */ - -#if !defined(_XPG4_2) || defined(__EXTENSIONS__) -/* IPsec algorithm prototype definitions */ -struct ipsecalgent *getalgbyname(); -struct ipsecalgent *getalgbydoi(); -int getdoidomainbyname(); -const char *getdoidomainbynum(); -void freealgent(); -/* END IPsec algorithm prototype definitions */ -#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ - -#endif /* __STDC__ */ /* * Error return codes from gethostbyname() and gethostbyaddr() @@ -437,11 +363,7 @@ void freealgent(); extern int h_errno; #ifdef _REENTRANT -#ifdef __STDC__ extern int *__h_errno(void); -#else -extern int *__h_errno(); -#endif /* __STDC__ */ /* Only #define h_errno if there is no conflict with other use */ #ifdef H_ERRNO_IS_FUNCTION diff --git a/usr/src/head/netdir.h b/usr/src/head/netdir.h index 694390ee1c..7d26eeb370 100644 --- a/usr/src/head/netdir.h +++ b/usr/src/head/netdir.h @@ -19,11 +19,13 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1992 Sun Microsystems, Inc. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - /* * netdir.h * @@ -34,8 +36,6 @@ #ifndef _NETDIR_H #define _NETDIR_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.5 */ - /* * This files uses struct netconfig, and netconfig.h must be included * before this to avoid warnings. @@ -79,8 +79,6 @@ extern int _nderror; #endif /* _REENTRANT */ -#ifdef __STDC__ - int netdir_options(struct netconfig *, int option, int fd, char *par); int netdir_getbyname(struct netconfig *, struct nd_hostserv *, struct nd_addrlist **); @@ -101,25 +99,6 @@ struct netbuf *_uaddr2taddr(struct netconfig *, char *); char *_taddr2uaddr(struct netconfig *, struct netbuf *); char *_netdir_mergeaddr(struct netconfig *, char *uaddr, char *ruaddr); -#else /* __STDC__ */ - -int netdir_options(); -int netdir_getbyname(); -int netdir_getbyaddr(); -int netdir_mergeaddr(); -void netdir_free(); -struct netbuf *uaddr2taddr(); -void netdir_perror(); -char *netdir_sperror(); -char *taddr2uaddr(); -struct nd_addrlist *_netdir_getbyname(); -struct nd_hostservlist *_netdir_getbyaddr(); -char *_netdir_mergeaddr(); -struct netbuf *_uaddr2taddr(); -char *_taddr2uaddr(); - -#endif /* __STDC__ */ - /* * These are all objects that can be freed by netdir_free */ diff --git a/usr/src/head/nl_types.h b/usr/src/head/nl_types.h index aa1615519c..c6cee0428f 100644 --- a/usr/src/head/nl_types.h +++ b/usr/src/head/nl_types.h @@ -22,6 +22,8 @@ /* * nl_types.h * + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright (c) 1991,1997,2000 by Sun Microsystems, Inc. * All rights reserved. */ @@ -32,8 +34,6 @@ #ifndef _NL_TYPES_H #define _NL_TYPES_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/isa_defs.h> #ifdef __cplusplus @@ -105,15 +105,9 @@ typedef int nl_item; /* XPG3 Conformant for nl_langinfo(). */ /* Need to be removed later */ typedef nl_item __nl_item; -#ifdef __STDC__ int catclose(nl_catd); char *catgets(nl_catd, int, int, const char *); nl_catd catopen(const char *, int); -#else -int catclose(); -char *catgets(); -nl_catd catopen(); -#endif /* __STDC__ */ #ifdef __cplusplus } diff --git a/usr/src/head/nlist.h b/usr/src/head/nlist.h index ea1bd203bb..de6be5e184 100644 --- a/usr/src/head/nlist.h +++ b/usr/src/head/nlist.h @@ -19,6 +19,9 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ @@ -26,8 +29,6 @@ #ifndef _NLIST_H #define _NLIST_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.8.2.4 */ - #ifdef __cplusplus extern "C" { #endif @@ -41,11 +42,7 @@ struct nlist { char n_numaux; /* number of aux. entries */ }; -#if defined(__STDC__) extern int nlist(const char *, struct nlist *); -#else /* __STDC__ */ -extern int nlist(); -#endif /* __STDC__ */ #ifdef __cplusplus } diff --git a/usr/src/head/nsctl.h b/usr/src/head/nsctl.h index 0479a7d39c..ccfd6b71aa 100644 --- a/usr/src/head/nsctl.h +++ b/usr/src/head/nsctl.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -63,7 +65,6 @@ typedef struct nsc_release { const char *runtime; /* runtime release(s) */ } nsc_release_t; -#ifdef __STDC__ extern void _nsc_nocheck(void); extern nsc_fd_t *nsc_open(char *, int, int); extern nsc_fd_t *nsc_fdopen(int, char *, int); @@ -79,23 +80,6 @@ extern int nsc_getsystemid(int *id); extern int nsc_name_to_id(char *name, int *id); extern int nsc_id_to_name(char **name, int id); extern int nsc_check_release(const char *, nsc_release_t *, char **); -#else -extern void _nsc_nocheck(); -extern nsc_fd_t *nsc_open(); -extern nsc_fd_t *nsc_fdopen(); -extern int nsc_close(); -extern int nsc_fileno(); -extern int nsc_reserve(); -extern int nsc_release(); -extern int nsc_partsize(); -extern int nsc_freeze(); -extern int nsc_unfreeze(); -extern int nsc_isfrozen(); -extern int nsc_getsystemid(); -extern int nsc_name_to_id(); -extern int nsc_id_to_name(); -extern int nsc_check_release(); -#endif #ifdef __cplusplus } diff --git a/usr/src/head/nss_common.h b/usr/src/head/nss_common.h index d2fa459d39..066d8462ab 100644 --- a/usr/src/head/nss_common.h +++ b/usr/src/head/nss_common.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -34,8 +36,6 @@ #ifndef _NSS_COMMON_H #define _NSS_COMMON_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <synch.h> #ifdef __cplusplus @@ -248,11 +248,7 @@ typedef enum { struct nss_backend; -#if defined(__STDC__) typedef nss_status_t (*nss_backend_op_t)(struct nss_backend *, void *args); -#else -typedef nss_status_t (*nss_backend_op_t)(); -#endif struct nss_backend { nss_backend_op_t *ops; @@ -295,24 +291,15 @@ typedef int nss_dbop_t; * backend, properly initialized (or returns NULL). */ -#if defined(__STDC__) typedef nss_backend_t *(*nss_backend_constr_t)(const char *db_name, const char *src_name, /* Hook for (unimplemented) args in nsswitch.conf */ const char *cfg_args); -#else -typedef nss_backend_t *(*nss_backend_constr_t)(); -#endif struct nss_backend_finder { -#if defined(__STDC__) nss_backend_constr_t (*lookup) (void *lkp_priv, const char *, const char *, void **del_privp); void (*delete) (void *del_priv, nss_backend_constr_t); -#else - nss_backend_constr_t (*lookup)(); - void (*delete)(); -#endif struct nss_backend_finder *next; void *lookup_priv; }; @@ -375,11 +362,7 @@ struct nss_db_params { typedef struct nss_db_params nss_db_params_t; -#if defined(__STDC__) typedef void (*nss_db_initf_t)(nss_db_params_t *); -#else -typedef void (*nss_db_initf_t)(); -#endif /* * DBD param offsets in NSS2 nscd header. @@ -451,7 +434,6 @@ struct nss_config { typedef struct nss_config nss_config_t; -#if defined(__STDC__) extern nss_status_t nss_config(nss_config_t **, int); extern nss_status_t nss_search(nss_db_root_t *, nss_db_initf_t, @@ -480,25 +462,6 @@ extern nss_status_t _nsc_setent_u(nss_db_root_t *, nss_db_initf_t, extern nss_status_t _nsc_endent_u(nss_db_root_t *, nss_db_initf_t, nss_getent_t *); -#else -extern nss_status_t nss_config(); - -extern nss_status_t nss_search(); -extern nss_status_t nss_getent(); -extern void nss_setent(); -extern void nss_endent(); -extern void nss_delete(); - -extern int nss_pack(); -extern int nss_pack_ent(); -extern int nss_unpack(); -extern int nss_unpack_ent(); - -extern nss_status_t _nsc_search(); -extern nss_status_t _nsc_getent_u(); -extern nss_status_t _nsc_setent_u(); -extern nss_status_t _nsc_endent_u(); -#endif #ifdef __cplusplus } diff --git a/usr/src/head/nss_dbdefs.h b/usr/src/head/nss_dbdefs.h index 103d74a7ef..7608e10648 100644 --- a/usr/src/head/nss_dbdefs.h +++ b/usr/src/head/nss_dbdefs.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * @@ -234,17 +236,12 @@ extern "C" { * The nss_groupstr_t routine does the real work for any backend * that can supply a netgroup entry as a string in /etc/group format */ -#if defined(__STDC__) typedef int (*nss_str2ent_t)(const char *in, int inlen, void *ent, char *buf, int buflen); struct nss_groupsbymem; /* forward definition */ typedef nss_status_t (*nss_groupstr_t)(const char *instr, int inlen, struct nss_groupsbymem *); -#else -typedef int (*nss_str2ent_t)(); -typedef nss_status_t (*nss_groupstr_t)(); -#endif /* * The initgroups() function [see initgroups(3c)] needs to find all the @@ -376,13 +373,8 @@ typedef struct { int buflen; /* "buflen" " " */ } nss_XbyY_buf_t; -#if defined(__STDC__) extern nss_XbyY_buf_t *_nss_XbyY_buf_alloc(int struct_size, int buffer_size); extern void _nss_XbyY_buf_free(nss_XbyY_buf_t *); -#else -extern nss_XbyY_buf_t *_nss_XbyY_buf_alloc(); -extern void _nss_XbyY_buf_free(); -#endif #define NSS_XbyY_ALLOC(bufpp, str_size, buf_size) (\ (*bufpp) == 0 \ @@ -453,12 +445,8 @@ typedef union nss_XbyY_key { /* No tag; backend should know what to expect */ } nss_XbyY_key_t; -#if defined(__STDC__) typedef int (*nss_key2str_t)(void *buffer, size_t buflen, nss_XbyY_key_t *key, size_t *len); -#else -typedef int (*nss_key2str_t)(); -#endif typedef struct nss_XbyY_args { @@ -689,7 +677,6 @@ typedef struct { ((nss_pheader_t *)(buf))->p_ruid == (ruid) && \ ((nss_pheader_t *)(buf))->p_euid == (euid)) -#if defined(__STDC__) extern char **_nss_netdb_aliases(const char *, int, char *, int); extern nss_status_t nss_default_key2str(void *, size_t, nss_XbyY_args_t *, const char *, int, size_t *); @@ -703,14 +690,6 @@ extern void nss_packed_set_status(void *, size_t, nss_status_t, nss_XbyY_args_t *); extern nss_status_t nss_packed_getkey(void *, size_t, char **, int *, nss_XbyY_args_t *); -#else -extern char **_nss_netdb_aliases(); -extern int nss_default_key2str(); -extern nss_status_t nss_packed_arg_init(); -extern nss_status_t nss_packed_context_init(); -extern void nss_packed_set_status(); -extern nss_status_t nss_packed_getkey(); -#endif /* * nss_dbop_t values for searches with various keys; values for diff --git a/usr/src/head/nss_netdir.h b/usr/src/head/nss_netdir.h index 6c8988eabf..9ab072fe2a 100644 --- a/usr/src/head/nss_netdir.h +++ b/usr/src/head/nss_netdir.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -36,8 +38,6 @@ #ifndef _NSS_NETDIR_H #define _NSS_NETDIR_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -123,8 +123,6 @@ union nss_netdirbyaddr_out { } nss; }; -#ifdef __STDC__ - int __classic_netdir_getbyname(struct netconfig *, struct nd_hostserv *, struct nd_addrlist **); int __classic_netdir_getbyaddr(struct netconfig *, @@ -138,18 +136,6 @@ int __inet_netdir_options(struct netconfig *, struct netbuf *__inet_uaddr2taddr(struct netconfig *, char *); char *__inet_taddr2uaddr(struct netconfig *, struct netbuf *); -#else - -int __classic_netdir_getbyname(); -int __classic_netdir_getbyaddr(); -int _get_hostserv_inetnetdir_byname(); -int _get_hostserv_inetnetdir_byaddr(); -int __inet_netdir_options(); -struct netbuf *__inet_uaddr2taddr(); -char *__inet_taddr2uaddr(); - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/nsswitch.h b/usr/src/head/nsswitch.h index f2657f135e..d1612a2988 100644 --- a/usr/src/head/nsswitch.h +++ b/usr/src/head/nsswitch.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -35,8 +37,6 @@ #ifndef _NSSWITCH_H #define _NSSWITCH_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -125,21 +125,11 @@ struct __nsw_switchconfig { : \ __nsw_extended_action(lkp, err))) -#ifdef __STDC__ - struct __nsw_switchconfig *__nsw_getconfig (const char *, enum __nsw_parse_err *); int __nsw_freeconfig(struct __nsw_switchconfig *); action_t __nsw_extended_action(struct __nsw_lookup *, int); -#else - -struct __nsw_switchconfig *__nsw_getconfig(); -int __nsw_freeconfig(); -action_t __nsw_extended_action(); - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/pcsample.h b/usr/src/head/pcsample.h index c30b33d3d5..4a3d28dff1 100644 --- a/usr/src/head/pcsample.h +++ b/usr/src/head/pcsample.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 1998 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _PCSAMPLE_H #define _PCSAMPLE_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #ifdef __cplusplus @@ -38,11 +38,7 @@ extern "C" { /* * PC sampling profiling */ -#ifdef __STDC__ long pcsample(uintptr_t [], long); -#else -long pcsample(); -#endif /* __STDC__ */ #ifdef __cplusplus } diff --git a/usr/src/head/pfmt.h b/usr/src/head/pfmt.h index 332f2ab0e8..406c1f47b2 100644 --- a/usr/src/head/pfmt.h +++ b/usr/src/head/pfmt.h @@ -19,15 +19,15 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ - #ifndef _PFMT_H #define _PFMT_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <stdio.h> #ifndef va_args #include <stdarg.h> @@ -64,7 +64,6 @@ extern "C" { #define MM_WARNING 2 #define MM_INFO 3 -#ifdef __STDC__ int pfmt(FILE *, long, const char *, ...); int lfmt(FILE *, long, const char *, ...); int vpfmt(FILE *, long, const char *, va_list); @@ -72,15 +71,6 @@ int vlfmt(FILE *, long, const char *, va_list); const char *setcat(const char *); int setlabel(const char *); int addsev(int, const char *); -#else -int pfmt(); -int lfmt(); -int vpfmt(); -int vlfmt(); -char *setcat(); -int setlabel(); -int addsev(); -#endif #define DB_NAME_LEN 15 #define MAXLABEL 25 diff --git a/usr/src/head/pkginfo.h b/usr/src/head/pkginfo.h index 4e0af291c1..b0a6a8bf51 100644 --- a/usr/src/head/pkginfo.h +++ b/usr/src/head/pkginfo.h @@ -19,15 +19,15 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - #ifndef _PKGINFO_H #define _PKGINFO_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.5.1.2 */ - #ifdef __cplusplus extern "C" { #endif @@ -51,15 +51,9 @@ struct pkginfo { extern char *pkgdir; -#ifdef __STDC__ extern char *pkgparam(char *, char *); extern int pkginfo(struct pkginfo *, char *, ...), pkgnmchk(char *, char *, int); -#else -extern char *pkgparam(); -extern int pkginfo(), - pkgnmchk(); -#endif /* __STDC__ */ #ifdef __cplusplus } diff --git a/usr/src/head/poll.h b/usr/src/head/poll.h index 900bca5368..d14c8150d1 100644 --- a/usr/src/head/poll.h +++ b/usr/src/head/poll.h @@ -20,6 +20,7 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -46,17 +47,9 @@ extern "C" { #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) -#if defined(__STDC__) - extern int ppoll(struct pollfd *_RESTRICT_KYWD, nfds_t, const struct timespec *_RESTRICT_KYWD, const sigset_t *_RESTRICT_KYWD); -#else /* __STDC__ */ - -extern int ppoll(); - -#endif /* __STDC__ */ - #endif /* defined(__EXTENSIONS__) ... */ #ifdef __cplusplus diff --git a/usr/src/head/priv.h b/usr/src/head/priv.h index aa4c4a36f3..47125ac928 100644 --- a/usr/src/head/priv.h +++ b/usr/src/head/priv.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -41,7 +43,6 @@ extern "C" { /* * library functions prototype. */ -#if defined(__STDC__) extern int setppriv(priv_op_t, priv_ptype_t, const priv_set_t *); extern int getppriv(priv_ptype_t, priv_set_t *); @@ -78,46 +79,6 @@ extern void priv_copyset(const priv_set_t *, priv_set_t *); extern int priv_delset(priv_set_t *, const char *); extern boolean_t priv_ismember(const priv_set_t *, const char *); -#else /* Non ANSI */ - -extern int setppriv(/* priv_op_t, priv_ptype_t, const priv_set_t * */); -extern int getppriv(/* priv_ptype_t, priv_set_t * */); -extern int setpflags(/* uint_t, uint_t */); -extern uint_t getpflags(/* uint_t */); -extern priv_impl_info_t *getprivimplinfo(/* void */); - -extern int priv_set(/* priv_op_t, priv_ptype_t, ... */); -extern boolean_t priv_ineffect(/* const char * */); -extern priv_set_t *priv_str_to_set(/* - const char *, const char *, const char ** */); -extern char *priv_set_to_str(/* const priv_set_t *, char, int */); - -extern int priv_getbyname(/* const char * */); -extern char *priv_getbynum(/* int */); -extern int priv_getsetbyname(/* const char * */); -extern char *priv_getsetbynum(/* int */); -extern char *priv_gettext(/* const char * */); - -extern priv_set_t *priv_allocset(/* void */); -extern void priv_freeset(/* priv_set_t * */); - -extern void priv_emptyset(/* priv_set_t * */); -extern void priv_basicset(/* priv_set_t * */); -extern void priv_fillset(/* priv_set_t * */); -extern boolean_t priv_isemptyset(/* const priv_set_t * */); -extern boolean_t priv_isfullset(/* const priv_set_t * */); -extern boolean_t priv_isequalset(/* const priv_set_t *, const priv_set_t * */); -extern boolean_t priv_issubset(/* const priv_set_t *, const priv_set_t * */); -extern void priv_intersect(/* const priv_set_t *, priv_set_t * */); -extern void priv_union(/* const priv_set_t *, priv_set_t * */); -extern void priv_inverse(/* priv_set_t * */); -extern int priv_addset(/* priv_set_t *, const char * */); -extern void priv_copyset(/* const priv_set_t *, priv_set_t * */); -extern int priv_delset(/* priv_set_t *, const char * */); -extern boolean_t priv_ismember(/* const priv_set_t *, const char * */); - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/prof.h b/usr/src/head/prof.h index 792fd2137b..74c5aa35b1 100644 --- a/usr/src/head/prof.h +++ b/usr/src/head/prof.h @@ -24,6 +24,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright (c) 1996-1999 by Sun Microsystems, Inc. * All rights reserved. */ @@ -31,8 +33,6 @@ #ifndef _PROF_H #define _PROF_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.10.1.4 */ - #ifdef __cplusplus extern "C" { #endif @@ -42,8 +42,6 @@ extern "C" { #else #undef MARK -#if defined(__STDC__) - #if defined(__i386) #define MARK(K) {\ asm(" .data"); \ @@ -67,33 +65,6 @@ extern "C" { } #endif -#else /* __STDC__ */ - -#if defined(__i386) -#define MARK(K) {\ - asm(" .data"); \ - asm(" .align 4"); \ - asm(".K.:"); \ - asm(" .long 0"); \ - asm(" .text"); \ - asm("M.K:"); \ - asm(" movl $.K., %edx"); \ - asm(" call _mcount"); \ - } -#endif - -#if defined(__sparc) -#define MARK(K) {\ - asm(" .reserve .K., 4, \".bss\", 4"); \ - asm("M.K:"); \ - asm(" sethi %hi(.K.), %o0"); \ - asm(" call _mcount"); \ - asm(" or %o0, %lo(.K.), %o0"); \ - } -#endif - -#endif /* __STDC__ */ - #endif /* MARK */ #ifdef __cplusplus diff --git a/usr/src/head/prof_attr.h b/usr/src/head/prof_attr.h index b1ad96e116..ce84812b8e 100644 --- a/usr/src/head/prof_attr.h +++ b/usr/src/head/prof_attr.h @@ -19,6 +19,7 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -88,7 +89,6 @@ typedef struct profattr_s { kva_t *attr; /* array of key-value pair attributes */ } profattr_t; -#ifdef __STDC__ extern profattr_t *getprofnam(const char *); extern profattr_t *getprofattr(void); extern void getproflist(const char *, char **, int *); @@ -97,18 +97,6 @@ extern void endprofattr(void); extern void free_profattr(profattr_t *); extern void free_proflist(char **, int); -#else /* not __STDC__ */ - -extern profattr_t *getprofnam(); -extern profattr_t *getprofattr(); -extern void getproflist(); -extern int setprofattr(); -extern int endprofattr(); -extern void free_profattr(); -extern void free_proflist(); - -#endif - #ifdef __cplusplus } #endif diff --git a/usr/src/head/pthread.h b/usr/src/head/pthread.h index 6f778d02a0..8b1bddfa7c 100644 --- a/usr/src/head/pthread.h +++ b/usr/src/head/pthread.h @@ -20,6 +20,8 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -150,20 +152,10 @@ typedef struct _cleanup { uintptr_t pthread_cleanup_pad[4]; } _cleanup_t; -#ifdef __STDC__ - void __pthread_cleanup_push(void (*)(void *), void *, caddr_t, _cleanup_t *); void __pthread_cleanup_pop(int, _cleanup_t *); caddr_t _getfp(void); -#else /* __STDC__ */ - -void __pthread_cleanup_push(); -void __pthread_cleanup_pop(); -caddr_t _getfp(); - -#endif /* __STDC__ */ - #if __cplusplus extern "C" { #endif @@ -183,8 +175,6 @@ typedef void (*_Voidfp)(void*); /* pointer to extern "C" function */ __pthread_cleanup_pop(ex, &_cleanup_info); \ } -#ifdef __STDC__ - /* * function prototypes - thread related calls */ @@ -347,122 +337,6 @@ extern int pthread_mutexattr_setrobust_np(pthread_mutexattr_t *, int); extern int pthread_mutexattr_getrobust_np( const pthread_mutexattr_t *_RESTRICT_KYWD, int *_RESTRICT_KYWD); -#else /* __STDC__ */ - -/* - * function prototypes - thread related calls - */ -extern int pthread_atfork(); -extern int pthread_attr_init(); -extern int pthread_attr_destroy(); -extern int pthread_attr_setstack(); -extern int pthread_attr_getstack(); -extern int pthread_attr_setstacksize(); -extern int pthread_attr_getstacksize(); -extern int pthread_attr_setstackaddr(); -extern int pthread_attr_getstackaddr(); -extern int pthread_attr_setdetachstate(); -extern int pthread_attr_getdetachstate(); -extern int pthread_attr_setscope(); -extern int pthread_attr_getscope(); -extern int pthread_attr_setinheritsched(); -extern int pthread_attr_getinheritsched(); -extern int pthread_attr_setschedpolicy(); -extern int pthread_attr_getschedpolicy(); -extern int pthread_attr_setschedparam(); -extern int pthread_attr_getschedparam(); -extern int pthread_create(); -extern int pthread_once(); -extern int pthread_join(); -extern int pthread_detach(); -extern void pthread_exit(); -extern int pthread_cancel(); -extern int pthread_setschedparam(); -extern int pthread_getschedparam(); -extern int pthread_setschedprio(); -extern int pthread_setcancelstate(); -extern int pthread_setcanceltype(); -extern void pthread_testcancel(); -extern int pthread_equal(); -extern int pthread_key_create(); -extern int pthread_key_create_once_np(); -extern int pthread_key_delete(); -extern int pthread_setspecific(); -extern void *pthread_getspecific(); -extern pthread_t pthread_self(); -/* - * function prototypes - synchronization related calls - */ -extern int pthread_mutexattr_init(); -extern int pthread_mutexattr_destroy(); -extern int pthread_mutexattr_setpshared(); -extern int pthread_mutexattr_getpshared(); -extern int pthread_mutexattr_setprotocol(); -extern int pthread_mutexattr_getprotocol(); -extern int pthread_mutexattr_setprioceiling(); -extern int pthread_mutexattr_getprioceiling(); -extern int pthread_mutexattr_setrobust(); -extern int pthread_mutexattr_getrobust(); -extern int pthread_mutex_init(); -extern int pthread_mutex_consistent(); -extern int pthread_mutex_destroy(); -extern int pthread_mutex_lock(); -extern int pthread_mutex_timedlock(); -extern int pthread_mutex_reltimedlock_np(); -extern int pthread_mutex_unlock(); -extern int pthread_mutex_trylock(); -extern int pthread_mutex_setprioceiling(); -extern int pthread_mutex_getprioceiling(); -extern int pthread_condattr_init(); -extern int pthread_condattr_destroy(); -extern int pthread_condattr_setclock(); -extern int pthread_condattr_getclock(); -extern int pthread_condattr_setpshared(); -extern int pthread_condattr_getpshared(); -extern int pthread_cond_init(); -extern int pthread_cond_destroy(); -extern int pthread_cond_broadcast(); -extern int pthread_cond_signal(); -extern int pthread_cond_wait(); -extern int pthread_cond_timedwait(); -extern int pthread_cond_reltimedwait_np(); -extern int pthread_attr_getguardsize(); -extern int pthread_attr_setguardsize(); -extern int pthread_getconcurrency(); -extern int pthread_setconcurrency(); -extern int pthread_mutexattr_settype(); -extern int pthread_mutexattr_gettype(); -extern int pthread_rwlock_init(); -extern int pthread_rwlock_destroy(); -extern int pthread_rwlock_rdlock(); -extern int pthread_rwlock_tryrdlock(); -extern int pthread_rwlock_wrlock(); -extern int pthread_rwlock_trywrlock(); -extern int pthread_rwlock_unlock(); -extern int pthread_rwlockattr_init(); -extern int pthread_rwlockattr_destroy(); -extern int pthread_rwlockattr_getpshared(); -extern int pthread_rwlockattr_setpshared(); -extern int pthread_spin_init(); -extern int pthread_spin_destroy(); -extern int pthread_spin_lock(); -extern int pthread_spin_trylock(); -extern int pthread_spin_unlock(); -extern int pthread_barrierattr_init(); -extern int pthread_barrierattr_destroy(); -extern int pthread_barrierattr_setpshared(); -extern int pthread_barrierattr_getpshared(); -extern int pthread_barrier_init(); -extern int pthread_barrier_destroy(); -extern int pthread_barrier_wait(); - -/* Historical names -- present only for binary compatibility */ -extern int pthread_mutex_consistent_np(); -extern int pthread_mutexattr_setrobust_np(); -extern int pthread_mutexattr_getrobust_np(); - -#endif /* __STDC__ */ - #endif /* _ASM */ #ifdef __cplusplus diff --git a/usr/src/head/pw.h b/usr/src/head/pw.h index 4b6c9de8d4..a0cd690821 100644 --- a/usr/src/head/pw.h +++ b/usr/src/head/pw.h @@ -19,30 +19,22 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ - #ifndef _PW_H #define _PW_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */ - #ifdef __cplusplus extern "C" { #endif -#if defined(__STDC__) - extern char *logname(void); extern char *regcmp(const char *, ...); extern char *regex(const char *, const char *, ...); -#else -extern char *logname(); -extern char *regcmp(); -extern char *regex(); - -#endif #ifdef __cplusplus } diff --git a/usr/src/head/pwd.h b/usr/src/head/pwd.h index 47dc2f136b..409c658f27 100644 --- a/usr/src/head/pwd.h +++ b/usr/src/head/pwd.h @@ -24,6 +24,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,8 +33,6 @@ #ifndef _PWD_H #define _PWD_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3.1.9 */ - #include <sys/feature_tests.h> #include <sys/types.h> @@ -66,8 +66,6 @@ struct comment { }; #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ -#if defined(__STDC__) - extern struct passwd *getpwuid(uid_t); /* MT-unsafe */ extern struct passwd *getpwnam(const char *); /* MT-unsafe */ @@ -85,28 +83,6 @@ extern struct passwd *getpwent(void); /* MT-unsafe */ extern void setpwent(void); #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) ... */ -#else /* (__STDC__) */ - -extern struct passwd *getpwuid(); /* MT-unsafe */ -extern struct passwd *getpwnam(); /* MT-unsafe */ - -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern struct passwd *getpwent_r(); -extern struct passwd *fgetpwent_r(); - -extern struct passwd *fgetpwent(); /* MT-unsafe */ -extern int putpwent(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ - -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \ - defined(__EXTENSIONS__) -extern void endpwent(); -extern struct passwd *getpwent(); /* MT-unsafe */ -extern void setpwent(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) ... */ - -#endif /* (__STDC__) */ - /* * getpwuid_r() & getpwnam_r() prototypes are defined here. */ @@ -146,8 +122,6 @@ extern void setpwent(); #if !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE - 0 >= 199506L) || \ defined(_POSIX_PTHREAD_SEMANTICS) || defined(__EXTENSIONS__) -#if defined(__STDC__) - #if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) #ifdef __PRAGMA_REDEFINE_EXTNAME @@ -193,60 +167,6 @@ extern struct passwd *getpwnam_r(const char *, struct passwd *, char *, int); #endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ -#else /* __STDC__ */ - -#if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) - -#ifdef __PRAGMA_REDEFINE_EXTNAME -#pragma redefine_extname getpwuid_r __posix_getpwuid_r -#pragma redefine_extname getpwnam_r __posix_getpwnam_r -extern int getpwuid_r(); -extern int getpwnam_r(); -#else /* __PRAGMA_REDEFINE_EXTNAME */ - -extern int __posix_getpwuid_r(); -extern int __posix_getpwnam_r(); - -#ifdef __lint - -#define getpwuid_r __posix_getpwuid_r -#define getpwnam_r __posix_getpwnam_r - -#else /* !__lint */ - -static int -getpwuid_r(__uid, __pwd, __buf, __len, __res) - uid_t __uid; - struct passwd *__pwd; - char *__buf; - int __len; - struct passwd **__res; -{ - return (__posix_getpwuid_r(__uid, __pwd, __buf, __len, __res)); -} -static int -getpwnam_r(__cb, __pwd, __buf, __len, __res) - char *__cb; - struct passwd *__pwd; - char *__buf; - int __len; - struct passwd **__res; -{ - return (__posix_getpwnam_r(__cb, __pwd, __buf, __len, __res)); -} - -#endif /* !__lint */ -#endif /* __PRAGMA_REDEFINE_EXTNAME */ - -#else /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ - -extern struct passwd *getpwuid_r(); -extern struct passwd *getpwnam_r(); - -#endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ - -#endif /* __STDC__ */ - #endif /* !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE - 0 >= 199506L)... */ #ifdef __cplusplus diff --git a/usr/src/head/re_comp.h b/usr/src/head/re_comp.h index 9fecbfbb7c..ebec3caead 100644 --- a/usr/src/head/re_comp.h +++ b/usr/src/head/re_comp.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright (c) 1995, 2000 by Sun Microsystems, Inc. * All rights reserved. */ @@ -27,26 +29,15 @@ #ifndef _RE_COMP_H #define _RE_COMP_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/feature_tests.h> #ifdef __cplusplus extern "C" { #endif -#if defined(__STDC__) - extern char *re_comp(const char *); extern int re_exec(const char *); -#else - -extern char *re_comp(); -extern int re_exec(); - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/regex.h b/usr/src/head/regex.h index 7fc31e25e1..8131d756cc 100644 --- a/usr/src/head/regex.h +++ b/usr/src/head/regex.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -142,11 +144,7 @@ typedef struct { /* regcomp() data saved for regexec() */ /* subexpression positions */ typedef struct { -#ifdef __STDC__ const char *rm_sp, *rm_ep; /* Start pointer, end pointer */ -#else - char *rm_sp, *rm_ep; /* Start pointer, end pointer */ -#endif regoff_t rm_so, rm_eo; /* Start offset, end offset */ int rm_ss, rm_es; /* Used internally */ } regmatch_t; @@ -157,8 +155,6 @@ typedef struct { * on wide characters. */ -#if defined(__STDC__) - extern int regcomp(regex_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, int); extern int regexec(const regex_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t, regmatch_t *_RESTRICT_KYWD, int); @@ -166,15 +162,6 @@ extern size_t regerror(int, const regex_t *_RESTRICT_KYWD, char *_RESTRICT_KYWD, size_t); extern void regfree(regex_t *); -#else /* defined(__STDC__) */ - -extern int regcomp(); -extern int regexec(); -extern size_t regerror(); -extern void regfree(); - -#endif /* defined(__STDC__) */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/regexp.h b/usr/src/head/regexp.h index c8a58a1981..5336c81677 100644 --- a/usr/src/head/regexp.h +++ b/usr/src/head/regexp.h @@ -21,8 +21,9 @@ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ - /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,8 +31,6 @@ #ifndef _REGEXP_H #define _REGEXP_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.9 */ - #include <string.h> #ifdef __cplusplus @@ -70,23 +69,11 @@ static int size; static unsigned char bittab[] = { 1, 2, 4, 8, 16, 32, 64, 128 }; -#ifdef __STDC__ int advance(const char *lp, const char *ep); static void getrnge(const char *str); -#else -int advance(); -static void getrnge(); -#endif char * -#ifdef __STDC__ compile(char *instring, char *ep, const char *endbuf, int seof) -#else -compile(instring, ep, endbuf, seof) -register char *ep; -char *instring, *endbuf; -int seof; -#endif { INIT /* Dependent declarations and initializations */ register int c; @@ -315,14 +302,8 @@ int seof; /*NOTREACHED*/ } -#ifdef __STDC__ int step(const char *p1, const char *p2) -#else -int -step(p1, p2) -register char *p1, *p2; -#endif { char c; @@ -355,18 +336,9 @@ register char *p1, *p2; } int -#ifdef __STDC__ advance(const char *lp, const char *ep) -#else -advance(lp, ep) -register char *lp, *ep; -#endif { -#ifdef __STDC__ const char *curlp; -#else - register char *curlp; -#endif int c; char *bbeg; register char neg; @@ -580,12 +552,7 @@ register char *lp, *ep; } static void -#ifdef __STDC__ getrnge(const char *str) -#else -getrnge(str) -register char *str; -#endif { low = *str++ & 0377; size = ((*str & 0377) == 255)? 20000: (*str &0377) - low; diff --git a/usr/src/head/resolv.h b/usr/src/head/resolv.h index 90149fe77d..2d3ceb69b2 100644 --- a/usr/src/head/resolv.h +++ b/usr/src/head/resolv.h @@ -1,4 +1,6 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * @@ -130,15 +132,9 @@ void __h_errno_set(struct __res_state *res, int err); #define _PATH_RESCONF "/etc/resolv.conf" #endif -#ifdef __STDC__ #ifndef __P #define __P(x) x #endif -#else -#ifndef __P -#define __P(x) () -#endif -#endif /* __STDC__ */ typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error } res_sendhookact; diff --git a/usr/src/head/rpcsvc/nis_db.h b/usr/src/head/rpcsvc/nis_db.h index ff4b1a24a6..65efd4b2ba 100644 --- a/usr/src/head/rpcsvc/nis_db.h +++ b/usr/src/head/rpcsvc/nis_db.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright (c) 1991,1997-1998 by Sun Microsystems, Inc. * All rights reserved. */ @@ -34,8 +36,6 @@ #ifndef _RPCSVC_NIS_DB_H #define _RPCSVC_NIS_DB_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <rpc/rpc.h> #include <rpcsvc/nis.h> @@ -89,8 +89,6 @@ typedef struct db_result db_result; * Prototypes for the database functions. */ -#if defined(__STDC__) || defined(__cplusplus) - extern bool_t db_initialize(char *); extern db_status db_create_table(char *, table_obj *); extern db_status db_destroy_table(char *); @@ -106,25 +104,6 @@ extern db_status db_table_exists(char *); extern db_status db_unload_table(char *); extern void db_free_result(db_result *); -#else /* Non-prototype definitions */ - -extern bool_t db_initialize(); -extern db_status db_create_table(); -extern db_status db_destroy_table(); -extern db_result *db_first_entry(); -extern db_result *db_next_entry(); -extern db_result *db_reset_next_entry(); -extern db_result *db_list_entries(); -extern db_result *db_add_entry(); -extern db_result *db_remove_entry(); -extern db_status db_checkpoint(); -extern db_status db_standby(); -extern db_status db_table_exists(); -extern db_status db_unload_table(); -extern void db_free_result(); - -#endif /* defined(__STDC__) || defined(__cplusplus) */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/rpcsvc/nislib.h b/usr/src/head/rpcsvc/nislib.h index e4e929ff31..d1abc4aee7 100644 --- a/usr/src/head/rpcsvc/nislib.h +++ b/usr/src/head/rpcsvc/nislib.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,7 @@ * nislib.h * * This file contains the interfaces that are visible in the SunOS 5.x - * implementation of NIS Plus. When using C++ the defined __cplusplus and - * __STDC__ should both be true. + * implementation of NIS Plus. */ #ifndef _RPCSVC_NISLIB_H @@ -39,7 +40,6 @@ extern "C" { #endif -#ifdef __STDC__ extern name_pos nis_dir_cmp(nis_name, nis_name); extern nis_name nis_domain_of(nis_name); @@ -61,32 +61,6 @@ extern nis_name __nis_rpc_domain(void); CLIENT *__nis_clnt_create(int, struct netconfig *, char *, struct netbuf *, int, int, int, int, int); -#else - -/* Non-prototype definitions (old fashioned C) */ - -extern name_pos nis_dir_cmp(); - -extern nis_name nis_domain_of(); -extern nis_name nis_leaf_of(); -extern nis_name nis_leaf_of_r(); -extern nis_name nis_name_of(); -extern nis_name nis_local_group(); -extern nis_name nis_local_directory(); -extern nis_name nis_local_host(); - -extern void nis_destroy_object(); -extern nis_object *nis_clone_object(); - -extern nis_object *nis_read_obj(); -extern int nis_write_obj(); -extern void *nis_get_static_storage(); -extern nis_name __nis_rpc_domain(); - -CLIENT *__nis_clnt_create(); - -#endif - #ifdef __cplusplus } #endif diff --git a/usr/src/head/rpcsvc/yp_prot.h b/usr/src/head/rpcsvc/yp_prot.h index 5a9bb75164..6dc4841e9a 100644 --- a/usr/src/head/rpcsvc/yp_prot.h +++ b/usr/src/head/rpcsvc/yp_prot.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -35,8 +37,6 @@ #ifndef _RPCSVC_YP_PROT_H #define _RPCSVC_YP_PROT_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <rpc/rpc.h> #include <rpcsvc/ypclnt.h> #include <ndbm.h> @@ -360,7 +360,6 @@ struct yppushresp_xfr { #define YPPUSH_REFUSED (-14) /* Transfer request refused by ypserv */ #define YPPUSH_NOALIAS (-15) /* Alias not found for map or domain */ -#ifdef __STDC__ extern bool xdr_datum(XDR *, datum *); extern bool xdr_ypdomain_wrap_string(XDR *, char **); extern bool xdr_ypmap_wrap_string(XDR *, char **); @@ -378,27 +377,6 @@ extern bool xdr_ypresp_master(XDR *, struct ypresp_master *); extern bool xdr_ypall(XDR *, struct ypall_callback *); extern bool xdr_ypresp_maplist(XDR *, struct ypresp_maplist *); -#else - -extern bool xdr_datum(); -extern bool xdr_ypdomain_wrap_string(); -extern bool xdr_ypmap_wrap_string(); -extern bool xdr_ypreq_key(); -extern bool xdr_ypreq_nokey(); -extern bool xdr_ypreq_xfr(); -extern bool xdr_ypreq_newxfr(); -extern bool xdr_ypresp_val(); -extern bool xdr_ypresp_key_val(); -extern bool xdr_yp_inaddr(); -extern bool xdr_ypmap_parms(); -extern bool xdr_ypowner_wrap_string(); -extern bool xdr_yppushresp_xfr(); -extern bool xdr_ypresp_order(); -extern bool xdr_ypresp_master(); -extern bool xdr_ypall(); -extern bool xdr_ypresp_maplist(); -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/rpcsvc/ypclnt.h b/usr/src/head/rpcsvc/ypclnt.h index d80cf82a62..39c93c6898 100644 --- a/usr/src/head/rpcsvc/ypclnt.h +++ b/usr/src/head/rpcsvc/ypclnt.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 1989 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -35,8 +37,6 @@ #ifndef _RPCSVC_YPCLNT_H #define _RPCSVC_YPCLNT_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -100,7 +100,6 @@ struct ypall_callback { * External yp client function references. */ -#ifdef __STDC__ extern int yp_bind(char *); extern void yp_unbind(char *); extern int yp_get_default_domain(char **); @@ -114,23 +113,6 @@ extern char *yperr_string(int); extern int ypprot_err(int); extern int yp_update(char *, char *, unsigned, char *, int, char *, int); -#else - -extern int yp_bind(); -extern int __yp_dobind(); -extern void yp_unbind(); -extern int yp_get_default_domain(); -extern int yp_match(); -extern int yp_first(); -extern int yp_next(); -extern int yp_master(); -extern int yp_order(); -extern int yp_all(); -extern char *yperr_string(); -extern int ypprot_err(); -extern int yp_update(); -#endif /* __STDC__ */ - /* * Global yp data structures */ diff --git a/usr/src/head/rtld_db.h b/usr/src/head/rtld_db.h index c442087237..0bfe30057e 100644 --- a/usr/src/head/rtld_db.h +++ b/usr/src/head/rtld_db.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -26,9 +28,6 @@ #ifndef _RTLD_DB_H #define _RTLD_DB_H -#pragma ident "%Z%%M% %I% %E% SMI" - - #ifdef __cplusplus extern "C" { #endif @@ -135,11 +134,7 @@ typedef struct rd_loadobj { #define RD_CTL_SET_HELPPATH 0x01 /* Set the path used to find helpers */ typedef struct rd_agent rd_agent_t; -#ifdef __STDC__ typedef int rl_iter_f(const rd_loadobj_t *, void *); -#else -typedef int rl_iter_f(); -#endif /* @@ -175,7 +170,6 @@ struct ps_prochandle; /* * librtld_db.so entry points */ -#ifdef __STDC__ extern void rd_delete(rd_agent_t *); extern char *rd_errstr(rd_err_e rderr); extern rd_err_e rd_event_addr(rd_agent_t *, rd_event_e, rd_notify_t *); @@ -192,22 +186,6 @@ extern rd_err_e rd_plt_resolution(rd_agent_t *, psaddr_t, lwpid_t, psaddr_t, rd_plt_info_t *); extern rd_err_e rd_get_dyns(rd_agent_t *, psaddr_t, void **, size_t *); extern rd_err_e rd_reset(struct rd_agent *); -#else /* !__STDC__ */ -extern void rd_delete(); -extern char *rd_errstr(); -extern rd_err_e rd_event_addr(); -extern rd_err_e rd_event_enable(); -extern rd_err_e rd_event_getmsg(); -extern rd_err_e rd_init(); -extern rd_err_e rd_ctl(); -extern rd_err_e rd_loadobj_iter(); -extern void rd_log(); -extern rd_agent_t *rd_new(); -extern rd_err_e rd_objpad_enable(); -extern rd_err_e rd_plt_resolution(); -extern rd_err_e rd_get_dyns(); -extern rd_err_e rd_reset(); -#endif /* !__STDC__ */ #ifdef __cplusplus } diff --git a/usr/src/head/sac.h b/usr/src/head/sac.h index 7d205380e8..e263a74bc1 100644 --- a/usr/src/head/sac.h +++ b/usr/src/head/sac.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright (c) 1997-1998 by Sun Microsystems, Inc. * All rights reserved. */ @@ -31,8 +33,6 @@ #ifndef _SAC_H #define _SAC_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.4 */ - #include <sys/types.h> #ifdef __cplusplus @@ -143,11 +143,7 @@ struct sacmsg { #define E_RECOVER 9 /* in recovery */ #define E_SACNOTRUN 10 /* sac daemon is not running */ -#ifdef __STDC__ extern int doconfig(int, char *, long); -#else -extern int doconfig(); -#endif #ifdef __cplusplus } diff --git a/usr/src/head/sched.h b/usr/src/head/sched.h index 7460ff82c3..5eed5fb371 100644 --- a/usr/src/head/sched.h +++ b/usr/src/head/sched.h @@ -20,6 +20,8 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _SCHED_H #define _SCHED_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <time.h> @@ -56,7 +56,6 @@ struct sched_param { /* * function prototypes */ -#if defined(__STDC__) int sched_getparam(pid_t, struct sched_param *); int sched_setparam(pid_t, const struct sched_param *); int sched_getscheduler(pid_t); @@ -65,16 +64,6 @@ int sched_yield(void); int sched_get_priority_max(int); int sched_get_priority_min(int); int sched_rr_get_interval(pid_t, struct timespec *); -#else -int sched_getparam(); -int sched_setparam(); -int sched_getscheduler(); -int sched_setscheduler(); -int sched_yield(); -int sched_get_priority_max(); -int sched_get_priority_min(); -int sched_rr_get_interval(); -#endif /* __STDC__ */ #ifdef __cplusplus } diff --git a/usr/src/head/schedctl.h b/usr/src/head/schedctl.h index 3e6f261c7f..3d7349828f 100644 --- a/usr/src/head/schedctl.h +++ b/usr/src/head/schedctl.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 1996-2003 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _SCHEDCTL_H #define _SCHEDCTL_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -51,15 +51,9 @@ extern void yield(void); /* * libsched API */ -#if defined(__STDC__) schedctl_t *schedctl_init(void); schedctl_t *schedctl_lookup(void); void schedctl_exit(void); -#else -schedctl_t *schedctl_init(); -schedctl_t *schedctl_lookup(); -void schedctl_exit(); -#endif /* __STDC__ */ #ifdef __cplusplus } diff --git a/usr/src/head/search.h b/usr/src/head/search.h index 0af11254c8..de7fe97be1 100644 --- a/usr/src/head/search.h +++ b/usr/src/head/search.h @@ -22,8 +22,9 @@ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ - /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,8 +32,6 @@ #ifndef _SEARCH_H #define _SEARCH_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3.1.11 */ - #include <sys/feature_tests.h> #include <sys/types.h> @@ -52,8 +51,6 @@ struct qelem { typedef struct entry { char *key, *data; } ENTRY; -#if defined(__STDC__) - int hcreate(size_t); void hdestroy(void); ENTRY *hsearch(ENTRY, ACTION); @@ -62,35 +59,16 @@ void insque(void *, void *); void remque(void *); #endif -#else /* defined(__STDC__) */ - -int hcreate(); -void hdestroy(); -ENTRY *hsearch(); -#if defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) || defined(_XPG4_2) -void insque(); -void remque(); -#endif - -#endif /* defined(__STDC__) */ /* TSEARCH(3C) */ typedef enum { preorder, postorder, endorder, leaf } VISIT; -#if defined(__STDC__) void *tdelete(const void *_RESTRICT_KYWD, void **_RESTRICT_KYWD, int (*)(const void *, const void *)); void *tfind(const void *, void *const *, int (*)(const void *, const void *)); void *tsearch(const void *, void **, int (*)(const void *, const void *)); void twalk(const void *, void (*)(const void *, VISIT, int)); -#else -void *tdelete(); -void *tfind(); -void *tsearch(); -void twalk(); -#endif -#if defined(__STDC__) #if defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) /* BSEARCH(3C) */ @@ -103,11 +81,6 @@ void *lfind(const void *, const void *, size_t *, size_t, int (*)(const void *, const void *)); void *lsearch(const void *, void *, size_t *, size_t, int (*)(const void *, const void *)); -#else -void *bsearch(); -void *lfind(); -void *lsearch(); -#endif #ifdef __cplusplus } diff --git a/usr/src/head/semaphore.h b/usr/src/head/semaphore.h index 6a77eab5da..08f8fe1c1e 100644 --- a/usr/src/head/semaphore.h +++ b/usr/src/head/semaphore.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _SEMAPHORE_H #define _SEMAPHORE_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/feature_tests.h> #include <sys/types.h> @@ -52,7 +52,6 @@ typedef struct { /* * function prototypes */ -#if defined(__STDC__) int sem_init(sem_t *, int, unsigned int); int sem_destroy(sem_t *); sem_t *sem_open(const char *, int, ...); @@ -75,21 +74,6 @@ int sem_reltimedwait_np(sem_t *_RESTRICT_KYWD, int sem_trywait(sem_t *); int sem_post(sem_t *); int sem_getvalue(sem_t *_RESTRICT_KYWD, int *_RESTRICT_KYWD); -#else -int sem_init(); -int sem_destroy(); -sem_t *sem_open(); -int sem_close(); -int sem_unlink(); -int sem_wait(); -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__) -int sem_timedwait(); -int sem_reltimedwait_np(); -#endif /* #if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) ... */ -int sem_trywait(); -int sem_post(); -int sem_getvalue(); -#endif /* __STDC__ */ #ifdef __cplusplus } diff --git a/usr/src/head/setjmp.h b/usr/src/head/setjmp.h index fe85be6b84..c95e4cac0d 100644 --- a/usr/src/head/setjmp.h +++ b/usr/src/head/setjmp.h @@ -22,8 +22,9 @@ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ - /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -46,8 +47,6 @@ using std::longjmp; extern "C" { #endif -#if defined(__STDC__) - #if !defined(_STRICT_STDC) || defined(__XOPEN_OR_POSIX) || \ defined(__EXTENSIONS__) /* non-ANSI standard compilation */ @@ -63,20 +62,6 @@ extern int sigsetjmp(sigjmp_buf, int) __RETURNS_TWICE; extern void siglongjmp(sigjmp_buf, int) __NORETURN; #endif -#else /* __STDC__ */ - -#if defined(_LP64) || defined(_I32LPx) -typedef long sigjmp_buf[_SIGJBLEN]; -#else -typedef int sigjmp_buf[_SIGJBLEN]; -#endif - -extern int sigsetjmp() __RETURNS_TWICE; -#pragma unknown_control_flow(sigsetjmp) -extern void siglongjmp(); - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/shadow.h b/usr/src/head/shadow.h index d7a5582365..8f1c94734e 100644 --- a/usr/src/head/shadow.h +++ b/usr/src/head/shadow.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -71,8 +73,6 @@ struct spwd { #define FAILCOUNT_MASK 0xF }; -#if defined(__STDC__) - #ifndef _STDIO_H #include <stdio.h> #endif @@ -93,17 +93,6 @@ extern int putspent(const struct spwd *, FILE *); extern int lckpwdf(void); extern int ulckpwdf(void); -#else - -/* Declare all shadow password functions */ - -struct spwd *getspent_r(), *fgetspent_r(), *getspnam_r(); -void setspent(), endspent(); -struct spwd *getspent(), *fgetspent(), *getspnam(); /* MT-unsafe */ -int putspent(), lckpwdf(), ulckpwdf(); - -#endif - #ifdef __cplusplus } #endif diff --git a/usr/src/head/siginfo.h b/usr/src/head/siginfo.h index 01d3793931..249f1163b8 100644 --- a/usr/src/head/siginfo.h +++ b/usr/src/head/siginfo.h @@ -19,15 +19,15 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ - #ifndef _SIGINFO_H #define _SIGINFO_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - #include <sys/types.h> #include <sys/siginfo.h> @@ -40,7 +40,6 @@ struct siginfolist { char **vsiginfo; }; -#ifdef __STDC__ extern const char * _sys_illlist[]; extern const char * _sys_fpelist[]; extern const char * _sys_segvlist[]; @@ -49,29 +48,10 @@ extern const char * _sys_traplist[]; extern const char * _sys_cldlist[]; extern const struct siginfolist *_sys_siginfolistp; #define _sys_siginfolist _sys_siginfolistp -#else -extern char * _sys_illlist[]; -extern char * _sys_fpelist[]; -extern char * _sys_segvlist[]; -extern char * _sys_buslist[]; -extern char * _sys_traplist[]; -extern char * _sys_cldlist[]; -extern struct siginfolist *_sys_siginfolistp; -#define _sys_siginfolist _sys_siginfolistp -#endif - -#if defined(__STDC__) extern void psignal(int, const char *); extern void psiginfo(siginfo_t *, char *); -#else - -extern void psignal(); -extern void psiginfo(); - -#endif - #ifdef __cplusplus } #endif diff --git a/usr/src/head/signal.h b/usr/src/head/signal.h index 127cc6ad0c..b6030d9aa3 100644 --- a/usr/src/head/signal.h +++ b/usr/src/head/signal.h @@ -22,8 +22,9 @@ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ - /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,8 +32,6 @@ #ifndef _SIGNAL_H #define _SIGNAL_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.5.3.4 */ - #include <sys/feature_tests.h> #if defined(__EXTENSIONS__) || !defined(_STRICT_STDC) || \ @@ -58,8 +57,6 @@ extern "C" { #endif -#if defined(__STDC__) - extern const char **_sys_siglistp; /* signal descriptions */ extern const int _sys_siglistn; /* # of signal descriptions */ @@ -132,76 +129,6 @@ extern int sigtimedwait(const sigset_t *_RESTRICT_KYWD, extern int sigqueue(pid_t, int, const union sigval); #endif /* defined(__EXTENSIONS__) || (!defined(_STRICT_STDC) && */ -#else /* __STDC__ */ - -extern char **_sys_siglistp; /* signal descriptions */ -extern int _sys_siglistn; /* # of signal descriptions */ - -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) -#define _sys_siglist _sys_siglistp -#define _sys_nsig _sys_siglistn -#endif - -#if defined(__EXTENSIONS__) || defined(__XOPEN_OR_POSIX) -extern int kill(); -extern int sigaction(); -#ifndef _KERNEL -extern int sigaddset(); -extern int sigdelset(); -extern int sigemptyset(); -extern int sigfillset(); -extern int sigismember(); -#endif -extern int sigpending(); -extern int sigprocmask(); -extern int sigsuspend(); -#endif /* defined(__EXTENSIONS__)... */ - -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ - defined(_XPG4_2) -extern void (*bsd_signal())(); -extern int killpg(); -extern int siginterrupt(); -#endif /* defined(__EXTENSIONS__) ... */ - -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ - (defined(_XPG4_2) && !defined(_XPG6)) -extern int sigstack(); -#endif - -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) -extern int gsignal(); -extern int (*ssignal)(); -extern int sigsend(); -extern int sigsendset(); -extern int sig2str(); -extern int str2sig(); -#define SIG2STR_MAX 32 -#endif - -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ - defined(_XPG4_2) -extern int sigaltstack(); -extern int sighold(); -extern int sigignore(); -extern int sigpause(); -extern int sigrelse(); -extern void (*sigset())(); -#endif - -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ - (_POSIX_C_SOURCE > 2) -#include <sys/siginfo.h> -#include <sys/time.h> -extern int pthread_kill(); -extern int pthread_sigmask(); -extern int sigwaitinfo(); -extern int sigtimedwait(); -extern int sigqueue(); -#endif - -#endif /* __STDC__ */ - /* * sigwait() prototype is defined here. */ @@ -210,8 +137,6 @@ extern int sigqueue(); !defined(__XOPEN_OR_POSIX)) || (_POSIX_C_SOURCE - 0 >= 199506L) || \ defined(_POSIX_PTHREAD_SEMANTICS) -#if defined(__STDC__) - #if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) #ifdef __PRAGMA_REDEFINE_EXTNAME @@ -241,42 +166,6 @@ extern int sigwait(sigset_t *); #endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ - -#else /* __STDC__ */ - - -#if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) - -#ifdef __PRAGMA_REDEFINE_EXTNAME -#pragma redefine_extname sigwait __posix_sigwait -extern int sigwait(); -#else /* __PRAGMA_REDEFINE_EXTNAME */ - -extern int __posix_sigwait(); - -#ifdef __lint -#define sigwait __posix_sigwait -#else /* !__lint */ - -static int -sigwait(__setp, __signo) - sigset_t *__setp; - int *__signo; -{ - return (__posix_sigwait(__setp, __signo)); -} - -#endif /* !__lint */ -#endif /* __PRAGMA_REDEFINE_EXTNAME */ - -#else /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ - -extern int sigwait(); - -#endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ - -#endif /* __STDC__ */ - #endif /* defined(__EXTENSIONS__) || (!defined(_STRICT_STDC) ... */ #ifdef __cplusplus diff --git a/usr/src/head/spawn.h b/usr/src/head/spawn.h index a577c92009..4bfb1ac3a2 100644 --- a/usr/src/head/spawn.h +++ b/usr/src/head/spawn.h @@ -20,6 +20,8 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -67,8 +69,6 @@ typedef struct { void *__file_attrp; /* implementation-private */ } posix_spawn_file_actions_t; -#if defined(__STDC__) - extern int posix_spawn( pid_t *_RESTRICT_KYWD pid, const char *_RESTRICT_KYWD path, @@ -188,38 +188,6 @@ extern int posix_spawnattr_getsigmask( const posix_spawnattr_t *_RESTRICT_KYWD attr, sigset_t *_RESTRICT_KYWD sigmask); -#else /* __STDC__ */ - -extern int posix_spawn(); -extern int posix_spawnp(); -extern int posix_spawn_file_actions_init(); -extern int posix_spawn_file_actions_destroy(); -extern int posix_spawn_file_actions_addopen(); -extern int posix_spawn_file_actions_addclose(); -extern int posix_spawn_file_actions_adddup2(); -extern int posix_spawnattr_init(); -extern int posix_spawnattr_destroy(); -extern int posix_spawnattr_setflags(); -extern int posix_spawnattr_getflags(); -extern int posix_spawnattr_setpgroup(); -extern int posix_spawnattr_getpgroup(); -extern int posix_spawnattr_setschedparam(); -extern int posix_spawnattr_getschedparam(); -extern int posix_spawnattr_setschedpolicy(); -extern int posix_spawnattr_getschedpolicy(); -extern int posix_spawnattr_setsigdefault(); -extern int posix_spawnattr_getsigdefault(); -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern int posix_spawn_pipe_np(); -extern int posix_spawn_file_actions_addclosefrom_np(); -extern int posix_spawnattr_setsigignore_np(); -extern int posix_spawnattr_getsigignore_np(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ -extern int posix_spawnattr_setsigmask(); -extern int posix_spawnattr_getsigmask(); - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/stdarg.h b/usr/src/head/stdarg.h index 73684dfa9e..86d5734f10 100644 --- a/usr/src/head/stdarg.h +++ b/usr/src/head/stdarg.h @@ -22,8 +22,9 @@ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ - /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,8 +32,6 @@ #ifndef _STDARG_H #define _STDARG_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.8 */ - /* * This header defines the ISO C 1989, ISO C++ 1998, and ISO C 1999 * variable argument definitions. For legacy support, it also defines @@ -45,8 +44,6 @@ * names into the users' namespace. */ -#if defined(__STDC__) - #include <iso/stdarg_iso.h> #include <iso/stdarg_c99.h> @@ -58,10 +55,4 @@ using std::va_list; #endif -#else /* __STDC__ */ - -#include <varargs.h> - -#endif /* __STDC__ */ - #endif /* _STDARG_H */ diff --git a/usr/src/head/stdio.h b/usr/src/head/stdio.h index d4178a4c0e..65003f56a8 100644 --- a/usr/src/head/stdio.h +++ b/usr/src/head/stdio.h @@ -20,6 +20,7 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -215,19 +216,11 @@ extern unsigned char _sibuf[], _sobuf[]; /* large file compilation environment setup */ #if !defined(_LP64) && _FILE_OFFSET_BITS == 64 #if !defined(__PRAGMA_REDEFINE_EXTNAME) -#if defined(__STDC__) extern FILE *fopen64(const char *, const char *); extern FILE *freopen64(const char *, const char *, FILE *); extern FILE *tmpfile64(void); extern int fgetpos64(FILE *, fpos_t *); extern int fsetpos64(FILE *, const fpos_t *); -#else /* defined(__STDC__) */ -extern FILE *fopen64(); -extern FILE *freopen64(); -extern FILE *tmpfile64(); -extern int fgetpos64(); -extern int fsetpos64(); -#endif /* defined(__STDC__) */ #define fopen fopen64 #define freopen freopen64 #define tmpfile tmpfile64 @@ -269,8 +262,6 @@ typedef int ssize_t; /* (historical version) */ #endif #endif /* !_SSIZE_T */ -#if defined(__STDC__) - #if defined(__EXTENSIONS__) || \ (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ defined(_REENTRANT) @@ -371,94 +362,11 @@ extern int fseeko64(FILE *, off64_t, int); extern off64_t ftello64(FILE *); #endif -#else /* !defined __STDC__ */ - -#ifndef _LP64 -#define _bufend(p) ((fileno(p) < _NFILE) ? _bufendtab[fileno(p)] : \ - (unsigned char *)_realbufend(p)) -#define _bufsiz(p) (_bufend(p) - (p)->_base) -#endif /* _LP64 */ - -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ - defined(_REENTRANT) -extern char *tmpnam_r(); -#endif - -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) -extern int fcloseall(); -extern void setbuffer(); -extern int setlinebuf(); -extern int asprintf(); -extern int vasprintf(); -#endif - -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) - /* || defined(_XPG7) */ -extern ssize_t getdelim(); -extern ssize_t getline(); -#endif /* __EXTENSIONS__ ... */ - -#if defined(__EXTENSIONS__) || defined(__XOPEN_OR_POSIX) -extern FILE *fdopen(); -extern char *ctermid(); -extern int fileno(); -#endif /* defined(__EXTENSIONS__) || defined(__XOPEN_OR_POSIX) */ - -#if defined(__EXTENSIONS__) || defined(_REENTRANT) || \ - (_POSIX_C_SOURCE - 0 >= 199506L) -extern void flockfile(); -extern int ftrylockfile(); -extern void funlockfile(); -extern int getc_unlocked(); -extern int getchar_unlocked(); -extern int putc_unlocked(); -extern int putchar_unlocked(); -#endif /* defined(__EXTENSIONS__) || defined(_REENTRANT).. */ - -#if defined(__EXTENSIONS__) || defined(_XOPEN_SOURCE) -extern FILE *popen(); -extern char *tempnam(); -extern int pclose(); - -#if !defined(_XOPEN_SOURCE) -extern int getsubopt(); -#endif /* !defined(_XOPEN_SOURCE) */ - -#if !defined(_XPG6) || defined(__EXTENSIONS__) -extern char *cuserid(); -extern int getopt(); -extern char *optarg; -extern int optind, opterr, optopt; -extern int getw(); -extern int putw(); -#endif /* !defined(_XPG6) || defined(__EXTENSIONS__) */ - -#endif /* defined(__EXTENSIONS__) || defined(_XOPEN_SOURCE) */ - -#if defined(_LARGEFILE_SOURCE) || defined(_XPG5) -extern int fseeko(); -extern off_t ftello(); -#endif - -#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ - !defined(__PRAGMA_REDEFINE_EXTNAME)) -extern FILE *fopen64(); -extern FILE *freopen64(); -extern FILE *tmpfile64(); -extern int fgetpos64(); -extern int fsetpos64(); -extern int fseeko64(); -extern off64_t ftello64(); -#endif - -#endif /* __STDC__ */ - #if !defined(__lint) #if defined(__EXTENSIONS__) || defined(_REENTRANT) || \ (_POSIX_C_SOURCE - 0 >= 199506L) #ifndef _LP64 -#ifdef __STDC__ #define getc_unlocked(p) (--(p)->_cnt < 0 \ ? __filbuf(p) \ : (int)*(p)->_ptr++) @@ -466,15 +374,6 @@ extern off64_t ftello64(); ? __flsbuf((x), (p)) \ : (int)(*(p)->_ptr++ = \ (unsigned char) (x))) -#else -#define getc_unlocked(p) (--(p)->_cnt < 0 \ - ? _filbuf(p) \ - : (int)*(p)->_ptr++) -#define putc_unlocked(x, p) (--(p)->_cnt < 0 \ - ? _flsbuf((x), (p)) \ - : (int)(*(p)->_ptr++ = \ - (unsigned char) (x))) -#endif /* __STDC__ */ #endif /* _LP64 */ #define getchar_unlocked() getc_unlocked(stdin) #define putchar_unlocked(x) putc_unlocked((x), stdout) diff --git a/usr/src/head/stdlib.h b/usr/src/head/stdlib.h index 855c31bc39..4aaee3ca30 100644 --- a/usr/src/head/stdlib.h +++ b/usr/src/head/stdlib.h @@ -20,6 +20,7 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> * Copyright (c) 2013 Gary Mills * * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. @@ -87,8 +88,6 @@ extern "C" { typedef unsigned int uid_t; /* UID type */ #endif /* !_UID_T */ -#if defined(__STDC__) - /* large file compilation environment setup */ #if !defined(_LP64) && _FILE_OFFSET_BITS == 64 @@ -261,128 +260,6 @@ extern char *ulltostr(unsigned long long, char *); #endif /* defined(__EXTENSIONS__) || !defined(_STRICT_STDC) ... */ -#else /* not __STDC__ */ - -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ - (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT) -extern int rand_r(); -#endif /* defined(__EXTENSIONS__) || defined(_REENTRANT) ... */ - -extern void _exithandle(); - -#if defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) || defined(_XPG4) -extern double drand48(); -extern double erand48(); -extern long jrand48(); -extern void lcong48(); -extern long lrand48(); -extern long mrand48(); -extern long nrand48(); -extern unsigned short *seed48(); -extern void srand48(); -extern int putenv(); -extern void setkey(); -#endif /* defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) ... */ - -#if (defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE)) && \ - (!defined(_XOPEN_SOURCE) || (defined(_XPG3) && !defined(_XPG4))) -extern void swab(); -#endif - -#if defined(__EXTENSIONS__) || \ - !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \ - (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) -extern int mkstemp(); -#if !defined(_XPG4_2) || defined(__EXTENSIONS__) -extern int mkstemps(); -#endif -#endif /* defined(__EXTENSIONS__) ... */ - -#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ - !defined(__PRAGMA_REDEFINE_EXTNAME)) -extern int mkstemp64(); -#if !defined(_XPG4_2) || defined(__EXTENSIONS__) -extern int mkstemps64(); -#endif -#endif /* _LARGEFILE64_SOURCE... */ - -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) -extern long a64l(); -extern char *ecvt(); -extern char *fcvt(); -extern char *gcvt(); -extern int getsubopt(); -extern int grantpt(); -extern char *initstate(); -extern char *l64a(); -extern char *mktemp(); -extern char *ptsname(); -extern long random(); -extern char *realpath(); -extern char *setstate(); -extern void srandom(); -/* Marked LEGACY in SUSv2 and removed in SUSv3 */ -#if !defined(_XPG6) || defined(__EXTENSIONS__) -extern int ttyslot(); -extern void *valloc(); -#endif /* !defined(_XPG6) || defined(__EXTENSIONS__) */ -#endif /* defined(__EXTENSIONS__) || ... || defined(_XPG4_2) */ - -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG6) -extern int posix_memalign(); -extern int posix_openpt(); -extern int setenv(); -extern int unsetenv(); -#endif - -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) -extern char *canonicalize_file_name(); -extern int clearenv(); -extern void closefrom(); -extern int daemon(); -extern int dup2(); -extern int dup3(); -extern int fdwalk(); -extern char *qecvt(); -extern char *qfcvt(); -extern char *qgcvt(); -extern char *getcwd(); -extern char *getexecname(); - -#ifndef __GETLOGIN_DEFINED /* Avoid duplicate in unistd.h */ -#define __GETLOGIN_DEFINED -#ifndef __USE_LEGACY_LOGNAME__ -#ifdef __PRAGMA_REDEFINE_EXTNAME -#pragma redefine_extname getlogin getloginx -#else /* __PRAGMA_REDEFINE_EXTNAME */ -extern char *getloginx(); -#define getlogin getloginx -#endif /* __PRAGMA_REDEFINE_EXTNAME */ -#endif /* __USE_LEGACY_LOGNAME__ */ -extern char *getlogin(); -#endif /* __GETLOGIN_DEFINED */ - -extern int getopt(); -extern char *optarg; -extern int optind, opterr, optopt; -extern char *getpass(); -extern char *getpassphrase(); -extern int getpw(); -extern int isatty(); -extern void *memalign(); -extern char *ttyname(); -extern char *mkdtemp(); -extern char *getprogname(); -extern void setprogname(); - -#if defined(_LONGLONG_TYPE) -extern char *lltostr(); -extern char *ulltostr(); -#endif /* defined(_LONGLONG_TYPE) */ -#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/string.h b/usr/src/head/string.h index ebdb64fb2a..8ef411a60b 100644 --- a/usr/src/head/string.h +++ b/usr/src/head/string.h @@ -66,8 +66,6 @@ using std::strxfrm; extern "C" { #endif -#if defined(__STDC__) - #if defined(__EXTENSIONS__) || \ (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ defined(_XPG6) || defined(_REENTRANT) @@ -191,64 +189,6 @@ extern __thread size_t __strdupa_len; #endif /* __GNUC__ */ #endif /* __EXTENSIONS__ ... */ -#else /* __STDC__ */ - -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ - defined(_XPG6) || defined(_REENTRANT) -extern int strerror_r(); -#endif - -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ - (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT) -extern char *strtok_r(); -#endif - -#if defined(__EXTENSIONS__) || !defined(_STRICT_STDC) || \ - defined(__XOPEN_OR_POSIX) -extern void *memccpy(); -#endif - -#if defined(_XPG7) || !defined(_STRICT_SYMBOLS) -extern int strcasecmp(); -extern int strncasecmp(); -extern int strcasecmp_l(); -extern int strncasecmp_l(); -extern char *stpcpy(); -extern char *stpncpy(); -extern char *strndup(); -extern size_t strnlen(); -extern char *strsignal(); -#endif - -#if !defined(_STRICT_SYMBOLS) -extern int uucopy(); -extern int uucopystr(); -extern int ffs(); -extern int ffsl(); -extern int ffsll(); -extern int fls(); -extern int flsl(); -extern int flsll(); -extern char *strcasestr(); -extern char *strcasestr_l(); -extern char *strnstr(); -extern size_t strlcpy(); -extern size_t strlcat(); -extern char *strsep(); -extern char *strchrnul(); -#endif /* _STRICT_SYMBOLS */ - -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) -extern char *strdup(); -#endif - -#if defined(_XPG7) || !defined(_STRICT_SYMBOLS) -extern size_t strcoll_l(); -extern size_t strxfrm_l(); -#endif - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/strings.h b/usr/src/head/strings.h index 1cbbbea0ac..2d3cd9b256 100644 --- a/usr/src/head/strings.h +++ b/usr/src/head/strings.h @@ -20,12 +20,11 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright (c) 1995, 1996, by Sun Microsystems, Inc. * All rights reserved. */ -/* - * Copyright 2013 Garrett D'Amore <garrett@damore.org> - */ #ifndef _STRINGS_H #define _STRINGS_H @@ -41,8 +40,6 @@ extern "C" { #endif -#if defined(__STDC__) - extern int bcmp(const void *, const void *, size_t); extern void bcopy(const void *, void *, size_t); extern void bzero(void *, size_t); @@ -74,27 +71,6 @@ extern int strncasecmp_l(const char *, const char *, size_t, locale_t); #endif /* defined(_XPG7) */ #endif /* defined(_XPG4_2) && !defined(__EXTENSIONS__) */ -#else - -extern int bcmp(); -extern void bcopy(); -extern void bzero(); - -extern char *index(); -extern char *rindex(); - -#if defined(_XPG4_2) && !defined(__EXTENSIONS__) -extern int ffs(); -extern int strcasecmp(); -extern int strncasecmp(); -#if defined(_XPG7) -extern int strcasecmp_l(); -extern int strncasecmp_l(); -#endif -#endif /* defined(_XPG4_2) && !defined(__EXTENSIONS__) */ - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/stropts.h b/usr/src/head/stropts.h index f0ceea2a71..d418991fea 100644 --- a/usr/src/head/stropts.h +++ b/usr/src/head/stropts.h @@ -22,8 +22,9 @@ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ - /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,8 +32,6 @@ #ifndef _STROPTS_H #define _STROPTS_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.6 */ - /* * Streams user options definitions. */ @@ -44,8 +43,6 @@ extern "C" { #endif -#if defined(__STDC__) - extern int isastream(int); extern int getmsg(int, struct strbuf *_RESTRICT_KYWD, @@ -65,8 +62,6 @@ extern int ioctl(int, int, ...); extern int fattach(int, const char *); extern int fdetach(const char *); -#endif - #ifdef __cplusplus } #endif diff --git a/usr/src/head/synch.h b/usr/src/head/synch.h index 89efe9c687..c0f68f12f0 100644 --- a/usr/src/head/synch.h +++ b/usr/src/head/synch.h @@ -20,6 +20,7 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -86,7 +87,6 @@ typedef struct _rwlock { cond_t writercv; /* used only to indicate ownership */ } rwlock_t; -#ifdef __STDC__ int _lwp_mutex_lock(lwp_mutex_t *); int _lwp_mutex_unlock(lwp_mutex_t *); int _lwp_mutex_trylock(lwp_mutex_t *); @@ -127,50 +127,6 @@ int sema_reltimedwait(sema_t *, const timespec_t *); int sema_post(sema_t *); int sema_trywait(sema_t *); -#else /* __STDC__ */ - -int _lwp_mutex_lock(); -int _lwp_mutex_unlock(); -int _lwp_mutex_trylock(); -int _lwp_cond_wait(); -int _lwp_cond_timedwait(); -int _lwp_cond_reltimedwait(); -int _lwp_cond_signal(); -int _lwp_cond_broadcast(); -int _lwp_sema_init(); -int _lwp_sema_wait(); -int _lwp_sema_trywait(); -int _lwp_sema_post(); -int cond_init(); -int cond_destroy(); -int cond_wait(); -int cond_timedwait(); -int cond_reltimedwait(); -int cond_signal(); -int cond_broadcast(); -int mutex_init(); -int mutex_destroy(); -int mutex_consistent(); -int mutex_lock(); -int mutex_trylock(); -int mutex_unlock(); -int rwlock_init(); -int rwlock_destroy(); -int rw_rdlock(); -int rw_wrlock(); -int rw_unlock(); -int rw_tryrdlock(); -int rw_trywrlock(); -int sema_init(); -int sema_destroy(); -int sema_wait(); -int sema_timedwait(); -int sema_reltimedwait(); -int sema_post(); -int sema_trywait(); - -#endif /* __STDC__ */ - #endif /* _ASM */ /* "Magic numbers" tagging synchronization object types */ @@ -238,8 +194,6 @@ int sema_trywait(); #ifndef _ASM -#ifdef __STDC__ - /* * The *_held() functions apply equally well to Solaris threads * and to Posix threads synchronization objects, but the formal @@ -252,21 +206,8 @@ int _rw_read_held(void *); /* rwlock_t or pthread_rwlock_t */ int _rw_write_held(void *); /* rwlock_t or pthread_rwlock_t */ int _mutex_held(void *); /* mutex_t or pthread_mutex_t */ -#else /* __STDC__ */ - -int _sema_held(); -int _rw_read_held(); -int _rw_write_held(); -int _mutex_held(); - -#endif /* __STDC__ */ - /* Pause API */ -#ifdef __STDC__ void smt_pause(void); -#else /* __STDC__ */ -void smt_pause(); -#endif /* __STDC__ */ #endif /* _ASM */ diff --git a/usr/src/head/syslog.h b/usr/src/head/syslog.h index 52ddee0695..6cfa94f7e3 100644 --- a/usr/src/head/syslog.h +++ b/usr/src/head/syslog.h @@ -19,6 +19,9 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ @@ -26,8 +29,6 @@ #ifndef _SYSLOG_H #define _SYSLOG_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - #include <sys/feature_tests.h> #include <sys/syslog.h> #include <sys/va_list.h> @@ -36,8 +37,6 @@ extern "C" { #endif -#ifdef __STDC__ - void openlog(const char *, int, int); void syslog(int, const char *, ...); void closelog(void); @@ -46,18 +45,6 @@ int setlogmask(int); void vsyslog(int, const char *, __va_list); #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ -#else /* __STDC__ */ - -void openlog(); -void syslog(); -void closelog(); -int setlogmask(); -#if !defined(_XPG4_2) || defined(__EXTENSIONS__) -void vsyslog(); -#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/thread.h b/usr/src/head/thread.h index 63f0b7130d..d0b0b3ddeb 100644 --- a/usr/src/head/thread.h +++ b/usr/src/head/thread.h @@ -20,6 +20,8 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _THREAD_H #define _THREAD_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * thread.h: * definitions needed to use the thread interface except synchronization. @@ -48,10 +48,6 @@ extern "C" { #ifndef _ASM typedef unsigned int thread_t; typedef unsigned int thread_key_t; -#endif /* _ASM */ - -#ifndef _ASM -#ifdef __STDC__ extern int thr_create(void *, size_t, void *(*)(void *), void *, long, thread_t *); @@ -92,30 +88,6 @@ extern int thr_setspecific(thread_key_t, void *); extern int thr_getspecific(thread_key_t, void **); extern size_t thr_min_stack(void); -#else /* __STDC */ - -extern int thr_create(); -extern int thr_join(); -extern int thr_setconcurrency(); -extern int thr_getconcurrency(); -extern void thr_exit(); -extern thread_t thr_self(); -extern int thr_sigsetmask(); -extern int thr_stksegment(); -extern int thr_main(); -extern int thr_kill(); -extern int thr_suspend(); -extern int thr_continue(); -extern void thr_yield(); -extern int thr_setprio(); -extern int thr_getprio(); -extern int thr_keycreate(); -extern int thr_keycreate_once(); -extern int thr_setspecific(); -extern int thr_getspecific(); -extern size_t thr_min_stack(); - -#endif /* __STDC */ #endif /* _ASM */ #define THR_MIN_STACK thr_min_stack() diff --git a/usr/src/head/time.h b/usr/src/head/time.h index 551a291330..c61115f36f 100644 --- a/usr/src/head/time.h +++ b/usr/src/head/time.h @@ -23,12 +23,13 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* * Copyright 2010 Nexenta Systems, Inc. Al rights reserved. - * Copyright 2014 Garrett D'Amore <garrett@damore.org> */ #ifndef _TIME_H @@ -76,8 +77,6 @@ typedef int clockid_t; typedef int timer_t; #endif -#if defined(__STDC__) - #if defined(__EXTENSIONS__) || \ (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT) @@ -197,47 +196,6 @@ extern int getdate_err; #endif /* _REENTRANT */ #endif /* (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))... */ -#else /* __STDC__ */ - -extern int cftime(), ascftime(); -extern void tzset(); -extern time_t timegm(); - -#ifdef _STRPTIME_DONTZERO -#ifdef __PRAGMA_REDEFINE_EXTNAME -#pragma redefine_extname strptime __strptime_dontzero -#else /* __PRAGMA_REDEFINE_EXTNAME */ -extern char *__strptime_dontzero(); -#define strptime __strptime_dontzero -#endif /* __PRAGMA_REDEFINE_EXTNAME */ -#endif /* _STRPTIME_DONTZERO */ - -extern char *strptime(); - -#if defined(__EXTENSIONS__) || \ - (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ - (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT) -extern struct tm *gmtime_r(); -extern struct tm *localtime_r(); -#endif - -extern long timezone, altzone; -extern int daylight; -extern char *tzname[2]; - -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__) -extern struct tm *getdate(); -#ifdef _REENTRANT -#undef getdate_err -#define getdate_err *(int *)_getdate_err_addr() -extern int *_getdate_err_addr(); -#else -extern int getdate_err; -#endif /* _REENTRANT */ -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */ - -#endif /* __STDC__ */ - /* * ctime_r() & asctime_r() prototypes are defined here. */ @@ -278,8 +236,6 @@ extern int getdate_err; (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) -#if defined(__STDC__) - #if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) #ifdef __PRAGMA_REDEFINE_EXTNAME @@ -322,54 +278,6 @@ extern char *ctime_r(const time_t *, char *, int); #endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ -#else /* __STDC__ */ - -#if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) - -#ifdef __PRAGMA_REDEFINE_EXTNAME -#pragma redefine_extname asctime_r __posix_asctime_r -#pragma redefine_extname ctime_r __posix_ctime_r -extern char *asctime_r(); -extern char *ctime_r(); -#else /* __PRAGMA_REDEFINE_EXTNAME */ - -extern char *__posix_asctime_r(); -extern char *__posix_ctime_r(); - -#ifdef __lint - -#define asctime_r __posix_asctime_r -#define ctime_r __posix_ctime_r - -#else /* !__lint */ - -static char * -asctime_r(__tm, __buf) - struct tm *__tm; - char *__buf; -{ - return (__posix_asctime_r(__tm, __buf)); -} -static char * -ctime_r(__time, __buf) - time_t *__time; - char *__buf; -{ - return (__posix_ctime_r(__time, __buf)); -} - -#endif /* !__lint */ -#endif /* __PRAGMA_REDEFINE_EXTNAME */ - -#else /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ - -extern char *asctime_r(); -extern char *ctime_r(); - -#endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ - -#endif /* __STDC__ */ - #endif /* defined(__EXTENSIONS__) || defined(_REENTRANT)... */ @@ -380,12 +288,8 @@ extern char *ctime_r(); typedef struct _locale *locale_t; #endif -#if defined(__STDC__) extern size_t strftime_l(char *_RESTRICT_KYWD, size_t, const char *_RESTRICT_KYWD, const struct tm *_RESTRICT_KYWD, locale_t); -#else /* __STDC__ */ -extern size_t strftime_l(); -#endif /* __STDC__ */ #endif /* defined(_XPG7) || !defined(_STRICT_SYMBOLS) */ diff --git a/usr/src/head/tiuser.h b/usr/src/head/tiuser.h index 12fc9c24d6..355da6eef8 100644 --- a/usr/src/head/tiuser.h +++ b/usr/src/head/tiuser.h @@ -19,6 +19,9 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ @@ -26,8 +29,6 @@ #ifndef _TIUSER_H #define _TIUSER_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - /* * TLI user interface definitions. */ @@ -40,11 +41,7 @@ extern "C" { #if defined(_REENTRANT) || defined(_TS_ERRNO) || \ _POSIX_C_SOURCE - 0 >= 199506L -#if defined(__STDC__) extern int *__t_errno(void); -#else -extern int *__t_errno(); -#endif #define t_errno (*(__t_errno())) #else extern int t_errno; diff --git a/usr/src/head/ucontext.h b/usr/src/head/ucontext.h index 1c291a5ce0..6d96a18ad5 100644 --- a/usr/src/head/ucontext.h +++ b/usr/src/head/ucontext.h @@ -23,6 +23,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -48,14 +50,13 @@ extern "C" { #endif #endif -#if defined(__STDC__) - extern int getcontext(ucontext_t *) __RETURNS_TWICE; #pragma unknown_control_flow(getcontext) extern int setcontext(const ucontext_t *) __NORETURN; extern int swapcontext(ucontext_t *_RESTRICT_KYWD, const ucontext_t *_RESTRICT_KYWD); extern void makecontext(ucontext_t *, void(*)(), int, ...); + #if !defined(_XPG4_2) || defined(__EXTENSIONS__) extern int walkcontext(const ucontext_t *, int (*)(uintptr_t, int, void *), void *); @@ -70,29 +71,7 @@ extern int stack_inbounds(void *); extern int stack_violation(int, const siginfo_t *, const ucontext_t *); extern void *_stack_grow(void *); -#endif -#else - -extern int getcontext() __RETURNS_TWICE; -#pragma unknown_control_flow(getcontext) -extern int setcontext(); -extern int swapcontext(); -extern void makecontext(); -#if !defined(_XPG4_2) || defined(__EXTENSIONS__) -extern int walkcontext(); -extern int printstack(); -extern int addrtosymstr(); -extern int getustack(); -extern int setustack(); - -extern int stack_getbounds(); -extern int stack_setbounds(); -extern int stack_inbounds(); -extern int stack_violation(); - -extern void *_stack_grow(); -#endif -#endif +#endif /* !_XPG4_2 || __EXTENSIONS__ */ #ifdef __cplusplus } diff --git a/usr/src/head/ucred.h b/usr/src/head/ucred.h index e10ab26f52..375e4cef50 100644 --- a/usr/src/head/ucred.h +++ b/usr/src/head/ucred.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -26,8 +28,6 @@ #ifndef _UCRED_H_ #define _UCRED_H_ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/priv.h> #include <sys/tsol/label.h> @@ -41,7 +41,6 @@ typedef struct ucred_s ucred_t; /* * library functions prototype. */ -#if defined(__STDC__) extern ucred_t *ucred_get(pid_t pid); @@ -70,37 +69,6 @@ extern bslabel_t *ucred_getlabel(const ucred_t *); extern projid_t ucred_getprojid(const ucred_t *); -#else /* Non ANSI */ - -extern ucred_t *ucred_get(/* pid_t pid */); - -extern void ucred_free(/* ucred_t * */); - -extern uid_t ucred_geteuid(/* ucred_t * */); -extern uid_t ucred_getruid(/* ucred_t * */); -extern uid_t ucred_getsuid(/* ucred_t * */); -extern gid_t ucred_getegid(/* ucred_t * */); -extern gid_t ucred_getrgid(/* ucred_t * */); -extern gid_t ucred_getsgid(/* ucred_t * */); -extern int ucred_getgroups(/* ucred_t *, gid_t ** */); - -extern priv_set_t *ucred_getprivset(/* ucred_t *, priv_ptype_t */); -extern uint_t ucred_getpflags(/* ucred_t *, uint_t */); - -extern pid_t ucred_getpid(/* ucred_t * */); - -extern size_t ucred_size(/* void */); - -extern int getpeerucred(/* int, ucred_t ** */); - -extern zoneid_t ucred_getzoneid(/* ucred_t * */); - -extern bslabel_t *ucred_getlabel(/* const ucred_t * */); - -extern projid_t ucred_getprojid(/* ucred_t * */); - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/ulimit.h b/usr/src/head/ulimit.h index 7ceb93f072..7bf36214ad 100644 --- a/usr/src/head/ulimit.h +++ b/usr/src/head/ulimit.h @@ -19,6 +19,9 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ @@ -26,19 +29,13 @@ #ifndef _ULIMIT_H #define _ULIMIT_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.4 */ - #include <sys/ulimit.h> #ifdef __cplusplus extern "C" { #endif -#ifdef __STDC__ extern long ulimit(int, ...); -#else -extern long ulimit(); -#endif #ifdef __cplusplus } diff --git a/usr/src/head/unistd.h b/usr/src/head/unistd.h index aed9eddc14..a86fa99d06 100644 --- a/usr/src/head/unistd.h +++ b/usr/src/head/unistd.h @@ -20,6 +20,7 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> * Copyright (c) 2013 Gary Mills * * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. @@ -241,8 +242,6 @@ extern "C" { #endif /* __PRAGMA_REDEFINE_EXTNAME */ #endif /* _LP64 && _LARGEFILE64_SOURCE */ -#if defined(__STDC__) - extern int access(const char *, int); #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) extern int acct(const char *); @@ -602,323 +601,6 @@ extern int truncate64(const char *, off64_t); extern int lockf64(int, int, off64_t); #endif /* _LARGEFILE64_SOURCE */ -#else /* __STDC__ */ - -extern int access(); -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern int acct(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ -extern unsigned alarm(); -#if !defined(__XOPEN_OR_POSIX) || (defined(_XPG4_2) && !defined(_XPG6)) || \ - defined(__EXTENSIONS__) -extern int brk(); -#endif /* !defined(__XOPEN_OR_POSIX) || (defined(_XPG4_2)... */ -extern int chdir(); -extern int chown(); -#if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ - defined(__EXTENSIONS__) -extern int chroot(); -#endif /* (!defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)... */ -extern int close(); -#if defined(_XPG4) || defined(__EXTENSIONS__) -extern size_t confstr(); -extern char *crypt(); -#endif /* defined(XPG4) || defined(__EXTENSIONS__) */ -#if !defined(_POSIX_C_SOURCE) || defined(_XPG3) || defined(__EXTENSIONS__) -extern char *ctermid(); -#endif /* (!defined(_POSIX_C_SOURCE) || defined(_XPG3)... */ -#if !defined(__XOPEN_OR_POSIX) || defined(_REENTRANT) || defined(__EXTENSIONS__) -extern char *ctermid_r(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_REENTRANT) ... */ -#if !defined(_XPG6) || defined(__EXTENSIONS__) -extern char *cuserid(); -#endif -extern int dup(); -extern int dup2(); -extern int dup3(); -#if defined(_XPG4) || defined(__EXTENSIONS__) -extern void encrypt(); -#endif /* defined(_XPG4) || defined(__EXTENSIONS__) */ -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern void endusershell(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ -extern int execl(); -extern int execle(); -extern int execlp(); -extern int execv(); -extern int execve(); -extern int execvp(); -extern void _exit(); -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern int fattach(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__) -extern int fchdir(); -extern int fchown(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */ -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern int fchroot(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ -#if !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2) || \ - defined(__EXTENSIONS__) -extern int fdatasync(); -#endif /* !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2)... */ -#if !defined(__XOPEN_OR_POSIX) -extern int fdetach(); -#endif /* !defined(__XOPEN_OR_POSIX) */ -extern pid_t fork(); -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern pid_t fork1(); -extern pid_t forkall(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ -extern long fpathconf(); -#if !defined(_POSIX_C_SOURCE) || (_POSIX_C_SOURCE > 2) || \ - defined(__EXTENSIONS__) -extern int fsync(); -#endif /* !defined(_POSIX_C_SOURCE) || (_POSIX_C_SOURCE > 2)... */ -#if !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2) || defined(_XPG4_2) || \ - (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \ - defined(__EXTENSIONS__) -extern int ftruncate(); -#endif /* !defined(__XOPEN_OR_POSIX) (_POSIX_C_SOURCE > 2)... */ -extern char *getcwd(); -#if !defined(__XOPEN_OR_POSIX) || (defined(_XPG4_2) && !defined(_XPG6)) || \ - defined(__EXTENSIONS__) -extern int getdtablesize(); -#endif -extern gid_t getegid(); -extern uid_t geteuid(); -extern gid_t getgid(); -extern int getgroups(); -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__) -extern long gethostid(); -#endif -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__) -extern int gethostname(); -#endif - -#ifndef __GETLOGIN_DEFINED /* Avoid duplicate in stdlib.h */ -#define __GETLOGIN_DEFINED -#ifndef __USE_LEGACY_LOGNAME__ -#ifdef __PRAGMA_REDEFINE_EXTNAME -#pragma redefine_extname getlogin getloginx -#else /* __PRAGMA_REDEFINE_EXTNAME */ -extern char *getloginx(); -#define getlogin getloginx -#endif /* __PRAGMA_REDEFINE_EXTNAME */ -#endif /* __USE_LEGACY_LOGNAME__ */ -extern char *getlogin(); -#endif /* __GETLOGIN_DEFINED */ - -#if defined(_XPG4) || defined(__EXTENSIONS__) -extern int getopt(); -extern char *optarg; -extern int opterr, optind, optopt; -#if !defined(_XPG6) || defined(__EXTENSIONS__) -extern char *getpass(); -#endif -#endif /* defined(_XPG4) || defined(__EXTENSIONS__) */ -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__) -#if !defined(_XPG6) || defined(__EXTENSIONS__) -extern int getpagesize(); -#endif -extern pid_t getpgid(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */ -extern pid_t getpid(); -extern pid_t getppid(); -extern pid_t getpgrp(); -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -char *gettxt(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__) -extern pid_t getsid(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) */ -extern uid_t getuid(); -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern char *getusershell(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__) -extern char *getwd(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */ -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern int ioctl(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern int isaexec(); -extern int issetugid(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ -extern int isatty(); -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__) -extern int lchown(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) */ -extern int link(); -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern offset_t llseek(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \ - (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \ - defined(__EXTENSIONS__) -extern int lockf(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */ -extern off_t lseek(); -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern int mincore(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ -#if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ - defined(__EXTENSIONS__) -extern int nice(); -#endif /* !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)... */ -extern long pathconf(); -extern int pause(); -extern int pipe(); -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG5) || \ - (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \ - defined(__EXTENSIONS__) -extern ssize_t pread(); -#endif -#if !defined(_LP64) && \ - (!defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)) -extern void profil(); -extern int ptrace(); -#endif -#if !defined(__XOPEN_OR_POSIX) || \ - ((_POSIX_C_SOURCE > 2) && !defined(_XPG6)) || \ - defined(__EXTENSIONS__) -extern int pthread_atfork(); -#endif /* !defined(__XOPEN_OR_POSIX) || ((_POSIX_C_SOURCE > 2) ... */ -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG5) || \ - (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \ - defined(__EXTENSIONS__) -extern ssize_t pwrite(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG5) */ -extern ssize_t read(); -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -/* per RFC 3542; This is also defined in netdb.h */ -extern int rcmd_af(); -#endif -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__) -extern ssize_t readlink(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */ -#if (!defined(__XOPEN_OR_POSIX) || (defined(_XPG3) && !defined(_XPG4))) || \ - defined(__EXTENSIONS__) -extern int rename(); -#endif /* (!defined(__XOPEN_OR_POSIX) || (defined(_XPG3)... */ -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern int resolvepath(); -/* per RFC 3542; This is also defined in netdb.h */ -extern int rexec_af(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ -extern int rmdir(); -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -/* per RFC 3542; This is also defined in netdb.h */ -extern int rresvport_af(); -#endif -#if !defined(__XOPEN_OR_POSIX) || (defined(_XPG4_2) && !defined(_XPG6)) || \ - defined(__EXTENSIONS__) -extern void *sbrk(); -#endif /* !defined(__XOPEN_OR_POSIX)|| (defined(_XPG4_2)... */ -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__) -extern int setegid(); -extern int seteuid(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG6) ... */ -extern int setgid(); -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern int setgroups(); -extern int sethostname(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ -extern int setpgid(); -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__) -extern pid_t setpgrp(); -extern int setregid(); -extern int setreuid(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */ -extern pid_t setsid(); -extern int setuid(); -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern void setusershell(); -#endif /* !defined(__XOPEN_OR_POSIX)|| defined(__EXTENSIONS__) */ -extern unsigned sleep(); -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern int stime(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ -#if defined(_XPG4) -/* __EXTENSIONS__ makes the SVID Third Edition prototype in stdlib.h visible */ -extern void swab(); -#endif /* defined(_XPG4) */ -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__) -extern int symlink(); -extern void sync(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */ -#if defined(_XPG5) -#ifdef __PRAGMA_REDEFINE_EXTNAME -#pragma redefine_extname sysconf __sysconf_xpg5 -extern long sysconf(); -#else /* __PRAGMA_REDEFINE_EXTNAME */ -extern long __sysconf_xpg5(); -#define sysconf __sysconf_xpg5 -#endif /* __PRAGMA_REDEFINE_EXTNAME */ -#endif /* defined(_XPG5) */ -extern pid_t tcgetpgrp(); -extern int tcsetpgrp(); -#if !defined(__XOPEN_OR_POSIX) || \ - (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \ - defined(__EXTENSIONS__) -extern off_t tell(); -#endif /* !defined(__XOPEN_OR_POSIX)... */ -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \ - (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \ - defined(__EXTENSIONS__) -extern int truncate(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */ -extern char *ttyname(); -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__) -extern useconds_t ualarm(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */ -extern int unlink(); -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__) -extern int usleep(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */ -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__) -extern pid_t vfork(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */ -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern void vhangup(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ -extern ssize_t write(); -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern void yield(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ - -#if !defined(__XOPEN_OR_POSIX) || defined(_ATFILE_SOURCE) || \ - defined(__EXTENSIONS__) - /* || defined(_XPG7) */ -extern int faccessat(); -extern int fchownat(); -extern int linkat(); -extern ssize_t readlinkat(); -extern int renameat(); -extern int symlinkat(); -extern int unlinkat(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_ATFILE_SOURCE)... */ -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern int get_nprocs(); -extern int get_nprocs_conf(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ - -/* transitional large file interface versions */ -#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ - !defined(__PRAGMA_REDEFINE_EXTNAME)) -extern int ftruncate64(); -extern off64_t lseek64(); -extern ssize_t pread64(); -extern ssize_t pwrite64(); -extern off64_t tell64(); -extern int truncate64(); -extern int lockf64(); -#endif /* _LARGEFILE64_SOURCE */ - -#endif /* __STDC__ */ - #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__) #pragma unknown_control_flow(vfork) #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */ @@ -963,8 +645,6 @@ extern int lockf64(); !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE - 0 >= 199506L) || \ defined(_POSIX_PTHREAD_SEMANTICS) -#if defined(__STDC__) - #if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) #ifndef __USE_LEGACY_LOGNAME__ @@ -1035,83 +715,6 @@ extern char *ttyname_r(int, char *, int); #endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ -#else /* __STDC__ */ - -#if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS) - -#ifndef __USE_LEGACY_LOGNAME__ -#ifdef __PRAGMA_REDEFINE_EXTNAME -#pragma redefine_extname getlogin_r __posix_getloginx_r -extern int getlogin_r(); -#else /* __PRAGMA_REDEFINE_EXTNAME */ -extern int __posix_getloginx_r(); -#define getlogin_r __posix_getloginx_r -#endif /* __PRAGMA_REDEFINE_EXTNAME */ -#else /* __USE_LEGACY_LOGNAME__ */ -#ifdef __PRAGMA_REDEFINE_EXTNAME -#pragma redefine_extname getlogin_r __posix_getlogin_r -extern int getlogin_r(); -#else /* __PRAGMA_REDEFINE_EXTNAME */ -extern int __posix_getlogin_r(); - -#ifdef __lint - -#define getlogin_r __posix_getlogin_r - -#else /* !__lint */ - -static int -getlogin_r(__name, __len) - char *__name; - int __len; -{ - return (__posix_getlogin_r(__name, __len)); -} -#endif /* !__lint */ -#endif /* __PRAGMA_REDEFINE_EXTNAME */ -#endif /* __USE_LEGACY_LOGNAME__ */ - -#ifdef __PRAGMA_REDEFINE_EXTNAME -#pragma redefine_extname ttyname_r __posix_ttyname_r -extern int ttyname_r(); -#else /* __PRAGMA_REDEFINE_EXTNAME */ - -extern int __posix_ttyname_r(); - -#ifdef __lint - -#define ttyname_r __posix_ttyname_r - -#else /* !__lint */ - -ttyname_r(__fildes, __buf, __size) - int __fildes; - char *__buf; - size_t __size; -{ - return (__posix_ttyname_r(__fildes, __buf, __size)); -} -#endif /* !__lint */ -#endif /* __PRAGMA_REDEFINE_EXTNAME */ - -#else /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ - -#ifndef __USE_LEGACY_LOGNAME__ -#ifdef __PRAGMA_REDEFINE_EXTNAME -#pragma redefine_extname getlogin_r getloginx_r -#else /* __PRAGMA_REDEFINE_EXTNAME */ -extern char *getloginx_r(); -#define getlogin_r getloginx_r -#endif /* __PRAGMA_REDEFINE_EXTNAME */ -#endif /* __USE_LEGACY_LOGNAME__ */ -extern char *getlogin_r(); - -extern char *ttyname_r(); - -#endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */ - -#endif /* __STDC__ */ - #endif /* defined(__EXTENSIONS__) || defined(_REENTRANT)... */ #ifdef __cplusplus diff --git a/usr/src/head/user_attr.h b/usr/src/head/user_attr.h index 42fbea0a03..d11694e5d7 100644 --- a/usr/src/head/user_attr.h +++ b/usr/src/head/user_attr.h @@ -19,6 +19,7 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -129,7 +130,6 @@ typedef struct userattr_s { kva_t *attr; /* array of key-value pair attributes */ } userattr_t; -#ifdef __STDC__ extern userattr_t *getusernam(const char *); extern userattr_t *getuseruid(uid_t uid); extern userattr_t *getuserattr(void); @@ -138,17 +138,6 @@ extern void setuserattr(void); extern void enduserattr(void); extern void free_userattr(userattr_t *); -#else /* not __STDC__ */ - -extern userattr_t *getusernam(); -extern userattr_t *getuseruid(); -extern userattr_t *getuserattr(); -extern userattr_t *fgetuserattr(); -extern void setuserattr(); -extern void enduserattr(); -extern void free_userattr(); -#endif - #ifdef __cplusplus } #endif diff --git a/usr/src/head/ustat.h b/usr/src/head/ustat.h index b198e8f502..e78c14a349 100644 --- a/usr/src/head/ustat.h +++ b/usr/src/head/ustat.h @@ -19,6 +19,9 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ @@ -26,8 +29,6 @@ #ifndef _USTAT_H #define _USTAT_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3.1.6 */ - #include <sys/types.h> #include <sys/ustat.h> @@ -35,11 +36,7 @@ extern "C" { #endif -#if defined(__STDC__) extern int ustat(dev_t, struct ustat *); -#else -extern int ustat(); -#endif /* end defined(_STDC) */ #ifdef __cplusplus } diff --git a/usr/src/head/utime.h b/usr/src/head/utime.h index a39c702486..c4d28e55a2 100644 --- a/usr/src/head/utime.h +++ b/usr/src/head/utime.h @@ -19,6 +19,9 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ @@ -28,19 +31,13 @@ #ifndef _UTIME_H #define _UTIME_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3 */ - #include <sys/utime.h> #ifdef __cplusplus extern "C" { #endif -#if defined(__STDC__) extern int utime(const char *, const struct utimbuf *); -#else -extern int utime(); -#endif /* __STDC__ */ #ifdef __cplusplus } diff --git a/usr/src/head/utmp.h b/usr/src/head/utmp.h index 5784a98bf6..c752e12288 100644 --- a/usr/src/head/utmp.h +++ b/usr/src/head/utmp.h @@ -24,6 +24,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -32,8 +34,6 @@ #ifndef _UTMP_H #define _UTMP_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.5.1.7 */ - /* * Note: The getutent(3c) family of interfaces are obsolete. * The getutxent(3c) family provide a superset of this functionality @@ -151,7 +151,6 @@ struct futmp { #define setuser(ut) ((ut).ut_exit.e_exit = NONROOT_USR) -#if defined(__STDC__) extern void endutent(void); extern struct utmp *getutent(void); extern struct utmp *getutid(const struct utmp *); @@ -159,15 +158,6 @@ extern struct utmp *getutline(const struct utmp *); extern struct utmp *pututline(const struct utmp *); extern void setutent(void); extern int utmpname(const char *); -#else -extern void endutent(); -extern struct utmp *getutent(); -extern struct utmp *getutid(); -extern struct utmp *getutline(); -extern struct utmp *pututline(); -extern void setutent(); -extern int utmpname(); -#endif #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ diff --git a/usr/src/head/utmpx.h b/usr/src/head/utmpx.h index fe2dbd83e7..6af4040a30 100644 --- a/usr/src/head/utmpx.h +++ b/usr/src/head/utmpx.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 1997 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -35,8 +37,6 @@ #ifndef _UTMPX_H #define _UTMPX_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/feature_tests.h> #include <sys/types.h> #include <sys/time.h> @@ -127,8 +127,6 @@ struct futmpx { #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ -#if defined(__STDC__) - extern void endutxent(void); extern struct utmpx *getutxent(void); extern struct utmpx *getutxid(const struct utmpx *); @@ -146,27 +144,6 @@ extern void updwtmp(const char *, struct utmp *); extern void updwtmpx(const char *, struct utmpx *); #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ -#else /* __STDC__ */ - -extern void endutxent(); -extern struct utmpx *getutxent(); -extern struct utmpx *getutxid(); -extern struct utmpx *getutxline(); -extern struct utmpx *pututxline(); -extern void setutxent(); - -#if !defined(_XPG4_2) || defined(__EXTENSIONS__) -extern int utmpxname(); -extern struct utmpx *makeutx(); -extern struct utmpx *modutx(); -extern void getutmp(); -extern void getutmpx(); -extern void updwtmp(); -extern void updwtmpx(); -#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */ - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/values.h b/usr/src/head/values.h index 848981ccdb..94ccdb4718 100644 --- a/usr/src/head/values.h +++ b/usr/src/head/values.h @@ -24,6 +24,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,8 +33,6 @@ #ifndef _VALUES_H #define _VALUES_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.33 */ - #include <sys/isa_defs.h> #ifdef __cplusplus @@ -52,18 +52,9 @@ extern "C" { /* short, regular and long ints with only the high-order bit turned on */ #define HIBITS ((short)(1 << (BITS(short) - 1))) -#if defined(__STDC__) - #define HIBITI (1U << (BITS(int) - 1)) #define HIBITL (1UL << (BITS(long) - 1)) -#else - -#define HIBITI ((unsigned)1 << (BITS(int) - 1)) -#define HIBITL (1L << (BITS(long) - 1)) - -#endif - /* largest short, regular and long int */ #define MAXSHORT ((short)~HIBITS) #define MAXINT ((int)(~HIBITI)) diff --git a/usr/src/head/wait.h b/usr/src/head/wait.h index 90d8df581c..764b529601 100644 --- a/usr/src/head/wait.h +++ b/usr/src/head/wait.h @@ -19,6 +19,9 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ @@ -26,8 +29,6 @@ #ifndef _WAIT_H #define _WAIT_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */ - #include <sys/types.h> #include <sys/siginfo.h> #include <sys/procset.h> @@ -37,20 +38,10 @@ extern "C" { #endif -#if defined(__STDC__) - extern pid_t wait(int *); extern pid_t waitpid(pid_t, int *, int); extern int waitid(idtype_t, id_t, siginfo_t *, int); -#else - -extern pid_t wait(); -extern pid_t waitpid(); -extern int waitid(); - -#endif - #ifdef __cplusplus } #endif diff --git a/usr/src/head/wchar.h b/usr/src/head/wchar.h index dcb0c1bdfb..1bf97f9a29 100644 --- a/usr/src/head/wchar.h +++ b/usr/src/head/wchar.h @@ -120,8 +120,6 @@ typedef int wctype_t; typedef __va_list va_list; #endif /* defined(_XPG6) && !defined(_VA_LIST) */ -#ifdef __STDC__ - #if !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__) #if __cplusplus >= 199711L namespace std { @@ -192,45 +190,6 @@ extern size_t mbsnrtowcs(wchar_t *_RESTRICT_KYWD, const char **_RESTRICT_KYWD, #endif /* defined(_XPG7) || !defined(_STRICT_SYMBOLS) */ -#else /* __STDC__ */ - -#if !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE) || defined(__EXTENSIONS__) -extern int iswalpha(); -extern int iswupper(); -extern int iswlower(); -extern int iswdigit(); -extern int iswxdigit(); -extern int iswalnum(); -extern int iswspace(); -extern int iswpunct(); -extern int iswprint(); -extern int iswgraph(); -extern int iswcntrl(); -extern int iswctype(); -extern wint_t towlower(); -extern wint_t towupper(); -extern wchar_t *wcswcs(); -extern int wcswidth(); -extern int wcwidth(); -extern wctype_t wctype(); -#endif /* !defined(_STRICT_STDC) || defined(_XOPEN_SOURCE)... */ - -#if defined(_XGP7) || !defined(_STRICT_SYMBOLS) -extern size_t wcsnlen(); -extern wchar_t *wcpcpy(); -extern wchar_t *wcpncpy(); -extern size_t wcsxfrm_l(); -extern int wcscoll_l(); -extern wchar_t *wcsdup(); -extern int wcscasecmp(); -extern int wcscasecmp_l(); -extern int wcsncasecmp(); -extern int wcsncasecmp_l(); -extern size_t mbsnrtowcs(); -#endif - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/head/wctype.h b/usr/src/head/wctype.h index f8030e96e3..e6a23d483c 100644 --- a/usr/src/head/wctype.h +++ b/usr/src/head/wctype.h @@ -25,6 +25,7 @@ /* * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -104,7 +105,6 @@ extern wint_t __nextwctype(wint_t, wctype_t); #define iswascii(c) isascii(c) /* isw*, except iswascii(), are not macros any more. They become functions */ -#ifdef __STDC__ /* is* also become functions */ extern int isphonogram(wint_t); @@ -119,21 +119,6 @@ extern int iswnumber(wint_t); extern int iswhexnumber(wint_t); extern int iswspecial(wint_t); -#else /* __STDC__ */ - -/* is* also become functions */ -extern int isphonogram(); -extern int isideogram(); -extern int isenglish(); -extern int isnumber(); -extern int isspecial(); -/* From BSD/MacOS */ -extern int iswideogram(); -extern int iswphonogram(); -extern int iswnumber(); -extern int iswspecial(); -#endif - #define iscodeset0(c) isascii(c) #define iscodeset1(c) (((c) & WCHAR_CSMASK) == WCHAR_CS1) #define iscodeset2(c) (((c) & WCHAR_CSMASK) == WCHAR_CS2) @@ -150,7 +135,6 @@ extern int iswspecial(); typedef struct _locale *locale_t; #endif -#if defined(__STDC__) extern wint_t towlower_l(wint_t, locale_t); extern wint_t towupper_l(wint_t, locale_t); extern wint_t towctrans_l(wint_t, wctrans_t, locale_t); @@ -168,25 +152,6 @@ extern int iswupper_l(wint_t, locale_t); extern int iswxdigit_l(wint_t, locale_t); extern wctrans_t wctrans_l(const char *, locale_t); extern wctype_t wctype_l(const char *, locale_t); -#else /* __STDC__ */ -extern wint_t towlower_l(); -extern wint_t towupper_l(); -extern wint_t towctrans_l(); -extern int iswctype_l(); -extern int iswalnum_l(); -extern int iswalpha_l(); -extern int iswcntrl_l(); -extern int iswdigit_l(); -extern int iswgraph_l(); -extern int iswlower_l(); -extern int iswprint_l(); -extern int iswpunct_l(); -extern int iswspace_l(); -extern int iswupper_l(); -extern int iswxdigit_l(); -extern wctrans_t wctrans_l(); -extern wctype_t wctype_l(); -#endif /* __STDC__ */ #endif /* defined(_XPG7) || !defined(_STRICT_SYMBOLS) */ #ifdef __cplusplus diff --git a/usr/src/head/widec.h b/usr/src/head/widec.h index b0542b969b..0344a58db0 100644 --- a/usr/src/head/widec.h +++ b/usr/src/head/widec.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -33,13 +35,9 @@ #ifndef _WIDEC_H #define _WIDEC_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/feature_tests.h> -#if defined(__STDC__) #include <stdio.h> /* For definition of FILE */ -#endif #include <euc.h> #include <wchar.h> @@ -47,7 +45,6 @@ extern "C" { #endif -#if defined(__STDC__) /* Character based input and output functions */ extern wchar_t *getws(wchar_t *); extern int putws(const wchar_t *); @@ -94,57 +91,6 @@ extern long long wstoll(const wchar_t *, wchar_t **, int); #endif /* !defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX) */ -#else /* !defined(__STDC__) */ -/* Character based input and output functions */ -extern wchar_t *getws(); -extern int putws(); - -#ifndef getwc -#define getwc(p) fgetwc(p) -#endif -#ifndef putwc -#define putwc(x, p) fputwc((x), (p)) -#endif -#ifndef getwchar -#define getwchar() getwc(stdin) -#endif -#ifndef putwchar -#define putwchar(x) putwc((x), stdout) -#endif - -/* wchar_t string operation functions */ -extern wchar_t *strtows(); -extern wchar_t *wscpy(); -extern wchar_t *wsncpy(); -extern wchar_t *wscat(); -extern wchar_t *wsncat(); -extern wchar_t *wschr(); -extern wchar_t *wsrchr(); -extern wchar_t *wspbrk(); -extern wchar_t *wstok(); - -extern int wscmp(); -extern int wsncmp(); -extern int wslen(); -extern int wsspn(); -extern int wscspn(); -extern int wscoll(); -extern int wsxfrm(); - -extern char *wstostr(); -extern wchar_t *wsdup(); -extern int wscol(); -extern double wstod(); -extern long wstol(); -extern int wscasecmp(); -extern int wsncasecmp(); -extern int wsprintf(); -#if defined(_LONGLONG_TYPE) -extern long long wstoll(); -#endif /* defined(_LONGLONG_TYPE) */ - -#endif /* !defined(__STDC__) */ - /* Returns the code set number for the process code c. */ #define WCHAR_SHIFT 7 #define WCHAR_S_MASK 0x7f diff --git a/usr/src/head/wordexp.h b/usr/src/head/wordexp.h index c805a8a983..a5513c3986 100644 --- a/usr/src/head/wordexp.h +++ b/usr/src/head/wordexp.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,8 +33,6 @@ #ifndef _WORDEXP_H #define _WORDEXP_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/feature_tests.h> #include <sys/types.h> @@ -70,13 +70,8 @@ typedef struct wordexp_t { #define WRDE_SYNTAX (7) /* bad syntax */ #define WRDE_NOSYS (8) /* function not supported (XPG4) */ -#ifdef __STDC__ extern int wordexp(const char *_RESTRICT_KYWD, wordexp_t *_RESTRICT_KYWD, int); extern void wordfree(wordexp_t *); -#else -extern int wordexp(); -extern void wordfree(); -#endif #ifdef __cplusplus } diff --git a/usr/src/head/xti.h b/usr/src/head/xti.h index a757167e2a..e261b5a807 100644 --- a/usr/src/head/xti.h +++ b/usr/src/head/xti.h @@ -19,6 +19,9 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1996 Sun Microsystems, Inc. */ /* All Rights Reserved */ @@ -26,8 +29,6 @@ #ifndef _XTI_H #define _XTI_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> /* @@ -479,8 +480,6 @@ struct t_uderr { * XTI LIBRARY FUNCTIONS */ -#if defined(__STDC__) - #if defined(_XOPEN_SOURCE) && !defined(_XPG5) extern int t_accept(int, int, struct t_call *); extern char *t_alloc(int, int, int); @@ -534,8 +533,6 @@ extern int t_sync(int); extern int t_sysconf(int); extern int t_unbind(int); -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/uts/common/sys/acct.h b/usr/src/uts/common/sys/acct.h index e8903bd0da..42a8d69f96 100644 --- a/usr/src/uts/common/sys/acct.h +++ b/usr/src/uts/common/sys/acct.h @@ -20,6 +20,7 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -82,11 +83,7 @@ struct o_acct { }; #if !defined(_KERNEL) -#if defined(__STDC__) extern int acct(const char *); -#else -extern int acct(); -#endif #endif /* !defined(_KERNEL) */ #if defined(_KERNEL) diff --git a/usr/src/uts/common/sys/acl.h b/usr/src/uts/common/sys/acl.h index 35c9772b8e..2a92319408 100644 --- a/usr/src/uts/common/sys/acl.h +++ b/usr/src/uts/common/sys/acl.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -287,13 +289,8 @@ extern int cmp2acls(void *, void *); #endif /* !defined(_KERNEL) */ -#if defined(__STDC__) extern int acl(const char *path, int cmd, int cnt, void *buf); extern int facl(int fd, int cmd, int cnt, void *buf); -#else /* !__STDC__ */ -extern int acl(); -extern int facl(); -#endif /* defined(__STDC__) */ #ifdef __cplusplus } diff --git a/usr/src/uts/common/sys/aiocb.h b/usr/src/uts/common/sys/aiocb.h index 12d7b410d7..5b2fbaa95b 100644 --- a/usr/src/uts/common/sys/aiocb.h +++ b/usr/src/uts/common/sys/aiocb.h @@ -20,6 +20,8 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _SYS_AIOCB_H #define _SYS_AIOCB_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/fcntl.h> #include <sys/siginfo.h> @@ -40,11 +40,7 @@ extern "C" { typedef struct aiocb { int aio_fildes; -#if defined(__STDC__) volatile void *aio_buf; /* buffer location */ -#else - void *aio_buf; /* buffer location */ -#endif size_t aio_nbytes; /* length of transfer */ off_t aio_offset; /* file offset */ int aio_reqprio; /* request priority offset */ @@ -59,11 +55,7 @@ typedef struct aiocb { #if !defined(_KERNEL) typedef struct aiocb64 { int aio_fildes; -#if defined(__STDC__) volatile void *aio_buf; /* buffer location */ -#else - void *aio_buf; /* buffer location */ -#endif size_t aio_nbytes; /* length of transfer */ off64_t aio_offset; /* file offset */ int aio_reqprio; /* request priority offset */ diff --git a/usr/src/uts/common/sys/atomic.h b/usr/src/uts/common/sys/atomic.h index b4ebd3f4a6..774e8125f3 100644 --- a/usr/src/uts/common/sys/atomic.h +++ b/usr/src/uts/common/sys/atomic.h @@ -20,6 +20,8 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -39,7 +41,6 @@ extern "C" { #include <asm/atomic.h> #endif -#if defined(_KERNEL) || defined(__STDC__) /* * Increment target. */ @@ -52,7 +53,6 @@ extern void atomic_inc_uint(volatile uint_t *); extern void atomic_inc_ulong(volatile ulong_t *); #if defined(_KERNEL) || defined(_INT64_TYPE) extern void atomic_inc_64(volatile uint64_t *); -#endif /* * Decrement target @@ -264,143 +264,6 @@ extern void membar_producer(void); extern void membar_consumer(void); #endif -#if !defined(_KERNEL) && !defined(__STDC__) -extern void atomic_inc_8(); -extern void atomic_inc_uchar(); -extern void atomic_inc_16(); -extern void atomic_inc_ushort(); -extern void atomic_inc_32(); -extern void atomic_inc_uint(); -extern void atomic_inc_ulong(); -#if defined(_INT64_TYPE) -extern void atomic_inc_64(); -#endif /* defined(_INT64_TYPE) */ -extern void atomic_dec_8(); -extern void atomic_dec_uchar(); -extern void atomic_dec_16(); -extern void atomic_dec_ushort(); -extern void atomic_dec_32(); -extern void atomic_dec_uint(); -extern void atomic_dec_ulong(); -#if defined(_INT64_TYPE) -extern void atomic_dec_64(); -#endif /* defined(_INT64_TYPE) */ -extern void atomic_add_8(); -extern void atomic_add_char(); -extern void atomic_add_16(); -extern void atomic_add_short(); -extern void atomic_add_32(); -extern void atomic_add_int(); -extern void atomic_add_ptr(); -extern void atomic_add_long(); -#if defined(_INT64_TYPE) -extern void atomic_add_64(); -#endif /* defined(_INT64_TYPE) */ -extern void atomic_or_8(); -extern void atomic_or_uchar(); -extern void atomic_or_16(); -extern void atomic_or_ushort(); -extern void atomic_or_32(); -extern void atomic_or_uint(); -extern void atomic_or_ulong(); -#if defined(_INT64_TYPE) -extern void atomic_or_64(); -#endif /* defined(_INT64_TYPE) */ -extern void atomic_and_8(); -extern void atomic_and_uchar(); -extern void atomic_and_16(); -extern void atomic_and_ushort(); -extern void atomic_and_32(); -extern void atomic_and_uint(); -extern void atomic_and_ulong(); -#if defined(_INT64_TYPE) -extern void atomic_and_64(); -#endif /* defined(_INT64_TYPE) */ -extern uint8_t atomic_inc_8_nv(); -extern uchar_t atomic_inc_uchar_nv(); -extern uint16_t atomic_inc_16_nv(); -extern ushort_t atomic_inc_ushort_nv(); -extern uint32_t atomic_inc_32_nv(); -extern uint_t atomic_inc_uint_nv(); -extern ulong_t atomic_inc_ulong_nv(); -#if defined(_INT64_TYPE) -extern uint64_t atomic_inc_64_nv(); -#endif /* defined(_INT64_TYPE) */ -extern uint8_t atomic_dec_8_nv(); -extern uchar_t atomic_dec_uchar_nv(); -extern uint16_t atomic_dec_16_nv(); -extern ushort_t atomic_dec_ushort_nv(); -extern uint32_t atomic_dec_32_nv(); -extern uint_t atomic_dec_uint_nv(); -extern ulong_t atomic_dec_ulong_nv(); -#if defined(_INT64_TYPE) -extern uint64_t atomic_dec_64_nv(); -#endif /* defined(_INT64_TYPE) */ -extern uint8_t atomic_add_8_nv(); -extern uchar_t atomic_add_char_nv(); -extern uint16_t atomic_add_16_nv(); -extern ushort_t atomic_add_short_nv(); -extern uint32_t atomic_add_32_nv(); -extern uint_t atomic_add_int_nv(); -extern void *atomic_add_ptr_nv(); -extern ulong_t atomic_add_long_nv(); -#if defined(_INT64_TYPE) -extern uint64_t atomic_add_64_nv(); -#endif /* defined(_INT64_TYPE) */ -extern uint8_t atomic_or_8_nv(); -extern uchar_t atomic_or_uchar_nv(); -extern uint16_t atomic_or_16_nv(); -extern ushort_t atomic_or_ushort_nv(); -extern uint32_t atomic_or_32_nv(); -extern uint_t atomic_or_uint_nv(); -extern ulong_t atomic_or_ulong_nv(); -#if defined(_INT64_TYPE) -extern uint64_t atomic_or_64_nv(); -#endif /* defined(_INT64_TYPE) */ -extern uint8_t atomic_and_8_nv(); -extern uchar_t atomic_and_uchar_nv(); -extern uint16_t atomic_and_16_nv(); -extern ushort_t atomic_and_ushort_nv(); -extern uint32_t atomic_and_32_nv(); -extern uint_t atomic_and_uint_nv(); -extern ulong_t atomic_and_ulong_nv(); -#if defined(_INT64_TYPE) -extern uint64_t atomic_and_64_nv(); -#endif /* defined(_INT64_TYPE) */ -extern uint8_t atomic_cas_8(); -extern uchar_t atomic_cas_uchar(); -extern uint16_t atomic_cas_16(); -extern ushort_t atomic_cas_ushort(); -extern uint32_t atomic_cas_32(); -extern uint_t atomic_cas_uint(); -extern void *atomic_cas_ptr(); -extern ulong_t atomic_cas_ulong(); -#if defined(_INT64_TYPE) -extern uint64_t atomic_cas_64(); -#endif /* defined(_INT64_TYPE) */ -extern uint8_t atomic_swap_8(); -extern uchar_t atomic_swap_uchar(); -extern uint16_t atomic_swap_16(); -extern ushort_t atomic_swap_ushort(); -extern uint32_t atomic_swap_32(); -extern uint_t atomic_swap_uint(); -extern void *atomic_swap_ptr(); -extern ulong_t atomic_swap_ulong(); -#if defined(_INT64_TYPE) -extern uint64_t atomic_swap_64(); -#endif /* defined(_INT64_TYPE) */ - - -extern int atomic_set_long_excl(); -extern int atomic_clear_long_excl(); - -extern void membar_enter(); -extern void membar_exit(); -extern void membar_producer(); -extern void membar_consumer(); - -#endif - #if defined(_KERNEL) #if defined(_LP64) || defined(_ILP32) diff --git a/usr/src/uts/common/sys/auxv.h b/usr/src/uts/common/sys/auxv.h index fac0f359b2..3a2e705850 100644 --- a/usr/src/uts/common/sys/auxv.h +++ b/usr/src/uts/common/sys/auxv.h @@ -23,6 +23,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -45,11 +47,7 @@ typedef struct int a_type; union { long a_val; -#ifdef __STDC__ void *a_ptr; -#else - char *a_ptr; -#endif void (*a_fcn)(); } a_un; } auxv_t; diff --git a/usr/src/uts/common/sys/avintr.h b/usr/src/uts/common/sys/avintr.h index b0b42f6c28..974d08cf72 100644 --- a/usr/src/uts/common/sys/avintr.h +++ b/usr/src/uts/common/sys/avintr.h @@ -19,6 +19,7 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -41,11 +42,7 @@ extern "C" { #define INT_IPL(x) (x) #define AV_INT_SPURIOUS -1 -#ifdef __STDC__ typedef uint_t (*avfunc)(caddr_t, caddr_t); -#else -typedef uint_t (*avfunc)(); -#endif /* __STDC__ */ struct autovec { diff --git a/usr/src/uts/common/sys/cladm.h b/usr/src/uts/common/sys/cladm.h index 4850d6d89e..a131089fd8 100644 --- a/usr/src/uts/common/sys/cladm.h +++ b/usr/src/uts/common/sys/cladm.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 1998-2002 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _SYS_CLADM_H #define _SYS_CLADM_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -143,11 +143,7 @@ typedef struct { extern int cladmin(int fac, int cmd, void *data); extern int cluster_bootflags; #else -#if defined(__STDC__) extern int _cladm(int fac, int cmd, void *data); -#else /* !defined(__STDC__) */ -extern int _cladm(); -#endif /* defined(__STDC__) */ #endif /* _KERNEL */ #ifdef __cplusplus diff --git a/usr/src/uts/common/sys/ddi.h b/usr/src/uts/common/sys/ddi.h index 7e32333641..0a8f4eb5af 100644 --- a/usr/src/uts/common/sys/ddi.h +++ b/usr/src/uts/common/sys/ddi.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,8 +33,6 @@ #ifndef _SYS_DDI_H #define _SYS_DDI_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.19 */ - #include <sys/types.h> #include <sys/map.h> #include <sys/buf.h> @@ -80,7 +80,6 @@ extern "C" { #define PSID 12 #define UCRED 13 -#ifdef __STDC__ extern int drv_getparm(uint_t, void *); extern int drv_setparm(uint_t, ulong_t); extern void drv_usecwait(clock_t); @@ -89,42 +88,14 @@ extern clock_t drv_usectohz(clock_t); extern void delay(clock_t); extern void time_to_wait(clock_t *, clock_t); -#else - -extern int drv_getparm(); -extern int drv_setparm(); -extern void drv_usecwait(); -extern clock_t drv_hztousec(); -extern clock_t drv_usectohz(); -extern void delay(); -extern time_to_wait(); -#endif /* __STDC__ */ - /* XXX -- should be changed to major_t */ /* convert external to internal major number */ -#ifdef __STDC__ extern int etoimajor(major_t); /* convert internal to extern major number */ extern int itoemajor(major_t, int); - -#else - -extern int etoimajor(); -/* convert internal to extern major number */ -extern int itoemajor(); -#endif /* __STDC__ */ - -#if defined(__STDC__) - extern int drv_priv(struct cred *); -#else - -extern int drv_priv(); - -#endif - /* * The following declarations take the place of macros in * sysmacros.h The undefs are for any case where a driver includes @@ -139,7 +110,6 @@ extern int drv_priv(); #undef expdev -#ifdef __STDC__ extern major_t getemajor(dev_t); extern minor_t geteminor(dev_t); extern major_t getmajor(dev_t); @@ -147,15 +117,6 @@ extern minor_t getminor(dev_t); extern dev_t makedevice(major_t, minor_t); extern o_dev_t cmpdev(dev_t); extern dev_t expdev(dev_t); -#else -extern major_t getemajor(); -extern minor_t geteminor(); -extern major_t getmajor(); -extern minor_t getminor(); -extern dev_t makedevice(); -extern o_dev_t cmpdev(); -extern dev_t expdev(); -#endif /* __STDC__ */ /* * The following macros from param.h are also being converted to @@ -167,16 +128,9 @@ extern dev_t expdev(); #undef btopr #undef ptob - -#ifdef __STDC__ extern unsigned long btop(unsigned long); extern unsigned long btopr(unsigned long); extern unsigned long ptob(unsigned long); -#else -extern unsigned long btop(); -extern unsigned long btopr(); -extern unsigned long ptob(); -#endif /* __STDC__ */ /* STREAMS drivers and modules must include stream.h to pick up the */ @@ -192,33 +146,17 @@ extern unsigned long ptob(); #undef SAMESTR #undef datamsg - -#ifdef __STDC__ extern struct queue *OTHERQ(queue_t *); /* stream.h */ extern struct queue *RD(queue_t *); extern struct queue *WR(queue_t *); extern int SAMESTR(queue_t *); extern int datamsg(unsigned char); -#else - -extern struct queue *OTHERQ(); /* stream.h */ -extern struct queue *RD(); -extern struct queue *WR(); -extern int SAMESTR(); -extern int datamsg(); -#endif /* __STDC__ */ - /* declarations of functions for allocating and deallocating the space */ /* for a buffer header (just a header, not the associated buffer) */ -#ifdef __STDC__ extern struct buf *getrbuf(int); extern void freerbuf(struct buf *); -#else -extern struct buf *getrbuf(); -extern void freerbuf(); -#endif /* __STDC__ */ #ifdef _KERNEL /* @@ -228,11 +166,7 @@ extern void freerbuf(); typedef pfn_t ppid_t; /* a 'physical page identifier' - no math allowed! */ -#ifdef __STDC__ extern ppid_t kvtoppid(caddr_t); -#else /* __STDC__ */ -extern ppid_t kvtoppid(); -#endif /* __STDC__ */ extern int qassociate(queue_t *, int); diff --git a/usr/src/uts/common/sys/ddidmareq.h b/usr/src/uts/common/sys/ddidmareq.h index 56c8de3e34..ec6ca3b24c 100644 --- a/usr/src/uts/common/sys/ddidmareq.h +++ b/usr/src/uts/common/sys/ddidmareq.h @@ -19,10 +19,9 @@ * CDDL HEADER END */ /* - * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. - */ -/* * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * + * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. */ #ifndef _SYS_DDIDMAREQ_H @@ -509,13 +508,8 @@ typedef struct ddi_dma_req { * defines then it is assumed that one wishes a callback and is providing * a function address. */ -#ifdef __STDC__ #define DDI_DMA_DONTWAIT ((int (*)(caddr_t))0) #define DDI_DMA_SLEEP ((int (*)(caddr_t))1) -#else -#define DDI_DMA_DONTWAIT ((int (*)())0) -#define DDI_DMA_SLEEP ((int (*)())1) -#endif /* * Return values from callback functions. diff --git a/usr/src/uts/common/sys/debug.h b/usr/src/uts/common/sys/debug.h index 85b8ab5f90..27b84beb88 100644 --- a/usr/src/uts/common/sys/debug.h +++ b/usr/src/uts/common/sys/debug.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -48,7 +50,6 @@ extern "C" { * ASSERT and is evaluated on both debug and non-debug kernels. */ -#if defined(__STDC__) extern int assfail(const char *, const char *, int); #define VERIFY(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__))) #if DEBUG @@ -56,15 +57,6 @@ extern int assfail(const char *, const char *, int); #else #define ASSERT(x) ((void)0) #endif -#else /* defined(__STDC__) */ -extern int assfail(); -#define VERIFY(EX) ((void)((EX) || assfail("EX", __FILE__, __LINE__))) -#if DEBUG -#define ASSERT(EX) ((void)((EX) || assfail("EX", __FILE__, __LINE__))) -#else -#define ASSERT(x) ((void)0) -#endif -#endif /* defined(__STDC__) */ /* * Assertion variants sensitive to the compilation data model diff --git a/usr/src/uts/common/sys/dirent.h b/usr/src/uts/common/sys/dirent.h index 7778fbe0c9..225de0b77e 100644 --- a/usr/src/uts/common/sys/dirent.h +++ b/usr/src/uts/common/sys/dirent.h @@ -23,6 +23,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -119,11 +121,7 @@ typedef struct dirent64 { #endif #endif /* _LP64 && _LARGEFILE64_SOURCE */ -#if defined(__STDC__) extern int getdents(int, struct dirent *, size_t); -#else -extern int getdents(); -#endif /* N.B.: transitional large file interface version deliberately not provided */ diff --git a/usr/src/uts/common/sys/dktp/cm.h b/usr/src/uts/common/sys/dktp/cm.h index 5231b139f3..b9167403bb 100644 --- a/usr/src/uts/common/sys/dktp/cm.h +++ b/usr/src/uts/common/sys/dktp/cm.h @@ -20,14 +20,14 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright (c) 1992 Sun Microsystems, Inc. All Rights Reserved. */ #ifndef _SYS_DKTP_CM_H #define _SYS_DKTP_CM_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #ifdef _KERNEL #include <sys/conf.h> @@ -48,11 +48,7 @@ extern "C" { #ifdef _KERNEL #ifndef _SYS_SCSI_SCSI_H -#ifdef __STDC__ typedef void * opaque_t; -#else /* __STDC__ */ -typedef char * opaque_t; -#endif /* __STDC__ */ #endif #define PRF prom_printf diff --git a/usr/src/uts/common/sys/dl.h b/usr/src/uts/common/sys/dl.h index d8a4d73515..c01e3f488b 100644 --- a/usr/src/uts/common/sys/dl.h +++ b/usr/src/uts/common/sys/dl.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 1997 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,8 +32,6 @@ #ifndef _SYS_DL_H #define _SYS_DL_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/isa_defs.h> #ifdef __cplusplus @@ -48,7 +48,6 @@ typedef struct dl { #endif } dl_t; -#ifdef __STDC__ extern dl_t ladd(dl_t, dl_t); extern dl_t lsub(dl_t, dl_t); extern dl_t lmul(dl_t, dl_t); @@ -56,15 +55,6 @@ extern dl_t ldivide(dl_t, dl_t); extern dl_t lshiftl(dl_t, int); extern dl_t llog10(dl_t); extern dl_t lexp10(dl_t); -#else -extern dl_t ladd(); -extern dl_t lsub(); -extern dl_t lmul(); -extern dl_t ldivide(); -extern dl_t lshiftl(); -extern dl_t llog10(); -extern dl_t lexp10(); -#endif /* __STDC__ */ extern dl_t lzero; extern dl_t lone; diff --git a/usr/src/uts/common/sys/ethernet.h b/usr/src/uts/common/sys/ethernet.h index d7a6600660..6c9aeef4af 100644 --- a/usr/src/uts/common/sys/ethernet.h +++ b/usr/src/uts/common/sys/ethernet.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -141,19 +143,11 @@ extern int localetheraddr(struct ether_addr *, struct ether_addr *); extern char *ether_sprintf(struct ether_addr *); extern int ether_aton(char *, uchar_t *); #else /* _KERNEL */ -#ifdef __STDC__ extern char *ether_ntoa(const struct ether_addr *); extern struct ether_addr *ether_aton(const char *); extern int ether_ntohost(char *, const struct ether_addr *); extern int ether_hostton(const char *, struct ether_addr *); extern int ether_line(const char *, struct ether_addr *, char *); -#else /* __STDC__ */ -extern char *ether_ntoa(); -extern struct ether_addr *ether_aton(); -extern int ether_ntohost(); -extern int ether_hostton(); -extern int ether_line(); -#endif /* __STDC__ */ #endif /* _KERNEL */ #ifdef __cplusplus diff --git a/usr/src/uts/common/sys/fbuf.h b/usr/src/uts/common/sys/fbuf.h index c694c62618..3b1f8fd8db 100644 --- a/usr/src/uts/common/sys/fbuf.h +++ b/usr/src/uts/common/sys/fbuf.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright (c) 1997-1998 by Sun Microsystems, Inc. * All rights reserved. */ @@ -31,8 +33,6 @@ #ifndef _SYS_FBUF_H #define _SYS_FBUF_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3 */ - #include <sys/vnode.h> #ifdef __cplusplus @@ -53,7 +53,6 @@ struct fbuf { uint_t fb_count; }; -#if defined(__STDC__) extern int fbread(struct vnode *, offset_t, uint_t, enum seg_rw, struct fbuf **); extern void fbzero(struct vnode *, offset_t, uint_t, struct fbuf **); @@ -61,7 +60,6 @@ extern int fbwrite(struct fbuf *); extern int fbdwrite(struct fbuf *); extern int fbiwrite(struct fbuf *, struct vnode *, daddr_t bn, int bsize); extern void fbrelse(struct fbuf *, enum seg_rw); -#endif #ifdef __cplusplus } diff --git a/usr/src/uts/common/sys/feature_tests.h b/usr/src/uts/common/sys/feature_tests.h index f96760e34b..863b976706 100644 --- a/usr/src/uts/common/sys/feature_tests.h +++ b/usr/src/uts/common/sys/feature_tests.h @@ -20,12 +20,11 @@ */ /* + * Copyright 2013 Garrett D'Amore <garrett@damore.org> + * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -/* - * Copyright 2013 Garrett D'Amore <garrett@damore.org> - */ #ifndef _SYS_FEATURE_TESTS_H #define _SYS_FEATURE_TESTS_H diff --git a/usr/src/uts/common/sys/fibre-channel/fc_types.h b/usr/src/uts/common/sys/fibre-channel/fc_types.h index 46b444fd80..b88e7f9653 100644 --- a/usr/src/uts/common/sys/fibre-channel/fc_types.h +++ b/usr/src/uts/common/sys/fibre-channel/fc_types.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -60,11 +62,7 @@ extern "C" { #ifndef _SYS_SCSI_SCSI_TYPES_H -#ifdef __STDC__ typedef void *opaque_t; -#else /* __STDC__ */ -typedef char *opaque_t; -#endif /* __STDC__ */ #endif /* _SYS_SCSI_SCSI_TYPES_H */ diff --git a/usr/src/uts/common/sys/fs/cachefs_dir.h b/usr/src/uts/common/sys/fs/cachefs_dir.h index 2ae4af3910..c223b1c688 100644 --- a/usr/src/uts/common/sys/fs/cachefs_dir.h +++ b/usr/src/uts/common/sys/fs/cachefs_dir.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _SYS_FS_CACHEFS_DIR_H #define _SYS_FS_CACHEFS_DIR_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/fs/cachefs_fs.h> @@ -71,7 +71,7 @@ struct c_dirent { #define CDE_COMPLETE 0x2 /* entry is complete */ -#if defined(_KERNEL) && defined(__STDC__) +#if defined(_KERNEL) int cachefs_dir_look(cnode_t *dcp, char *nm, fid_t *cookiep, uint_t *flagp, u_offset_t *d_offsetp, cfs_cid_t *cidp); int cachefs_dir_new(cnode_t *dcp, cnode_t *cp); @@ -86,7 +86,7 @@ int cachefs_dir_empty(cnode_t *dcp); int cachefs_async_populate_dir(struct cachefs_populate_req *, cred_t *, vnode_t *, vnode_t *); -#endif /* defined(_KERNEL) && defined(__STDC__) */ +#endif /* defined(_KERNEL) */ #ifdef __cplusplus } diff --git a/usr/src/uts/common/sys/fs/cachefs_dlog.h b/usr/src/uts/common/sys/fs/cachefs_dlog.h index 9f598de55b..3914cad114 100644 --- a/usr/src/uts/common/sys/fs/cachefs_dlog.h +++ b/usr/src/uts/common/sys/fs/cachefs_dlog.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _SYS_FS_CACHEFS_DLOG_H #define _SYS_FS_CACHEFS_DLOG_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/vfs.h> #include <sys/acl.h> @@ -279,7 +279,7 @@ typedef struct cfs_dlog_entry cfs_dlog_entry_t; offsetof(struct cfs_dlog_entry, dl_u.dl_setsecattr) + \ CFS_DLOG_SECATTR_MAXSIZE) -#if defined(_KERNEL) && defined(__STDC__) +#if defined(_KERNEL) int cachefs_dlog_setup(fscache_t *fscp, int createfile); void cachefs_dlog_teardown(fscache_t *fscp); int cachefs_dlog_commit(fscache_t *fscp, off_t offset, int error); diff --git a/usr/src/uts/common/sys/fs/cachefs_fs.h b/usr/src/uts/common/sys/fs/cachefs_fs.h index ae0d900ada..30bc223a2b 100644 --- a/usr/src/uts/common/sys/fs/cachefs_fs.h +++ b/usr/src/uts/common/sys/fs/cachefs_fs.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _SYS_FS_CACHEFS_FS_H #define _SYS_FS_CACHEFS_FS_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/vnode.h> #include <sys/vfs.h> #include <sys/types.h> @@ -1107,7 +1107,7 @@ typedef struct cachefs_debug_info { /* * cachefs function prototypes */ -#if defined(_KERNEL) && defined(__STDC__) +#if defined(_KERNEL) extern int cachefs_getcookie(vnode_t *, struct fid *, struct vattr *, cred_t *, uint32_t); cachefscache_t *cachefs_cache_create(void); @@ -1305,7 +1305,7 @@ extern void *cachefs_kmem_zalloc(size_t, int); extern void cachefs_kmem_free(void *, size_t); extern char *cachefs_strdup(char *); -#endif /* defined (_KERNEL) && defined (__STDC__) */ +#endif /* defined (_KERNEL) */ diff --git a/usr/src/uts/common/sys/fs/ufs_filio.h b/usr/src/uts/common/sys/fs/ufs_filio.h index 052be12ef4..127a197217 100644 --- a/usr/src/uts/common/sys/fs/ufs_filio.h +++ b/usr/src/uts/common/sys/fs/ufs_filio.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -26,8 +28,6 @@ #ifndef _SYS_FS_UFS_FILIO_H #define _SYS_FS_UFS_FILIO_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -88,7 +88,7 @@ typedef struct fiolog { #define FIOLOG_ECLEAN 5 #define FIOLOG_ENOULOCK 6 -#if defined(_KERNEL) && defined(__STDC__) +#if defined(_KERNEL) extern int ufs_fiosatime(struct vnode *, struct timeval *, int, struct cred *); @@ -104,7 +104,7 @@ extern int ufs_fioislog(vnode_t *, uint32_t *, cred_t *, int); extern int ufs_fio_holey(vnode_t *, int, offset_t *); extern int ufs_mark_compressed(struct vnode *vp); -#endif /* defined(_KERNEL) && defined(__STDC__) */ +#endif /* defined(_KERNEL) */ #ifdef __cplusplus } diff --git a/usr/src/uts/common/sys/fs/ufs_prot.h b/usr/src/uts/common/sys/fs/ufs_prot.h index e1810198e7..2cd9683a1b 100644 --- a/usr/src/uts/common/sys/fs/ufs_prot.h +++ b/usr/src/uts/common/sys/fs/ufs_prot.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -32,8 +34,6 @@ #ifndef _SYS_FS_UFS_PROT_H #define _SYS_FS_UFS_PROT_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <rpc/rpc.h> #ifdef __cplusplus @@ -166,7 +166,6 @@ typedef struct ufsd_msg_t ufsd_msg_t; #define UFSD_PROG ((unsigned long)(100233)) #define UFSD_VERS ((unsigned long)(1)) -#if defined(__STDC__) || defined(__cplusplus) #define UFSD_NULL ((unsigned long)(0)) extern ufsdrc_t *ufsd_null_1(void *, CLIENT *); extern ufsdrc_t *ufsd_null_1_svc(void *, struct svc_req *); @@ -189,31 +188,8 @@ extern ufsdrc_t *ufsd_exit_1(void *, CLIENT *); extern ufsdrc_t *ufsd_exit_1_svc(void *, struct svc_req *); extern int ufsd_prog_1_freeresult(SVCXPRT *, xdrproc_t, caddr_t); -#else /* K&R C */ -#define UFSD_NULL ((unsigned long)(0)) -extern ufsdrc_t *ufsd_null_1(); -extern ufsdrc_t *ufsd_null_1_svc(); -#define UFSD_REPAIRFS ((unsigned long)(1)) -extern ufsdrc_t *ufsd_repairfs_1(); -extern ufsdrc_t *ufsd_repairfs_1_svc(); -#define UFSD_REPAIRFSLIST ((unsigned long)(2)) -extern ufsdrc_t *ufsd_repairfslist_1(); -extern ufsdrc_t *ufsd_repairfslist_1_svc(); -#define UFSD_SEND ((unsigned long)(3)) -extern ufsdrc_t *ufsd_send_1(); -extern ufsdrc_t *ufsd_send_1_svc(); -#define UFSD_RECV ((unsigned long)(4)) -extern ufsdrc_t *ufsd_recv_1(); -extern ufsdrc_t *ufsd_recv_1_svc(); -#define UFSD_EXIT ((unsigned long)(5)) -extern ufsdrc_t *ufsd_exit_1(); -extern ufsdrc_t *ufsd_exit_1_svc(); -extern int ufsd_prog_1_freeresult(); -#endif /* K&R C */ - /* the xdr functions */ -#if defined(__STDC__) || defined(__cplusplus) extern bool_t xdr_ufsdrc_t(XDR *, ufsdrc_t *); extern bool_t xdr_fs_identity_t(XDR *, fs_identity_t *); extern bool_t xdr_ufsd_repairfs_args_t(XDR *, ufsd_repairfs_args_t *); @@ -227,22 +203,6 @@ extern bool_t xdr_ufsd_log_msg_t(XDR *, ufsd_log_msg_t *); extern bool_t xdr_ufsd_msg_vardata_t(XDR *, ufsd_msg_vardata_t *); extern bool_t xdr_ufsd_msg_t(XDR *, ufsd_msg_t *); -#else /* K&R C */ -extern bool_t xdr_ufsdrc_t(); -extern bool_t xdr_fs_identity_t(); -extern bool_t xdr_ufsd_repairfs_args_t(); -extern bool_t xdr_ufsd_repairfs_list_t(); -extern bool_t xdr_ufsd_event_t(); -extern bool_t xdr_ufsd_boot_type_t(); -extern bool_t xdr_ufsd_log_op_t(); -extern bool_t xdr_ufsd_fsck_state_t(); -extern bool_t xdr_ufsd_log_data_t(); -extern bool_t xdr_ufsd_log_msg_t(); -extern bool_t xdr_ufsd_msg_vardata_t(); -extern bool_t xdr_ufsd_msg_t(); - -#endif /* K&R C */ - #ifdef __cplusplus } #endif diff --git a/usr/src/uts/common/sys/fs/ufs_trans.h b/usr/src/uts/common/sys/fs/ufs_trans.h index 53538c694c..cdaf55c87c 100644 --- a/usr/src/uts/common/sys/fs/ufs_trans.h +++ b/usr/src/uts/common/sys/fs/ufs_trans.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _SYS_FS_UFS_TRANS_H #define _SYS_FS_UFS_TRANS_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -481,7 +481,7 @@ struct ufsvfs; /* * ufs trans function prototypes */ -#if defined(_KERNEL) && defined(__STDC__) +#if defined(_KERNEL) extern int ufs_trans_hlock(); extern void ufs_trans_onerror(); @@ -538,7 +538,7 @@ void top_matadel(struct ufsvfs *ufsvfsp, offset_t mof, off_t nb); void top_mataclr(struct ufsvfs *ufsvfsp); -#endif /* defined(_KERNEL) && defined(__STDC__) */ +#endif /* defined(_KERNEL) */ #ifdef __cplusplus } diff --git a/usr/src/uts/common/sys/fstyp.h b/usr/src/uts/common/sys/fstyp.h index 1be613dbb1..d65553c1d9 100644 --- a/usr/src/uts/common/sys/fstyp.h +++ b/usr/src/uts/common/sys/fstyp.h @@ -19,6 +19,9 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ @@ -26,8 +29,6 @@ #ifndef _SYS_FSTYP_H #define _SYS_FSTYP_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 11.6 */ - #ifdef __cplusplus extern "C" { #endif @@ -43,7 +44,7 @@ extern "C" { #define GETFSTYP 2 /* translate fstype index to fs identifier */ #define GETNFSTYP 3 /* return the number of fstypes */ -#if defined(__STDC__) && !defined(_KERNEL) +#if !defined(_KERNEL) int sysfs(int, ...); #endif diff --git a/usr/src/uts/common/sys/hotplug/hpcsvc.h b/usr/src/uts/common/sys/hotplug/hpcsvc.h index 9975731c64..7ef8935cef 100644 --- a/usr/src/uts/common/sys/hotplug/hpcsvc.h +++ b/usr/src/uts/common/sys/hotplug/hpcsvc.h @@ -21,6 +21,8 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright (c) 1999-2000 by Sun Microsystems, Inc. * All rights reserved. */ @@ -28,8 +30,6 @@ #ifndef _SYS_HOTPLUG_HPCSVC_H #define _SYS_HOTPLUG_HPCSVC_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/hotplug/hpctrl.h> #ifdef __cplusplus @@ -40,7 +40,6 @@ extern "C" { #define HPC_EVENT_NORMAL 0 /* normal, queued event handling */ #define HPC_EVENT_SYNCHRONOUS 1 /* unqueued sync. event handling */ -#ifdef __STDC__ extern int hpc_nexus_register_bus(dev_info_t *dip, int (* callback)(dev_info_t *dip, hpc_slot_t handle, hpc_slot_info_t *slot_info, int slot_state), @@ -54,16 +53,6 @@ extern int hpc_nexus_control(hpc_slot_t handle, int request, caddr_t arg); extern int hpc_install_event_handler(hpc_slot_t handle, uint_t event_mask, int (*event_handler)(caddr_t, uint_t), caddr_t arg); extern int hpc_remove_event_handler(hpc_slot_t handle); -#else -extern int hpc_nexus_register_bus(); -extern int hpc_nexus_unregister_bus(); -extern int hpc_nexus_connect(); -extern int hpc_nexus_disconnect(); -extern int hpc_nexus_insert(); -extern int hpc_nexus_remove(); -extern int hpc_nexus_control(); -extern int hpc_install_event_handler(); -#endif #ifdef __cplusplus } diff --git a/usr/src/uts/common/sys/hotplug/hpctrl.h b/usr/src/uts/common/sys/hotplug/hpctrl.h index 1d1c83a8af..1fbd75964e 100644 --- a/usr/src/uts/common/sys/hotplug/hpctrl.h +++ b/usr/src/uts/common/sys/hotplug/hpctrl.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _SYS_HOTPLUG_HPCTRL_H #define _SYS_HOTPLUG_HPCTRL_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * **************************************************************** * Hot Plug Controller interfaces for PCI and CompactPCI platforms. @@ -270,7 +270,6 @@ typedef enum { HPC_BOARD_UNKNOWN, HPC_BOARD_PCI_HOTPLUG, * function prototype definitions for interfaces between HPC driver * and Hot Plug Services framework. */ -#ifdef __STDC__ extern int hpc_slot_register(dev_info_t *dip, char *bus_path, hpc_slot_info_t *slot_info, hpc_slot_t *slot_hdl, hpc_slot_ops_t *slot_ops, caddr_t ops_arg, uint_t flags); @@ -280,14 +279,6 @@ extern void hpc_free_slot_ops(hpc_slot_ops_t *ops); extern int hpc_slot_event_notify(hpc_slot_t slot_hdl, uint_t event, uint_t flags); extern boolean_t hpc_bus_registered(hpc_slot_t slot_hdl); -#else -extern int hpc_slot_register(); -extern int hpc_slot_unregister(); -extern struct hpc_slot_ops *hpc_alloc_slot_ops(); -extern void hpc_free_slot_ops(); -extern int hpc_slot_event_notify(); -extern boolean_t hpc_bus_registered(); -#endif /* __STDC__ */ /* * ***************************************************************** diff --git a/usr/src/uts/common/sys/instance.h b/usr/src/uts/common/sys/instance.h index 4e57a9974f..01a404010f 100644 --- a/usr/src/uts/common/sys/instance.h +++ b/usr/src/uts/common/sys/instance.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -134,11 +136,7 @@ void e_ddi_return_instance(dev_info_t *cdip, char *addr, in_node_t *cnp); #else /* _KERNEL */ -#ifdef __STDC__ extern int inst_sync(char *pathname, int flags); -#else -extern int inst_sync(); -#endif /* __STDC__ */ #endif /* _KERNEL */ #define INST_SYNC_IF_REQUIRED 0 diff --git a/usr/src/uts/common/sys/int_const.h b/usr/src/uts/common/sys/int_const.h index 61cf149b17..a32da14bbd 100644 --- a/usr/src/uts/common/sys/int_const.h +++ b/usr/src/uts/common/sys/int_const.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _SYS_INT_CONST_H #define _SYS_INT_CONST_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This file, <sys/int_const.h>, is part of the Sun Microsystems implementation * of <inttypes.h> as proposed in the ISO/JTC1/SC22/WG14 C committee's working @@ -72,17 +72,10 @@ extern "C" { * standard requires a space between arguments, but the historical, * non-ANSI-C ``method'' of concatenation can't tolerate those spaces. */ -#ifdef __STDC__ /* CSTYLED */ #define __CONCAT__(A,B) A ## B -#else -/* CSTYLED */ -#define __CONCAT__(A,B) A/**/B -#endif -#if defined(_CHAR_IS_SIGNED) || defined(__STDC__) #define INT8_C(c) (c) -#endif #define INT16_C(c) (c) #define INT32_C(c) (c) #ifdef _LP64 diff --git a/usr/src/uts/common/sys/int_fmtio.h b/usr/src/uts/common/sys/int_fmtio.h index 54d0541b38..764fc0e7a2 100644 --- a/usr/src/uts/common/sys/int_fmtio.h +++ b/usr/src/uts/common/sys/int_fmtio.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _SYS_INT_FMTIO_H #define _SYS_INT_FMTIO_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This file, <sys/int_fmtio.h>, is part of the Sun Microsystems implementation * of <inttypes.h> as defined by the ISO C Standard, ISO/IEC 9899:1999 @@ -94,11 +94,9 @@ extern "C" { #define _PRIx "x" #define _PRIX "X" -#if defined(_CHAR_IS_SIGNED) || defined(__STDC__) #define PRId8 _MODF8 _PRId #define PRIdLEAST8 PRId8 #define PRIdFAST8 PRId8 -#endif #define PRId16 _MODF16 _PRId #define PRIdLEAST16 PRId16 #define PRId32 "d" @@ -117,11 +115,9 @@ extern "C" { #define PRIdFAST64 PRId64 #endif -#if defined(_CHAR_IS_SIGNED) || defined(__STDC__) #define PRIi8 _MODF8 _PRIi #define PRIiLEAST8 PRIi8 #define PRIiFAST8 PRIi8 -#endif #define PRIi16 _MODF16 _PRIi #define PRIiLEAST16 PRIi16 #define PRIi32 "i" @@ -251,11 +247,9 @@ extern "C" { /* * fscanf macros for signed integers */ -#if defined(_CHAR_IS_SIGNED) || defined(__STDC__) #define SCNd8 "hhd" #define SCNdLEAST8 SCNd8 #define SCNdFAST8 SCNd8 -#endif #define SCNd16 "hd" #define SCNdLEAST16 SCNd16 #define SCNd32 "d" @@ -269,11 +263,9 @@ extern "C" { #endif #define SCNdPTR PRIdPTR -#if defined(_CHAR_IS_SIGNED) || defined(__STDC__) #define SCNi8 "hhi" #define SCNiLEAST8 SCNi8 #define SCNiFAST8 SCNi8 -#endif #define SCNi16 "hi" #define SCNiLEAST16 SCNi16 #define SCNi32 "i" diff --git a/usr/src/uts/common/sys/int_limits.h b/usr/src/uts/common/sys/int_limits.h index 4995abb3b9..bc466064cd 100644 --- a/usr/src/uts/common/sys/int_limits.h +++ b/usr/src/uts/common/sys/int_limits.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _SYS_INT_LIMITS_H #define _SYS_INT_LIMITS_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This file, <sys/int_limits.h>, is part of the Sun Microsystems implementation * of <inttypes.h> as defined in the ISO C standard, ISO/IEC 9899:1999 @@ -80,9 +80,7 @@ extern "C" { * where the ABI specifies "char" as unsigned when the translation mode is * not ANSI-C. */ -#if defined(_CHAR_IS_SIGNED) || defined(__STDC__) #define INT8_MAX (127) -#endif #define INT16_MAX (32767) #define INT32_MAX (2147483647) #if defined(_LP64) @@ -112,9 +110,7 @@ extern "C" { #define UINTMAX_MAX UINT32_MAX #endif -#if defined(_CHAR_IS_SIGNED) || defined(__STDC__) #define INT_LEAST8_MAX INT8_MAX -#endif #define INT_LEAST16_MAX INT16_MAX #define INT_LEAST32_MAX INT32_MAX #ifdef INT64_MAX @@ -128,9 +124,7 @@ extern "C" { #define UINT_LEAST64_MAX UINT64_MAX #endif -#if defined(_CHAR_IS_SIGNED) || defined(__STDC__) #define INT_FAST8_MAX INT8_MAX -#endif #define INT_FAST16_MAX INT16_MAX #define INT_FAST32_MAX INT32_MAX #ifdef INT64_MAX @@ -204,9 +198,7 @@ extern "C" { */ #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG6) -#if defined(_CHAR_IS_SIGNED) || defined(__STDC__) #define INT8_MIN (-128) -#endif #define INT16_MIN (-32767-1) #define INT32_MIN (-2147483647-1) #if defined(_LP64) @@ -221,18 +213,14 @@ extern "C" { #define INTMAX_MIN INT32_MIN #endif -#if defined(_CHAR_IS_SIGNED) || defined(__STDC__) #define INT_LEAST8_MIN INT8_MIN -#endif #define INT_LEAST16_MIN INT16_MIN #define INT_LEAST32_MIN INT32_MIN #ifdef INT64_MIN #define INT_LEAST64_MIN INT64_MIN #endif -#if defined(_CHAR_IS_SIGNED) || defined(__STDC__) #define INT_FAST8_MIN INT8_MIN -#endif #define INT_FAST16_MIN INT16_MIN #define INT_FAST32_MIN INT32_MIN #ifdef INT64_MIN diff --git a/usr/src/uts/common/sys/int_types.h b/usr/src/uts/common/sys/int_types.h index d9d52008de..e57d6f8b75 100644 --- a/usr/src/uts/common/sys/int_types.h +++ b/usr/src/uts/common/sys/int_types.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _SYS_INT_TYPES_H #define _SYS_INT_TYPES_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This file, <sys/int_types.h>, is part of the Sun Microsystems implementation * of <inttypes.h> defined in the ISO C standard, ISO/IEC 9899:1999 @@ -74,10 +74,8 @@ extern "C" { #if defined(_CHAR_IS_SIGNED) typedef char int8_t; #else -#if defined(__STDC__) typedef signed char int8_t; #endif -#endif typedef short int16_t; typedef int int32_t; #ifdef _LP64 @@ -133,10 +131,8 @@ typedef unsigned int uintptr_t; #if defined(_CHAR_IS_SIGNED) typedef char int_fast8_t; #else -#if defined(__STDC__) typedef signed char int_fast8_t; #endif -#endif typedef int int_fast16_t; typedef int int_fast32_t; #ifdef _LP64 @@ -165,10 +161,8 @@ typedef unsigned long long uint_fast64_t; #if defined(_CHAR_IS_SIGNED) typedef char int_least8_t; #else -#if defined(__STDC__) typedef signed char int_least8_t; #endif -#endif typedef short int_least16_t; typedef int int_least32_t; #ifdef _LP64 diff --git a/usr/src/uts/common/sys/ipc.h b/usr/src/uts/common/sys/ipc.h index 317412b55d..4857aac3e8 100644 --- a/usr/src/uts/common/sys/ipc.h +++ b/usr/src/uts/common/sys/ipc.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 1996-2003 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -32,8 +34,6 @@ #ifndef _SYS_IPC_H #define _SYS_IPC_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/isa_defs.h> #include <sys/feature_tests.h> #include <sys/types.h> @@ -78,11 +78,7 @@ struct ipc_perm { #if (!defined(_KERNEL) && !defined(_XOPEN_SOURCE)) || defined(_XPG4_2) || \ defined(__EXTENSIONS__) -#if defined(__STDC__) key_t ftok(const char *, int); -#else -key_t ftok(); -#endif /* defined(__STDC__) */ #endif /* (!defined(_KERNEL) && !defined(_XOPEN_SOURCE))... */ #ifdef __cplusplus diff --git a/usr/src/uts/common/sys/lgrp_user.h b/usr/src/uts/common/sys/lgrp_user.h index f98ff53ef0..cf9a04ab21 100644 --- a/usr/src/uts/common/sys/lgrp_user.h +++ b/usr/src/uts/common/sys/lgrp_user.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _LGRP_USER_H #define _LGRP_USER_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * latency group definitions for user */ @@ -244,8 +244,6 @@ typedef struct lgrp_snapshot_header32 { #if (!defined(_KERNEL) && !defined(_KMEMUSER)) -#ifdef __STDC__ - lgrp_affinity_t lgrp_affinity_get(idtype_t idtype, id_t id, lgrp_id_t lgrp); int lgrp_affinity_set(idtype_t idtype, id_t id, lgrp_id_t lgrp, @@ -287,25 +285,6 @@ int lgrp_version(int version); lgrp_view_t lgrp_view(lgrp_cookie_t cookie); -#else /* __STDC__ */ -lgrp_affinity_t lgrp_affinity_get(); -int lgrp_affinity_set(); -int lgrp_children(); -int lgrp_cookie_stale(); -int lgrp_cpus(); -int lgrp_fini(); -lgrp_id_t lgrp_home(); -int lgrp_init(); -int lgrp_latency(); -spgcnt_t lgrp_mem_size(); -int lgrp_nlgrps(); -int lgrp_parents(); -int lgrp_resources(); -lgrp_id_t lgrp_root(); -int lgrp_version(); -lgrp_view_t lgrp_view(); -#endif /* __STDC__ */ - #endif /* !_KERNEL && !_KMEMUSER */ #ifdef __cplusplus diff --git a/usr/src/uts/common/sys/link.h b/usr/src/uts/common/sys/link.h index 4012471785..b97f321420 100644 --- a/usr/src/uts/common/sys/link.h +++ b/usr/src/uts/common/sys/link.h @@ -23,6 +23,8 @@ * Copyright (c) 1988 AT&T * All Rights Reserved * + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -622,15 +624,10 @@ typedef struct { #ifndef _ASM -#ifdef __STDC__ - /* * Concurrency communication structure for libc callbacks. */ extern void _ld_libc(void *); -#else /* __STDC__ */ -extern void _ld_libc(); -#endif /* __STDC__ */ #pragma unknown_control_flow(_ld_libc) #endif /* _ASM */ diff --git a/usr/src/uts/common/sys/lock.h b/usr/src/uts/common/sys/lock.h index d211977ce2..be5d18865b 100644 --- a/usr/src/uts/common/sys/lock.h +++ b/usr/src/uts/common/sys/lock.h @@ -19,6 +19,9 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ @@ -26,8 +29,6 @@ #ifndef _SYS_LOCK_H #define _SYS_LOCK_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 11.7 */ - #ifdef __cplusplus extern "C" { #endif @@ -44,19 +45,11 @@ extern "C" { #define MEMLOCK 8 -#if defined(__STDC__) int punlock(void); -#else -int punlock(); -#endif /* __STDC__ */ #else -#if defined(__STDC__) int plock(int); -#else -int plock(); -#endif /* __STDC__ */ #endif /* _KERNEL */ diff --git a/usr/src/uts/common/sys/mkdev.h b/usr/src/uts/common/sys/mkdev.h index 0b0f7deb64..1586e880b4 100644 --- a/usr/src/uts/common/sys/mkdev.h +++ b/usr/src/uts/common/sys/mkdev.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -82,8 +84,6 @@ extern "C" { #undef major #undef minor -#if defined(__STDC__) - extern dev_t makedev(const major_t, const minor_t); extern major_t major(const dev_t); extern minor_t minor(const dev_t); @@ -91,17 +91,6 @@ extern dev_t __makedev(const int, const major_t, const minor_t); extern major_t __major(const int, const dev_t); extern minor_t __minor(const int, const dev_t); -#else - -extern dev_t makedev(); -extern major_t major(); -extern minor_t minor(); -extern dev_t __makedev(); -extern major_t __major(); -extern minor_t __minor(); - -#endif /* defined(__STDC__) */ - #define OLDDEV 0 /* old device format */ #define NEWDEV 1 /* new device format */ diff --git a/usr/src/uts/common/sys/mman.h b/usr/src/uts/common/sys/mman.h index 8f66bf7489..a4cca68098 100644 --- a/usr/src/uts/common/sys/mman.h +++ b/usr/src/uts/common/sys/mman.h @@ -21,6 +21,8 @@ /* Copyright 2013 OmniTI Computer Consulting, Inc. All rights reserved. */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -221,7 +223,6 @@ typedef struct mmapobj_result32 { * Except for old binaries mmap() will return the resultant * address of mapping on success and (caddr_t)-1 on error. */ -#ifdef __STDC__ #if (_POSIX_C_SOURCE > 2) || defined(_XPG4_2) extern void *mmap(void *, size_t, int, int, int, off_t); extern int munmap(void *, size_t); @@ -276,33 +277,6 @@ extern int posix_madvise(void *, size_t, int); /* mmap failure value */ #define MAP_FAILED ((void *) -1) -#else /* __STDC__ */ -extern caddr_t mmap(); -extern int munmap(); -extern int mmapobj(); -extern int mprotect(); -extern int mincore(); -extern int memcntl(); -extern int msync(); -extern int madvise(); -extern int posix_madvise(); -extern int getpagesizes(); -extern int getpagesizes2(); -extern int mlock(); -extern int mlockall(); -extern int munlock(); -extern int munlockall(); -extern int meminfo(); -extern int shm_open(); -extern int shm_unlink(); - -/* transitional large file interface version */ -#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ - !defined(__PRAGMA_REDEFINE_EXTNAME)) -extern caddr_t mmap64(); -#endif /* _LARGEFILE64_SOURCE... */ -#endif /* __STDC__ */ - #endif /* !_ASM && !_KERNEL */ @@ -388,7 +362,7 @@ struct memcntl_mha32 { /* definitions for meminfosys syscall */ #define MISYS_MEMINFO 0x0 -#if !defined(_ASM) && defined(__STDC__) +#if !defined(_ASM) #if defined(_INT64_TYPE) /* private structure for meminfo */ @@ -411,7 +385,7 @@ typedef struct meminfo32 { } meminfo32_t; #endif /* defined(_SYSCALL32) */ -#endif /* !defined(_ASM) && defined(__STDC__) */ +#endif /* !defined(_ASM) */ /* * info_req request type definitions for meminfo diff --git a/usr/src/uts/common/sys/mnttab.h b/usr/src/uts/common/sys/mnttab.h index ff086370ec..0955762aaf 100644 --- a/usr/src/uts/common/sys/mnttab.h +++ b/usr/src/uts/common/sys/mnttab.h @@ -23,6 +23,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -83,21 +85,12 @@ struct mntentbuf { }; #if !defined(_KERNEL) -#ifdef __STDC__ extern void resetmnttab(FILE *); extern int getmntent(FILE *, struct mnttab *); extern int getextmntent(FILE *, struct extmnttab *, size_t); extern int getmntany(FILE *, struct mnttab *, struct mnttab *); extern char *hasmntopt(struct mnttab *, char *); extern char *mntopt(char **); -#else -extern void resetmnttab(); -extern int getmntent(); -extern int getextmntent(); -extern int getmntany(); -extern char *hasmntopt(); -extern char *mntopt(); -#endif #endif #ifdef __cplusplus diff --git a/usr/src/uts/common/sys/mount.h b/usr/src/uts/common/sys/mount.h index a84bdacbc5..8b6055a652 100644 --- a/usr/src/uts/common/sys/mount.h +++ b/usr/src/uts/common/sys/mount.h @@ -24,6 +24,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright (c) 1996, 1999 by Sun Microsystems, Inc. * All rights reserved. */ @@ -31,8 +33,6 @@ #ifndef _SYS_MOUNT_H #define _SYS_MOUNT_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 11.10 */ - #ifdef __cplusplus extern "C" { #endif @@ -76,7 +76,7 @@ extern "C" { */ #define MAX_MNTOPT_STR 1024 /* max length of mount options string */ -#if defined(__STDC__) && !defined(_KERNEL) +#if !defined(_KERNEL) int mount(const char *, const char *, int, ...); int umount(const char *); int umount2(const char *, int); diff --git a/usr/src/uts/common/sys/msg.h b/usr/src/uts/common/sys/msg.h index af8f5a291e..12b0554a98 100644 --- a/usr/src/uts/common/sys/msg.h +++ b/usr/src/uts/common/sys/msg.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 1999-2003 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,8 +33,6 @@ #ifndef _SYS_MSG_H #define _SYS_MSG_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/ipc.h> #ifdef __cplusplus @@ -126,21 +126,12 @@ struct msgsnap_mhead { }; #if !defined(_KERNEL) -#if defined(__STDC__) int msgctl(int, int, struct msqid_ds *); int msgget(key_t, int); int msgids(int *, uint_t, uint_t *); int msgsnap(int, void *, size_t, long); ssize_t msgrcv(int, void *, size_t, long, int); int msgsnd(int, const void *, size_t, int); -#else /* __STDC__ */ -int msgctl(); -int msgget(); -int msgids(); -int msgsnap(); -int msgrcv(); -int msgsnd(); -#endif /* __STDC__ */ #endif /* ! _KERNEL */ #ifdef __cplusplus diff --git a/usr/src/uts/common/sys/netconfig.h b/usr/src/uts/common/sys/netconfig.h index 44a871ddfa..14b1aa55db 100644 --- a/usr/src/uts/common/sys/netconfig.h +++ b/usr/src/uts/common/sys/netconfig.h @@ -24,6 +24,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,8 +33,6 @@ #ifndef _SYS_NETCONFIG_H #define _SYS_NETCONFIG_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.4 */ - #ifdef __cplusplus extern "C" { #endif @@ -137,8 +137,6 @@ typedef struct { #define NC_IBTF "ibtf" #define NC_KDAPL "kdapl" -#if defined(__STDC__) - extern void *setnetconfig(void); extern int endnetconfig(void *); extern struct netconfig *getnetconfig(void *); @@ -150,21 +148,6 @@ extern struct netconfig *getnetpath(void *); extern void nc_perror(const char *); extern char *nc_sperror(void); -#else /* __STDC__ */ - -extern void *setnetconfig(); -extern int endnetconfig(); -extern struct netconfig *getnetconfig(); -extern struct netconfig *getnetconfigent(); -extern void freenetconfigent(); -extern void *setnetpath(); -extern int endnetpath(); -extern struct netconfig *getnetpath(); -extern void nc_perror(); -extern char *nc_sperror(); - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/uts/common/sys/poll.h b/usr/src/uts/common/sys/poll.h index b1e222a3a3..9fff78a966 100644 --- a/usr/src/uts/common/sys/poll.h +++ b/usr/src/uts/common/sys/poll.h @@ -24,6 +24,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright (c) 1995, 1998 by Sun Microsystems, Inc. * All rights reserved. */ @@ -31,8 +33,6 @@ #ifndef _SYS_POLL_H #define _SYS_POLL_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 11.9 */ - #ifdef __cplusplus extern "C" { #endif @@ -138,11 +138,7 @@ extern void pollhead_clean(pollhead_t *); #endif /* defined(_KERNEL) || defined(_KMEMUSER) */ #if !defined(_KERNEL) -#if defined(__STDC__) int poll(struct pollfd *, nfds_t, int); -#else -int poll(); -#endif /* __STDC__ */ #endif /* !_KERNEL */ #ifdef __cplusplus diff --git a/usr/src/uts/common/sys/priocntl.h b/usr/src/uts/common/sys/priocntl.h index 1f88f47c66..cb08f4ac54 100644 --- a/usr/src/uts/common/sys/priocntl.h +++ b/usr/src/uts/common/sys/priocntl.h @@ -20,6 +20,8 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,8 +32,6 @@ #ifndef _SYS_PRIOCNTL_H #define _SYS_PRIOCNTL_H -#pragma ident "%Z%%M% %I% %E% SMI" /* from SVR4 1.6 */ - #include <sys/types.h> #include <sys/procset.h> @@ -41,12 +41,8 @@ extern "C" { #define PC_VERSION 1 /* First version of priocntl */ -#ifdef __STDC__ extern long priocntl(idtype_t, id_t, int, ...); extern long priocntlset(procset_t *, int, ...); -#else -extern long priocntl(), priocntlset(); -#endif /* __STDC__ */ /* * The following are the possible values of the command diff --git a/usr/src/uts/common/sys/priv.h b/usr/src/uts/common/sys/priv.h index 49beaf156d..51a504ee4e 100644 --- a/usr/src/uts/common/sys/priv.h +++ b/usr/src/uts/common/sys/priv.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -50,13 +52,8 @@ typedef int priv_t; * Userland type definitions. */ -#ifdef __STDC__ typedef const char *priv_ptype_t; typedef const char *priv_t; -#else -typedef char *priv_ptype_t; -typedef char *priv_t; -#endif #endif /* _KERNEL */ diff --git a/usr/src/uts/common/sys/processor.h b/usr/src/uts/common/sys/processor.h index c0fe6e21b8..ec4b7471e5 100644 --- a/usr/src/uts/common/sys/processor.h +++ b/usr/src/uts/common/sys/processor.h @@ -25,6 +25,8 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -112,7 +114,6 @@ typedef struct { * User-level system call interface prototypes */ #ifndef _KERNEL -#ifdef __STDC__ extern int p_online(processorid_t processorid, int flag); extern int processor_info(processorid_t processorid, @@ -122,16 +123,6 @@ extern int processor_bind(idtype_t idtype, id_t id, extern processorid_t getcpuid(void); extern lgrpid_t gethomelgroup(void); -#else - -extern int p_online(); -extern int processor_info(); -extern int processor_bind(); -extern processorid_t getcpuid(); -extern lgrpid_t gethomelgroup(); - -#endif /* __STDC__ */ - #else /* _KERNEL */ /* diff --git a/usr/src/uts/common/sys/pset.h b/usr/src/uts/common/sys/pset.h index bf6562bb4e..355c095d2b 100644 --- a/usr/src/uts/common/sys/pset.h +++ b/usr/src/uts/common/sys/pset.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -51,7 +53,6 @@ typedef int psetid_t; #define PS_PRIVATE 2 #ifndef _KERNEL -#ifdef __STDC__ extern int pset_create(psetid_t *); extern int pset_destroy(psetid_t); @@ -64,20 +65,6 @@ extern int pset_list(psetid_t *, uint_t *); extern int pset_setattr(psetid_t, uint_t); extern int pset_getattr(psetid_t, uint_t *); -#else - -extern int pset_create(); -extern int pset_destroy(); -extern int pset_assign(); -extern int pset_info(); -extern int pset_bind(); -extern int pset_bind_lwp(); -extern int pset_getloadavg(); -extern int pset_list(); -extern int pset_setattr(); -extern int pset_getattr(); - -#endif /* __STDC__ */ #endif /* ! _KERNEL */ #endif /* !defined(_ASM) */ diff --git a/usr/src/uts/common/sys/reboot.h b/usr/src/uts/common/sys/reboot.h index 87b992d191..80dd7c76aa 100644 --- a/usr/src/uts/common/sys/reboot.h +++ b/usr/src/uts/common/sys/reboot.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _SYS_REBOOT_H #define _SYS_REBOOT_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifndef _ASM #include <sys/types.h> #endif @@ -65,11 +65,7 @@ extern "C" { #ifndef _ASM -#if defined(__STDC__) extern int reboot(int, char *); -#else -extern int reboot(); -#endif #if defined(_KERNEL) diff --git a/usr/src/uts/common/sys/resource.h b/usr/src/uts/common/sys/resource.h index bf02808d4b..d69b23aade 100644 --- a/usr/src/uts/common/sys/resource.h +++ b/usr/src/uts/common/sys/resource.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrrett D'Amore <garrett@damore.org> + * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -39,8 +41,6 @@ #ifndef _SYS_RESOURCE_H #define _SYS_RESOURCE_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/feature_tests.h> #include <sys/types.h> @@ -258,8 +258,6 @@ struct proc; #endif #endif /* _LP64 && _LARGEFILE64_SOURCE */ -#if defined(__STDC__) - extern int setrlimit(int, const struct rlimit *); extern int getrlimit(int, struct rlimit *); @@ -274,24 +272,6 @@ extern int getpriority(int, id_t); extern int setpriority(int, id_t, int); extern int getrusage(int, struct rusage *); -#else /* __STDC__ */ - -extern int getrlimit(); -extern int setrlimit(); - -/* transitional large file interfaces */ -#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ - !defined(__PRAGMA_REDEFINE_EXTNAME)) -extern int setrlimit64(); -extern int getrlimit64(); -#endif /* _LARGEFILE64_SOURCE... */ - -extern int getpriority(); -extern int setpriority(); -extern int getrusage(); - -#endif /* __STDC__ */ - #endif /* _KERNEL */ #ifdef __cplusplus diff --git a/usr/src/uts/common/sys/scsi/impl/commands.h b/usr/src/uts/common/sys/scsi/impl/commands.h index 38feeca32c..646074c897 100644 --- a/usr/src/uts/common/sys/scsi/impl/commands.h +++ b/usr/src/uts/common/sys/scsi/impl/commands.h @@ -20,6 +20,7 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -669,7 +670,6 @@ struct scsi_capacity_16 { * scsi_setup_cdb() */ -#ifdef __STDC__ extern void makecom_g0(struct scsi_pkt *pkt, struct scsi_device *devp, int flag, int cmd, int addr, int cnt); extern void makecom_g0_s(struct scsi_pkt *pkt, struct scsi_device *devp, @@ -681,16 +681,6 @@ extern void makecom_g5(struct scsi_pkt *pkt, struct scsi_device *devp, extern int scsi_setup_cdb(union scsi_cdb *cdbp, uchar_t cmd, uint_t addr, uint_t cnt, uint_t addtl_cdb_data); -#else /* __STDC__ */ - -extern void makecom_g0(); -extern void makecom_g0_s(); -extern void makecom_g1(); -extern void makecom_g5(); -extern int scsi_setup_cdb(); - -#endif /* __STDC__ */ - #endif /* _KERNEL */ #ifdef __cplusplus diff --git a/usr/src/uts/common/sys/scsi/impl/scsi_reset_notify.h b/usr/src/uts/common/sys/scsi/impl/scsi_reset_notify.h index 2e025362a9..379e97c3a3 100644 --- a/usr/src/uts/common/sys/scsi/impl/scsi_reset_notify.h +++ b/usr/src/uts/common/sys/scsi/impl/scsi_reset_notify.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright (c) 1998 by Sun Microsystems, Inc. * All rights reserved. */ @@ -27,8 +29,6 @@ #ifndef _SYS_SCSI_RESET_NOTIFY_H #define _SYS_SCSI_RESET_NOTIFY_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/note.h> #include <sys/scsi/scsi_types.h> @@ -60,7 +60,6 @@ _NOTE(SCHEME_PROTECTS_DATA("protected by lock passed as arg", #endif #ifdef _KERNEL -#ifdef __STDC__ extern int scsi_hba_reset_notify_setup(struct scsi_address *, int, void (*)(caddr_t), caddr_t, kmutex_t *, struct scsi_reset_notify_entry **); @@ -68,11 +67,6 @@ extern void scsi_hba_reset_notify_tear_down( struct scsi_reset_notify_entry *listp); extern void scsi_hba_reset_notify_callback(kmutex_t *mutex, struct scsi_reset_notify_entry **listp); -#else /* __STDC__ */ -extern int scsi_hba_reset_notify_setup(); -extern void scsi_hba_reset_notify_tear_down(); -extern void scsi_hba_reset_notify_callback(); -#endif /* __STDC__ */ #endif /* _KERNEL */ diff --git a/usr/src/uts/common/sys/select.h b/usr/src/uts/common/sys/select.h index 5a8c266761..418cb56838 100644 --- a/usr/src/uts/common/sys/select.h +++ b/usr/src/uts/common/sys/select.h @@ -20,6 +20,8 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -152,7 +154,6 @@ typedef struct __fd_set { #endif /* _KERNEL */ #ifndef _KERNEL -#ifdef __STDC__ extern int select(int, fd_set *_RESTRICT_KYWD, fd_set *_RESTRICT_KYWD, fd_set *_RESTRICT_KYWD, struct timeval *_RESTRICT_KYWD); @@ -162,12 +163,6 @@ extern int pselect(int, fd_set *_RESTRICT_KYWD, fd_set *_RESTRICT_KYWD, const sigset_t *_RESTRICT_KYWD); #endif -#else -extern int select(); -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__) -extern int pselect(); -#endif -#endif /* __STDC__ */ #endif /* _KERNEL */ #ifdef __cplusplus diff --git a/usr/src/uts/common/sys/sem.h b/usr/src/uts/common/sys/sem.h index f776d1f3e7..302eb2e1bf 100644 --- a/usr/src/uts/common/sys/sem.h +++ b/usr/src/uts/common/sys/sem.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 1997-2003 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,8 +33,6 @@ #ifndef _SYS_SEM_H #define _SYS_SEM_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/ipc.h> #ifdef __cplusplus @@ -103,7 +103,6 @@ struct sembuf { }; #if !defined(_KERNEL) -#if defined(__STDC__) int semctl(int, int, int, ...); int semget(key_t, int, int); int semids(int *, uint_t, uint_t *); @@ -111,13 +110,6 @@ int semop(int, struct sembuf *, size_t); #if defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) int semtimedop(int, struct sembuf *, size_t, const struct timespec *); #endif -#else /* __STDC__ */ -int semctl(); -int semget(); -int semids(); -int semop(); -int semtimedop(); -#endif /* __STDC__ */ #endif /* ! _KERNEL */ #ifdef __cplusplus diff --git a/usr/src/uts/common/sys/sendfile.h b/usr/src/uts/common/sys/sendfile.h index aa6eec98dc..22bce8ccea 100644 --- a/usr/src/uts/common/sys/sendfile.h +++ b/usr/src/uts/common/sys/sendfile.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -27,8 +29,6 @@ #ifndef _SYS_SENDFILE_H #define _SYS_SENDFILE_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/feature_tests.h> #ifdef __cplusplus @@ -128,7 +128,6 @@ typedef struct ksendfilevec64 { #endif /* __PRAGMA_REDEFINE_EXTNAME */ #endif /* _LP64 && _LARGEFILE64_SOURCE */ -#ifdef __STDC__ extern ssize_t sendfilev(int, const struct sendfilevec *, int, size_t *); extern ssize_t sendfile(int, int, off_t *, size_t); /* Transitional largefile interface */ @@ -137,15 +136,6 @@ extern ssize_t sendfile(int, int, off_t *, size_t); extern ssize_t sendfilev64(int, const struct sendfilevec64 *, int, size_t *); extern ssize_t sendfile64(int, int, off64_t *, size_t); #endif -#else /* __STDC__ */ -extern int sendfilev(); -extern int sendfile(); -#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ - !defined(__PRAGMA_REDEFINE_EXTNAME)) -extern int sendfilev64(); -extern int sendfile64(); -#endif -#endif /* __STDC__ */ #endif /* _KERNEL */ #ifdef __cplusplus diff --git a/usr/src/uts/common/sys/shm.h b/usr/src/uts/common/sys/shm.h index 457c28fcef..e3bd2a77d3 100644 --- a/usr/src/uts/common/sys/shm.h +++ b/usr/src/uts/common/sys/shm.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -35,8 +37,6 @@ #ifndef _SYS_SHM_H #define _SYS_SHM_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/ipc.h> #ifdef __cplusplus @@ -121,7 +121,6 @@ struct shmid_ds { #define SHM_UNLOCK 4 /* Unlock segment */ #if !defined(_KERNEL) -#if defined(__STDC__) int shmget(key_t, size_t, int); int shmids(int *, uint_t, uint_t *); int shmctl(int, int, struct shmid_ds *); @@ -131,13 +130,6 @@ int shmdt(const void *); #else int shmdt(char *); #endif /* defined(_XPG4) */ -#else /* __STDC__ */ -int shmctl(); -int shmget(); -int shmids(); -void *shmat(); -int shmdt(); -#endif /* __STDC__ */ #endif /* !defined(_KERNEL) */ #ifdef __cplusplus diff --git a/usr/src/uts/common/sys/socket.h b/usr/src/uts/common/sys/socket.h index 2733c50faa..590551f6f2 100644 --- a/usr/src/uts/common/sys/socket.h +++ b/usr/src/uts/common/sys/socket.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -522,7 +524,6 @@ struct cmsghdr { #endif /* (_XPG4_2) && !defined(_XPG5) */ #if !defined(_KERNEL) || defined(_BOOT) -#ifdef __STDC__ extern int accept(int, struct sockaddr *_RESTRICT_KYWD, Psocklen_t); extern int accept4(int, struct sockaddr *_RESTRICT_KYWD, Psocklen_t, int); extern int bind(int, const struct sockaddr *, socklen_t); @@ -547,27 +548,6 @@ extern int socket(int, int, int); #if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) extern int sockatmark(int); #endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */ -#else /* __STDC__ */ -extern int accept(); -extern int accept4(); -extern int bind(); -extern int connect(); -extern int getpeername(); -extern int getsockname(); -extern int getsockopt(); -extern int listen(); -extern int recv(); -extern int recvfrom(); -extern int send(); -extern int sendto(); -extern int setsockopt(); -extern int sockatmark(); -extern int socket(); -extern int recvmsg(); -extern int sendmsg(); -extern int shutdown(); -extern int socketpair(); -#endif /* __STDC__ */ #endif /* !defined(_KERNEL) || defined(_BOOT) */ #ifdef __cplusplus diff --git a/usr/src/uts/common/sys/stat.h b/usr/src/uts/common/sys/stat.h index 3f68a55730..42cc40646f 100644 --- a/usr/src/uts/common/sys/stat.h +++ b/usr/src/uts/common/sys/stat.h @@ -20,6 +20,7 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -480,8 +481,6 @@ struct stat64_32 { #if !defined(_KERNEL) || defined(_BOOT) -#if defined(__STDC__) - #if !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2) || \ defined(_XPG4_2) || defined(__EXTENSIONS__) extern int fchmod(int, mode_t); @@ -515,43 +514,6 @@ extern int futimens(int, const struct timespec[2]); extern int utimensat(int, const char *, const struct timespec[2], int); #endif /* defined(__EXTENSIONS__) ... */ -#else /* !__STDC__ */ - -#if !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2) || \ - defined(_XPG4_2) || defined(__EXTENSIONS__) -extern int fchmod(); -#endif /* !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2)... */ - -extern int chmod(); -extern int mkdir(); -extern int mkfifo(); -extern mode_t umask(); - -/* transitional large file interfaces */ -#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ - !defined(__PRAGMA_REDEFINE_EXTNAME)) -extern int fstat64(); -extern int stat64(); -extern int lstat64(); -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) || \ - defined(_ATFILE_SOURCE) -extern int fstatat64(); -#endif /* defined (_ATFILE_SOURCE) */ -#endif - -#if defined(__EXTENSIONS__) || defined(_ATFILE_SOURCE) || \ - (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) - /* || defined(_XPG7) */ -extern int mkdirat(); -extern int mkfifoat(); -extern int mknodat(); -extern int fchmodat(); -extern int futimens(); -extern int utimensat(); -#endif /* defined(__EXTENSIONS__) ... */ - -#endif /* defined(__STDC__) */ - #include <sys/stat_impl.h> #endif /* !defined(_KERNEL) */ diff --git a/usr/src/uts/common/sys/statfs.h b/usr/src/uts/common/sys/statfs.h index 247a8f4da4..bfda45c7bb 100644 --- a/usr/src/uts/common/sys/statfs.h +++ b/usr/src/uts/common/sys/statfs.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 1996 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -30,8 +32,6 @@ #ifndef _SYS_STATFS_H #define _SYS_STATFS_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -71,7 +71,7 @@ struct statfs32 { #endif /* _SYSCALL32 */ -#if defined(__STDC__) && !defined(_KERNEL) +#if !defined(_KERNEL) int statfs(const char *, struct statfs *, int, int); int fstatfs(int, struct statfs *, int, int); #endif diff --git a/usr/src/uts/common/sys/statvfs.h b/usr/src/uts/common/sys/statvfs.h index 1cc7013dd6..a86b3380b1 100644 --- a/usr/src/uts/common/sys/statvfs.h +++ b/usr/src/uts/common/sys/statvfs.h @@ -22,8 +22,9 @@ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,8 +32,6 @@ #ifndef _SYS_STATVFS_H #define _SYS_STATVFS_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.10 */ - #include <sys/feature_tests.h> #include <sys/types.h> @@ -188,7 +187,6 @@ typedef struct statvfs64_32 { #endif #endif /* _LP64 && _LARGEFILE64_SOURCE */ -#if defined(__STDC__) int statvfs(const char *_RESTRICT_KYWD, statvfs_t *_RESTRICT_KYWD); int fstatvfs(int, statvfs_t *); @@ -198,7 +196,6 @@ int fstatvfs(int, statvfs_t *); int statvfs64(const char *_RESTRICT_KYWD, statvfs64_t *_RESTRICT_KYWD); int fstatvfs64(int, statvfs64_t *); #endif /* _LARGEFILE64_SOURCE... */ -#endif /* defined(__STDC__) */ #endif /* !defined(_KERNEL) */ #ifdef __cplusplus diff --git a/usr/src/uts/common/sys/sunpm.h b/usr/src/uts/common/sys/sunpm.h index f505eb2237..7ce11e0bda 100644 --- a/usr/src/uts/common/sys/sunpm.h +++ b/usr/src/uts/common/sys/sunpm.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -99,14 +101,6 @@ struct pm_trans_data { #define PM_LEVEL_D0_STR "3=Device D0 State" /* - * If you add or remove a function or data reference, please - * remember to duplicate the action below the #else clause for - * __STDC__. - */ - -#ifdef __STDC__ - -/* * Generic Sun PM definitions. */ @@ -114,69 +108,33 @@ struct pm_trans_data { * These are obsolete power management interfaces, they will be removed from * a subsequent release. */ -int -pm_create_components(dev_info_t *dip, int num_components); +int pm_create_components(dev_info_t *dip, int num_components); -void -pm_destroy_components(dev_info_t *dip); +void pm_destroy_components(dev_info_t *dip); -void -pm_set_normal_power(dev_info_t *dip, int component_number, int level); +void pm_set_normal_power(dev_info_t *dip, int component_number, int level); -int -pm_get_normal_power(dev_info_t *dip, int component_number); +int pm_get_normal_power(dev_info_t *dip, int component_number); /* * These are power management interfaces. */ -int -pm_busy_component(dev_info_t *dip, int component_number); - -int -pm_idle_component(dev_info_t *dip, int component_number); +int pm_busy_component(dev_info_t *dip, int component_number); -int -pm_get_current_power(dev_info_t *dip, int component, int *levelp); +int pm_idle_component(dev_info_t *dip, int component_number); -int -pm_power_has_changed(dev_info_t *, int, int); +int pm_get_current_power(dev_info_t *dip, int component, int *levelp); -int -pm_trans_check(struct pm_trans_data *datap, time_t *intervalp); +int pm_power_has_changed(dev_info_t *, int, int); -int -pm_lower_power(dev_info_t *dip, int comp, int level); +int pm_trans_check(struct pm_trans_data *datap, time_t *intervalp); -int -pm_raise_power(dev_info_t *dip, int comp, int level); +int pm_lower_power(dev_info_t *dip, int comp, int level); -int -pm_update_maxpower(dev_info_t *dip, int comp, int level); +int pm_raise_power(dev_info_t *dip, int comp, int level); -#else /* __STDC__ */ - -/* - * Obsolete interfaces. - */ -extern int pm_create_components(); -extern void pm_destroy_components(); -extern void pm_set_normal_power(); -extern int pm_get_normal_power(); - -/* - * PM interfaces - */ -extern int pm_busy_component(); -extern int pm_idle_component(); -extern int pm_get_current_power(); -extern int pm_power_has_changed(); -extern int pm_trans_check(); -extern int pm_lower_power(); -extern int pm_raise_power(); -extern int pm_update_maxpower(); - -#endif /* __STDC__ */ +int pm_update_maxpower(dev_info_t *dip, int comp, int level); #endif /* _KERNEL */ diff --git a/usr/src/uts/common/sys/swap.h b/usr/src/uts/common/sys/swap.h index bfe5fe3349..e31c642c3a 100644 --- a/usr/src/uts/common/sys/swap.h +++ b/usr/src/uts/common/sys/swap.h @@ -19,6 +19,7 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> * Copyright (c) 1987, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -112,11 +113,7 @@ extern int swapctl(int, void *, int *); extern int swapctl32(int, void *, int *); #endif /* _LP64 && _SYSCALL32 */ #else /* !_KERNEL */ -#if defined(__STDC__) extern int swapctl(int, void *); -#else -extern int swapctl(); -#endif #endif /* _KERNEL */ diff --git a/usr/src/uts/common/sys/syscall.h b/usr/src/uts/common/sys/syscall.h index 15dc00aa45..eee273a25f 100644 --- a/usr/src/uts/common/sys/syscall.h +++ b/usr/src/uts/common/sys/syscall.h @@ -20,6 +20,7 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. */ @@ -506,15 +507,9 @@ typedef struct { /* return values from system call */ #if !defined(_KERNEL) -#if defined(__STDC__) extern int syscall(int, ...); extern int __systemcall(sysret_t *, int, ...); extern int __set_errno(int); -#else -extern int syscall(); -extern int __systemcall(); -extern int __set_errno(); -#endif #endif /* _KERNEL */ diff --git a/usr/src/uts/common/sys/systeminfo.h b/usr/src/uts/common/sys/systeminfo.h index 3f7a465aa5..b02984f003 100644 --- a/usr/src/uts/common/sys/systeminfo.h +++ b/usr/src/uts/common/sys/systeminfo.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -98,11 +100,7 @@ extern char platform[]; /* name */ #if !defined(_KERNEL) -#if defined(__STDC__) int sysinfo(int, char *, long); -#else -int sysinfo(); -#endif #endif #ifdef __cplusplus diff --git a/usr/src/uts/common/sys/t_kuser.h b/usr/src/uts/common/sys/t_kuser.h index da749ac81b..287adf8964 100644 --- a/usr/src/uts/common/sys/t_kuser.h +++ b/usr/src/uts/common/sys/t_kuser.h @@ -20,6 +20,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 1998 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -40,8 +42,6 @@ #ifndef _SYS_T_KUSER_H #define _SYS_T_KUSER_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <sys/file.h> #include <sys/cred.h> @@ -91,9 +91,6 @@ extern int ktlilog; */ #define MADE_FP 0x02 - -#ifdef __STDC__ - extern int t_kalloc(TIUSER *, int, int, char **); extern int t_kbind(TIUSER *, struct t_bind *, struct t_bind *); extern int t_kclose(TIUSER *, int); @@ -110,25 +107,6 @@ extern int tli_recv(TIUSER *, mblk_t **, int); extern int t_tlitosyserr(int); extern int get_ok_ack(TIUSER *, int, int); -#else - -extern int t_kalloc(); -extern int t_kbind(); -extern int t_kclose(); -extern int t_kconnect(); -extern int t_kfree(); -extern int t_kgetstate(); -extern int t_kopen(); -extern int t_krcvudata(); -extern int t_ksndudata(); -extern int t_kspoll(); -extern int t_kunbind(); -extern int tli_send(); -extern int tli_recv(); -extern int t_tlitosyserr(); -extern int get_ok_ack(); -#endif /* __STDC__ */ - /* * these make life a lot easier */ diff --git a/usr/src/uts/common/sys/termios.h b/usr/src/uts/common/sys/termios.h index e66ba0bc6b..09be20858d 100644 --- a/usr/src/uts/common/sys/termios.h +++ b/usr/src/uts/common/sys/termios.h @@ -23,6 +23,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved. */ @@ -98,8 +100,6 @@ struct termios { #ifndef _KERNEL -#if defined(__STDC__) - extern speed_t cfgetospeed(const struct termios *); extern int cfsetospeed(struct termios *, speed_t); extern speed_t cfgetispeed(const struct termios *); @@ -111,28 +111,9 @@ extern int tcdrain(int); extern int tcflush(int, int); extern int tcflow(int, int); -#else - -extern speed_t cfgetospeed(); -extern int cfsetospeed(); -extern speed_t cfgetispeed(); -extern int cfsetispeed(); -extern int tcgetattr(); -extern int tcsetattr(); -extern int tcsendbreak(); -extern int tcdrain(); -extern int tcflush(); -extern int tcflow(); - -#endif /* __STDC__ */ - #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__) -#if defined(__STDC__) extern pid_t tcgetsid(int); -#else -extern pid_t tcgetsid(); -#endif /* __STDC__ */ #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) ... */ diff --git a/usr/src/uts/common/sys/time.h b/usr/src/uts/common/sys/time.h index eba6cb5277..c110707171 100644 --- a/usr/src/uts/common/sys/time.h +++ b/usr/src/uts/common/sys/time.h @@ -9,6 +9,8 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -372,27 +374,17 @@ extern void hrt2ts32(hrtime_t, timestruc32_t *); #endif /* _KERNEL */ #if !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -#if defined(__STDC__) int adjtime(struct timeval *, struct timeval *); -#else -int adjtime(); -#endif #endif /* !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) ... */ #if !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) || \ defined(_ATFILE_SOURCE) || defined(__EXTENSIONS__) -#if defined(__STDC__) int futimesat(int, const char *, const struct timeval *); -#else -int futimesat(); -#endif /* defined(__STDC__) */ #endif /* defined(__ATFILE_SOURCE) */ #if !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \ defined(__EXTENSIONS__) -#if defined(__STDC__) - int getitimer(int, struct itimerval *); int utimes(const char *, const struct timeval *); #if defined(_XPG4_2) @@ -403,12 +395,6 @@ int setitimer(int, struct itimerval *_RESTRICT_KYWD, struct itimerval *_RESTRICT_KYWD); #endif /* defined(_XPG2_2) */ -#else /* __STDC__ */ - -int gettimer(); -int settimer(); -int utimes(); -#endif /* __STDC__ */ #endif /* !defined(_KERNEL) ... defined(_XPG4_2) */ /* @@ -427,7 +413,6 @@ int utimes(); */ #if !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -#if defined(__STDC__) #if defined(_SVID_GETTOD) int settimeofday(struct timeval *); #else @@ -435,26 +420,17 @@ int settimeofday(struct timeval *, void *); #endif hrtime_t gethrtime(void); hrtime_t gethrvtime(void); -#else /* __STDC__ */ -int settimeofday(); -hrtime_t gethrtime(); -hrtime_t gethrvtime(); -#endif /* __STDC__ */ #endif /* !(defined _KERNEL) && !defined(__XOPEN_OR_POSIX) ... */ #if !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \ defined(__EXTENSIONS__) -#if defined(__STDC__) #if defined(_SVID_GETTOD) int gettimeofday(struct timeval *); #else int gettimeofday(struct timeval *_RESTRICT_KYWD, void *_RESTRICT_KYWD); #endif -#else /* __STDC__ */ -int gettimeofday(); -#endif /* __STDC__ */ #endif /* !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) ... */ diff --git a/usr/src/uts/common/sys/timeb.h b/usr/src/uts/common/sys/timeb.h index a8755273ac..c16fa7f54a 100644 --- a/usr/src/uts/common/sys/timeb.h +++ b/usr/src/uts/common/sys/timeb.h @@ -1,4 +1,6 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -6,8 +8,6 @@ #ifndef _SYS_TIMEB_H #define _SYS_TIMEB_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -60,11 +60,7 @@ struct timeb { short dstflag; /* DST == non-zero */ }; -#if defined(__STDC__) extern int ftime(struct timeb *); -#else -extern int ftime(); -#endif #ifdef __cplusplus } diff --git a/usr/src/uts/common/sys/times.h b/usr/src/uts/common/sys/times.h index acf533a19d..ef0602209c 100644 --- a/usr/src/uts/common/sys/times.h +++ b/usr/src/uts/common/sys/times.h @@ -19,6 +19,9 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ @@ -26,8 +29,6 @@ #ifndef _SYS_TIMES_H #define _SYS_TIMES_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 11.7 */ - #include <sys/types.h> #ifdef __cplusplus @@ -58,11 +59,7 @@ struct tms32 { #endif /* _SYSCALL32 */ -#if defined(__STDC__) clock_t times(struct tms *); -#else -clock_t times(); -#endif #ifdef __cplusplus } diff --git a/usr/src/uts/common/sys/timex.h b/usr/src/uts/common/sys/timex.h index bc51fe1ca3..fc7365abdf 100644 --- a/usr/src/uts/common/sys/timex.h +++ b/usr/src/uts/common/sys/timex.h @@ -13,6 +13,8 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 1996-1997, 2002 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -20,8 +22,6 @@ #ifndef _SYS_TIMEX_H #define _SYS_TIMEX_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -237,16 +237,11 @@ struct timex { int32_t stbcnt; /* stability limit exceeded (ro) */ }; -#if defined(__STDC__) /* * NTP syscalls */ int ntp_gettime(struct ntptimeval *); int ntp_adjtime(struct timex *); -#else -int ntp_gettime(); -int ntp_adjtime(); -#endif /* __STDC__ */ #ifdef _KERNEL diff --git a/usr/src/uts/common/sys/tiuser.h b/usr/src/uts/common/sys/tiuser.h index 72762d7210..5bb9cfb632 100644 --- a/usr/src/uts/common/sys/tiuser.h +++ b/usr/src/uts/common/sys/tiuser.h @@ -26,6 +26,8 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2002 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * Copyright 2014 Gary Mills @@ -192,8 +194,6 @@ struct t_uderr { #define LOCALNAME 0 #define REMOTENAME 1 -#if defined(__STDC__) - extern int t_accept(int fildes, int resfd, struct t_call *call); extern char *t_alloc(int fildes, int struct_type, int fields); extern int t_bind(int fildes, struct t_bind *req, struct t_bind *ret); @@ -230,8 +230,6 @@ extern int t_unbind(int fildes); extern char *t_errlist[]; extern int t_nerr; -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/uts/common/sys/uadmin.h b/usr/src/uts/common/sys/uadmin.h index c35d0a5cfb..d5168c9b2c 100644 --- a/usr/src/uts/common/sys/uadmin.h +++ b/usr/src/uts/common/sys/uadmin.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -160,11 +162,7 @@ extern int kadmin(int, int, void *, cred_t *); extern void killall(zoneid_t); #endif -#if defined(__STDC__) extern int uadmin(int, int, uintptr_t); -#else -extern int uadmin(); -#endif #endif /* _ASM */ diff --git a/usr/src/uts/common/sys/uio.h b/usr/src/uts/common/sys/uio.h index 7255a2fa67..dd8cbea4fa 100644 --- a/usr/src/uts/common/sys/uio.h +++ b/usr/src/uts/common/sys/uio.h @@ -19,6 +19,8 @@ * CDDL HEADER END */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -249,18 +251,9 @@ extern uioasync_t uioasync; #else /* defined(_KERNEL) */ -#if defined(__STDC__) - extern ssize_t readv(int, const struct iovec *, int); extern ssize_t writev(int, const struct iovec *, int); -#else /* defined(__STDC__) */ - -extern ssize_t readv(); -extern ssize_t writev(); - -#endif /* defined(__STDC__) */ - #endif /* defined(_KERNEL) */ #ifdef __cplusplus diff --git a/usr/src/uts/common/sys/utsname.h b/usr/src/uts/common/sys/utsname.h index 4a2aca442c..2ed104236c 100644 --- a/usr/src/uts/common/sys/utsname.h +++ b/usr/src/uts/common/sys/utsname.h @@ -24,6 +24,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -63,8 +65,6 @@ extern struct utsname utsname; #if defined(__i386) && !defined(__amd64) -#if defined(__STDC__) - extern int uname(struct utsname *); extern int _uname(struct utsname *); @@ -73,18 +73,6 @@ extern int nuname(struct utsname *); #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ extern int _nuname(struct utsname *); -#else /* defined(__STDC__) */ - -extern int uname(); -extern int _uname(); - -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern int nuname(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ -extern int _nuname(); - -#endif /* defined(__STDC__) */ - /* * On i386 in SVID.2 uname() returns a utsname structure with 8 byte members, * and nuname() returns the real struct utsname. In SVID.3 uname and nuname @@ -102,11 +90,7 @@ extern int _nuname(); #else /* defined(__i386) */ -#if defined(__STDC__) extern int uname(struct utsname *); -#else -extern int uname(); -#endif /* (__STDC__) */ #endif /* defined(__i386) */ diff --git a/usr/src/uts/common/sys/va_impl.h b/usr/src/uts/common/sys/va_impl.h index ca5acdc60e..d11a65640b 100644 --- a/usr/src/uts/common/sys/va_impl.h +++ b/usr/src/uts/common/sys/va_impl.h @@ -24,6 +24,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -118,18 +120,9 @@ static void __va_end(__va_list list) { __va_end(list); } /* ISA __va_list structures defined in <sys/va_list.h> */ -#if defined(__STDC__) /* source language is ISO C or C++ */ - void __builtin_va_start(__va_list, ...); void *__builtin_va_arg_incr(__va_list, ...); -#else /* source language is K&R C */ - -int __builtin_va_start(); -char *__builtin_va_arg_incr(); - -#endif /* source language */ - #define __va_start(list, name) __builtin_va_start(list, 0) #define __va_arg(list, type) \ ((type *)__builtin_va_arg_incr(list, (type *)0))[0] diff --git a/usr/src/uts/common/sys/va_list.h b/usr/src/uts/common/sys/va_list.h index 40aa4c210a..dbd69f3303 100644 --- a/usr/src/uts/common/sys/va_list.h +++ b/usr/src/uts/common/sys/va_list.h @@ -24,6 +24,8 @@ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -76,18 +78,9 @@ extern "C" { #define __va_alist_type int #endif -#if defined(__STDC__) /* source language is ISO C or C++ */ - #define __va_void(expr) ((void)expr) #define __va_ptr_base void -#else /* source language is K&R C */ - -#define __va_void(expr) expr -#define __va_ptr_base char - -#endif /* __STDC__ */ - #if defined(__BUILTIN_VA_STRUCT) && !defined(__lint) /* -------- protocol */ #if defined(__amd64) /* processor */ diff --git a/usr/src/uts/common/sys/varargs.h b/usr/src/uts/common/sys/varargs.h index d17403751a..a1257ef964 100644 --- a/usr/src/uts/common/sys/varargs.h +++ b/usr/src/uts/common/sys/varargs.h @@ -22,8 +22,9 @@ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,14 +32,11 @@ #ifndef _SYS_VARARGS_H #define _SYS_VARARGS_H -#pragma ident "%Z%%M% %I% %E% SMI" /* UCB 4.1 83/05/03 */ - /* * This header defines the Solaris system definitions for variable * argument lists. For the most part, it follows the definitions of * ISO C 1999. It does not follow the namespace rules for ISO C++ - * 1998. For legacy support, it also defines the pre-standard variable - * argument definitions. + * 1998. * * The varargs definitions within this header are defined in terms of * implementation definitions. These implementation definitions reside @@ -58,10 +56,8 @@ extern "C" { typedef __va_list va_list; #endif -#if defined(__STDC__) /* - * When __STDC__ is defined, this file provides stdarg semantics despite - * the name of the file. + * This file provides stdarg semantics despite the name of the file. */ #define va_start(list, name) __va_start(list, name) @@ -69,20 +65,6 @@ typedef __va_list va_list; #define va_copy(to, from) __va_copy(to, from) #define va_end(list) __va_end(list) -#else /* ! __STDC__ */ -/* - * In the absence of __STDC__, this file provides traditional varargs - * semantics. - */ - -#define va_alist __builtin_va_alist -#define va_dcl __va_alist_type va_alist; -#define va_start(list) __va_start(list, va_alist) -#define va_arg(list, type) __va_arg(list, type) -#define va_copy(to, from) __va_copy(to, from) -#define va_end(list) __va_end(list) - -#endif /* __STDC__ */ #ifdef __cplusplus } diff --git a/usr/src/uts/common/sys/vfstab.h b/usr/src/uts/common/sys/vfstab.h index 634230c13f..745f3adb8f 100644 --- a/usr/src/uts/common/sys/vfstab.h +++ b/usr/src/uts/common/sys/vfstab.h @@ -19,6 +19,9 @@ * * CDDL HEADER END */ +/* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ @@ -26,8 +29,6 @@ #ifndef _SYS_VFSTAB_H #define _SYS_VFSTAB_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */ - #ifdef __cplusplus extern "C" { #endif @@ -64,17 +65,10 @@ struct vfstab { char *vfs_mntopts; }; -#ifdef __STDC__ extern int getvfsent(FILE *, struct vfstab *); extern int getvfsspec(FILE *, struct vfstab *, char *); extern int getvfsfile(FILE *, struct vfstab *, char *); extern int getvfsany(FILE *, struct vfstab *, struct vfstab *); -#else -extern int getvfsent(); -extern int getvfsspec(); -extern int getvfsfile(); -extern int getvfsany(); -#endif #ifdef __cplusplus } diff --git a/usr/src/uts/common/sys/vtoc.h b/usr/src/uts/common/sys/vtoc.h index 004b49097a..ab6f56829d 100644 --- a/usr/src/uts/common/sys/vtoc.h +++ b/usr/src/uts/common/sys/vtoc.h @@ -20,6 +20,8 @@ */ /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -327,22 +329,11 @@ struct vtoc32 { #define CK_CHECKSUM 0 /* check checksum */ #define CK_MAKESUM 1 /* generate checksum */ -#if defined(__STDC__) - extern int read_vtoc(int, struct vtoc *); extern int write_vtoc(int, struct vtoc *); extern int read_extvtoc(int, struct extvtoc *); extern int write_extvtoc(int, struct extvtoc *); -#else - -extern int read_vtoc(); -extern int write_vtoc(); -extern int read_extvtoc(); -extern int write_extvtoc(); - -#endif /* __STDC__ */ - #ifdef __cplusplus } #endif diff --git a/usr/src/uts/common/sys/wait.h b/usr/src/uts/common/sys/wait.h index ff0e4c7200..8a2ab51a69 100644 --- a/usr/src/uts/common/sys/wait.h +++ b/usr/src/uts/common/sys/wait.h @@ -22,8 +22,9 @@ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ - /* + * Copyright 2014 Garrett D'Amore <garrett@damore.org> + * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -31,8 +32,6 @@ #ifndef _SYS_WAIT_H #define _SYS_WAIT_H -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.10 */ - #include <sys/feature_tests.h> #include <sys/types.h> @@ -95,7 +94,6 @@ extern "C" { #if !defined(_KERNEL) -#if defined(__STDC__) extern pid_t wait(int *); extern pid_t waitpid(pid_t, int *, int); @@ -112,23 +110,6 @@ extern pid_t wait3(int *, int, struct rusage *); extern pid_t wait4(pid_t, int *, int, struct rusage *); #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ -#else /* __STDC__ */ - -extern pid_t wait(); -extern pid_t waitpid(); -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__) -extern int waitid(); -/* Marked as LEGACY in SUSv2 and removed in SUSv3 */ -#if !defined(_XPG6) || defined(__EXTENSIONS__) -extern pid_t wait3(); -#endif /* !defined(_XPG6) || defined(__EXTENSIONS__) */ -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ - -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) -extern pid_t wait4(); -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */ - -#endif /* __STDC__ */ #endif /* _KERNEL */ #ifdef __cplusplus |