mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-25 22:20:28 +02:00
Changes from arch/CVS synchronization
This commit is contained in:
parent
6caac03c93
commit
f743909974
5 changed files with 10 additions and 80 deletions
|
@ -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>
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue