Print this page
remove support for non-ANSI compilation

*** 18,27 **** --- 18,29 ---- * information: Portions Copyright [yyyy] [name of copyright owner] * * 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. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
*** 29,40 **** #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> #include <sys/uio.h> #include <sys/stream.h> --- 31,40 ----
*** 78,132 **** #define SYSOUTC 10 #define PPID 11 #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); extern clock_t drv_hztousec(clock_t); 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 * sysmacros.h, even though DDI conforming drivers must not. */ --- 78,103 ----
*** 137,163 **** #undef makedevice #undef cmpdev #undef expdev - #ifdef __STDC__ extern major_t getemajor(dev_t); extern minor_t geteminor(dev_t); extern major_t getmajor(dev_t); 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 * functions and #undefs must be done here as well since param.h * will be included by most if not every driver --- 108,124 ----
*** 165,184 **** #undef btop #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 */ /* needed structure and flag definitions. As was the case with map.h, */ /* macros used by both the kernel and drivers in times past now have */ --- 126,138 ----
*** 190,240 **** #undef RD #undef WR #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 /* * SVR4MP replacement for hat_getkpfnum() */ #define NOPAGE (-1) /* value returned for invalid addresses */ 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); #endif /* _KERNEL */ --- 144,174 ----