Print this page
5187 missing functions in stdlib.h : mkostemp, mkostemps & mkdtemp

Split Close
Expand all
Collapse all
          --- old/usr/src/head/stdlib.h
          +++ new/usr/src/head/stdlib.h
↓ open down ↓ 86 lines elided ↑ open up ↑
  87   87  #define _UID_T
  88   88  typedef unsigned int    uid_t;          /* UID type             */
  89   89  #endif  /* !_UID_T */
  90   90  
  91   91  /* large file compilation environment setup */
  92   92  #if !defined(_LP64) && _FILE_OFFSET_BITS == 64
  93   93  
  94   94  #ifdef  __PRAGMA_REDEFINE_EXTNAME
  95   95  #pragma redefine_extname        mkstemp         mkstemp64
  96   96  #pragma redefine_extname        mkstemps        mkstemps64
       97 +#pragma redefine_extname        mkostemp        mkostemp64
       98 +#pragma redefine_extname        mkostemps       mkostemps64
  97   99  #else   /* __PRAGMA_REDEFINE_EXTNAME */
  98  100  #define mkstemp                 mkstemp64
  99  101  #define mkstemps                mkstemps64
      102 +#define mkostemp                mkostemp64
      103 +#define mkostemps               mkostemps64
 100  104  #endif  /* __PRAGMA_REDEFINE_EXTNAME */
 101  105  
 102  106  #endif  /* _FILE_OFFSET_BITS == 64 */
 103  107  
 104  108  /* In the LP64 compilation environment, all APIs are already large file */
 105  109  #if defined(_LP64) && defined(_LARGEFILE64_SOURCE)
 106  110  
 107  111  #ifdef  __PRAGMA_REDEFINE_EXTNAME
 108  112  #pragma redefine_extname        mkstemp64       mkstemp
 109  113  #pragma redefine_extname        mkstemps64      mkstemps
      114 +#pragma redefine_extname        mkostemp64      mkostemp
      115 +#pragma redefine_extname        mkostemps64     mkostemps
 110  116  #else   /* __PRAGMA_REDEFINE_EXTNAME */
 111  117  #define mkstemp64               mkstemp
 112  118  #define mkstemps64              mkstemps
      119 +#define mkostemp64              mkostemp
      120 +#define mkostemps64             mkostemps
 113  121  #endif  /* __PRAGMA_REDEFINE_EXTNAME */
 114  122  
 115  123  #endif  /* _LP64 && _LARGEFILE64_SOURCE */
 116  124  
 117  125  #if defined(__EXTENSIONS__) || \
 118  126          (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
 119  127          (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT)
 120  128  extern int rand_r(unsigned int *);
 121  129  #endif
 122  130  
↓ open down ↓ 48 lines elided ↑ open up ↑
 171  179  #endif /* defined(__EXTENSIONS__) ... */
 172  180  
 173  181  #if     defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
 174  182              !defined(__PRAGMA_REDEFINE_EXTNAME))
 175  183  extern int      mkstemp64(char *);
 176  184  #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 177  185  extern int      mkstemps64(char *, int);
 178  186  #endif
 179  187  #endif  /* _LARGEFILE64_SOURCE... */
 180  188  
      189 +#if !defined(_STRICT_SYMBOLS) || defined(_XPG7)
      190 +extern char *mkdtemp(char *);
      191 +#endif  /* !defined(_STRICT_SYMBOLS) || defined(_XPG7) */
      192 +
      193 +#if !defined(_STRICT_SYMBOLS)
      194 +extern int      mkostemp(char *, int);
      195 +extern int      mkostemps(char *, int, int);
      196 +#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
      197 +                !defined(__PRAGMA_REDEFINE_EXTNAME))
      198 +extern int      mkostemp64(char *, int);
      199 +extern int      mkostemps64(char *, int, int);
      200 +#endif  /* defined(_LARGEFILE64_SOURCE) || !((_FILE_OFFSET_BITS == 64) ... */
      201 +#endif  /* !defined(_STRICT_SYMBOLS) */
      202 +
 181  203  #if defined(__EXTENSIONS__) || \
 182  204          (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
 183  205          defined(_XPG4_2)
 184  206  extern long a64l(const char *);
 185  207  extern char *ecvt(double, int, int *_RESTRICT_KYWD, int *_RESTRICT_KYWD);
 186  208  extern char *fcvt(double, int, int *_RESTRICT_KYWD, int *_RESTRICT_KYWD);
 187  209  extern char *gcvt(double, int, char *);
 188  210  extern int getsubopt(char **, char *const *, char **);
 189  211  extern int  grantpt(int);
 190  212  extern char *initstate(unsigned, char *, size_t);
↓ open down ↓ 51 lines elided ↑ open up ↑
 242  264  
 243  265  extern int getopt(int, char *const *, const char *);
 244  266  extern char *optarg;
 245  267  extern int optind, opterr, optopt;
 246  268  extern char *getpass(const char *);
 247  269  extern char *getpassphrase(const char *);
 248  270  extern int getpw(uid_t, char *);
 249  271  extern int isatty(int);
 250  272  extern void *memalign(size_t, size_t);
 251  273  extern char *ttyname(int);
 252      -extern char *mkdtemp(char *);
 253  274  extern const char *getprogname(void);
 254  275  extern void setprogname(const char *);
 255  276  
 256  277  #if !defined(_STRICT_STDC) && defined(_LONGLONG_TYPE)
 257  278  extern char *lltostr(long long, char *);
 258  279  extern char *ulltostr(unsigned long long, char *);
 259  280  #endif  /* !defined(_STRICT_STDC) && defined(_LONGLONG_TYPE) */
 260  281  
 261  282  #endif /* defined(__EXTENSIONS__) || !defined(_STRICT_STDC) ... */
 262  283  
 263  284  #ifdef  __cplusplus
 264  285  }
 265  286  #endif
 266  287  
 267  288  #endif  /* _STDLIB_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX