Print this page
remove support for non-ANSI compilation

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/ddi.h
          +++ new/usr/src/uts/common/sys/ddi.h
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   *
  14   14   * When distributing Covered Code, include this CDDL HEADER in each
  15   15   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16   16   * If applicable, add the following below this CDDL HEADER, with the
  17   17   * fields enclosed by brackets "[]" replaced with your own identifying
  18   18   * information: Portions Copyright [yyyy] [name of copyright owner]
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*
       23 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
       24 + *
  23   25   * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  24   26   * Use is subject to license terms.
  25   27   */
  26   28  
  27   29  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  28   30  /*        All Rights Reserved   */
  29   31  
  30   32  
  31   33  #ifndef _SYS_DDI_H
  32   34  #define _SYS_DDI_H
  33   35  
  34      -#pragma ident   "%Z%%M% %I%     %E% SMI"        /* SVr4.0 1.19  */
  35      -
  36   36  #include <sys/types.h>
  37   37  #include <sys/map.h>
  38   38  #include <sys/buf.h>
  39   39  #include <sys/uio.h>
  40   40  #include <sys/stream.h>
  41   41  
  42   42  #ifdef  __cplusplus
  43   43  extern "C" {
  44   44  #endif
  45   45  
↓ open down ↓ 27 lines elided ↑ open up ↑
  73   73  #define SYSRINT 5
  74   74  #define SYSXINT 6
  75   75  #define SYSMINT 7
  76   76  #define SYSRAWC 8
  77   77  #define SYSCANC 9
  78   78  #define SYSOUTC 10
  79   79  #define PPID    11
  80   80  #define PSID    12
  81   81  #define UCRED   13
  82   82  
  83      -#ifdef __STDC__
  84   83  extern int drv_getparm(uint_t, void *);
  85   84  extern int drv_setparm(uint_t, ulong_t);
  86   85  extern void drv_usecwait(clock_t);
  87   86  extern clock_t drv_hztousec(clock_t);
  88   87  extern clock_t drv_usectohz(clock_t);
  89   88  extern void delay(clock_t);
  90   89  extern void time_to_wait(clock_t *, clock_t);
  91   90  
  92      -#else
  93      -
  94      -extern int drv_getparm();
  95      -extern int drv_setparm();
  96      -extern void drv_usecwait();
  97      -extern clock_t drv_hztousec();
  98      -extern clock_t drv_usectohz();
  99      -extern void delay();
 100      -extern time_to_wait();
 101      -#endif  /* __STDC__ */
 102      -
 103   91  /* XXX -- should be changed to major_t */
 104   92  /* convert external to internal major number */
 105   93  
 106      -#ifdef __STDC__
 107   94  extern int etoimajor(major_t);
 108   95  /* convert internal to extern major number */
 109   96  extern int itoemajor(major_t, int);
 110      -
 111      -#else
 112      -
 113      -extern int etoimajor();
 114      -/* convert internal to extern major number */
 115      -extern int itoemajor();
 116      -#endif  /* __STDC__ */
 117      -
 118      -#if defined(__STDC__)
 119      -
 120   97  extern int drv_priv(struct cred *);
 121   98  
 122      -#else
 123      -
 124      -extern int drv_priv();
 125      -
 126      -#endif
 127      -
 128   99  /*
 129  100   * The following declarations take the place of macros in
 130  101   * sysmacros.h The undefs are for any case where a driver includes
 131  102   * sysmacros.h, even though DDI conforming drivers must not.
 132  103   */
 133  104  #undef getemajor
 134  105  #undef geteminor
 135  106  #undef getmajor
 136  107  #undef getminor
 137  108  #undef makedevice
 138  109  #undef cmpdev
 139  110  #undef expdev
 140  111  
 141  112  
 142      -#ifdef __STDC__
 143  113  extern major_t getemajor(dev_t);
 144  114  extern minor_t geteminor(dev_t);
 145  115  extern major_t getmajor(dev_t);
 146  116  extern minor_t getminor(dev_t);
 147  117  extern dev_t makedevice(major_t, minor_t);
 148  118  extern o_dev_t cmpdev(dev_t);
 149  119  extern dev_t expdev(dev_t);
 150      -#else
 151      -extern major_t getemajor();
 152      -extern minor_t geteminor();
 153      -extern major_t getmajor();
 154      -extern minor_t getminor();
 155      -extern dev_t makedevice();
 156      -extern o_dev_t cmpdev();
 157      -extern dev_t expdev();
 158      -#endif  /* __STDC__ */
 159  120  
 160  121  /*
 161  122   * The following macros from param.h are also being converted to
 162  123   * functions and #undefs must be done here as well since param.h
 163  124   * will be included by most if not every driver
 164  125   */
 165  126  
 166  127  #undef btop
 167  128  #undef btopr
 168  129  #undef ptob
 169  130  
 170      -
 171      -#ifdef __STDC__
 172  131  extern unsigned long btop(unsigned long);
 173  132  extern unsigned long btopr(unsigned long);
 174  133  extern unsigned long ptob(unsigned long);
 175      -#else
 176      -extern unsigned long btop();
 177      -extern unsigned long btopr();
 178      -extern unsigned long ptob();
 179      -#endif  /* __STDC__ */
 180  134  
 181  135  
 182  136  /* STREAMS drivers and modules must include stream.h to pick up the */
 183  137  /* needed structure and flag definitions. As was the case with map.h, */
 184  138  /* macros used by both the kernel and drivers in times past now have */
 185  139  /* a macro definition for the kernel and a function definition for */
 186  140  /* drivers. The following #undefs allow drivers to include stream.h */
 187  141  /* but call the functions rather than macros. */
 188  142  
 189  143  #undef OTHERQ
 190  144  #undef RD
 191  145  #undef WR
 192  146  #undef SAMESTR
 193  147  #undef datamsg
 194  148  
 195      -
 196      -#ifdef __STDC__
 197  149  extern struct queue *OTHERQ(queue_t *); /* stream.h */
 198  150  extern struct queue *RD(queue_t *);
 199  151  extern struct queue *WR(queue_t *);
 200  152  extern int SAMESTR(queue_t *);
 201  153  extern int datamsg(unsigned char);
 202  154  
 203      -#else
 204      -
 205      -extern struct queue *OTHERQ();  /* stream.h */
 206      -extern struct queue *RD();
 207      -extern struct queue *WR();
 208      -extern int SAMESTR();
 209      -extern int datamsg();
 210      -#endif  /* __STDC__ */
 211      -
 212  155  /* declarations of functions for allocating and deallocating the space */
 213  156  /* for a buffer header (just a header, not the associated buffer) */
 214  157  
 215      -#ifdef __STDC__
 216  158  extern struct buf *getrbuf(int);
 217  159  extern void freerbuf(struct buf *);
 218      -#else
 219      -extern struct buf *getrbuf();
 220      -extern void freerbuf();
 221      -#endif  /* __STDC__ */
 222  160  
 223  161  #ifdef  _KERNEL
 224  162  /*
 225  163   * SVR4MP replacement for hat_getkpfnum()
 226  164   */
 227  165  #define NOPAGE  (-1)    /* value returned for invalid addresses */
 228  166  
 229  167  typedef pfn_t   ppid_t; /* a 'physical page identifier' - no math allowed! */
 230  168  
 231      -#ifdef  __STDC__
 232  169  extern ppid_t kvtoppid(caddr_t);
 233      -#else   /* __STDC__ */
 234      -extern ppid_t kvtoppid();
 235      -#endif  /* __STDC__ */
 236  170  
 237  171  extern int qassociate(queue_t *, int);
 238  172  
 239  173  #endif  /* _KERNEL */
 240  174  
 241  175  #ifdef  __cplusplus
 242  176  }
 243  177  #endif
 244  178  
 245  179  #endif  /* _SYS_DDI_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX