Print this page
remove support for non-ANSI compilation

Split Close
Expand all
Collapse all
          --- old/usr/src/head/unistd.h
          +++ new/usr/src/head/unistd.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) 1988 AT&T */
  29   30  /*        All Rights Reserved   */
  30   31  
  31   32  /* Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved. */
  32   33  
↓ open down ↓ 201 lines elided ↑ open up ↑
 234  235  #define ftruncate64                     ftruncate
 235  236  #define lseek64                         lseek
 236  237  #define pread64                         pread
 237  238  #define pwrite64                        pwrite
 238  239  #define truncate64                      truncate
 239  240  #define lockf64                         lockf
 240  241  #define tell64                          tell
 241  242  #endif  /* __PRAGMA_REDEFINE_EXTNAME */
 242  243  #endif  /* _LP64 && _LARGEFILE64_SOURCE */
 243  244  
 244      -#if defined(__STDC__)
 245      -
 246  245  extern int access(const char *, int);
 247  246  #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 248  247  extern int acct(const char *);
 249  248  #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 250  249  extern unsigned alarm(unsigned);
 251  250  /* Marked as LEGACY in SUSv2 and removed in SUSv3 */
 252  251  #if !defined(__XOPEN_OR_POSIX) || (defined(_XPG4_2) && !defined(_XPG6)) || \
 253  252          defined(__EXTENSIONS__)
 254  253  extern int brk(void *);
 255  254  #endif /* !defined(__XOPEN_OR_POSIX) || (defined(_XPG4_2)... */
