Print this page
remove support for non-ANSI compilation

Split Close
Expand all
Collapse all
          --- old/usr/src/head/getopt.h
          +++ new/usr/src/head/getopt.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  /*
  28   30   * GNU-like getopt_long(), getopt_long_only().
  29   31   * Solaris-specific getopt_clip().
  30   32   */
  31   33  
  32   34  #ifndef _GETOPT_H
  33   35  #define _GETOPT_H
  34   36  
  35      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  36      -
  37   37  #ifdef  __cplusplus
  38   38  extern "C" {
  39   39  #endif
  40   40  
  41   41  
  42   42  /*
  43   43   * Values for has_arg field.
  44   44   *
  45   45   * optional_argument is not supported by getopt_clip()
  46   46   */
↓ open down ↓ 13 lines elided ↑ open up ↑
  60   60   * External variables used by these routines.
  61   61   */
  62   62  extern char *optarg;
  63   63  extern int  opterr;
  64   64  extern int  optind;
  65   65  extern int  optopt;
  66   66  
  67   67  /*
  68   68   * The use of getopt_long_only in new development is strongly discouraged.
  69   69   */
  70      -#ifdef __STDC__
  71   70  extern int      getopt_long(int, char * const *, const char *,
  72   71                      const struct option *, int *);
  73   72  extern int      getopt_long_only(int, char * const *, const char *,
  74   73                      const struct option *, int *);
  75   74  extern int      getopt_clip(int, char * const *, const char *,
  76   75                      const struct option *, int *);
  77      -#else   /* __STDC__ */
  78      -extern int      getopt_long();
  79      -extern int      getopt_long_only();
  80      -extern int      getopt_clip();
  81      -#endif  /* __STDC__ */
  82   76  
  83   77  #ifdef __cplusplus
  84   78  }
  85   79  #endif
  86   80  
  87   81  #endif  /* _GETOPT_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX