summaryrefslogtreecommitdiff
path: root/libguile/gen-scmconfig.c
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-11-17 23:40:51 +0100
committerLudovic Courtès <ludo@gnu.org>2009-11-17 23:42:22 +0100
commit56a3dcd4311d26ef2e9d14ef01021947562c5f17 (patch)
tree8fdaa74c4b29438b09b36d6573d2e843b5c70abc /libguile/gen-scmconfig.c
parentc32b39b9cb69dda94fdd2c3d0f13b4de1b2fd2c9 (diff)
downloadguile-56a3dcd4311d26ef2e9d14ef01021947562c5f17.tar.gz
Remove references to undefined macros.
The intent is to allow compilation with `-Wundef', which in turn should make it easier to catch erroneous uses of nonexistent macros. * libguile/__scm.h: Don't assume `BUILDING_LIBGUILE' is defined. * libguile/conv-uinteger.i.c (SCM_TO_TYPE_PROTO): Remove unneeded CPP conditional on `TYPE_MIN == 0'. * libguile/fports.c: Check for the definition of `HAVE_CHSIZE' and `HAVE_FTRUNCATE', not for their value. * libguile/ports.c: Likewise. * libguile/numbers.c (guile_ieee_init): Likewise with `HAVE_DINFINITY' and `HAVE_DQNAN'. * test-suite/standalone/test-conversion.c (ieee_init): Likewise. * libguile/strings.c: Likewise with `SCM_STRING_LENGTH_HISTOGRAM'. * libguile/strings.h: Likewise. * libguile/tags.h: Likewise with `HAVE_INTTYPES_H' and `HAVE_STDINT_H'. * libguile/threads.c: Likewise with `HAVE_PTHREAD_GET_STACKADDR_NP'. * libguile/vm-engine.c (VM_NAME): Likewise with `VM_CHECK_IP'. * libguile/gen-scmconfig.c (main): Use "#ifdef HAVE_", not "#if HAVE_". * libguile/socket.c (scm_setsockopt): Likewise.
Diffstat (limited to 'libguile/gen-scmconfig.c')
-rw-r--r--libguile/gen-scmconfig.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libguile/gen-scmconfig.c b/libguile/gen-scmconfig.c
index bc0c2df20..f9fff6e3e 100644
--- a/libguile/gen-scmconfig.c
+++ b/libguile/gen-scmconfig.c
@@ -169,10 +169,10 @@ main (int argc, char *argv[])
#ifdef STDC_HEADERS
pf ("#define SCM_HAVE_STDC_HEADERS 1 /* 0 or 1 */\n");
pf ("#include <stdlib.h>\n");
-# if HAVE_SYS_TYPES_H
+# ifdef HAVE_SYS_TYPES_H
pf ("#include <sys/types.h>\n");
# endif
-# if HAVE_SYS_STDTYPES_H
+# ifdef HAVE_SYS_STDTYPES_H
pf ("#include <sys/stdtypes.h>\n");
# endif
pf ("#include <stddef.h>\n");
@@ -411,7 +411,7 @@ main (int argc, char *argv[])
else
pf ("/* #undef SCM_HAVE_THREAD_STORAGE_CLASS */\n");
-#if USE_DLL_IMPORT
+#ifdef USE_DLL_IMPORT
pf ("\n");
pf ("/* Define some additional CPP macros on Win32 platforms. */\n");
pf ("# define __REGEX_IMPORT__ 1\n");