From b72f2fe092981ea4233e42c67a1921dee36c9e56 Mon Sep 17 00:00:00 2001 From: panne Date: Sun, 2 Nov 2003 16:30:16 +0000 Subject: [PATCH] [project @ 2003-11-02 16:30:16 by panne] * Added workaround for broken sigemptyset * Use #if, not #ifdef for feature tests * Nuked CVS keyword --- include/HsBase.h | 58 +++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/include/HsBase.h b/include/HsBase.h index f9c6e1d..960aedd 100644 --- a/include/HsBase.h +++ b/include/HsBase.h @@ -1,5 +1,4 @@ /* ----------------------------------------------------------------------------- - * $Id: HsBase.h,v 1.35 2003/11/02 00:06:23 panne Exp $ * * (c) The University of Glasgow 2001-2002 * @@ -17,77 +16,78 @@ #include #include -#ifdef HAVE_SYS_TYPES_H +#if HAVE_SYS_TYPES_H #include #endif -#ifdef HAVE_UNISTD_H +#if HAVE_UNISTD_H #include #endif -#ifdef HAVE_SYS_STAT_H +#if HAVE_SYS_STAT_H #include #endif -#ifdef HAVE_FCNTL_H +#if HAVE_FCNTL_H # include #endif -#ifdef HAVE_TERMIOS_H +#if HAVE_TERMIOS_H #include #endif -#ifdef HAVE_SIGNAL_H +#if HAVE_SIGNAL_H #include -/* Ultra-ugly: OpenBSD uses a broken macro for sigfillset (missing cast) */ +/* Ultra-ugly: OpenBSD uses broken macros for sigemptyset and sigfillset (missing casts) */ #if __OpenBSD__ +#undef sigemptyset #undef sigfillset #endif #endif -#ifdef HAVE_ERRNO_H +#if HAVE_ERRNO_H #include #endif -#ifdef HAVE_STRING_H +#if HAVE_STRING_H #include #endif -#ifdef HAVE_DIRENT_H +#if HAVE_DIRENT_H #include #endif -#ifdef HAVE_UTIME_H +#if HAVE_UTIME_H #include #endif -#ifdef HAVE_SYS_UTSNAME_H +#if HAVE_SYS_UTSNAME_H #include #endif -#if defined(HAVE_GETTIMEOFDAY) -# ifdef HAVE_SYS_TIME_H +#if HAVE_GETTIMEOFDAY +# if HAVE_SYS_TIME_H # include # endif -#elif defined(HAVE_GETCLOCK) -# ifdef HAVE_SYS_TIMERS_H +#elif HAVE_GETCLOCK +# if HAVE_SYS_TIMERS_H # define POSIX_4D9 1 # include # endif #endif -#if defined(HAVE_TIME_H) -# include +#if HAVE_TIME_H +#include #endif -#ifdef HAVE_SYS_TIMEB_H +#if HAVE_SYS_TIMEB_H #include #endif -#ifdef HAVE_WINDOWS_H +#if HAVE_WINDOWS_H #include #endif -#ifdef HAVE_SYS_TIMES_H +#if HAVE_SYS_TIMES_H #include #endif -#if defined(HAVE_WINSOCK_H) && defined(mingw32_TARGET_OS) +#if HAVE_WINSOCK_H && defined(mingw32_TARGET_OS) #include #endif -#ifdef HAVE_LIMITS_H +#if HAVE_LIMITS_H #include #endif -#ifdef HAVE_WCTYPE_H +#if HAVE_WCTYPE_H #include #endif #if !defined(mingw32_TARGET_OS) && !defined(irix_TARGET_OS) -# if defined(HAVE_SYS_RESOURCE_H) +# if HAVE_SYS_RESOURCE_H # include # endif #endif @@ -99,10 +99,10 @@ #endif /* For System */ -#ifdef HAVE_SYS_WAIT_H +#if HAVE_SYS_WAIT_H #include #endif -#ifdef HAVE_VFORK_H +#if HAVE_VFORK_H #include #endif #include "lockFile.h" @@ -437,7 +437,7 @@ __hscore_mkdir( HsAddr pathName, HsInt mode ) INLINE HsInt __hscore_lstat( HsAddr fname, HsAddr st ) { -#ifdef HAVE_LSTAT +#if HAVE_LSTAT return lstat((const char*)fname, (struct stat*)st); #else return stat((const char*)fname, (struct stat*)st); -- 1.7.10.4