summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2007-07-29 15:16:46 +0000
committerLudovic Courtès <ludo@gnu.org>2007-07-29 15:16:46 +0000
commitf7439099748d8f1bd4806b96c989897f22b0634e (patch)
treece16ecf210e62dd7d71bc71380fbdd9a0301da4c
parent6caac03c93f3c0657a9487ee175b2779eae0f747 (diff)
downloadguile-f7439099748d8f1bd4806b96c989897f22b0634e.tar.gz
Changes from arch/CVS synchronization
-rw-r--r--libguile/ChangeLog6
-rw-r--r--libguile/eval.c20
-rw-r--r--libguile/filesys.c18
-rw-r--r--libguile/i18n.c19
-rw-r--r--libguile/read.c27
5 files changed, 10 insertions, 80 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog
index ff4113827..a96e35a9b 100644
--- a/libguile/ChangeLog
+++ b/libguile/ChangeLog
@@ -9,6 +9,12 @@
* posix.c: Don't define `_GNU_SOURCE' since `gl_EARLY' arranges
to define it when available.
* srfi-14.c: Likewise.
+ * i18n.c: Likewise. Include Gnulib's <alloca.h>
+ * eval.c: Include Gnulib's <alloca.h>.
+ * filesys.c: Likewise.
+ * read.c: Don't include <strings.h> and don't provide an
+ `strncasecmp ()' replacement; use Gnulib's <string.h> and
+ `strncasecmp ()' instead.
2007-07-25 Ludovic Courtès <ludo@gnu.org>
diff --git a/libguile/eval.c b/libguile/eval.c
index 64266151f..8d6c4d923 100644
--- a/libguile/eval.c
+++ b/libguile/eval.c
@@ -27,25 +27,9 @@
# include <config.h>
#endif
-#include "libguile/__scm.h"
+#include <alloca.h>
-/* This blob per the Autoconf manual (under "Particular Functions"). */
-#if HAVE_ALLOCA_H
-# include <alloca.h>
-#elif defined __GNUC__
-# define alloca __builtin_alloca
-#elif defined _AIX
-# define alloca __alloca
-#elif defined _MSC_VER
-# include <malloc.h>
-# define alloca _alloca
-#else
-# include <stddef.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-void *alloca (size_t);
-#endif
+#include "libguile/__scm.h"
#include <assert.h>
#include "libguile/_scm.h"
diff --git a/libguile/filesys.c b/libguile/filesys.c
index 1798bb698..0e90105ec 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -29,23 +29,7 @@
# include <config.h>
#endif
-/* This blob per the Autoconf manual (under "Particular Functions"). */
-#if HAVE_ALLOCA_H
-# include <alloca.h>
-#elif defined __GNUC__
-# define alloca __builtin_alloca
-#elif defined _AIX
-# define alloca __alloca
-#elif defined _MSC_VER
-# include <malloc.h>
-# define alloca _alloca
-#else
-# include <stddef.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-void *alloca (size_t);
-#endif
+#include <alloca.h>
#include <stdio.h>
#include <errno.h>
diff --git a/libguile/i18n.c b/libguile/i18n.c
index 2a778eb91..88652efd2 100644
--- a/libguile/i18n.c
+++ b/libguile/i18n.c
@@ -15,28 +15,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#define _GNU_SOURCE /* Ask for glibc's `newlocale' API */
-
#if HAVE_CONFIG_H
# include <config.h>
#endif
-#if HAVE_ALLOCA_H
-# include <alloca.h>
-#elif defined __GNUC__
-# define alloca __builtin_alloca
-#elif defined _AIX
-# define alloca __alloca
-#elif defined _MSC_VER
-# include <malloc.h>
-# define alloca _alloca
-#else
-# include <stddef.h>
-# ifdef __cplusplus
-extern "C"
-# endif
-void *alloca (size_t);
-#endif
+#include <alloca.h>
#include "libguile/_scm.h"
#include "libguile/feature.h"
diff --git a/libguile/read.c b/libguile/read.c
index 52c4dc265..d61723efb 100644
--- a/libguile/read.c
+++ b/libguile/read.c
@@ -26,9 +26,6 @@
#include <stdio.h>
#include <ctype.h>
#include <string.h>
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
#include "libguile/_scm.h"
#include "libguile/chars.h"
@@ -182,30 +179,6 @@ static SCM *scm_read_hash_procedures;
(((_chr) <= UCHAR_MAX) ? tolower (_chr) : (_chr))
-#ifndef HAVE_STRNCASECMP
-/* XXX: Use Gnulib's `strncasecmp ()'. */
-
-static int
-strncasecmp (const char *s1, const char *s2, size_t len2)
-{
- while (*s1 && *s2 && len2 > 0)
- {
- int c1 = *s1, c2 = *s2;
-
- if (CHAR_DOWNCASE (c1) != CHAR_DOWNCASE (c2))
- return 0;
- else
- {
- ++s1;
- ++s2;
- --len2;
- }
- }
- return !(*s1 || *s2 || len2 > 0);
-}
-#endif
-
-
/* Helper function similar to `scm_read_token ()'. Read from PORT until a
whitespace is read. Return zero if the whole token could fit in BUF,
non-zero otherwise. */