This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove spurious LINT: directives
[metaconfig.git] / U / threads / d_getpwuid_r.U
index 19cae03..14282e1 100644 (file)
@@ -1,19 +1,23 @@
-?RCS: $Id$
-?RCS:
-?RCS: Copyright (c) 1999 Jarkko Hietaniemi
+?RCS: $Id: d_getpwuid_r.U,v 0RCS:
+?RCS: Copyright (c) 2002,2003 Jarkko Hietaniemi
 ?RCS:
 ?RCS: You may distribute under the terms of either the GNU General Public
 ?RCS: License or the Artistic License, as specified in the README file.
 ?RCS:
-?MAKE:d_getpwuid_r getpwuid_r_proto: Inlibc Protochk i_systypes i_pwd uidtype
+?RCS: Generated by the reentr.pl from the Perl 5.8 distribution.
+?RCS:
+?MAKE:d_getpwuid_r getpwuid_r_proto: Inlibc Protochk Hasproto i_systypes usethreads i_pwd
 ?MAKE: -pick add $@ %<
 ?S:d_getpwuid_r:
 ?S:    This variable conditionally defines the HAS_GETPWUID_R symbol,
-?S:    which indicates to the C propwam that the getpwuid_r()
+?S:    which indicates to the C program that the getpwuid_r()
 ?S:    routine is available.
 ?S:.
 ?S:getpwuid_r_proto:
 ?S:    This variable encodes the prototype of getpwuid_r.
+?S:    It is zero if d_getpwuid_r is undef, and one of the
+?S:    REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwuid_r
+?S:    is defined.
 ?S:.
 ?C:HAS_GETPWUID_R:
 ?C:    This symbol, if defined, indicates that the getpwuid_r routine
 ?C:.
 ?C:GETPWUID_R_PROTO:
 ?C:    This symbol encodes the prototype of getpwuid_r.
-?C:     13     int   getpwuid_r(char*, struct passwd*, char*, int)
-?C:     15     struct passwd* getpwuid_r(char*, struct passwd*, char*, int)
-?C:     45     int   getpwuid_r(char*, struct passwd*, char*, int, struct passwd**)
-?C:     53     int   getpwuid_r(char*, struct passwd*, char*, size_t, struct passwd**)
-?C:    The 53 is preferred since it's the SUSv3/POSIX 1001.3-2001 one.
+?C:    It is zero if d_getpwuid_r is undef, and one of the
+?C:    REENTRANT_PROTO_T_ABC macros of reentr.h if d_getpwuid_r
+?C:    is defined.
 ?C:.
-?H:#$d_getpwuid_r HAS_GETPWUID_R               /**/
-?H:#define GETPWUID_R_PROTO $getpwuid_r_proto  /**/
+?H:#$d_getpwuid_r HAS_GETPWUID_R          /**/
+?H:#define GETPWUID_R_PROTO $getpwuid_r_proto     /**/
 ?H:.
-?T:try hdrs
-?LINT:set d_getpwuid_r
+?T:try hdrs d_getpwuid_r_proto
 : see if getpwuid_r exists
 set getpwuid_r d_getpwuid_r
 eval $inlibc
 case "$d_getpwuid_r" in
 "$define")
-       hdrs="$i_systypes sys/types.h $i_pwd pwd.h"
-       try="extern char* getpwuid_r($uidtype, struct passwd*, char*, size_t, struct passwd**);"
-       if ./protochk $try $hdrs; then
-               echo "Your system has $try"
-               getpwuid_r_proto=53
-       else
-               try="extern char* getpwuid_r($uidtype, struct passwd*, char*, size_t, struct passwd**);"
-               if ./protochk $try $hdrs; then
-                       echo "Your system has $try"
-                       getpwuid_r_proto=45
-               else
-                       try="extern int getpwuid_r($uidtype, struct passwd*, char*, size_t);"
-                       if ./protochk $try $hdrs; then
-                               echo "Your system has $try"
-                               getpwuid_r_proto=13
-                       else
-                               try="extern struct passwd* getpwuid_r($uidtype, struct passwd*, char*, size_t);"
-                               if ./protochk $try $hdrs; then
-                                       echo "Your system has $try"
-                                       getpwuid_r_proto=15
-                               else
-                                       echo "I do not recognize the prototype of your getpwuid_r, not using it." >&4
-                                       d_getpwuid_r="$undef"
-                                       getpwuid_r_proto=0
-                               fi
-                       fi
-               fi
-       fi
+       hdrs="$i_systypes sys/types.h define stdio.h $i_pwd pwd.h"
+       case "$d_getpwuid_r_proto:$usethreads" in
+       ":define")      d_getpwuid_r_proto=define
+               set d_getpwuid_r_proto getpwuid_r $hdrs
+               eval $hasproto ;;
+       *)      ;;
+       esac
+       case "$d_getpwuid_r_proto" in
+       define)
+       case "$getpwuid_r_proto" in
+       ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);'
+       ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBWR ;;
+       esac
+       case "$getpwuid_r_proto" in
+       ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int, struct passwd**);'
+       ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBIR ;;
+       esac
+       case "$getpwuid_r_proto" in
+       ''|0) try='int getpwuid_r(uid_t, struct passwd*, char*, int);'
+       ./protochk "extern $try" $hdrs && getpwuid_r_proto=I_TSBI ;;
+       esac
+       case "$getpwuid_r_proto" in
+       ''|0) try='struct passwd* getpwuid_r(uid_t, struct passwd*, char*, int);'
+       ./protochk "extern $try" $hdrs && getpwuid_r_proto=S_TSBI ;;
+       esac
+       case "$getpwuid_r_proto" in
+       ''|0)   d_getpwuid_r=undef
+               getpwuid_r_proto=0
+               echo "Disabling getpwuid_r, cannot determine prototype." >&4 ;;
+       * )     case "$getpwuid_r_proto" in
+               REENTRANT_PROTO*) ;;
+               *) getpwuid_r_proto="REENTRANT_PROTO_$getpwuid_r_proto" ;;
+               esac
+               echo "Prototype: $try" ;;
+       esac
+       ;;
+       *)      case "$usethreads" in
+               define) echo "getpwuid_r has no prototype, not using it." >&4 ;;
+               esac
+               d_getpwuid_r=undef
+               getpwuid_r_proto=0
+               ;;
+       esac
+       ;;
+*)     getpwuid_r_proto=0
        ;;
-*)     getpwuid_r_proto=0 ;;
 esac