root/aclocal.m4

Revision 451a0e07f83d6599e8716c96d353c9737726a91b, 0.7 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 6 years ago)

better detection and correct use of POSIX.1c getpwnam_r

  • Property mode set to 100644
Line 
1
2
3 dnl
4 dnl checks for password entry functions and header files
5 dnl
6 AC_DEFUN(GETPWNAM_R_POSIX,
7 [
8
9 HAVE_GETPWNAM_R_POSIX=""
10
11 AC_MSG_CHECKING(for POSIX.1c getpwnam_r)
12 AC_TRY_LINK([
13 #include <pwd.h>
14 #include <stdlib.h>],
15   getpwnam_r(NULL,NULL,NULL,0,NULL);,
16   AC_DEFINE(HAVE_GETPWNAM_R_POSIX,1,POSIX.1c getpwnam_r)
17   AC_MSG_RESULT(yes),
18   AC_MSG_RESULT(no))
19 ])
20
21 dnl
22 dnl checks for group entry functions and header files
23 dnl
24 AC_DEFUN(GETGRNAM_R_POSIX,
25 [
26
27 HAVE_GETGRNAM_R_POSIX=""
28
29 AC_MSG_CHECKING(for POSIX.1c getgrnam_r)
30 AC_TRY_LINK([
31 #include <grp.h>
32 #include <stdlib.h>],
33   getgrnam_r(NULL,NULL,NULL,0,NULL);,
34   AC_DEFINE(HAVE_GETGRNAM_R_POSIX,1,POSIX.1c getgrnam_r)
35   AC_MSG_RESULT(yes),
36   AC_MSG_RESULT(no))
37 ])
38
Note: See TracBrowser for help on using the browser.