generalize the getuid/geteuid stubs to avoid OS-ifdef nests

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1792 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 14 years ago
parent c6cffe42ac
commit 8fa9714bbc

@ -3,6 +3,9 @@
* acinclude.m4 (VL_LIB_READLINE): Add a --with[out]-readline configure
option so people can explicitly control support for the library.
* configure.ac (AC_CHECK_FUNCS): Check for geteuid and getuid functions.
* sysdep.h: Key off of HAVE_xxx defines for geteuid/getuid stubs.
2010-06-15 Mike Frysinger <vapier@gentoo.org>
* src/bus/s3c4510x.c: Punt dead/useless cvs log info.

@ -116,6 +116,8 @@ else
fi
AC_CHECK_FUNCS(m4_flatten([
geteuid
getuid
nanosleep
swprintf
usleep

@ -52,8 +52,6 @@
#define NO_W32_PSEUDO_MODIFIERS
#define _NO_W32_PSEUDO_MODIFIERS
#include <windows.h>
#define geteuid() 0
#define getuid() 0
/* Microsoft uses a different swprintf() than ISO C requires */
#include <stdio.h>
#define swprintf _snwprintf
@ -62,6 +60,14 @@
#define mkdir(path, mode) mkdir(path)
#endif
#ifndef HAVE_GETEUID
#define geteuid() 0
#endif
#ifndef HAVE_GETUID
#define getuid() 0
#endif
#ifndef HAVE_USLEEP
int usleep (long unsigned usec);
#endif

Loading…
Cancel
Save