-?MAKE:d_strerror_r strerror_r_proto: Inlibc Protochk i_systypes i_string
+?RCS: $Id: d_strerror_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_strerror_r strerror_r_proto: Inlibc Protochk Hasproto i_systypes usethreads i_string
?MAKE: -pick add $@ %<
?S:d_strerror_r:
?S: This variable conditionally defines the HAS_STRERROR_R symbol,
?S:.
?S:strerror_r_proto:
?S: This variable encodes the prototype of strerror_r.
+?S: It is zero if d_strerror_r is undef, and one of the
+?S: REENTRANT_PROTO_T_ABC macros of reentr.h if d_strerror_r
+?S: is defined.
?S:.
?C:HAS_STRERROR_R:
?C: This symbol, if defined, indicates that the strerror_r routine
?C:.
?C:STRERROR_R_PROTO:
?C: This symbol encodes the prototype of strerror_r.
+?C: It is zero if d_strerror_r is undef, and one of the
+?C: REENTRANT_PROTO_T_ABC macros of reentr.h if d_strerror_r
+?C: is defined.
?C:.
?H:#$d_strerror_r HAS_STRERROR_R /**/
?H:#define STRERROR_R_PROTO $strerror_r_proto /**/
?H:.
-?T:try hdrs
-?LINT:set d_strerror_r
-?LINT:set strerror_r_proto
+?T:try hdrs d_strerror_r_proto
: see if strerror_r exists
set strerror_r d_strerror_r
eval $inlibc
case "$d_strerror_r" in
"$define")
hdrs="$i_systypes sys/types.h define stdio.h $i_string string.h"
+ case "$d_strerror_r_proto:$usethreads" in
+ ":define") d_strerror_r_proto=define
+ set d_strerror_r_proto strerror_r $hdrs
+ eval $hasproto ;;
+ *) ;;
+ esac
+ case "$d_strerror_r_proto" in
+ define)
case "$strerror_r_proto" in
- '') try='int strerror_r(int, char*, size_t);'
+ ''|0) try='int strerror_r(int, char*, size_t);'
./protochk "extern $try" $hdrs && strerror_r_proto=I_IBW ;;
esac
case "$strerror_r_proto" in
- '') try='int strerror_r(int, char*, int);'
+ ''|0) try='int strerror_r(int, char*, int);'
./protochk "extern $try" $hdrs && strerror_r_proto=I_IBI ;;
esac
case "$strerror_r_proto" in
- '') try='char* strerror_r(int, char*, size_t);'
+ ''|0) try='char* strerror_r(int, char*, size_t);'
./protochk "extern $try" $hdrs && strerror_r_proto=B_IBW ;;
esac
case "$strerror_r_proto" in
- '') d_strerror_r=undef
- echo "Disabling strerror_r, cannot determine prototype." ;;
+ ''|0) d_strerror_r=undef
+ strerror_r_proto=0
+ echo "Disabling strerror_r, cannot determine prototype." >&4 ;;
* ) case "$strerror_r_proto" in
REENTRANT_PROTO*) ;;
*) strerror_r_proto="REENTRANT_PROTO_$strerror_r_proto" ;;
echo "Prototype: $try" ;;
esac
;;
+ *) case "$usethreads" in
+ define) echo "strerror_r has no prototype, not using it." >&4 ;;
+ esac
+ d_strerror_r=undef
+ strerror_r_proto=0
+ ;;
+ esac
+ ;;
+*) strerror_r_proto=0
+ ;;
esac