better check for issetugid

This commit is contained in:
Wez Furlong 2007-03-18 02:17:55 +00:00
parent 41bc866d58
commit 1a747468dc
2 changed files with 2 additions and 11 deletions

View file

@ -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])

View file

@ -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