diff options
-rwxr-xr-x[-rw-r--r--] | ConfigureChecks.cmake | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | config.h.cmake | 9 |
2 files changed, 12 insertions, 1 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 942be7ce..997cc54b 100644..100755 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -26,7 +26,6 @@ if(WIN32 AND MSVC) check_function_exists(_write HAVE__WRITE) #Windows <io.h> else() check_function_exists(access HAVE_ACCESS) #Unix <unistd.h> - check_function_exists(alarm HAVE_ALARM) #Unix <unistd.h> check_function_exists(fork HAVE_FORK) #Unix <unistd.h> check_function_exists(getpid HAVE_GETPID) #Unix <unistd.h> check_function_exists(getpwent HAVE_GETPWENT) #Unix <sys/types.h>,<pwd.h> @@ -45,6 +44,9 @@ else() check_function_exists(usleep HAVE_USLEEP) #Unix <unistd.h> check_function_exists(waitpid HAVE_WAITPID) #Unix <sys/types.h>,<sys/wait.h> check_function_exists(write HAVE_WRITE) #Unix <unistd.h> + if(NOT MINGW) + check_function_exists(alarm HAVE_ALARM) #Unix <unistd.h> + endif() endif() check_function_exists(backtrace HAVE_BACKTRACE) diff --git a/config.h.cmake b/config.h.cmake index 4061e731..0d567369 100644..100755 --- a/config.h.cmake +++ b/config.h.cmake @@ -288,8 +288,10 @@ typedef unsigned int wint_t; #endif #if !defined(HAVE_NANOSLEEP) && !defined(HAVE_USLEEP) +#if !defined(_WIN32) #error "No function for high resolution timing available" #endif +#endif /* stat: function to get status info on a file */ #if defined(HAVE__STAT) @@ -447,8 +449,10 @@ typedef ssize_t IO_SSIZE_T; /* alarm - function to set and alarm for delivering a signal */ #if defined(HAVE_ALARM) +#if defined(HAVE_UNISTD_H) #include <unistd.h> #endif +#endif /* signal - signal handling function */ #if defined(HAVE_SIGNAL) @@ -495,6 +499,11 @@ typedef ssize_t IO_SSIZE_T; #define MAXPATHLEN 1024 #endif +/* MIN macro */ +#if !defined(MIN) +#define MIN(a,b) (((a)<(b))?(a):(b)) +#endif + /* Unused argument macro */ #if !defined(_unused) #if defined(__LCLINT__) || defined(S_SPLINT_S) |