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_strerror_r strerror_r_proto: Inlibc Protochk i_systypes i_string
11 ?S: This variable conditionally defines the HAS_STRERROR_R symbol,
12 ?S: which indicates to the C program that the strerror_r()
13 ?S: routine is available.
16 ?S: This variable encodes the prototype of strerror_r.
19 ?C: This symbol, if defined, indicates that the strerror_r routine
20 ?C: is available to strerror re-entrantly.
23 ?C: This symbol encodes the prototype of strerror_r.
24 ?C: 13 int strerror_r(int, char *, int)
25 ?C: 14 char* strerror_r(int, char *, int)
26 ?C: 21 int strerror_r(int, char *, size_t)
27 ?C: 22 char* strerror_r(int, char *, size_t)
28 ?C: The 21 is preferred since it's the SUSv3/POSIX 1001.3-2001 one.
30 ?H:#$d_strerror_r HAS_STRERROR_R /**/
31 ?H:#define STRERROR_R_PROTO $strerror_r_proto /**/
34 ?LINT:set d_strerror_r
35 : see if strerror_r exists
36 set strerror_r d_strerror_r
38 case "$d_strerror_r" in
40 hdrs="$i_systypes sys/types.h $i_string string.h"
41 try='extern int strerror_r(int, char*, size_t);'
42 if ./protochk $try $hdrs; then
43 echo "Your system has $try"
46 try='extern int strerror_r(int, char*, int);'
47 if ./protochk $try $hdrs; then
48 echo "Your system has $try"
51 try='extern char* strerror_r(int, char*, size_t);'
52 if ./protochk $try $hdrs; then
53 echo "Your system has $try"
56 try='extern char* strerror_r(int, char*, int);'
57 if ./protochk $try $hdrs; then
58 echo "Your system has $try"
61 echo "I do not recognize the prototype of your strerror_r, not using it." >&4
69 *) strerror_r_proto=0 ;;