-?MAKE:d_getpwuid_r getpwuid_r_proto: Inlibc Protochk i_systypes i_pwd
+?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:
+?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:.
?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: 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:.
-?T:try hdrs
-?LINT:set d_getpwuid_r
-?LINT:set getpwuid_r_proto
+?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 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
- '') try='int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);'
+ ''|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
- '') try='int getpwuid_r(uid_t, struct passwd*, char*, int, struct passwd**);'
+ ''|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
- '') try='int getpwuid_r(uid_t, struct passwd*, char*, int);'
+ ''|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
- '') try='struct passwd* getpwuid_r(uid_t, struct passwd*, char*, int);'
+ ''|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
- '') d_getpwuid_r=undef
- echo "Disabling getpwuid_r, cannot determine prototype." ;;
+ ''|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" ;;
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
+ ;;
esac