Print this page
remove support for non-ANSI compilation

Split Close
Expand all
Collapse all
          --- old/usr/src/head/iso/stdlib_iso.h
          +++ new/usr/src/head/iso/stdlib_iso.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 2005 Sun Microsystems, Inc.  All rights reserved.
  24   26   * Use is subject to license terms.
  25   27   */
  26      -/*
  27      - * Copyright 2013 Garrett D'Amore <garrett@damore.org>
  28      - */
  29   28  
  30   29  /*      Copyright (c) 1988 AT&T */
  31   30  /*        All Rights Reserved   */
  32   31  
  33   32  
  34   33  /*
  35   34   * An application should not include this header directly.  Instead it
  36   35   * should be included only through the inclusion of other Sun headers.
  37   36   *
  38   37   * The contents of this header is limited to identifiers specified in the
↓ open down ↓ 6 lines elided ↑ open up ↑
  45   44  
  46   45  #ifndef _ISO_STDLIB_ISO_H
  47   46  #define _ISO_STDLIB_ISO_H
  48   47  
  49   48  #include <sys/feature_tests.h>
  50   49  
  51   50  #ifdef  __cplusplus
  52   51  extern "C" {
  53   52  #endif
  54   53  
  55      -#if defined(__STDC__)
  56   54  unsigned char __mb_cur_max(void);
  57      -#else
  58      -unsigned char __mb_cur_max();
  59      -#endif
  60   55  #ifndef MB_CUR_MAX
  61   56  #define MB_CUR_MAX      (__mb_cur_max())
  62   57  #endif
  63   58  
  64   59  #if __cplusplus >= 199711L
  65   60  namespace std {
  66   61  #endif
  67   62  
  68   63  typedef struct {
  69   64          int     quot;
↓ open down ↓ 43 lines elided ↑ open up ↑
 113  108  #ifndef _WCHAR_T
 114  109  #define _WCHAR_T
 115  110  #if defined(_LP64)
 116  111  typedef int     wchar_t;
 117  112  #else
 118  113  typedef long    wchar_t;
 119  114  #endif
 120  115  #endif  /* !_WCHAR_T */
 121  116  #endif  /* !defined(__cplusplus) ... */
 122  117  
 123      -#if defined(__STDC__)
 124      -
 125  118  extern void abort(void) __NORETURN;
 126  119  extern int abs(int);
 127  120  extern int atexit(void (*)(void));
 128  121  extern double atof(const char *);
 129  122  extern int atoi(const char *);
 130  123  extern long int atol(const char *);
 131  124  extern void *bsearch(const void *, const void *, size_t, size_t,
 132  125          int (*)(const void *, const void *));
 133  126  #if __cplusplus >= 199711L && defined(__SUNPRO_CC)
 134  127  extern "C++" {
↓ open down ↓ 32 lines elided ↑ open up ↑
 167  160  extern size_t wcstombs(char *_RESTRICT_KYWD, const wchar_t *_RESTRICT_KYWD,
 168  161          size_t);
 169  162  
 170  163  #if __cplusplus >= 199711L
 171  164  extern "C++" {
 172  165          inline long   abs(long _l) { return labs(_l); }
 173  166          inline ldiv_t div(long _l1, long _l2) { return ldiv(_l1, _l2); }
 174  167  }
 175  168  #endif /* __cplusplus */
 176  169  
 177      -#else /* not __STDC__ */
 178      -
 179      -extern void abort();
 180      -extern int abs();
 181      -extern int atexit();
 182      -extern double atof();
 183      -extern int atoi();
 184      -extern long int atol();
 185      -extern void *bsearch();
 186      -extern void *calloc();
 187      -extern div_t div();
 188      -extern void exit();
 189      -extern void free();
 190      -extern char *getenv();
 191      -extern long int labs();
 192      -extern ldiv_t ldiv();
 193      -extern void *malloc();
 194      -extern int mblen();
 195      -extern size_t mbstowcs();
 196      -extern int mbtowc();
 197      -extern void qsort();
 198      -extern int rand();
 199      -extern void *realloc();
 200      -extern void srand();
 201      -extern double strtod();
 202      -extern long int strtol();
 203      -extern unsigned long strtoul();
 204      -extern int system();
 205      -extern int wctomb();
 206      -extern size_t wcstombs();
 207      -
 208      -#endif  /* __STDC__ */
 209      -
 210  170  #if __cplusplus >= 199711L
 211  171  }
 212  172  #endif /* end of namespace std */
 213  173  
 214  174  #ifdef  __cplusplus
 215  175  }
 216  176  #endif
 217  177  
 218  178  #endif  /* _ISO_STDLIB_ISO_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX