When testing for getpwuid_r and getgrgid_r also check the signature. Solaris

7-9 have these with non-POSIX signatures.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Michael Wetherell 2007-10-21 11:39:33 +00:00
parent df2c23e79b
commit 85d2919f49
2 changed files with 40 additions and 8 deletions

14
configure vendored
View File

@ -41353,6 +41353,7 @@ _ACEOF
done
for wx_func in getpwuid_r
do
{ echo "$as_me:$LINENO: checking for $wx_func" >&5
@ -41369,8 +41370,10 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _REENTRANT
#include <pwd.h>
$ac_includes_default
int
@ -41381,6 +41384,10 @@ main ()
&$wx_func;
#endif
struct passwd pw, *ppw;
char buf[1024];
getpwuid_r(0, &pw, buf, sizeof(buf), &ppw)
;
return 0;
@ -41435,6 +41442,7 @@ _ACEOF
done
for wx_func in getgrgid_r
do
{ echo "$as_me:$LINENO: checking for $wx_func" >&5
@ -41451,8 +41459,10 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _REENTRANT
#include <grp.h>
$ac_includes_default
int
@ -41463,6 +41473,10 @@ main ()
&$wx_func;
#endif
struct group grp, *pgrp;
char buf[1024];
getgrgid_r(0, &grp, buf, sizeof(buf), &pgrp)
;
return 0;

View File

@ -4640,10 +4640,28 @@ WX_CHECK_FUNCS(fdopen)
if test "$wxUSE_TARSTREAM" = "yes"; then
WX_CHECK_FUNCS(sysconf)
WX_CHECK_FUNCS(getpwuid_r, [], [], [#define _REENTRANT
#include <pwd.h>])
WX_CHECK_FUNCS(getgrgid_r, [], [], [#define _REENTRANT
#include <grp.h>])
WX_CHECK_FUNCS(getpwuid_r, [], [],
[
#define _REENTRANT
#include <pwd.h>
],
[[
struct passwd pw, *ppw;
char buf[1024];
getpwuid_r(0, &pw, buf, sizeof(buf), &ppw)
]])
WX_CHECK_FUNCS(getgrgid_r, [], [],
[
#define _REENTRANT
#include <grp.h>
],
[[
struct group grp, *pgrp;
char buf[1024];
getgrgid_r(0, &grp, buf, sizeof(buf), &pgrp)
]])
fi
fi