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