summaryrefslogtreecommitdiff
path: root/libguile
diff options
context:
space:
mode:
authorMike Gran <spk121@yahoo.com>2022-09-15 20:51:05 -0700
committerMike Gran <spk121@yahoo.com>2022-10-14 08:40:23 -0700
commit9b357bace3850a9c6c03e8fb6b3b82f4e57da507 (patch)
tree155b0c51fdedaf0958180857b16f9c66b73c94d2 /libguile
parent128e0a3479980c0ac76716c425009206b774dfe3 (diff)
downloadguile-9b357bace3850a9c6c03e8fb6b3b82f4e57da507.tar.gz
Presume ISO C90 headers are always available
This includes <assert.h>, <ctype.h>, <errno.h>, <float.h>, <iso646.h>, <limits.h>, <locale.h>, <math.h>, <setjmp.h>, <signal.h>, <stdarg.h>, <stddef.h>, <stdio.h>, <stdlib.h>, <string.h>, <time.h>, <wchar.h>, and <wctype.h>. * configure.ac: don't check for <limits.h>, <string.h>, <time.h>, <assert.h>. Remove AC_INCLUDES_DEFAULT macro * libguile/bytevectors.c: include <limits.h>, remove HAVE_LIMITS_H * libguile/filesys.c: include <string.h>, remove HAVE_STRING_H * libguile/fports.c: include <string.h>, remove HAVE_STRING_H * libguile/gen-scmconfig.c: remove HAVE_LIMITS_H, HAVE_TIME_H, STDC_HEADERS Remove SCM_HAVE_STDC_HEADERS * libguile/hash.c: include <wchar.h>, remove HAVE_WCHAR_H * libguile/net_db.c: include <string.h>, remove HAVE_STRING_H * libguile/numbers.h: remove SCM_HAVE_STDC_HEADERS * libguile/regex-posix.c: include <wchar.h>, remove HAVE_WCHAR_H (fixup_multibyte_match): always defined (scm_regexp_exec): use fixup_multibyte_match * libguile/scmsigs.c: remove STDC_HEADERS * libguile/socket.c: include <string.h>, remove HAVE_STRING_H * test-suite/standalone/test-unwind.c: include <string.h>, remove HAVE_STRING_H
Diffstat (limited to 'libguile')
-rw-r--r--libguile/bytevectors.c5
-rw-r--r--libguile/filesys.c5
-rw-r--r--libguile/fports.c3
-rw-r--r--libguile/gen-scmconfig.c16
-rw-r--r--libguile/hash.c3
-rw-r--r--libguile/net_db.c4
-rw-r--r--libguile/numbers.h16
-rw-r--r--libguile/regex-posix.c7
-rw-r--r--libguile/scmsigs.c6
-rw-r--r--libguile/socket.c3
10 files changed, 12 insertions, 56 deletions
diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c
index f42fbb427..bbc23f449 100644
--- a/libguile/bytevectors.c
+++ b/libguile/bytevectors.c
@@ -22,10 +22,7 @@
# include <config.h>
#endif
-#ifdef HAVE_LIMITS_H
-# include <limits.h>
-#endif
-
+#include <limits.h>
#include <byteswap.h>
#include <errno.h>
#include <striconveh.h>
diff --git a/libguile/filesys.c b/libguile/filesys.c
index 6247734e8..f182f6c79 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -43,6 +43,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
+#include <string.h>
#ifdef HAVE_DIRECT_H
#include <direct.h>
@@ -67,10 +68,6 @@
#include <libc.h>
#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
diff --git a/libguile/fports.c b/libguile/fports.c
index 121d50bf0..9d4ca6ace 100644
--- a/libguile/fports.c
+++ b/libguile/fports.c
@@ -28,10 +28,7 @@
#include <stdio.h>
#include <fcntl.h>
-
-#ifdef HAVE_STRING_H
#include <string.h>
-#endif
#include <unistd.h>
#ifdef HAVE_IO_H
#include <io.h>
diff --git a/libguile/gen-scmconfig.c b/libguile/gen-scmconfig.c
index 691ebd0af..4525455b6 100644
--- a/libguile/gen-scmconfig.c
+++ b/libguile/gen-scmconfig.c
@@ -159,12 +159,7 @@ main (int argc, char *argv[])
pf ("/* Important headers */\n");
pf ("#include <stdint.h>\n");
pf ("#include <stddef.h>\n");
-
-#ifdef HAVE_LIMITS_H
pf ("#include <limits.h>\n");
-#else
- pf ("/* limits.h not available */\n");
-#endif
#if HAVE_SYS_TIME_H
pf ("#include <sys/time.h>\n");
@@ -172,15 +167,9 @@ main (int argc, char *argv[])
pf ("/* sys/time.h not available */\n");
#endif
-#if HAVE_TIME_H
pf ("#include <time.h>\n");
-#else
- pf ("/* time.h not available */\n");
-#endif
-
pf("\n");
-#ifdef STDC_HEADERS
- pf ("#define SCM_HAVE_STDC_HEADERS 1 /* 0 or 1 */\n");
+
pf ("#include <stdlib.h>\n");
# ifdef HAVE_SYS_TYPES_H
pf ("#include <sys/types.h>\n");
@@ -189,9 +178,6 @@ main (int argc, char *argv[])
pf ("#include <sys/stdtypes.h>\n");
# endif
pf ("#include <stddef.h>\n");
-#else /* STDC_HEADERS */
- pf ("#define SCM_HAVE_STDC_HEADERS 0 /* 0 or 1 */");
-#endif /* def STDC_HEADERS */
pf("\n");
#ifdef HAVE_SYS_SELECT_H
diff --git a/libguile/hash.c b/libguile/hash.c
index 11a35c2cb..c192ac2e5 100644
--- a/libguile/hash.c
+++ b/libguile/hash.c
@@ -24,10 +24,7 @@
# include <config.h>
#endif
-#ifdef HAVE_WCHAR_H
#include <wchar.h>
-#endif
-
#include <math.h>
#include <string.h>
#include <unistr.h>
diff --git a/libguile/net_db.c b/libguile/net_db.c
index dfb61e8d0..81e701668 100644
--- a/libguile/net_db.c
+++ b/libguile/net_db.c
@@ -33,11 +33,7 @@
#include <verify.h>
#include <errno.h>
-
-#ifdef HAVE_STRING_H
#include <string.h>
-#endif
-
#include <sys/types.h>
#include <sys/socket.h>
diff --git a/libguile/numbers.h b/libguile/numbers.h
index fdb446e1a..84ad5466f 100644
--- a/libguile/numbers.h
+++ b/libguile/numbers.h
@@ -112,15 +112,13 @@ typedef long scm_t_inum;
* SCM_FLTMAX is less than or scm_equal the largest single precision float
*/
-#if SCM_HAVE_STDC_HEADERS
-# ifndef GO32
-# include <float.h>
-# ifdef __MINGW32__
-# define copysign _copysign
-# define finite _finite
-# endif /* __MINGW32__ */
-# endif /* ndef GO32 */
-#endif /* def STDC_HEADERS */
+#ifndef GO32
+# include <float.h>
+# ifdef __MINGW32__
+# define copysign _copysign
+# define finite _finite
+# endif /* __MINGW32__ */
+#endif /* ndef GO32 */
#ifdef DBL_MAX_10_EXP
# define SCM_MAXEXP DBL_MAX_10_EXP
diff --git a/libguile/regex-posix.c b/libguile/regex-posix.c
index a08da02db..5eb05c07c 100644
--- a/libguile/regex-posix.c
+++ b/libguile/regex-posix.c
@@ -35,10 +35,7 @@
#include <regex.h>
#include <string.h>
#include <sys/types.h>
-
-#ifdef HAVE_WCHAR_H
#include <wchar.h>
-#endif
#include "async.h"
#include "feature.h"
@@ -187,7 +184,6 @@ SCM_DEFINE (scm_make_regexp, "make-regexp", 1, 0, 1,
}
#undef FUNC_NAME
-#ifdef HAVE_WCHAR_H
/*
* While regexec does respect the current locale, it returns byte
* offsets instead of character offsets. This routine fixes up the
@@ -222,7 +218,6 @@ fixup_multibyte_match (regmatch_t *matches, int nmatches, char *str)
}
}
-#endif
SCM_DEFINE (scm_regexp_exec, "regexp-exec", 2, 2, 0,
(SCM rx, SCM str, SCM start, SCM flags),
@@ -280,10 +275,8 @@ SCM_DEFINE (scm_regexp_exec, "regexp-exec", 2, 2, 0,
status = regexec (SCM_RGX (rx), c_str, nmatches, matches,
scm_to_int (flags));
-#ifdef HAVE_WCHAR_H
if (!status)
fixup_multibyte_match (matches, nmatches, c_str);
-#endif
free (c_str);
diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c
index d1daf04b4..5b8ffaf80 100644
--- a/libguile/scmsigs.c
+++ b/libguile/scmsigs.c
@@ -67,11 +67,7 @@
#ifdef RETSIGTYPE
# define SIGRETTYPE RETSIGTYPE
#else
-# ifdef STDC_HEADERS
-# define SIGRETTYPE void
-# else
-# define SIGRETTYPE int
-# endif
+# define SIGRETTYPE void
#endif
diff --git a/libguile/socket.c b/libguile/socket.c
index 8451aadac..446f7877f 100644
--- a/libguile/socket.c
+++ b/libguile/socket.c
@@ -30,9 +30,8 @@
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
-#ifdef HAVE_STRING_H
+
#include <string.h>
-#endif
#include <unistd.h>
#include <sys/types.h>
#include <sys/time.h>