summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwez <wez@1665872d-e22b-0410-9e5d-a57ad4215e6d>2007-03-18 02:17:55 +0000
committerwez <wez@1665872d-e22b-0410-9e5d-a57ad4215e6d>2007-03-18 02:17:55 +0000
commitf5af16a685fffa230a1aa67528bce772c4e4551b (patch)
treeecf80a98237c48bb0da4f61628cd0392848ca4cd
parent3112674b98313e57c4ddecdeef1931fc4b926bcb (diff)
downloadportableumem-f5af16a685fffa230a1aa67528bce772c4e4551b.tar.gz
better check for issetugid
git-svn-id: https://labs.omniti.com/portableumem/trunk@40 1665872d-e22b-0410-9e5d-a57ad4215e6d
-rw-r--r--configure.ac11
-rw-r--r--sol_compat.h2
2 files changed, 2 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 04a72fe..b56d557 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,16 +1,6 @@
AC_INIT([umem], [1.0], [], [umem])
AM_INIT_AUTOMAKE([dist-bzip2])
-dnl AC_ARG_ENABLE([malloc-replacement],
-dnl AS_HELP_STRING([--enable-malloc-replacement],
-dnl [Include implementations of malloc/free/etc. in libumem (default is no)]),
-dnl [case "${enableval}" in
-dnl yes) malloc_replacement=true ;;
-dnl no) malloc_replacement=false ;;
-dnl *) AC_MSG_ERROR(bad value ${enableval} for --enable-malloc-replacement) ;;
-dnl esac],[malloc_replacement=false])
-dnl AM_CONDITIONAL(MALLOC_REPLACEMENT, test x$malloc_replacement = xtrue)
-
AC_PROG_CC
AM_PROG_AS
AC_PROG_LIBTOOL
@@ -18,6 +8,7 @@ AC_PROG_LIBTOOL
AC_C_INLINE
AC_CHECK_HEADERS([sys/mman.h sys/sysmacros.h sys/time.h])
+AC_CHECK_FUNCS([issetugid])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile Doxyfile umem.spec])
diff --git a/sol_compat.h b/sol_compat.h
index 239cd86..95de221 100644
--- a/sol_compat.h
+++ b/sol_compat.h
@@ -165,7 +165,7 @@ static INLINE uint_t ec_atomic_inc(uint_t *mem)
#ifdef _WIN32
#define issetugid() 0
-#elif !defined(__FreeBSD__)
+#elif !HAVE_ISSETUGID
#define issetugid() (geteuid() == 0)
#endif