diff --git a/configure.ac b/configure.ac index 9724a3809..14aaf2055 100644 --- a/configure.ac +++ b/configure.ac @@ -418,10 +418,10 @@ AC_SUBST([SCM_I_GSC_HAVE_STRUCT_DIRENT64]) # sched.h - missing on MinGW # sys/sendfile.h - non-POSIX, found in glibc # -AC_CHECK_HEADERS([complex.h fenv.h io.h libc.h limits.h memory.h process.h string.h \ +AC_CHECK_HEADERS([complex.h fenv.h io.h libc.h memory.h process.h \ sys/dir.h sys/ioctl.h sys/select.h \ sys/time.h sys/timeb.h sys/times.h sys/stdtypes.h sys/types.h \ -sys/utime.h time.h unistd.h utime.h pwd.h grp.h sys/utsname.h \ +sys/utime.h unistd.h utime.h pwd.h grp.h sys/utsname.h \ direct.h machine/fpu.h sched.h sys/sendfile.h]) # "complex double" is new in C99, and "complex" is only a keyword if @@ -489,7 +489,7 @@ AM_CONDITIONAL([MINGW_LIBPATH], [test x$mingw_libpath = xtrue]) # Reasons for testing: # crt_externs.h - Darwin specific # -AC_CHECK_HEADERS([assert.h crt_externs.h]) +AC_CHECK_HEADERS([crt_externs.h]) # Reasons for testing: # DINFINITY - OSF specific @@ -903,9 +903,7 @@ AC_MSG_CHECKING(whether localtime caches TZ) AC_CACHE_VAL(guile_cv_localtime_cache, [if test x$ac_cv_func_tzset = xyes; then AC_RUN_IFELSE([AC_LANG_SOURCE([[#include -#if STDC_HEADERS -# include -#endif +#include extern char **environ; unset_TZ () { @@ -1007,7 +1005,9 @@ int main () { return (isnan(x) != 0); }]])], # AC_CHECK_MEMBERS([struct stat.st_rdev, struct stat.st_blksize, struct stat.st_blocks, struct stat.st_atim, struct stat.st_mtim, struct stat.st_ctim],,, [#define _GNU_SOURCE -AC_INCLUDES_DEFAULT +#ifdef HAVE_SYS_STAT_H +# include +#endif ]) AC_STRUCT_TIMEZONE @@ -1054,8 +1054,7 @@ GUILE_UNISTRING_ICONVEH_VALUES SCM_I_GSC_STACK_GROWS_UP=0 AC_RUN_IFELSE([AC_LANG_SOURCE( -[AC_INCLUDES_DEFAULT -int +[int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; 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 #endif -#ifdef HAVE_LIMITS_H -# include -#endif - +#include #include #include #include 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 #include #include +#include #ifdef HAVE_DIRECT_H #include @@ -67,10 +68,6 @@ #include #endif -#ifdef HAVE_STRING_H -#include -#endif - #ifdef HAVE_PWD_H #include #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 #include - -#ifdef HAVE_STRING_H #include -#endif #include #ifdef HAVE_IO_H #include 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 \n"); pf ("#include \n"); - -#ifdef HAVE_LIMITS_H pf ("#include \n"); -#else - pf ("/* limits.h not available */\n"); -#endif #if HAVE_SYS_TIME_H pf ("#include \n"); @@ -172,15 +167,9 @@ main (int argc, char *argv[]) pf ("/* sys/time.h not available */\n"); #endif -#if HAVE_TIME_H pf ("#include \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 \n"); # ifdef HAVE_SYS_TYPES_H pf ("#include \n"); @@ -189,9 +178,6 @@ main (int argc, char *argv[]) pf ("#include \n"); # endif pf ("#include \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 #endif -#ifdef HAVE_WCHAR_H #include -#endif - #include #include #include 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 #include - -#ifdef HAVE_STRING_H #include -#endif - #include #include 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 -# ifdef __MINGW32__ -# define copysign _copysign -# define finite _finite -# endif /* __MINGW32__ */ -# endif /* ndef GO32 */ -#endif /* def STDC_HEADERS */ +#ifndef GO32 +# include +# 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 #include #include - -#ifdef HAVE_WCHAR_H #include -#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 b3482c8f3..5d77bf94e 100644 --- a/libguile/socket.c +++ b/libguile/socket.c @@ -30,9 +30,8 @@ #ifdef HAVE_STDINT_H #include #endif -#ifdef HAVE_STRING_H + #include -#endif #include #include diff --git a/test-suite/standalone/test-unwind.c b/test-suite/standalone/test-unwind.c index 33752cd22..48096732d 100644 --- a/test-suite/standalone/test-unwind.c +++ b/test-suite/standalone/test-unwind.c @@ -27,11 +27,7 @@ #include #include #include - -#ifdef HAVE_STRING_H -# include -#endif - +#include void set_flag (void *data); void func1 (void);