[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 07/13: Presume ISO C90 functions are always available
From: |
Mike Gran |
Subject: |
[Guile-commits] 07/13: Presume ISO C90 functions are always available |
Date: |
Sat, 15 Oct 2022 15:16:32 -0400 (EDT) |
mike121 pushed a commit to branch main
in repository guile.
commit 3827291425de2cd22ba8026ff8ad08ef64ef8269
Author: Mike Gran <spk121@yahoo.com>
AuthorDate: Thu Sep 15 21:25:29 2022 -0700
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
---
configure.ac | 10 +++++-----
libguile/i18n.c | 9 ---------
libguile/posix.c | 5 -----
libguile/simpos.c | 2 --
4 files changed, 5 insertions(+), 21 deletions(-)
diff --git a/configure.ac b/configure.ac
index 14aaf2055..ac2f91f57 100644
--- a/configure.ac
+++ b/configure.ac
@@ -522,13 +522,13 @@ AC_CHECK_HEADERS([crt_externs.h])
AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clog clog10 ctermid \
fesetround ftime ftruncate fchown fchmod getcwd geteuid getsid \
gettimeofday getuid getgid gmtime_r ioctl lstat mkdir mkdtemp mknod \
- nice readlink rename rmdir setegid seteuid \
- setlocale setuid setgid setpgid setsid sigaction siginterrupt stat64 \
+ nice readlink rmdir setegid seteuid \
+ setuid setgid setpgid setsid sigaction siginterrupt stat64 \
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 \
- index bcopy memcpy rindex truncate isblank _NSGetEnviron \
- strcoll strcoll_l strtod_l strtol_l newlocale uselocale utimensat \
+ index bcopy rindex truncate isblank _NSGetEnviron \
+ strcoll_l strtod_l strtol_l newlocale uselocale utimensat \
sched_getaffinity sched_setaffinity sendfile pipe2])
# The newlib C library uses _NL_ prefixed locale langinfo constants.
diff --git a/libguile/i18n.c b/libguile/i18n.c
index 52a808041..a56852248 100644
--- a/libguile/i18n.c
+++ b/libguile/i18n.c
@@ -75,15 +75,6 @@
/* Use Gnulib's header, which also provides `nl_item' & co. */
#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. */
#if HAVE_DECL__NL_NUMERIC_GROUPING
#define INT_CURR_SYMBOL _NL_MONETARY_INT_CURR_SYMBOL
diff --git a/libguile/posix.c b/libguile/posix.c
index 475312c2a..8471818ad 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -112,9 +112,7 @@
#include <sys/utsname.h>
#endif
-#ifdef HAVE_SETLOCALE
#include <locale.h>
-#endif
#if (defined HAVE_NEWLOCALE) && (defined HAVE_STRCOLL_L)
# define USE_GNU_LOCALE_API
@@ -1833,8 +1831,6 @@ SCM_DEFINE (scm_putenv, "putenv", 1, 0, 0,
details. */
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 category, SCM locale),
"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);
}
#undef FUNC_NAME
-#endif /* HAVE_SETLOCALE */
#ifdef HAVE_MKNOD
SCM_DEFINE (scm_mknod, "mknod", 4, 0, 0,
diff --git a/libguile/simpos.c b/libguile/simpos.c
index 2a292eeff..537f194b9 100644
--- a/libguile/simpos.c
+++ b/libguile/simpos.c
@@ -36,7 +36,6 @@
-#ifdef HAVE_SYSTEM
SCM_DEFINE (scm_system, "system", 0, 1, 0,
(SCM cmd),
"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);
}
#undef FUNC_NAME
-#endif /* HAVE_SYSTEM */
SCM_DEFINE (scm_getenv, "getenv", 1, 0, 0,
- [Guile-commits] branch main updated (bc3b1a4e2 -> 1ddc4eb96), Mike Gran, 2022/10/15
- [Guile-commits] 01/13: Update libtool initialization in configure script, Mike Gran, 2022/10/15
- [Guile-commits] 02/13: Presume const is always available, Mike Gran, 2022/10/15
- [Guile-commits] 05/13: Remove AC_HEADER_STDC from configure.ac, Mike Gran, 2022/10/15
- [Guile-commits] 06/13: Presume ISO C90 headers are always available, Mike Gran, 2022/10/15
- [Guile-commits] 13/13: Fixes arg type for scm_integer_from_mpz, Mike Gran, 2022/10/15
- [Guile-commits] 10/13: Modernizes labels-as-values.m4, Mike Gran, 2022/10/15
- [Guile-commits] 11/13: Presumes signal handler return void, Mike Gran, 2022/10/15
- [Guile-commits] 08/13: Presume time.h and sys/time.h don't conflict when included, Mike Gran, 2022/10/15
- [Guile-commits] 03/13: Use autoconf's ability to choose the latest version of C, Mike Gran, 2022/10/15
- [Guile-commits] 07/13: Presume ISO C90 functions are always available,
Mike Gran <=
- [Guile-commits] 04/13: Remove obsolete macro AM_PROG_CC_C_O in configure script, Mike Gran, 2022/10/15
- [Guile-commits] 09/13: Remove special logic for the obscure CMU C library's libc.h, Mike Gran, 2022/10/15
- [Guile-commits] 12/13: autoupdate acinclude.m4, Mike Gran, 2022/10/15