diff options
author | Keith M Wesolowski <wesolows@foobazco.org> | 2014-08-20 20:04:47 +0000 |
---|---|---|
committer | Keith M Wesolowski <wesolows@foobazco.org> | 2014-08-20 20:04:47 +0000 |
commit | 5f00496ef2e39b976b062f196ff01a99fd4864a4 (patch) | |
tree | 20be9cbc8f4b7ed3e616ce23552728083801e846 /usr/src/uts/common | |
parent | af59b1a40df03681c1c8129aea7b1f5f52f2bcea (diff) | |
parent | 86bb58aec7165f8a0303564575c65e5a2ad58bf1 (diff) | |
download | illumos-joyent-release-20140821.tar.gz |
[illumos-gate merge]20140821release-20140821
commit 86bb58aec7165f8a0303564575c65e5a2ad58bf1
5095 panic when adding a duplicate dbuf to dn_dbufs
commit 60a61f7adabc73a7a0cb70d200ac2a6735f4a6e8
5092 env files don't need to define LOCKNAME by default
5091 illumos.sh env file's LOCKNAME definition is busted
commit 5e3f545c431ec4bce3e1b52f3f81bc9befe501f2
4989 removal of ntfsprogs and parted
commit ba3594ba9b5dd4c846c472a8d657edcb7c8109ac
5066 remove support for non-ANSI compilation
5068 Remove SCCSID() macro from <macros.h>
commit d8ccf998f9c944b8cf27ed840c376f9b79ebce5c
5087 8-bit inline atomic {add,or,and} use wrong reg constraints on x86
Manifests:
usr/src/pkg/manifests/SUNWntfsprogs.mf (torch library)
usr/src/pkg/manifests/SUNWparted.mf (torch headers)
usr/src/pkg/manifests/system-file-system-ntfsprogs.mf
usr/src/pkg/manifests/system-storage-parted.mf
Diffstat (limited to 'usr/src/uts/common')
82 files changed, 218 insertions, 1054 deletions
diff --git a/usr/src/uts/common/fs/zfs/dbuf.c b/usr/src/uts/common/fs/zfs/dbuf.c index 3b4afd6a09..0e97ad4bac 100644 --- a/usr/src/uts/common/fs/zfs/dbuf.c +++ b/usr/src/uts/common/fs/zfs/dbuf.c @@ -70,8 +70,6 @@ dbuf_cons(void *vdb, void *unused, int kmflag) cv_init(&db->db_changed, NULL, CV_DEFAULT, NULL); refcount_create(&db->db_holds); - db->db_creation = gethrtime(); - return (0); } @@ -830,7 +828,7 @@ dbuf_free_range(dnode_t *dn, uint64_t start_blkid, uint64_t end_blkid, db_search.db_level = 0; db_search.db_blkid = start_blkid; - db_search.db_creation = 0; + db_search.db_state = DB_SEARCH; mutex_enter(&dn->dn_dbufs_mtx); if (start_blkid >= dn->dn_unlisted_l0_blkid) { diff --git a/usr/src/uts/common/fs/zfs/dnode.c b/usr/src/uts/common/fs/zfs/dnode.c index f5f5c40163..6f47b440e1 100644 --- a/usr/src/uts/common/fs/zfs/dnode.c +++ b/usr/src/uts/common/fs/zfs/dnode.c @@ -67,33 +67,35 @@ dbuf_compare(const void *x1, const void *x2) if (d1->db_level < d2->db_level) { return (-1); - } else if (d1->db_level > d2->db_level) { + } + if (d1->db_level > d2->db_level) { return (1); } if (d1->db_blkid < d2->db_blkid) { return (-1); - } else if (d1->db_blkid > d2->db_blkid) { + } + if (d1->db_blkid > d2->db_blkid) { return (1); } - /* - * If a dbuf is being evicted while dn_dbufs_mutex is not held, we set - * the db_state to DB_EVICTING but do not remove it from dn_dbufs. If - * another thread creates a dbuf of the same blkid before the dbuf is - * removed from dn_dbufs, we can reach a state where there are two - * dbufs of the same blkid and level in db_dbufs. To maintain the avl - * invariant that there cannot be duplicate items, we distinguish - * between these two dbufs based on the time they were created. - */ - if (d1->db_creation < d2->db_creation) { + if (d1->db_state < d2->db_state) { return (-1); - } else if (d1->db_creation > d2->db_creation) { + } + if (d1->db_state > d2->db_state) { return (1); - } else { - ASSERT3P(d1, ==, d2); - return (0); } + + ASSERT3S(d1->db_state, !=, DB_SEARCH); + ASSERT3S(d2->db_state, !=, DB_SEARCH); + + if ((uintptr_t)d1 < (uintptr_t)d2) { + return (-1); + } + if ((uintptr_t)d1 > (uintptr_t)d2) { + return (1); + } + return (0); } /* ARGSUSED */ diff --git a/usr/src/uts/common/fs/zfs/sys/dbuf.h b/usr/src/uts/common/fs/zfs/sys/dbuf.h index 643d9685b6..8ca8753e5e 100644 --- a/usr/src/uts/common/fs/zfs/sys/dbuf.h +++ b/usr/src/uts/common/fs/zfs/sys/dbuf.h @@ -66,8 +66,13 @@ extern "C" { * | | * | | * +--------> NOFILL -------+ + * + * DB_SEARCH is an invalid state for a dbuf. It is used by dbuf_free_range + * to find all dbufs in a range of a dnode and must be less than any other + * dbuf_states_t (see comment on dn_dbufs in dnode.h). */ typedef enum dbuf_states { + DB_SEARCH = -1, DB_UNCACHED, DB_FILL, DB_NOFILL, @@ -213,9 +218,6 @@ typedef struct dmu_buf_impl { /* pointer to most recent dirty record for this buffer */ dbuf_dirty_record_t *db_last_dirty; - /* Creation time of dbuf (see comment in dbuf_compare). */ - hrtime_t db_creation; - /* * Our link on the owner dnodes's dn_dbufs list. * Protected by its dn_dbufs_mtx. diff --git a/usr/src/uts/common/fs/zfs/sys/dnode.h b/usr/src/uts/common/fs/zfs/sys/dnode.h index 6e4a845a36..8a4f3f6185 100644 --- a/usr/src/uts/common/fs/zfs/sys/dnode.h +++ b/usr/src/uts/common/fs/zfs/sys/dnode.h @@ -211,7 +211,18 @@ typedef struct dnode { refcount_t dn_holds; kmutex_t dn_dbufs_mtx; - avl_tree_t dn_dbufs; /* descendent dbufs */ + /* + * Descendent dbufs, ordered by dbuf_compare. Note that dn_dbufs + * can contain multiple dbufs of the same (level, blkid) when a + * dbuf is marked DB_EVICTING without being removed from + * dn_dbufs. To maintain the avl invariant that there cannot be + * duplicate entries, we order the dbufs by an arbitrary value - + * their address in memory. This means that dn_dbufs cannot be used to + * directly look up a dbuf. Instead, callers must use avl_walk, have + * a reference to the dbuf, or look up a non-existant node with + * db_state = DB_SEARCH (see dbuf_free_range for an example). + */ + avl_tree_t dn_dbufs; /* protected by dn_struct_rwlock */ struct dmu_buf_impl *dn_bonus; /* bonus buffer dbuf */ 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 b7db2c6454..d5c82fa913 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 ae2f5fb1bf..8f4cd1639f 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. * Copyright 2012 Joyent, Inc. All rights reserved. @@ -222,7 +224,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); @@ -277,33 +278,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 */ @@ -390,7 +364,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 */ @@ -413,7 +387,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 4e3673753e..efc8457a6a 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. */ @@ -147,11 +149,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 69089802eb..666fbcd8a4 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. * Copyright 2014 Joyent, Inc. All rights reserved. @@ -258,8 +260,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 +274,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 dda6621a33..bbe2121d0e 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. */ @@ -527,7 +529,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); @@ -552,27 +553,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 1e1124d554..889a7096cd 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 6adeb477bb..c14a3bf11e 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. * Copyright 2011 Joyent, Inc. All rights reserved. @@ -161,11 +163,7 @@ extern int kadmin(int, int, void *, cred_t *); extern void killall(zoneid_t, boolean_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 |