Print this page
remove support for non-ANSI compilation

Split Close
Expand all
Collapse all
          --- old/usr/src/head/priv.h
          +++ new/usr/src/head/priv.h
↓ open down ↓ 11 lines elided ↑ open up ↑
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
       22 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
       23 + *
  22   24   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  23   25   * Use is subject to license terms.
  24   26   */
  25   27  
  26   28  #ifndef _PRIV_H_
  27   29  #define _PRIV_H_
  28   30  
  29   31  #include <sys/priv.h>
  30   32  
  31   33  #ifdef  __cplusplus
↓ open down ↓ 2 lines elided ↑ open up ↑
  34   36  
  35   37  #define PRIV_STR_PORT           0x00                    /* portable output */
  36   38  #define PRIV_STR_LIT            0x01                    /* literal output */
  37   39  #define PRIV_STR_SHORT          0x02                    /* shortest output */
  38   40  
  39   41  #define PRIV_ALLSETS            ((priv_ptype_t)0)       /* for priv_set() */
  40   42  
  41   43  /*
  42   44   * library functions prototype.
  43   45   */
  44      -#if     defined(__STDC__)
  45   46  
  46   47  extern int setppriv(priv_op_t, priv_ptype_t, const priv_set_t *);
  47   48  extern int getppriv(priv_ptype_t, priv_set_t *);
  48   49  extern int setpflags(uint_t, uint_t);
  49   50  extern uint_t getpflags(uint_t);
  50   51  extern const priv_impl_info_t *getprivimplinfo(void);
  51   52  
  52   53  extern int priv_set(priv_op_t, priv_ptype_t, ...);
  53   54  extern boolean_t priv_ineffect(const char *);
  54   55  extern priv_set_t *priv_str_to_set(const char *, const char *, const char **);
↓ open down ↓ 16 lines elided ↑ open up ↑
  71   72  extern boolean_t priv_isequalset(const priv_set_t *, const priv_set_t *);
  72   73  extern boolean_t priv_issubset(const priv_set_t *, const priv_set_t *);
  73   74  extern void priv_intersect(const priv_set_t *, priv_set_t *);
  74   75  extern void priv_union(const priv_set_t *, priv_set_t *);
  75   76  extern void priv_inverse(priv_set_t *);
  76   77  extern int priv_addset(priv_set_t *, const char *);
  77   78  extern void priv_copyset(const priv_set_t *, priv_set_t *);
  78   79  extern int priv_delset(priv_set_t *, const char *);
  79   80  extern boolean_t priv_ismember(const priv_set_t *, const char *);
  80   81  
  81      -#else   /* Non ANSI */
  82      -
  83      -extern int setppriv(/* priv_op_t, priv_ptype_t, const priv_set_t * */);
  84      -extern int getppriv(/* priv_ptype_t, priv_set_t * */);
  85      -extern int setpflags(/* uint_t, uint_t */);
  86      -extern uint_t getpflags(/* uint_t */);
  87      -extern priv_impl_info_t *getprivimplinfo(/* void */);
  88      -
  89      -extern int priv_set(/* priv_op_t, priv_ptype_t, ... */);
  90      -extern boolean_t priv_ineffect(/* const char * */);
  91      -extern priv_set_t *priv_str_to_set(/*
  92      -                            const char *, const char *, const char ** */);
  93      -extern char *priv_set_to_str(/* const priv_set_t *, char, int */);
  94      -
  95      -extern int priv_getbyname(/* const char * */);
  96      -extern char *priv_getbynum(/* int */);
  97      -extern int priv_getsetbyname(/* const char * */);
  98      -extern char *priv_getsetbynum(/* int */);
  99      -extern char *priv_gettext(/* const char * */);
 100      -
 101      -extern priv_set_t *priv_allocset(/* void */);
 102      -extern void priv_freeset(/* priv_set_t * */);
 103      -
 104      -extern void priv_emptyset(/* priv_set_t * */);
 105      -extern void priv_basicset(/* priv_set_t * */);
 106      -extern void priv_fillset(/* priv_set_t * */);
 107      -extern boolean_t priv_isemptyset(/* const priv_set_t * */);
 108      -extern boolean_t priv_isfullset(/* const priv_set_t * */);
 109      -extern boolean_t priv_isequalset(/* const priv_set_t *, const priv_set_t * */);
 110      -extern boolean_t priv_issubset(/* const priv_set_t *, const priv_set_t * */);
 111      -extern void priv_intersect(/* const priv_set_t *, priv_set_t * */);
 112      -extern void priv_union(/* const priv_set_t *, priv_set_t * */);
 113      -extern void priv_inverse(/* priv_set_t * */);
 114      -extern int priv_addset(/* priv_set_t *, const char * */);
 115      -extern void priv_copyset(/* const priv_set_t *, priv_set_t * */);
 116      -extern int priv_delset(/* priv_set_t *, const char * */);
 117      -extern boolean_t priv_ismember(/* const priv_set_t *, const char * */);
 118      -
 119      -#endif  /* __STDC__ */
 120      -
 121   82  #ifdef  __cplusplus
 122   83  }
 123   84  #endif
 124   85  
 125   86  #endif  /* _PRIV_H_ */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX