-?MAKE:d_ctime_r ctime_r_proto: Inlibc Protochk i_systypes i_unistd
+?MAKE:d_ctime_r ctime_r_proto: Inlibc Protochk i_systypes i_time
?MAKE: -pick add $@ %<
?S:d_ctime_r:
?S: This variable conditionally defines the HAS_CTIME_R symbol,
eval $inlibc
case "$d_ctime_r" in
"$define")
- hdrs="$i_systypes sys/types.h $i_unistd unistd.h"
+ hdrs="$i_systypes sys/types.h define stdio.h $i_time time.h"
case "$ctime_r_proto" in
- '') try='extern char* ctime_r(const time_t*, char*);'
- ./protochk "$try" $hdrs && ctime_r_proto=B_SB;
- ;;
+ '') try='char* ctime_r(const time_t*, char*);'
+ ./protochk "extern $try" $hdrs && ctime_r_proto=B_SB ;;
esac
case "$ctime_r_proto" in
- '') try='extern char* ctime_r(const time_t*, char*, int);'
- ./protochk "$try" $hdrs && ctime_r_proto=B_SBI;
- ;;
+ '') try='char* ctime_r(const time_t*, char*, int);'
+ ./protochk "extern $try" $hdrs && ctime_r_proto=B_SBI ;;
esac
case "$ctime_r_proto" in
- '') try='extern int ctime_r(const time_t*, char*);'
- ./protochk "$try" $hdrs && ctime_r_proto=I_SB;
- ;;
+ '') try='int ctime_r(const time_t*, char*);'
+ ./protochk "extern $try" $hdrs && ctime_r_proto=I_SB ;;
esac
case "$ctime_r_proto" in
- '') try='extern int ctime_r(const time_t*, char*, int);'
- ./protochk "$try" $hdrs && ctime_r_proto=I_SBI;
- ;;
+ '') try='int ctime_r(const time_t*, char*, int);'
+ ./protochk "extern $try" $hdrs && ctime_r_proto=I_SBI ;;
esac
case "$ctime_r_proto" in
- '') d_ctime_r=undef ; echo "Disabling ctime_r, cannot find prototype." ;;
- * ) ctime_r_proto="REENTRANT_PROTO_$ctime_r_proto" ; echo "$try" ;;
+ '') d_ctime_r=undef
+ echo "Disabling ctime_r, cannot determine prototype." ;;
+ * ) case "$ctime_r_proto" in
+ REENTRANT_PROTO*) ;;
+ *) ctime_r_proto="REENTRANT_PROTO_$ctime_r_proto" ;;
+ esac
+ echo "Prototype: $try" ;;
esac
;;
esac