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


 378 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
 379 #if !defined(_XPG6) || defined(__EXTENSIONS__)
 380 extern int getpagesize(void);
 381 #endif
 382 extern pid_t getpgid(pid_t);
 383 #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 384 extern pid_t getpid(void);
 385 extern pid_t getppid(void);
 386 extern pid_t getpgrp(void);
 387 
 388 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 389 char *gettxt(const char *, const char *);
 390 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 391 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 392 extern pid_t getsid(pid_t);
 393 #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 394 extern uid_t getuid(void);
 395 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 396 extern char *getusershell(void);
 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 /*
 402  * The following ioctl prototype is duplicated in <stropts.h>. The
 403  * duplication is necessitated by XPG4.2 which requires the prototype
 404  * be defined in <stropts.h>.
 405  */
 406 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 407 extern int ioctl(int, int, ...);
 408 extern int isaexec(const char *, char *const *, char *const *);
 409 extern int issetugid(void);
 410 #endif
 411 extern int isatty(int);
 412 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 413 extern int lchown(const char *, uid_t, gid_t);
 414 #endif
 415 extern int link(const char *, const char *);
 416 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 417 extern offset_t llseek(int, offset_t, int);
 418 #endif
 419 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
 420         (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \


 542 #endif /* defined(_XPG5) && !defined(_XPG6) */
 543 extern long sysconf(int);
 544 extern pid_t tcgetpgrp(int);
 545 extern int tcsetpgrp(int, pid_t);
 546 #if !defined(__XOPEN_OR_POSIX) || \
 547         (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \
 548         defined(__EXTENSIONS__)
 549 extern off_t tell(int);
 550 #endif /* !defined(__XOPEN_OR_POSIX)... */
 551 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
 552         (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \
 553         defined(__EXTENSIONS__)
 554 extern int truncate(const char *, off_t);
 555 #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 556 extern char *ttyname(int);
 557 #if (defined(_XPG4_2) && !defined(_XPG7)) || !defined(_STRICT_SYMBOLS)
 558 extern useconds_t ualarm(useconds_t, useconds_t);
 559 #endif
 560 extern int unlink(const char *);
 561 #if (defined(_XPG4_2) && !defined(_XPG7)) || !defined(_STRICT_SYMBOLS)

 562 extern int usleep(useconds_t);
 563 #endif
 564 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 565 extern pid_t vfork(void) __RETURNS_TWICE;
 566 #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */

 567 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 568 extern void vhangup(void);
 569 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 570 extern ssize_t write(int, const void *, size_t);
 571 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 572 extern void yield(void);
 573 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 574 
 575 #if !defined(__XOPEN_OR_POSIX) || defined(_ATFILE_SOURCE) || \
 576         defined(__EXTENSIONS__)
 577         /* || defined(_XPG7) */
 578 extern int faccessat(int, const char *, int, int);
 579 extern int fchownat(int, const char *, uid_t, gid_t, int);
 580 extern int linkat(int, const char *, int, const char *, int);
 581 extern ssize_t readlinkat(int, const char *_RESTRICT_KYWD,
 582         char *_RESTRICT_KYWD, size_t);
 583 extern int renameat(int, const char *, int, const char *);
 584 extern int symlinkat(const char *, int, const char *);
 585 extern int unlinkat(int, const char *, int);
 586 #endif  /* !defined(__XOPEN_OR_POSIX) || defined(_ATFILE_SOURCE)... */
 587 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 588 extern int get_nprocs(void);
 589 extern int get_nprocs_conf(void);
 590 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 591 
 592 /* transitional large file interface versions */
 593 #if     defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
 594             !defined(__PRAGMA_REDEFINE_EXTNAME))
 595 extern int ftruncate64(int, off64_t);
 596 extern off64_t lseek64(int, off64_t, int);
 597 extern ssize_t  pread64(int, void *, size_t, off64_t);
 598 extern ssize_t  pwrite64(int, const void *, size_t, off64_t);
 599 extern off64_t  tell64(int);
 600 extern int      truncate64(const char *, off64_t);
 601 extern int      lockf64(int, int, off64_t);
 602 #endif  /* _LARGEFILE64_SOURCE */
 603 
 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 /*
 609  * getlogin_r() & ttyname_r() prototypes are defined here.
 610  */
 611 
 612 /*
 613  * Previous releases of Solaris, starting at 2.3, provided definitions of
 614  * various functions as specified in POSIX.1c, Draft 6.  For some of these
 615  * functions, the final POSIX 1003.1c standard had a different number of
 616  * arguments and return values.
 617  *
 618  * The following segment of this header provides support for the standard
 619  * interfaces while supporting applications written under earlier
 620  * releases.  The application defines appropriate values of the feature
 621  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
 622  * whether it was written to expect the Draft 6 or standard versions of
 623  * these interfaces, before including this header.  This header then
 624  * provides a mapping from the source version of the interface to an
 625  * appropriate binary interface.  Such mappings permit an application
 626  * to be built from libraries and objects which have mixed expectations
 627  * of the definitions of these functions.




 378 /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
 379 #if !defined(_XPG6) || defined(__EXTENSIONS__)
 380 extern int getpagesize(void);
 381 #endif
 382 extern pid_t getpgid(pid_t);
 383 #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 384 extern pid_t getpid(void);
 385 extern pid_t getppid(void);
 386 extern pid_t getpgrp(void);
 387 
 388 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 389 char *gettxt(const char *, const char *);
 390 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 391 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 392 extern pid_t getsid(pid_t);
 393 #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 394 extern uid_t getuid(void);
 395 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 396 extern char *getusershell(void);
 397 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */



 398 /*
 399  * The following ioctl prototype is duplicated in <stropts.h>. The
 400  * duplication is necessitated by XPG4.2 which requires the prototype
 401  * be defined in <stropts.h>.
 402  */
 403 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 404 extern int ioctl(int, int, ...);
 405 extern int isaexec(const char *, char *const *, char *const *);
 406 extern int issetugid(void);
 407 #endif
 408 extern int isatty(int);
 409 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 410 extern int lchown(const char *, uid_t, gid_t);
 411 #endif
 412 extern int link(const char *, const char *);
 413 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 414 extern offset_t llseek(int, offset_t, int);
 415 #endif
 416 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
 417         (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \


 539 #endif /* defined(_XPG5) && !defined(_XPG6) */
 540 extern long sysconf(int);
 541 extern pid_t tcgetpgrp(int);
 542 extern int tcsetpgrp(int, pid_t);
 543 #if !defined(__XOPEN_OR_POSIX) || \
 544         (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \
 545         defined(__EXTENSIONS__)
 546 extern off_t tell(int);
 547 #endif /* !defined(__XOPEN_OR_POSIX)... */
 548 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
 549         (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \
 550         defined(__EXTENSIONS__)
 551 extern int truncate(const char *, off_t);
 552 #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 553 extern char *ttyname(int);
 554 #if (defined(_XPG4_2) && !defined(_XPG7)) || !defined(_STRICT_SYMBOLS)
 555 extern useconds_t ualarm(useconds_t, useconds_t);
 556 #endif
 557 extern int unlink(const char *);
 558 #if (defined(_XPG4_2) && !defined(_XPG7)) || !defined(_STRICT_SYMBOLS)
 559 extern char *getwd(char *);
 560 extern int usleep(useconds_t);


 561 extern pid_t vfork(void) __RETURNS_TWICE;
 562 #pragma unknown_control_flow(vfork)
 563 #endif
 564 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 565 extern void vhangup(void);
 566 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 567 extern ssize_t write(int, const void *, size_t);
 568 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 569 extern void yield(void);
 570 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 571 
 572 #if !defined(__XOPEN_OR_POSIX) || defined(_ATFILE_SOURCE) || \
 573         defined(__EXTENSIONS__)
 574         /* || defined(_XPG7) */
 575 extern int faccessat(int, const char *, int, int);
 576 extern int fchownat(int, const char *, uid_t, gid_t, int);
 577 extern int linkat(int, const char *, int, const char *, int);
 578 extern ssize_t readlinkat(int, const char *_RESTRICT_KYWD,
 579         char *_RESTRICT_KYWD, size_t);
 580 extern int renameat(int, const char *, int, const char *);
 581 extern int symlinkat(const char *, int, const char *);
 582 extern int unlinkat(int, const char *, int);
 583 #endif  /* !defined(__XOPEN_OR_POSIX) || defined(_ATFILE_SOURCE)... */
 584 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 585 extern int get_nprocs(void);
 586 extern int get_nprocs_conf(void);
 587 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 588 
 589 /* transitional large file interface versions */
 590 #if     defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
 591             !defined(__PRAGMA_REDEFINE_EXTNAME))
 592 extern int ftruncate64(int, off64_t);
 593 extern off64_t lseek64(int, off64_t, int);
 594 extern ssize_t  pread64(int, void *, size_t, off64_t);
 595 extern ssize_t  pwrite64(int, const void *, size_t, off64_t);
 596 extern off64_t  tell64(int);
 597 extern int      truncate64(const char *, off64_t);
 598 extern int      lockf64(int, int, off64_t);
 599 #endif  /* _LARGEFILE64_SOURCE */
 600 




 601 /*
 602  * getlogin_r() & ttyname_r() prototypes are defined here.
 603  */
 604 
 605 /*
 606  * Previous releases of Solaris, starting at 2.3, provided definitions of
 607  * various functions as specified in POSIX.1c, Draft 6.  For some of these
 608  * functions, the final POSIX 1003.1c standard had a different number of
 609  * arguments and return values.
 610  *
 611  * The following segment of this header provides support for the standard
 612  * interfaces while supporting applications written under earlier
 613  * releases.  The application defines appropriate values of the feature
 614  * test macros _POSIX_C_SOURCE and _POSIX_PTHREAD_SEMANTICS to indicate
 615  * whether it was written to expect the Draft 6 or standard versions of
 616  * these interfaces, before including this header.  This header then
 617  * provides a mapping from the source version of the interface to an
 618  * appropriate binary interface.  Such mappings permit an application
 619  * to be built from libraries and objects which have mixed expectations
 620  * of the definitions of these functions.