Print this page
5776 vfork and getwd should not be exposed under XPG7

Split Close
Expand all
Collapse all
          --- old/usr/src/head/unistd.h
          +++ new/usr/src/head/unistd.h
↓ open down ↓ 387 lines elided ↑ open up ↑
 388  388  #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 389  389  char *gettxt(const char *, const char *);
 390  390  #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 391  391  #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 392  392  extern pid_t getsid(pid_t);
 393  393  #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 394  394  extern uid_t getuid(void);
 395  395  #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 396  396  extern char *getusershell(void);
 397  397  #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 398      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 399      -extern char *getwd(char *);
 400      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 401  398  /*
 402  399   * The following ioctl prototype is duplicated in <stropts.h>. The
 403  400   * duplication is necessitated by XPG4.2 which requires the prototype
 404  401   * be defined in <stropts.h>.
 405  402   */
 406  403  #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 407  404  extern int ioctl(int, int, ...);
 408  405  extern int isaexec(const char *, char *const *, char *const *);
 409  406  extern int issetugid(void);
 410  407  #endif
↓ open down ↓ 141 lines elided ↑ open up ↑
 552  549          (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \
 553  550          defined(__EXTENSIONS__)
 554  551  extern int truncate(const char *, off_t);
 555  552  #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 556  553  extern char *ttyname(int);
 557  554  #if (defined(_XPG4_2) && !defined(_XPG7)) || !defined(_STRICT_SYMBOLS)
 558  555  extern useconds_t ualarm(useconds_t, useconds_t);
 559  556  #endif
 560  557  extern int unlink(const char *);
 561  558  #if (defined(_XPG4_2) && !defined(_XPG7)) || !defined(_STRICT_SYMBOLS)
      559 +extern char *getwd(char *);
 562  560  extern int usleep(useconds_t);
 563      -#endif
 564      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 565  561  extern pid_t vfork(void) __RETURNS_TWICE;
 566      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
      562 +#pragma unknown_control_flow(vfork)
      563 +#endif
 567  564  #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 568  565  extern void vhangup(void);
 569  566  #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 570  567  extern ssize_t write(int, const void *, size_t);
 571  568  #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 572  569  extern void yield(void);
 573  570  #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 574  571  
 575  572  #if !defined(__XOPEN_OR_POSIX) || defined(_ATFILE_SOURCE) || \
 576  573          defined(__EXTENSIONS__)
↓ open down ↓ 17 lines elided ↑ open up ↑
 594  591              !defined(__PRAGMA_REDEFINE_EXTNAME))
 595  592  extern int ftruncate64(int, off64_t);
 596  593  extern off64_t lseek64(int, off64_t, int);
 597  594  extern ssize_t  pread64(int, void *, size_t, off64_t);
 598  595  extern ssize_t  pwrite64(int, const void *, size_t, off64_t);
 599  596  extern off64_t  tell64(int);
 600  597  extern int      truncate64(const char *, off64_t);
 601  598  extern int      lockf64(int, int, off64_t);
 602  599  #endif  /* _LARGEFILE64_SOURCE */
 603  600  
 604      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 605      -#pragma unknown_control_flow(vfork)
 606      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 607      -
 608  601  /*
 609  602   * getlogin_r() & ttyname_r() prototypes are defined here.
 610  603   */
 611  604  
 612  605  /*
 613  606   * Previous releases of Solaris, starting at 2.3, provided definitions of
 614  607   * various functions as specified in POSIX.1c, Draft 6.  For some of these
 615  608   * functions, the final POSIX 1003.1c standard had a different number of
 616  609   * arguments and return values.
 617  610   *
↓ open down ↓ 107 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX