mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Presume ISO C90 functions are always available
* configure.ac: don't check for rename, setlocale, system, memcpy, and strcoll * libguile/i18n.c [HAVE_SETLOCALE] (setlocale): remove static setlocale Don't use HAVE_SETLOCALE * libguile/posix.c: include <locale.h>, remove HAVE_SETLOCALE (scm_setlocale): always include. remove HAVE_SETLOCALE * libguile/simpos.c (scm_system): always include. remove HAVE_SYSTEM
This commit is contained in:
parent
9b357bace3
commit
3827291425
4 changed files with 5 additions and 21 deletions
10
configure.ac
10
configure.ac
|
@ -522,13 +522,13 @@ AC_CHECK_HEADERS([crt_externs.h])
|
||||||
AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clog clog10 ctermid \
|
AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clog clog10 ctermid \
|
||||||
fesetround ftime ftruncate fchown fchmod getcwd geteuid getsid \
|
fesetround ftime ftruncate fchown fchmod getcwd geteuid getsid \
|
||||||
gettimeofday getuid getgid gmtime_r ioctl lstat mkdir mkdtemp mknod \
|
gettimeofday getuid getgid gmtime_r ioctl lstat mkdir mkdtemp mknod \
|
||||||
nice readlink rename rmdir setegid seteuid \
|
nice readlink rmdir setegid seteuid \
|
||||||
setlocale setuid setgid setpgid setsid sigaction siginterrupt stat64 \
|
setuid setgid setpgid setsid sigaction siginterrupt stat64 \
|
||||||
strptime symlink sync sysconf tcgetpgrp tcsetpgrp uname waitpid \
|
strptime symlink sync sysconf tcgetpgrp tcsetpgrp uname waitpid \
|
||||||
strdup system usleep atexit on_exit chown link fcntl ttyname getpwent \
|
strdup usleep on_exit chown link fcntl ttyname getpwent \
|
||||||
getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp \
|
getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp \
|
||||||
index bcopy memcpy rindex truncate isblank _NSGetEnviron \
|
index bcopy rindex truncate isblank _NSGetEnviron \
|
||||||
strcoll strcoll_l strtod_l strtol_l newlocale uselocale utimensat \
|
strcoll_l strtod_l strtol_l newlocale uselocale utimensat \
|
||||||
sched_getaffinity sched_setaffinity sendfile pipe2])
|
sched_getaffinity sched_setaffinity sendfile pipe2])
|
||||||
|
|
||||||
# The newlib C library uses _NL_ prefixed locale langinfo constants.
|
# The newlib C library uses _NL_ prefixed locale langinfo constants.
|
||||||
|
|
|
@ -75,15 +75,6 @@
|
||||||
/* Use Gnulib's header, which also provides `nl_item' & co. */
|
/* Use Gnulib's header, which also provides `nl_item' & co. */
|
||||||
#include <langinfo.h>
|
#include <langinfo.h>
|
||||||
|
|
||||||
#ifndef HAVE_SETLOCALE
|
|
||||||
static inline char *
|
|
||||||
setlocale (int category, const char *name)
|
|
||||||
{
|
|
||||||
errno = ENOSYS;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The newlib C library has alternative names for locale constants. */
|
/* The newlib C library has alternative names for locale constants. */
|
||||||
#if HAVE_DECL__NL_NUMERIC_GROUPING
|
#if HAVE_DECL__NL_NUMERIC_GROUPING
|
||||||
#define INT_CURR_SYMBOL _NL_MONETARY_INT_CURR_SYMBOL
|
#define INT_CURR_SYMBOL _NL_MONETARY_INT_CURR_SYMBOL
|
||||||
|
|
|
@ -112,9 +112,7 @@
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SETLOCALE
|
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (defined HAVE_NEWLOCALE) && (defined HAVE_STRCOLL_L)
|
#if (defined HAVE_NEWLOCALE) && (defined HAVE_STRCOLL_L)
|
||||||
# define USE_GNU_LOCALE_API
|
# define USE_GNU_LOCALE_API
|
||||||
|
@ -1833,8 +1831,6 @@ SCM_DEFINE (scm_putenv, "putenv", 1, 0, 0,
|
||||||
details. */
|
details. */
|
||||||
scm_i_pthread_mutex_t scm_i_locale_mutex = SCM_I_PTHREAD_MUTEX_INITIALIZER;
|
scm_i_pthread_mutex_t scm_i_locale_mutex = SCM_I_PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
|
||||||
#ifdef HAVE_SETLOCALE
|
|
||||||
|
|
||||||
SCM_DEFINE (scm_setlocale, "setlocale", 1, 1, 0,
|
SCM_DEFINE (scm_setlocale, "setlocale", 1, 1, 0,
|
||||||
(SCM category, SCM locale),
|
(SCM category, SCM locale),
|
||||||
"If @var{locale} is omitted, return the current value of the\n"
|
"If @var{locale} is omitted, return the current value of the\n"
|
||||||
|
@ -1898,7 +1894,6 @@ SCM_DEFINE (scm_setlocale, "setlocale", 1, 1, 0,
|
||||||
return scm_from_locale_string (rv);
|
return scm_from_locale_string (rv);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
#endif /* HAVE_SETLOCALE */
|
|
||||||
|
|
||||||
#ifdef HAVE_MKNOD
|
#ifdef HAVE_MKNOD
|
||||||
SCM_DEFINE (scm_mknod, "mknod", 4, 0, 0,
|
SCM_DEFINE (scm_mknod, "mknod", 4, 0, 0,
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_SYSTEM
|
|
||||||
SCM_DEFINE (scm_system, "system", 0, 1, 0,
|
SCM_DEFINE (scm_system, "system", 0, 1, 0,
|
||||||
(SCM cmd),
|
(SCM cmd),
|
||||||
"Execute @var{cmd} using the operating system's \"command\n"
|
"Execute @var{cmd} using the operating system's \"command\n"
|
||||||
|
@ -67,7 +66,6 @@ SCM_DEFINE (scm_system, "system", 0, 1, 0,
|
||||||
return scm_from_int (rv);
|
return scm_from_int (rv);
|
||||||
}
|
}
|
||||||
#undef FUNC_NAME
|
#undef FUNC_NAME
|
||||||
#endif /* HAVE_SYSTEM */
|
|
||||||
|
|
||||||
|
|
||||||
SCM_DEFINE (scm_getenv, "getenv", 1, 0, 0,
|
SCM_DEFINE (scm_getenv, "getenv", 1, 0, 0,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue