diff options
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | src/CvtStdSel.c | 36 |
2 files changed, 11 insertions, 26 deletions
diff --git a/configure.ac b/configure.ac index 1ac8612..4afe3d5 100644 --- a/configure.ac +++ b/configure.ac @@ -33,6 +33,7 @@ PKG_CHECK_MODULES(XMU, xt xext x11 xextproto) PKG_CHECK_MODULES(XMUU, x11) # Checks for library functions. +AC_CHECK_FUNCS([uname]) AC_REPLACE_FUNCS([reallocarray]) # Allow checking code with lint, sparse, etc. diff --git a/src/CvtStdSel.c b/src/CvtStdSel.c index 177de1b..439ab7a 100644 --- a/src/CvtStdSel.c +++ b/src/CvtStdSel.c @@ -65,26 +65,14 @@ in this Software without prior written authorization from The Open Group. #include <X11/Xfuncs.h> #ifndef OS_NAME -#ifndef X_OS_FILE -#ifdef SYSV /* keep separate until makedepend fixed */ -#define USE_UNAME -#endif -#ifdef SVR4 -#define USE_UNAME -#endif -#ifdef ultrix -#define USE_UNAME -#endif -#ifdef CSRG_BASED -#define USE_UNAME -#endif -#ifdef __linux__ -#define USE_UNAME -#endif -#endif /*X_OS_FILE*/ -#ifdef USE_UNAME -#include <sys/utsname.h> -#endif +# ifndef X_OS_FILE +# ifdef HAVE_UNAME +# define USE_UNAME +# endif +# endif /*X_OS_FILE*/ +# ifdef USE_UNAME +# include <sys/utsname.h> +# endif #endif /* @@ -148,14 +136,10 @@ get_os_name(void) } #endif -#ifdef sun - return XtNewString("SunOS"); -#else -# if !defined(SYSV) && (defined(CSRG_BASED) || defined(unix)) +#if !defined(SYSV) && (defined(CSRG_BASED) || defined(unix)) return XtNewString("BSD"); -# else +#else return NULL; -# endif #endif #endif /*OS_NAME*/ |