Print this page
remove support for non-ANSI compilation

Split Close
Expand all
Collapse all
          --- old/usr/src/head/stdlib.h
          +++ new/usr/src/head/stdlib.h
↓ open down ↓ 12 lines elided ↑ open up ↑
  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   22  /*
       23 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  23   24   * Copyright (c) 2013 Gary Mills
  24   25   *
  25   26   * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
  26   27   */
  27   28  
  28   29  /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
  29   30  
  30   31  /*      Copyright (c) 1988 AT&T */
  31   32  /*        All Rights Reserved   */
  32   33  
↓ open down ↓ 47 lines elided ↑ open up ↑
  80   81  
  81   82  #ifdef  __cplusplus
  82   83  extern "C" {
  83   84  #endif
  84   85  
  85   86  #ifndef _UID_T
  86   87  #define _UID_T
  87   88  typedef unsigned int    uid_t;          /* UID type             */
  88   89  #endif  /* !_UID_T */
  89   90  
  90      -#if defined(__STDC__)
  91      -
  92   91  /* large file compilation environment setup */
  93   92  #if !defined(_LP64) && _FILE_OFFSET_BITS == 64
  94   93  
  95   94  #ifdef  __PRAGMA_REDEFINE_EXTNAME
  96   95  #pragma redefine_extname        mkstemp         mkstemp64
  97   96  #pragma redefine_extname        mkstemps        mkstemps64
  98   97  #else   /* __PRAGMA_REDEFINE_EXTNAME */
  99   98  #define mkstemp                 mkstemp64
 100   99  #define mkstemps                mkstemps64
 101  100  #endif  /* __PRAGMA_REDEFINE_EXTNAME */
↓ open down ↓ 152 lines elided ↑ open up ↑
 254  253  extern const char *getprogname(void);
 255  254  extern void setprogname(const char *);
 256  255  
 257  256  #if !defined(_STRICT_STDC) && defined(_LONGLONG_TYPE)
 258  257  extern char *lltostr(long long, char *);
 259  258  extern char *ulltostr(unsigned long long, char *);
 260  259  #endif  /* !defined(_STRICT_STDC) && defined(_LONGLONG_TYPE) */
 261  260  
 262  261  #endif /* defined(__EXTENSIONS__) || !defined(_STRICT_STDC) ... */
 263  262  
 264      -#else /* not __STDC__ */
 265      -
 266      -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
 267      -        (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT)
 268      -extern int rand_r();
 269      -#endif  /* defined(__EXTENSIONS__) || defined(_REENTRANT) ... */
 270      -
 271      -extern void _exithandle();
 272      -
 273      -#if defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) || defined(_XPG4)
 274      -extern double drand48();
 275      -extern double erand48();
 276      -extern long jrand48();
 277      -extern void lcong48();
 278      -extern long lrand48();
 279      -extern long mrand48();
 280      -extern long nrand48();
 281      -extern unsigned short *seed48();
 282      -extern void srand48();
 283      -extern int putenv();
 284      -extern void setkey();
 285      -#endif /* defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) ... */
 286      -
 287      -#if (defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE)) && \
 288      -        (!defined(_XOPEN_SOURCE) || (defined(_XPG3) && !defined(_XPG4)))
 289      -extern void swab();
 290      -#endif
 291      -
 292      -#if defined(__EXTENSIONS__) || \
 293      -        !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
 294      -        (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64)
 295      -extern int      mkstemp();
 296      -#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 297      -extern int      mkstemps();
 298      -#endif
 299      -#endif  /* defined(__EXTENSIONS__) ... */
 300      -
 301      -#if     defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
 302      -            !defined(__PRAGMA_REDEFINE_EXTNAME))
 303      -extern int      mkstemp64();
 304      -#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 305      -extern int      mkstemps64();
 306      -#endif
 307      -#endif  /* _LARGEFILE64_SOURCE... */
 308      -
 309      -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)
 310      -extern long a64l();
 311      -extern char *ecvt();
 312      -extern char *fcvt();
 313      -extern char *gcvt();
 314      -extern int getsubopt();
 315      -extern int grantpt();
 316      -extern char *initstate();
 317      -extern char *l64a();
 318      -extern char *mktemp();
 319      -extern char *ptsname();
 320      -extern long random();
 321      -extern char *realpath();
 322      -extern char *setstate();
 323      -extern void srandom();
 324      -/* Marked LEGACY in SUSv2 and removed in SUSv3 */
 325      -#if !defined(_XPG6) || defined(__EXTENSIONS__)
 326      -extern int ttyslot();
 327      -extern void *valloc();
 328      -#endif /* !defined(_XPG6) || defined(__EXTENSIONS__) */
 329      -#endif /* defined(__EXTENSIONS__) || ... || defined(_XPG4_2) */
 330      -
 331      -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG6)
 332      -extern int posix_memalign();
 333      -extern int posix_openpt();
 334      -extern int setenv();
 335      -extern int unsetenv();
 336      -#endif
 337      -
 338      -#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)
 339      -extern char *canonicalize_file_name();
 340      -extern int clearenv();
 341      -extern void closefrom();
 342      -extern int daemon();
 343      -extern int dup2();
 344      -extern int dup3();
 345      -extern int fdwalk();
 346      -extern char *qecvt();
 347      -extern char *qfcvt();
 348      -extern char *qgcvt();
 349      -extern char *getcwd();
 350      -extern char *getexecname();
 351      -
 352      -#ifndef __GETLOGIN_DEFINED      /* Avoid duplicate in unistd.h */
 353      -#define __GETLOGIN_DEFINED
 354      -#ifndef __USE_LEGACY_LOGNAME__
 355      -#ifdef  __PRAGMA_REDEFINE_EXTNAME
 356      -#pragma redefine_extname getlogin getloginx
 357      -#else   /* __PRAGMA_REDEFINE_EXTNAME */
 358      -extern char *getloginx();
 359      -#define getlogin        getloginx
 360      -#endif  /* __PRAGMA_REDEFINE_EXTNAME */
 361      -#endif  /* __USE_LEGACY_LOGNAME__ */
 362      -extern char *getlogin();
 363      -#endif  /* __GETLOGIN_DEFINED */
 364      -
 365      -extern int getopt();
 366      -extern char *optarg;
 367      -extern int optind, opterr, optopt;
 368      -extern char *getpass();
 369      -extern char *getpassphrase();
 370      -extern int getpw();
 371      -extern int isatty();
 372      -extern void *memalign();
 373      -extern char *ttyname();
 374      -extern char *mkdtemp();
 375      -extern char *getprogname();
 376      -extern void setprogname();
 377      -
 378      -#if defined(_LONGLONG_TYPE)
 379      -extern char *lltostr();
 380      -extern char *ulltostr();
 381      -#endif  /* defined(_LONGLONG_TYPE) */
 382      -#endif  /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */
 383      -
 384      -#endif  /* __STDC__ */
 385      -
 386  263  #ifdef  __cplusplus
 387  264  }
 388  265  #endif
 389  266  
 390  267  #endif  /* _STDLIB_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX