diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index 826e2bd5..3e185870 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -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 * src/bus/s3c4510x.c: Punt dead/useless cvs log info. diff --git a/urjtag/configure.ac b/urjtag/configure.ac index c1e2edac..8764fc29 100644 --- a/urjtag/configure.ac +++ b/urjtag/configure.ac @@ -116,6 +116,8 @@ else fi AC_CHECK_FUNCS(m4_flatten([ + geteuid + getuid nanosleep swprintf usleep diff --git a/urjtag/sysdep.h b/urjtag/sysdep.h index d74bf596..65966745 100644 --- a/urjtag/sysdep.h +++ b/urjtag/sysdep.h @@ -52,8 +52,6 @@ #define NO_W32_PSEUDO_MODIFIERS #define _NO_W32_PSEUDO_MODIFIERS #include -#define geteuid() 0 -#define getuid() 0 /* Microsoft uses a different swprintf() than ISO C requires */ #include #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