xfree86: improve check for posix saved ids
Replace hardcoded SVR4 || linux || CSRG_BASED with an autoconf check and the _POSIX_SAVED_IDS macro. Suggested-by: Mark Kettenis <mark.kettenis@xs4all.nl> Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
930c6ff15d
commit
c218ba8423
|
@ -215,7 +215,7 @@ AC_SUBST(DLOPEN_LIBS)
|
||||||
dnl Checks for library functions.
|
dnl Checks for library functions.
|
||||||
AC_CHECK_FUNCS([backtrace ffs geteuid getuid issetugid getresuid \
|
AC_CHECK_FUNCS([backtrace ffs geteuid getuid issetugid getresuid \
|
||||||
getdtablesize getifaddrs getpeereid getpeerucred getzoneid \
|
getdtablesize getifaddrs getpeereid getpeerucred getzoneid \
|
||||||
mmap shmctl64 strncasecmp vasprintf vsnprintf walkcontext])
|
mmap seteuid shmctl64 strncasecmp vasprintf vsnprintf walkcontext])
|
||||||
AC_REPLACE_FUNCS([strcasecmp strcasestr strlcat strlcpy strndup])
|
AC_REPLACE_FUNCS([strcasecmp strcasestr strlcat strlcpy strndup])
|
||||||
|
|
||||||
dnl Find the math libary, then check for cbrt function in it.
|
dnl Find the math libary, then check for cbrt function in it.
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
#include <xorg-config.h>
|
#include <xorg-config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "os.h"
|
||||||
#include "xf86Parser.h"
|
#include "xf86Parser.h"
|
||||||
#include "xf86tokens.h"
|
#include "xf86tokens.h"
|
||||||
#include "Configint.h"
|
#include "Configint.h"
|
||||||
|
@ -65,7 +66,7 @@
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined(SVR4) || defined(__linux__) || defined(CSRG_BASED)
|
#if defined(HAVE_SETEUID) && defined(_POSIX_SAVED_IDS) && _POSIX_SAVED_IDS > 0
|
||||||
#define HAS_SAVED_IDS_AND_SETEUID
|
#define HAS_SAVED_IDS_AND_SETEUID
|
||||||
#endif
|
#endif
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
|
|
|
@ -139,4 +139,7 @@
|
||||||
/* Have X server platform bus support */
|
/* Have X server platform bus support */
|
||||||
#undef XSERVER_PLATFORM_BUS
|
#undef XSERVER_PLATFORM_BUS
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `seteuid' function. */
|
||||||
|
#undef HAVE_SETEUID
|
||||||
|
|
||||||
#endif /* _XORG_CONFIG_H_ */
|
#endif /* _XORG_CONFIG_H_ */
|
||||||
|
|
Loading…
Reference in New Issue