diff options
author | Steve Bennett <steveb@workware.net.au> | 2022-08-29 15:25:12 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2022-09-18 10:52:51 +1000 |
commit | 0545f4c08c65836104d0373879b5173d885ee9a4 (patch) | |
tree | c538b4bc9557a2b17e8a60daee98c2b4ac960b26 | |
parent | 5dbb37089d94b61c34ee5b1da4747c365b5f5072 (diff) | |
download | jimtcl-0545f4c08c65836104d0373879b5173d885ee9a4.zip jimtcl-0545f4c08c65836104d0373879b5173d885ee9a4.tar.gz jimtcl-0545f4c08c65836104d0373879b5173d885ee9a4.tar.bz2 |
build: isinf and isnan are macros in C
So don't try to find them as functions
Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r-- | auto.def | 6 | ||||
-rw-r--r-- | jim.c | 4 |
2 files changed, 7 insertions, 3 deletions
@@ -246,9 +246,13 @@ cc-check-functions ualarm lstat fork system select execvpe cc-check-functions geteuid mkstemp realpath isatty cc-check-functions regcomp waitpid sigaction sys_signame sys_siglist isascii cc-check-functions syslog opendir readlink sleep usleep pipe getaddrinfo utimes -cc-check-functions shutdown socketpair isinf isnan link symlink fsync dup umask +cc-check-functions shutdown socketpair link symlink fsync dup umask cc-check-functions localtime gmtime strptime clock_gettime +cc-with {-includes math.h} { + cc-check-decls isinf isnan +} + if {[have-feature fork]} { # Only use vfork if not deprecated cc-with {-nooutput 1} { @@ -6164,11 +6164,11 @@ static const Jim_ObjType doubleObjType = { JIM_TYPE_NONE, }; -#ifndef HAVE_ISNAN +#ifndef HAVE_DECL_ISNAN #undef isnan #define isnan(X) ((X) != (X)) #endif -#ifndef HAVE_ISINF +#ifndef HAVE_DECL_ISINF #undef isinf #define isinf(X) (1.0 / (X) == 0.0) #endif |