[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 09/09: Remove special logic for the obscure CMU C librar
From: |
Mike Gran |
Subject: |
[Guile-commits] 09/09: Remove special logic for the obscure CMU C library's libc.h |
Date: |
Fri, 16 Sep 2022 00:44:05 -0400 (EDT) |
mike121 pushed a commit to branch wip-modernize-autotools
in repository guile.
commit eb9e547e69aa7119232f17080e8a7ebb115cafe7
Author: Mike Gran <spk121@yahoo.com>
AuthorDate: Thu Sep 15 14:50:32 2022 -0700
Remove special logic for the obscure CMU C library's libc.h
* acinclude.m4 (GUILE_HEADER_LIBC_WITH_UNISTD): removed
* configure.ac: remove GUILE_HEADER_LIBC_WITH_UNISTD, don't check for libc.h
* libguile/filesys.c [LIBC_H_WITH_UNISTD_H]: remove libc.h inclusion
* libguile/posix.c [LIBC_H_WITH_UNISTD_H]: remove libc.h inclusion
---
acinclude.m4 | 45 ---------------------------------------------
configure.ac | 4 +---
libguile/filesys.c | 4 ----
libguile/posix.c | 4 ----
4 files changed, 1 insertion(+), 56 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index dd8f0bff5..2c5355a36 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -44,51 +44,6 @@ struct utime blah;
fi])
-
-
-dnl
-dnl Apparently, at CMU they have a weird version of libc.h that is
-dnl installed in /usr/local/include and conflicts with unistd.h.
-dnl In these situations, we should not #include libc.h.
-dnl This test arranges to #define LIBC_H_WITH_UNISTD_H iff libc.h is
-dnl present on the system, and is safe to #include.
-dnl
-AC_DEFUN([GUILE_HEADER_LIBC_WITH_UNISTD],
- [
- AC_CHECK_HEADERS(libc.h unistd.h)
- AC_CACHE_CHECK(
- [whether libc.h and unistd.h can be included together],
- guile_cv_header_libc_with_unistd,
- [
- if test "$ac_cv_header_libc_h" = "no"; then
- guile_cv_header_libc_with_unistd="no"
- elif test "$ac_cv_header_unistd_h" = "no"; then
- guile_cv_header_libc_with_unistd="yes"
- else
- AC_TRY_COMPILE(
- [
-# include <libc.h>
-# include <unistd.h>
- ],
- [],
- [guile_cv_header_libc_with_unistd=yes],
- [guile_cv_header_libc_with_unistd=no]
- )
- fi
- ]
- )
- if test "$guile_cv_header_libc_with_unistd" = yes; then
- AC_DEFINE([LIBC_H_WITH_UNISTD_H], 1,
- [Define this if we should include <libc.h> when we've already
- included <unistd.h>. On some systems, they conflict, and libc.h
- should be omitted. See GUILE_HEADER_LIBC_WITH_UNISTD in
- aclocal.m4.])
- fi
- ]
-)
-
-
-
dnl This is needed when we want to check for the same function repeatedly
dnl with other parameters, such as libraries, varying.
dnl
diff --git a/configure.ac b/configure.ac
index c4a51bc4f..80b1230f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -417,7 +417,7 @@ AC_SUBST([SCM_I_GSC_HAVE_STRUCT_DIRENT64])
# sched.h - missing on MinGW
# sys/sendfile.h - non-POSIX, found in glibc
#
-AC_CHECK_HEADERS([complex.h fenv.h io.h libc.h memory.h process.h \
+AC_CHECK_HEADERS([complex.h fenv.h io.h memory.h process.h \
sys/dir.h sys/ioctl.h sys/select.h \
sys/time.h sys/timeb.h sys/times.h sys/stdtypes.h sys/types.h \
sys/utime.h unistd.h utime.h pwd.h grp.h sys/utsname.h \
@@ -443,8 +443,6 @@ AC_CHECK_TYPE(socklen_t, ,
AC_CHECK_TYPES([struct ip_mreq], , , [#include <netinet/in.h>])
-GUILE_HEADER_LIBC_WITH_UNISTD
-
AC_TYPE_GETGROUPS
AC_TYPE_SIGNAL
AC_TYPE_MODE_T
diff --git a/libguile/filesys.c b/libguile/filesys.c
index 234f70f77..7f8377815 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -58,10 +58,6 @@
#endif
#include <time.h>
-#ifdef LIBC_H_WITH_UNISTD_H
-#include <libc.h>
-#endif
-
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
diff --git a/libguile/posix.c b/libguile/posix.c
index bd5bbe648..6235ddcdd 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -42,10 +42,6 @@
#endif
#include <time.h>
-#ifdef LIBC_H_WITH_UNISTD_H
-# include <libc.h>
-#endif
-
#ifdef HAVE_PWD_H
# include <pwd.h>
#endif
- [Guile-commits] branch wip-modernize-autotools created (now eb9e547e6), Mike Gran, 2022/09/16
- [Guile-commits] 02/09: Presume const is always available, Mike Gran, 2022/09/16
- [Guile-commits] 03/09: Use autoconf's ability to choose the latest version of C, Mike Gran, 2022/09/16
- [Guile-commits] 01/09: Update libtool initialization in configure script, Mike Gran, 2022/09/16
- [Guile-commits] 04/09: Remove obsolete macro AM_PROG_CC_C_O in configure script, Mike Gran, 2022/09/16
- [Guile-commits] 07/09: Presume ISO C90 functions are always available, Mike Gran, 2022/09/16
- [Guile-commits] 09/09: Remove special logic for the obscure CMU C library's libc.h,
Mike Gran <=
- [Guile-commits] 05/09: Remove AC_HEADER_STDC from configure.ac, Mike Gran, 2022/09/16
- [Guile-commits] 06/09: Presume ISO C90 headers are always available, Mike Gran, 2022/09/16
- [Guile-commits] 08/09: Presume time.h and sys/time.h don't conflict when included, Mike Gran, 2022/09/16