3 ?RCS: Copyright (c) 1999 Jarkko Hietaniemi
5 ?RCS: You may distribute under the terms of either the GNU General Public
6 ?RCS: License or the Artistic License, as specified in the README file.
8 ?MAKE:d_localtime_r localtime_r_proto: Inlibc Protochk i_systypes i_time
11 ?S: This variable conditionally defines the HAS_LOCALTIME_R symbol,
12 ?S: which indicates to the C program that the localtime_r()
13 ?S: routine is available.
16 ?S: This variable encodes the prototype of localtime_r.
19 ?C: This symbol, if defined, indicates that the localtime_r routine
20 ?C: is available to localtime re-entrantly.
23 ?C: This symbol encodes the prototype of localtime_r.
24 ?C: 1 int localtime_r(time_t *, struct tm*)
25 ?C: 2 struct tm* localtime_r(time_t *, struct tm*)
26 ?C: The 2 is preferred since it's the SUSv3/POSIX 1001.3-2001 one.
28 ?H:#$d_localtime_r HAS_LOCALTIME_R /**/
29 ?H:#define LOCALTIME_R_PROTO $localtime_r_proto /**/
32 ?LINT:set d_localtime_r
33 : see if localtime_r exists
34 set localtime_r d_localtime_r
36 case "$d_localtime_r" in
38 hdrs="$i_systypes sys/types.h $i_time time.h"
39 try='extern struct tm* localtime_r(time_t *, struct tm*);'
40 if ./protochk "$try" $hdrs; then
41 echo "Your system has $try"
44 try='extern int localtime_r(time_t *, struct tm*);'
45 if ./protochk "$try" $hdrs; then
46 echo "Your system has $try"
49 echo "I do not recognize the prototype of your localtime_r, not using it." >&4
50 d_localtime_r="$undef"
55 *) localtime_r_proto=0 ;;