mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
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
This commit is contained in:
parent
128e0a3479
commit
9b357bace3
12 changed files with 21 additions and 70 deletions
17
configure.ac
17
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 <time.h>
|
||||
#if STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
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 <sys/stat.h>
|
||||
#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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -27,11 +27,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void set_flag (void *data);
|
||||
void func1 (void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue