1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-18 17:50:29 +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:
Mike Gran 2022-09-15 20:51:05 -07:00
parent 128e0a3479
commit 9b357bace3
12 changed files with 21 additions and 70 deletions

View file

@ -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);