↓ open down ↓ 339 lines elided ↑ open up ↑
 595  594              !defined(__PRAGMA_REDEFINE_EXTNAME))
 596  595  extern int ftruncate64(int, off64_t);
 597  596  extern off64_t lseek64(int, off64_t, int);
 598  597  extern ssize_t  pread64(int, void *, size_t, off64_t);
 599  598  extern ssize_t  pwrite64(int, const void *, size_t, off64_t);
 600  599  extern off64_t  tell64(int);
 601  600  extern int      truncate64(const char *, off64_t);
 602  601  extern int      lockf64(int, int, off64_t);
 603  602  #endif  /* _LARGEFILE64_SOURCE */
 604  603  
 605      -#else  /* __STDC__ */
 606      -
 607      -extern int access();
 608      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 609      -extern int acct();
 610      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 611      -extern unsigned alarm();
 612      -#if !defined(__XOPEN_OR_POSIX) || (defined(_XPG4_2) && !defined(_XPG6)) || \
 613      -        defined(__EXTENSIONS__)
 614      -extern int brk();
 615      -#endif /* !defined(__XOPEN_OR_POSIX) || (defined(_XPG4_2)... */
 616      -extern int chdir();
 617      -extern int chown();
 618      -#if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
 619      -        defined(__EXTENSIONS__)
 620      -extern int chroot();
 621      -#endif /* (!defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)... */
 622      -extern int close();
 623      -#if defined(_XPG4) || defined(__EXTENSIONS__)
 624      -extern size_t confstr();
 625      -extern char *crypt();
 626      -#endif /* defined(XPG4) || defined(__EXTENSIONS__) */
 627      -#if !defined(_POSIX_C_SOURCE) || defined(_XPG3) || defined(__EXTENSIONS__)
 628      -extern char *ctermid();
 629      -#endif /* (!defined(_POSIX_C_SOURCE) || defined(_XPG3)... */
 630      -#if !defined(__XOPEN_OR_POSIX) || defined(_REENTRANT) || defined(__EXTENSIONS__)
 631      -extern char *ctermid_r();
 632      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_REENTRANT) ... */
 633      -#if !defined(_XPG6) || defined(__EXTENSIONS__)
 634      -extern char *cuserid();
 635      -#endif
 636      -extern int dup();
 637      -extern int dup2();
 638      -extern int dup3();
 639      -#if defined(_XPG4) || defined(__EXTENSIONS__)
 640      -extern void encrypt();
 641      -#endif /* defined(_XPG4) || defined(__EXTENSIONS__) */
 642      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 643      -extern void endusershell();
 644      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 645      -extern int execl();
 646      -extern int execle();
 647      -extern int execlp();
 648      -extern int execv();
 649      -extern int execve();
 650      -extern int execvp();
 651      -extern void _exit();
 652      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 653      -extern int fattach();
 654      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 655  604  #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 656      -extern int fchdir();
 657      -extern int fchown();
 658      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 659      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 660      -extern int fchroot();
 661      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 662      -#if !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2) || \
 663      -        defined(__EXTENSIONS__)
 664      -extern int fdatasync();
 665      -#endif /* !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2)... */
 666      -#if !defined(__XOPEN_OR_POSIX)
 667      -extern int fdetach();
 668      -#endif /* !defined(__XOPEN_OR_POSIX) */
 669      -extern pid_t fork();
 670      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 671      -extern pid_t fork1();
 672      -extern pid_t forkall();
 673      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 674      -extern long fpathconf();
 675      -#if !defined(_POSIX_C_SOURCE) || (_POSIX_C_SOURCE > 2) || \
 676      -        defined(__EXTENSIONS__)
 677      -extern int fsync();
 678      -#endif /* !defined(_POSIX_C_SOURCE) || (_POSIX_C_SOURCE > 2)... */
 679      -#if !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2) || defined(_XPG4_2) || \
 680      -        (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \
 681      -        defined(__EXTENSIONS__)
 682      -extern int ftruncate();
 683      -#endif /* !defined(__XOPEN_OR_POSIX) (_POSIX_C_SOURCE > 2)... */
 684      -extern char *getcwd();
 685      -#if !defined(__XOPEN_OR_POSIX) || (defined(_XPG4_2) && !defined(_XPG6)) || \
 686      -        defined(__EXTENSIONS__)
 687      -extern int getdtablesize();
 688      -#endif
 689      -extern gid_t getegid();
 690      -extern uid_t geteuid();
 691      -extern gid_t getgid();
 692      -extern int getgroups();
 693      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 694      -extern long gethostid();
 695      -#endif
 696      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 697      -extern int gethostname();
 698      -#endif
 699      -
 700      -#ifndef __GETLOGIN_DEFINED      /* Avoid duplicate in stdlib.h */
 701      -#define __GETLOGIN_DEFINED
 702      -#ifndef __USE_LEGACY_LOGNAME__
 703      -#ifdef __PRAGMA_REDEFINE_EXTNAME
 704      -#pragma redefine_extname getlogin       getloginx
 705      -#else   /* __PRAGMA_REDEFINE_EXTNAME */
 706      -extern char *getloginx();
 707      -#define getlogin        getloginx
 708      -#endif  /* __PRAGMA_REDEFINE_EXTNAME */
 709      -#endif  /* __USE_LEGACY_LOGNAME__ */
 710      -extern char *getlogin();
 711      -#endif  /* __GETLOGIN_DEFINED */
 712      -
 713      -#if defined(_XPG4) || defined(__EXTENSIONS__)
 714      -extern int  getopt();
 715      -extern char *optarg;
 716      -extern int  opterr, optind, optopt;
 717      -#if !defined(_XPG6) || defined(__EXTENSIONS__)
 718      -extern char *getpass();
 719      -#endif
 720      -#endif /* defined(_XPG4) || defined(__EXTENSIONS__) */
 721      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 722      -#if !defined(_XPG6) || defined(__EXTENSIONS__)
 723      -extern int getpagesize();
 724      -#endif
 725      -extern pid_t getpgid();
 726      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 727      -extern pid_t getpid();
 728      -extern pid_t getppid();
 729      -extern pid_t getpgrp();
 730      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 731      -char *gettxt();
 732      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 733      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 734      -extern pid_t getsid();
 735      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) */
 736      -extern uid_t getuid();
 737      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 738      -extern char *getusershell();
 739      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 740      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 741      -extern char *getwd();
 742      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 743      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 744      -extern int ioctl();
 745      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 746      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 747      -extern int isaexec();
 748      -extern int issetugid();
 749      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 750      -extern int isatty();
 751      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 752      -extern int lchown();
 753      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) */
 754      -extern int link();
 755      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 756      -extern offset_t llseek();
 757      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 758      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
 759      -        (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \
 760      -        defined(__EXTENSIONS__)
 761      -extern int lockf();
 762      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 763      -extern off_t lseek();
 764      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 765      -extern int mincore();
 766      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 767      -#if !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
 768      -        defined(__EXTENSIONS__)
 769      -extern int nice();
 770      -#endif /* !defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)... */
 771      -extern long pathconf();
 772      -extern int pause();
 773      -extern int pipe();
 774      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG5) || \
 775      -        (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \
 776      -        defined(__EXTENSIONS__)
 777      -extern ssize_t pread();
 778      -#endif
 779      -#if !defined(_LP64) && \
 780      -        (!defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__))
 781      -extern void profil();
 782      -extern int ptrace();
 783      -#endif
 784      -#if !defined(__XOPEN_OR_POSIX) || \
 785      -        ((_POSIX_C_SOURCE > 2) && !defined(_XPG6)) || \
 786      -        defined(__EXTENSIONS__)
 787      -extern int pthread_atfork();
 788      -#endif /* !defined(__XOPEN_OR_POSIX) || ((_POSIX_C_SOURCE > 2) ...  */
 789      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG5) || \
 790      -        (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \
 791      -        defined(__EXTENSIONS__)
 792      -extern ssize_t pwrite();
 793      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG5) */
 794      -extern ssize_t read();
 795      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 796      -/* per RFC 3542; This is also defined in netdb.h */
 797      -extern int rcmd_af();
 798      -#endif
 799      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 800      -extern ssize_t readlink();
 801      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 802      -#if (!defined(__XOPEN_OR_POSIX) || (defined(_XPG3) && !defined(_XPG4))) || \
 803      -        defined(__EXTENSIONS__)
 804      -extern int rename();
 805      -#endif /* (!defined(__XOPEN_OR_POSIX) || (defined(_XPG3)... */
 806      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 807      -extern int resolvepath();
 808      -/* per RFC 3542; This is also defined in netdb.h */
 809      -extern int rexec_af();
 810      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 811      -extern int rmdir();
 812      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 813      -/* per RFC 3542; This is also defined in netdb.h */
 814      -extern int rresvport_af();
 815      -#endif
 816      -#if !defined(__XOPEN_OR_POSIX) || (defined(_XPG4_2) && !defined(_XPG6)) || \
 817      -        defined(__EXTENSIONS__)
 818      -extern void *sbrk();
 819      -#endif /* !defined(__XOPEN_OR_POSIX)|| (defined(_XPG4_2)... */
 820      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG6) || defined(__EXTENSIONS__)
 821      -extern int setegid();
 822      -extern int seteuid();
 823      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG6) ... */
 824      -extern int setgid();
 825      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 826      -extern int setgroups();
 827      -extern int sethostname();
 828      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 829      -extern int setpgid();
 830      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 831      -extern pid_t setpgrp();
 832      -extern int setregid();
 833      -extern int setreuid();
 834      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 835      -extern pid_t setsid();
 836      -extern int setuid();
 837      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 838      -extern void setusershell();
 839      -#endif /* !defined(__XOPEN_OR_POSIX)|| defined(__EXTENSIONS__) */
 840      -extern unsigned sleep();
 841      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 842      -extern int stime();
 843      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 844      -#if defined(_XPG4)
 845      -/* __EXTENSIONS__ makes the SVID Third Edition prototype in stdlib.h visible */
 846      -extern void swab();
 847      -#endif /* defined(_XPG4) */
 848      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 849      -extern int symlink();
 850      -extern void sync();
 851      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 852      -#if defined(_XPG5)
 853      -#ifdef __PRAGMA_REDEFINE_EXTNAME
 854      -#pragma redefine_extname sysconf __sysconf_xpg5
 855      -extern long sysconf();
 856      -#else /* __PRAGMA_REDEFINE_EXTNAME */
 857      -extern long __sysconf_xpg5();
 858      -#define sysconf __sysconf_xpg5
 859      -#endif  /* __PRAGMA_REDEFINE_EXTNAME */
 860      -#endif  /* defined(_XPG5) */
 861      -extern pid_t tcgetpgrp();
 862      -extern int tcsetpgrp();
 863      -#if !defined(__XOPEN_OR_POSIX) || \
 864      -        (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \
 865      -        defined(__EXTENSIONS__)
 866      -extern off_t tell();
 867      -#endif /* !defined(__XOPEN_OR_POSIX)... */
 868      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
 869      -        (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) || \
 870      -        defined(__EXTENSIONS__)
 871      -extern int truncate();
 872      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 873      -extern char *ttyname();
 874      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 875      -extern useconds_t ualarm();
 876      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 877      -extern int unlink();
 878      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 879      -extern int usleep();
 880      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 881      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 882      -extern pid_t vfork();
 883      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 884      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 885      -extern void vhangup();
 886      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 887      -extern ssize_t write();
 888      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 889      -extern void yield();
 890      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 891      -
 892      -#if !defined(__XOPEN_OR_POSIX) || defined(_ATFILE_SOURCE) || \
 893      -        defined(__EXTENSIONS__)
 894      -        /* || defined(_XPG7) */
 895      -extern int faccessat();
 896      -extern int fchownat();
 897      -extern int linkat();
 898      -extern ssize_t readlinkat();
 899      -extern int renameat();
 900      -extern int symlinkat();
 901      -extern int unlinkat();
 902      -#endif  /* !defined(__XOPEN_OR_POSIX) || defined(_ATFILE_SOURCE)... */
 903      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 904      -extern int get_nprocs();
 905      -extern int get_nprocs_conf();
 906      -#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
 907      -
 908      -/* transitional large file interface versions */
 909      -#if     defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
 910      -            !defined(__PRAGMA_REDEFINE_EXTNAME))
 911      -extern int ftruncate64();
 912      -extern off64_t lseek64();
 913      -extern ssize_t pread64();
 914      -extern ssize_t pwrite64();
 915      -extern off64_t tell64();
 916      -extern int truncate64();
 917      -extern int lockf64();
 918      -#endif  /* _LARGEFILE64_SOURCE */
 919      -
 920      -#endif /* __STDC__ */
 921      -
 922      -#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
 923  605  #pragma unknown_control_flow(vfork)
 924  606  #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)... */
 925  607  
 926  608  /*
 927  609   * getlogin_r() & ttyname_r() prototypes are defined here.
 928  610   */
 929  611  
 930  612  /*
 931  613   * Previous releases of Solaris, starting at 2.3, provided definitions of
 932  614   * various functions as specified in POSIX.1c, Draft 6.  For some of these
↓ open down ↓ 23 lines elided ↑ open up ↑
 956  638   * #define in that case.
 957  639   *
 958  640   * NOTE: Support for the Draft 6 definitions is provided for compatibility
 959  641   * only.  New applications/libraries should use the standard definitions.
 960  642   */
 961  643  
 962  644  #if     defined(__EXTENSIONS__) || defined(_REENTRANT) || \
 963  645          !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE - 0 >= 199506L) || \
 964  646          defined(_POSIX_PTHREAD_SEMANTICS)
 965  647  
 966      -#if     defined(__STDC__)
 967      -
 968  648  #if     (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS)
 969  649  
 970  650  #ifndef __USE_LEGACY_LOGNAME__
 971  651  #ifdef  __PRAGMA_REDEFINE_EXTNAME
 972  652  #pragma redefine_extname getlogin_r __posix_getloginx_r
 973  653  extern int getlogin_r(char *, int);
 974  654  #else   /* __PRAGMA_REDEFINE_EXTNAME */
 975  655  extern int __posix_getloginx_r(char *, int);
 976  656  #define getlogin_r      __posix_getloginx_r
 977  657  #endif  /* __PRAGMA_REDEFINE_EXTNAME */
↓ open down ↓ 50 lines elided ↑ open up ↑
1028  708  extern char *getloginx_r(char *, int);
1029  709  #define getlogin_r      getloginx_r
1030  710  #endif  /* __PRAGMA_REDEFINE_EXTNAME */
1031  711  #endif  /* __USE_LEGACY_LOGNAME__ */
1032  712  extern char *getlogin_r(char *, int);
1033  713  
1034  714  extern char *ttyname_r(int, char *, int);
1035  715  
1036  716  #endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */
1037  717  
1038      -#else  /* __STDC__ */
1039      -
1040      -#if (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_POSIX_PTHREAD_SEMANTICS)
1041      -
1042      -#ifndef __USE_LEGACY_LOGNAME__
1043      -#ifdef  __PRAGMA_REDEFINE_EXTNAME
1044      -#pragma redefine_extname getlogin_r __posix_getloginx_r
1045      -extern int getlogin_r();
1046      -#else   /* __PRAGMA_REDEFINE_EXTNAME */
1047      -extern int __posix_getloginx_r();
1048      -#define getlogin_r      __posix_getloginx_r
1049      -#endif  /* __PRAGMA_REDEFINE_EXTNAME */
1050      -#else   /* __USE_LEGACY_LOGNAME__ */
1051      -#ifdef __PRAGMA_REDEFINE_EXTNAME
1052      -#pragma redefine_extname getlogin_r __posix_getlogin_r
1053      -extern int getlogin_r();
1054      -#else  /* __PRAGMA_REDEFINE_EXTNAME */
1055      -extern int __posix_getlogin_r();
1056      -
1057      -#ifdef  __lint
1058      -
1059      -#define getlogin_r      __posix_getlogin_r
1060      -
1061      -#else /* !__lint */
1062      -
1063      -static int
1064      -getlogin_r(__name, __len)
1065      -        char *__name;
1066      -        int __len;
1067      -{
1068      -        return (__posix_getlogin_r(__name, __len));
1069      -}
1070      -#endif /* !__lint */
1071      -#endif /* __PRAGMA_REDEFINE_EXTNAME */
1072      -#endif  /* __USE_LEGACY_LOGNAME__ */
1073      -
1074      -#ifdef __PRAGMA_REDEFINE_EXTNAME
1075      -#pragma redefine_extname ttyname_r __posix_ttyname_r
1076      -extern int ttyname_r();
1077      -#else  /* __PRAGMA_REDEFINE_EXTNAME */
1078      -
1079      -extern int __posix_ttyname_r();
1080      -
1081      -#ifdef  __lint
1082      -
1083      -#define ttyname_r       __posix_ttyname_r
1084      -
1085      -#else /* !__lint */
1086      -
1087      -ttyname_r(__fildes, __buf, __size)
1088      -        int __fildes;
1089      -        char *__buf;
1090      -        size_t __size;
1091      -{
1092      -        return (__posix_ttyname_r(__fildes, __buf, __size));
1093      -}
1094      -#endif /* !__lint */
1095      -#endif /* __PRAGMA_REDEFINE_EXTNAME */
1096      -
1097      -#else  /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */
1098      -
1099      -#ifndef __USE_LEGACY_LOGNAME__
1100      -#ifdef __PRAGMA_REDEFINE_EXTNAME
1101      -#pragma redefine_extname getlogin_r     getloginx_r
1102      -#else   /* __PRAGMA_REDEFINE_EXTNAME */
1103      -extern char *getloginx_r();
1104      -#define getlogin_r      getloginx_r
1105      -#endif  /* __PRAGMA_REDEFINE_EXTNAME */
1106      -#endif  /* __USE_LEGACY_LOGNAME__ */
1107      -extern char *getlogin_r();
1108      -
1109      -extern char *ttyname_r();
1110      -
1111      -#endif /* (_POSIX_C_SOURCE - 0 >= 199506L) || ... */
1112      -
1113      -#endif /* __STDC__ */
1114      -
1115  718  #endif /* defined(__EXTENSIONS__) || defined(_REENTRANT)... */
1116  719  
1117  720  #ifdef  __cplusplus
1118  721  }
1119  722  #endif
1120  723  
1121  724  #endif /* _UNISTD_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX