summaryrefslogtreecommitdiff
path: root/libguile
diff options
context:
space:
mode:
authorGary Houston <ghouston@arglist.com>1997-03-29 18:42:43 +0000
committerGary Houston <ghouston@arglist.com>1997-03-29 18:42:43 +0000
commit67ec36676ea1eb123d62f87d1269f5e37c228af3 (patch)
tree25398769c7f73d69074fedc015f84e42943df94d /libguile
parent9337637f9a078de747d54e1448107a9a9d09e92d (diff)
downloadguile-67ec36676ea1eb123d62f87d1269f5e37c228af3.tar.gz
* ioext.c (scm_setfileno): throw a runtime error if SET_FILE_FD_FIELD
wan't defined. Don't include fd.h. * Previously fd.h was regenerated whenever configure was run, forcing a couple of files to be recompiled. * fd.h.in: deleted, SET_FILE_FD_FIELD moved to ioext.c. * configure.in: AC_DEFINE FD_SETTER instead of HAVE_FD_SETTER. Check for _fileno as well as _file. Don't output fd.h. * ioext.c: don't fd.h. * acconfig.h: remove duplicate HAVE_FD_SETTER and change the other to FD_SETTER. * Change the stratigy for getting information about errno (and now signal number) values, e.g., ENOSYS, SIGKILL. Instead of generating lists of symbols during the build process, which will not always work, include comprehensive lists in the distribution. To help keep the lists up to date, the "check_signals" and "check_errnos" make targets can be used. * configure.in: don't check for a command to extract errno codes. * Makefile.am: update file lists, remove errnos.list and errnos.c targets, add cpp_err_symbols.c, cpp_sig_symbols.c, check_signals, check_errnos targets. (CLEANFILES): remove errnos.c and errnos.list, add cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new * errnos.default: deleted. * cpp_signal.c: new file. * cpp_errno.c: renamed from errnos_get.c. * cpp_err_symbols, cpp_sig_symbols: new files. * cpp_cnvt.awk: renamed from errnos_cnvt_awk. * error.c (scm_init_error): #include cpp_err_symbols instead of errnos.c. * posix.c (scm_init_posix): don't intern signal symbols. #include cpp_sig_symbols.c. * strop.c (scm_i_index): allow the lower bound to be equal to the length of the string, so a null string doesn't always give an error. * posix.h: new prototypes. * posix.c (scm_status_exit_val, scm_status_term_sig, scm_status_stop_sig): new functions, as in scsh. They break down process status values as returned by waitpid.
Diffstat (limited to 'libguile')
-rw-r--r--libguile/ChangeLog52
-rw-r--r--libguile/Makefile.am47
-rw-r--r--libguile/Makefile.in54
-rw-r--r--libguile/acconfig.h12
-rw-r--r--libguile/aclocal.m435
-rwxr-xr-xlibguile/configure318
-rw-r--r--libguile/configure.in53
-rw-r--r--libguile/cpp_cnvt.awk7
-rw-r--r--libguile/cpp_errno.c3
-rw-r--r--libguile/cpp_signal.c3
-rw-r--r--libguile/error.c2
-rw-r--r--libguile/filesys.c2
-rw-r--r--libguile/fports.h2
-rw-r--r--libguile/ioext.c14
-rw-r--r--libguile/posix.c133
-rw-r--r--libguile/posix.h3
-rw-r--r--libguile/scmconfig.h.in12
-rw-r--r--libguile/strop.c2
18 files changed, 360 insertions, 394 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog
index 612e489c3..dea3ccab5 100644
--- a/libguile/ChangeLog
+++ b/libguile/ChangeLog
@@ -1,5 +1,55 @@
-Sat Mar 22 18:16:29 1997 Gary Houston <ghouston@actrix.gen.nz>
+Wed Mar 26 04:10:32 1997 Gary Houston <ghouston@actrix.gen.nz>
+
+ * ioext.c (scm_setfileno): throw a runtime error if SET_FILE_FD_FIELD
+ wan't defined. Don't include fd.h.
+
+ * Previously fd.h was regenerated whenever configure was run,
+ forcing a couple of files to be recompiled.
+
+ * fd.h.in: deleted, SET_FILE_FD_FIELD moved to ioext.c.
+ * configure.in: AC_DEFINE FD_SETTER instead of HAVE_FD_SETTER.
+ Check for _fileno as well as _file.
+ Don't output fd.h.
+ * ioext.c: don't fd.h.
+ * acconfig.h: remove duplicate HAVE_FD_SETTER and change the
+ other to FD_SETTER.
+
+ * Change the stratigy for getting information about errno
+ (and now signal number) values, e.g., ENOSYS, SIGKILL. Instead of
+ generating lists of symbols during the build process, which will
+ not always work, include comprehensive lists in the distribution.
+ To help keep the lists up to date, the "check_signals" and
+ "check_errnos" make targets can be used.
+
+ * configure.in: don't check for a command to extract errno codes.
+ * Makefile.am: update file lists, remove errnos.list and errnos.c
+ targets, add cpp_err_symbols.c, cpp_sig_symbols.c, check_signals,
+ check_errnos targets.
+ (CLEANFILES): remove errnos.c and errnos.list, add
+ cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new
+ cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new
+ * errnos.default: deleted.
+ * cpp_signal.c: new file.
+ * cpp_errno.c: renamed from errnos_get.c.
+ * cpp_err_symbols, cpp_sig_symbols: new files.
+ * cpp_cnvt.awk: renamed from errnos_cnvt_awk.
+ * error.c (scm_init_error): #include cpp_err_symbols instead of
+ errnos.c.
+ * posix.c (scm_init_posix): don't intern signal symbols. #include
+ cpp_sig_symbols.c.
+
+Tue Mar 25 04:51:10 1997 Gary Houston <ghouston@actrix.gen.nz>
+
+ * strop.c (scm_i_index): allow the lower bound to be equal to the
+ length of the string, so a null string doesn't always give an error.
+
+ * posix.h: new prototypes.
+ * posix.c (scm_status_exit_val, scm_status_term_sig,
+ scm_status_stop_sig): new functions, as in scsh. They break down
+ process status values as returned by waitpid.
+Sat Mar 22 18:16:29 1997 Gary Houston <ghouston@actrix.gen.nz>
+
* net_db.c (scm_gethost): don't check HAVE_GETHOSTENT, since
configure doesn't know about it.
diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index 53b51d728..6515b1515 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -49,7 +49,8 @@ bin_SCRIPTS = guile-snarf
EXTRA_DIST = gscm.c gscm.h ChangeLog-scm dynl-dl.c dynl-dld.c dynl-shl.c \
dynl-vms.c DYNAMIC-LINKING PLUGIN/REQ PLUGIN/guile.config \
-PLUGIN/guile.libs.in errnos_cnvt.awk errnos.default errnos_get.c
+PLUGIN/guile.libs.in cpp_signal.c cpp_errno.c cpp_err_signals \
+cpp_sig_symbols cpp_cnvt_awk
## FIXME: shouldn't directly generate file; instead generate temp file
## and "mv". Consider using timestamp file as well, to avoid
@@ -67,10 +68,42 @@ SUFFIXES = .x
## Add -MG to make the .x magic work with auto-dep code.
MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-errnos.list: $(srcdir)/errnos.default
- $(ERRNO_EXTRACT)
-
-errnos.c: errnos.list
- $(AWK) -f $(srcdir)/errnos_cnvt.awk < errnos.list > errnos.c
+cpp_err_symbols.c: cpp_err_symbols
+ $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols > \
+ cpp_err_symbols.c
-CLEANFILES=errnos.c errnos.list
+cpp_sig_symbols.c: cpp_sig_symbols
+ $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_sig_symbols > \
+ cpp_sig_symbols.c
+
+## Create a new version of the cpp_sig_symbols file, including all SIGXXX
+## macros defined on this platform.
+check_signals:
+ gcc -undef -dM -E $(srcdir)/cpp_signal.c | egrep ' SIG[A-Z]+' \
+ | cut -f2 -d' ' | sort > cpp_sig_symbols_here
+ diff -u $(srcdir)/cpp_sig_symbols cpp_sig_symbols_here | egrep '^\+S' \
+ | cut -c2- > cpp_sig_symbols_diff
+ if test -s cpp_sig_symbols_diff ; then \
+ cat $(srcdir)/cpp_sig_symbols cpp_sig_symbols_diff \
+ | sort > cpp_sig_symbols_new ;\
+ echo "cpp_sig_symbols_new has the following additions:" ;\
+ cat cpp_sig_symbols_diff ;\
+ else echo "No new symbols found."; \
+ fi
+
+## Likewise for cpp_err_symbols.
+check_errnos:
+ gcc -undef -dM -E $(srcdir)/cpp_errno.c | egrep ' E.+' \
+ | cut -f2 -d' ' | sort > cpp_err_symbols_here
+ diff -u $(srcdir)/cpp_err_symbols cpp_err_symbols_here | egrep '^\+E' \
+ | cut -c2- > cpp_err_symbols_diff
+ if test -s cpp_err_symbols_diff ; then \
+ cat $(srcdir)/cpp_err_symbols cpp_err_symbols_diff \
+ | sort > cpp_err_symbols_new ;\
+ echo "cpp_err_symbols_new has the following additions:" ;\
+ cat cpp_err_symbols_diff ;\
+ else echo "No new symbols found."; \
+ fi
+
+CLEANFILES=cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new \
+ cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new
diff --git a/libguile/Makefile.in b/libguile/Makefile.in
index a1e93a99a..c6627bd53 100644
--- a/libguile/Makefile.in
+++ b/libguile/Makefile.in
@@ -39,8 +39,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
host_triplet = @host@
host_alias = @host_alias@
-ERRNO_EXTRACT = @ERRNO_EXTRACT@
-FD_SETTER = @FD_SETTER@
LIBLOBJS = @LIBLOBJS@
AWK = @AWK@
LIBTOOL = @LIBTOOL@
@@ -49,8 +47,8 @@ VERSION = @VERSION@
CC = @CC@
RANLIB = @RANLIB@
MAINT = @MAINT@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
xtra_PLUGIN_guile_libs = @xtra_PLUGIN_guile_libs@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
PACKAGE = @PACKAGE@
AUTOMAKE_OPTIONS = foreign
@@ -97,18 +95,20 @@ bin_SCRIPTS = guile-snarf
EXTRA_DIST = gscm.c gscm.h ChangeLog-scm dynl-dl.c dynl-dld.c dynl-shl.c \
dynl-vms.c DYNAMIC-LINKING PLUGIN/REQ PLUGIN/guile.config \
-PLUGIN/guile.libs.in errnos_cnvt.awk errnos.default errnos_get.c
+PLUGIN/guile.libs.in cpp_signal.c cpp_errno.c cpp_err_signals \
+cpp_sig_symbols cpp_cnvt_awk
SUFFIXES = .x
MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-CLEANFILES=errnos.c errnos.list
+CLEANFILES=cpp_err_symbols_here cpp_err_symbols_diff cpp_err_symbols_new \
+ cpp_sig_symbols_here cpp_sig_symbols_diff cpp_sig_symbols_new
ACLOCAL = $(top_srcdir)/aclocal.m4
CONFIG_HEADER_IN = scmconfig.h.in
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = scmconfig.h
-CONFIG_CLEAN_FILES = fd.h guile-snarf
+CONFIG_CLEAN_FILES = guile-snarf
PROGRAMS = $(lib_PROGRAMS)
@@ -136,7 +136,7 @@ DATA = $(modinclude_DATA)
HEADERS = $(include_HEADERS) $(modinclude_HEADERS)
DIST_COMMON = COPYING ChangeLog Makefile.am Makefile.in acconfig.h \
-acinclude.m4 aclocal.m4 configure configure.in fd.h.in guile-snarf.in \
+acinclude.m4 aclocal.m4 configure configure.in guile-snarf.in \
scmconfig.h.in stamp-h.in
@@ -202,8 +202,6 @@ distclean-hdr:
rm -f $(CONFIG_HEADER)
maintainer-clean-hdr:
-fd.h: $(top_builddir)/config.status fd.h.in
- cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
guile-snarf: $(top_builddir)/config.status guile-snarf.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
@@ -496,11 +494,39 @@ libpath.h: Makefile
.c.x:
./guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@
-errnos.list: $(srcdir)/errnos.default
- $(ERRNO_EXTRACT)
-
-errnos.c: errnos.list
- $(AWK) -f $(srcdir)/errnos_cnvt.awk < errnos.list > errnos.c
+cpp_err_symbols.c: cpp_err_symbols
+ $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols > \
+ cpp_err_symbols.c
+
+cpp_sig_symbols.c: cpp_sig_symbols
+ $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_sig_symbols > \
+ cpp_sig_symbols.c
+
+check_signals:
+ gcc -undef -dM -E $(srcdir)/cpp_signal.c | egrep ' SIG[A-Z]+' \
+ | cut -f2 -d' ' | sort > cpp_sig_symbols_here
+ diff -u $(srcdir)/cpp_sig_symbols cpp_sig_symbols_here | egrep '^\+S' \
+ | cut -c2- > cpp_sig_symbols_diff
+ if test -s cpp_sig_symbols_diff ; then \
+ cat $(srcdir)/cpp_sig_symbols cpp_sig_symbols_diff \
+ | sort > cpp_sig_symbols_new ;\
+ echo "cpp_sig_symbols_new has the following additions:" ;\
+ cat cpp_sig_symbols_diff ;\
+ else echo "No new symbols found."; \
+ fi
+
+check_errnos:
+ gcc -undef -dM -E $(srcdir)/cpp_errno.c | egrep ' E.+' \
+ | cut -f2 -d' ' | sort > cpp_err_symbols_here
+ diff -u $(srcdir)/cpp_err_symbols cpp_err_symbols_here | egrep '^\+E' \
+ | cut -c2- > cpp_err_symbols_diff
+ if test -s cpp_err_symbols_diff ; then \
+ cat $(srcdir)/cpp_err_symbols cpp_err_symbols_diff \
+ | sort > cpp_err_symbols_new ;\
+ echo "cpp_err_symbols_new has the following additions:" ;\
+ cat cpp_err_symbols_diff ;\
+ else echo "No new symbols found."; \
+ fi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/libguile/acconfig.h b/libguile/acconfig.h
index 496d65d73..9ee531262 100644
--- a/libguile/acconfig.h
+++ b/libguile/acconfig.h
@@ -7,16 +7,8 @@
#undef READER_EXTENSIONS
/* Define this if your system has a way to set a stdio stream's file
- descriptor. You should also copy fd.h.in to fd.h, and give the
- macro SET_FILE_FD_FIELD an appropriate definition. See
- configure.in for more details. */
-#undef HAVE_FD_SETTER
-
-/* Define this if your system has a way to set a stdio stream's file
- descriptor. You should also copy fd.h.in to fd.h, and give the
- macro SET_FILE_FD_FIELD an appropriate definition. See
- configure.in for more details. */
-#undef HAVE_FD_SETTER
+ descriptor. */
+#undef FD_SETTER
/* Set this to the name of a field in FILE which contains the number
of buffered characters waiting to be read. */
diff --git a/libguile/aclocal.m4 b/libguile/aclocal.m4
index 3dd5c1e9b..e2dbd74c0 100644
--- a/libguile/aclocal.m4
+++ b/libguile/aclocal.m4
@@ -145,8 +145,7 @@ AC_DEFUN(AM_MAINTAINER_MODE,
]
)
-
-# serial 4 AM_PROG_LIBTOOL
+# serial 1 AM_PROG_LIBTOOL
AC_DEFUN(AM_PROG_LIBTOOL,
[AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_PROG_CC])
@@ -166,42 +165,12 @@ libtool_flags="$libtool_shared"
test "$silent" = yes && libtool_flags="$libtool_flags --silent"
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-[case "$host" in
-*-*-irix6*)
- # For IRIX 6, ld needs -n32 if cc uses it.
- if echo " $CC $CFLAGS " | egrep -e '[ ]-n32[ ]' > /dev/null; then
- LD="${LD-ld} -n32"
- fi
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- CFLAGS="$CFLAGS -belf"
- ;;
-esac]
-
# Actually configure libtool. ac_aux_dir is where install-sh is found.
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LD="$LD" RANLIB="$RANLIB" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+$ac_aux_dir/ltconfig $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|| AC_MSG_ERROR([libtool configure failed])
])
-dnl From Jim Meyering.
-
-# serial 1
-
-AC_DEFUN(AM_SYS_POSIX_TERMIOS,
-[AC_CACHE_CHECK([POSIX termios], am_cv_sys_posix_termios,
- [AC_TRY_LINK([#include <sys/types.h>
-#include <unistd.h>
-#include <termios.h>],
- [/* SunOS 4.0.3 has termios.h but not the library calls. */
- tcgetattr(0, 0);],
- am_cv_sys_posix_termios=yes,
- am_cv_sys_posix_termios=no)])
-])
-
dnl
dnl CY_AC_WITH_THREADS determines which thread library the user intends
dnl to put underneath guile. Pass it the path to find the guile top-level
diff --git a/libguile/configure b/libguile/configure
index aa56622e0..f5c435c33 100755
--- a/libguile/configure
+++ b/libguile/configure
@@ -1082,31 +1082,16 @@ libtool_flags="$libtool_shared"
test "$silent" = yes && libtool_flags="$libtool_flags --silent"
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-case "$host" in
-*-*-irix6*)
- # For IRIX 6, ld needs -n32 if cc uses it.
- if echo " $CC $CFLAGS " | egrep -e '[ ]-n32[ ]' > /dev/null; then
- LD="${LD-ld} -n32"
- fi
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- CFLAGS="$CFLAGS -belf"
- ;;
-esac
-
# Actually configure libtool. ac_aux_dir is where install-sh is found.
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LD="$LD" RANLIB="$RANLIB" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+$ac_aux_dir/ltconfig $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:1108: checking for AIX" >&5
+echo "configure:1093: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 1110 "configure"
+#line 1095 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
@@ -1128,7 +1113,7 @@ rm -f conftest*
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:1132: checking for POSIXized ISC" >&5
+echo "configure:1117: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
@@ -1150,17 +1135,17 @@ fi
ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
-echo "configure:1154: checking for minix/config.h" >&5
+echo "configure:1139: checking for minix/config.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1159 "configure"
+#line 1144 "configure"
#include "confdefs.h"
#include <minix/config.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1200,7 +1185,7 @@ fi
echo $ac_n "checking "threads package type"""... $ac_c" 1>&6
-echo "configure:1204: checking "threads package type"" >&5
+echo "configure:1189: checking "threads package type"" >&5
if eval "test \"`echo '$''{'cy_cv_threads_package'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1259,7 +1244,7 @@ if test "$use_threads" != no; then
LDFLAGS="-L$use_threads/lib"
LIBS="-lgthreads -lmalloc"
cat > conftest.$ac_ext <<EOF
-#line 1263 "configure"
+#line 1248 "configure"
#include "confdefs.h"
#include <pthread.h>
int main() {
@@ -1268,7 +1253,7 @@ pthread_equal(NULL,NULL);
; return 0; }
EOF
-if { (eval echo configure:1272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
threads_package=FSU
else
@@ -1280,7 +1265,7 @@ rm -f conftest*
if test "$threads_package" = unknown; then
LIBS="-lpthread"
cat > conftest.$ac_ext <<EOF
-#line 1284 "configure"
+#line 1269 "configure"
#include "confdefs.h"
#include <pthread.h>
int main() {
@@ -1289,7 +1274,7 @@ pthread_equal(NULL,NULL);
; return 0; }
EOF
-if { (eval echo configure:1293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
threads_package=MIT
else
@@ -1301,7 +1286,7 @@ rm -f conftest*
if test "$threads_package" = unknown; then
LIBS="-lpthreads"
cat > conftest.$ac_ext <<EOF
-#line 1305 "configure"
+#line 1290 "configure"
#include "confdefs.h"
#include <pthread.h>
int main() {
@@ -1310,7 +1295,7 @@ pthread_equal(NULL,NULL);
; return 0; }
EOF
-if { (eval echo configure:1314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
threads_package=PCthreads
else
@@ -1342,12 +1327,12 @@ echo "$ac_t""$cy_cv_threads_package" 1>&6
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1346: checking for working const" >&5
+echo "configure:1331: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1351 "configure"
+#line 1336 "configure"
#include "confdefs.h"
int main() {
@@ -1396,7 +1381,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:1400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1418,12 +1403,12 @@ fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1422: checking for ANSI C header files" >&5
+echo "configure:1407: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1427 "configure"
+#line 1412 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1431,7 +1416,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1448,7 +1433,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1452 "configure"
+#line 1437 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1466,7 +1451,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1470 "configure"
+#line 1455 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1487,7 +1472,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1491 "configure"
+#line 1476 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1498,7 +1483,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1526,12 +1511,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:1530: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1515: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1535 "configure"
+#line 1520 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -1539,7 +1524,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:1543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -1564,7 +1549,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:1568: checking for opendir in -ldir" >&5
+echo "configure:1553: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1572,7 +1557,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1576 "configure"
+#line 1561 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1583,7 +1568,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:1587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1605,7 +1590,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1609: checking for opendir in -lx" >&5
+echo "configure:1594: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1613,7 +1598,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1617 "configure"
+#line 1602 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1624,7 +1609,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:1628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1647,12 +1632,12 @@ fi
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1651: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1636: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1656 "configure"
+#line 1641 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -1661,7 +1646,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:1665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -1682,12 +1667,12 @@ EOF
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1686: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1671: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1691 "configure"
+#line 1676 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -1703,7 +1688,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:1707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -1727,17 +1712,17 @@ for ac_hdr in libc.h limits.h malloc.h memory.h string.h sys/ioctl.h sys/select.
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1731: checking for $ac_hdr" >&5
+echo "configure:1716: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1736 "configure"
+#line 1721 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1768,17 +1753,17 @@ done
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1772: checking for $ac_hdr" >&5
+echo "configure:1757: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1777 "configure"
+#line 1762 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1805,7 +1790,7 @@ fi
done
echo $ac_n "checking "whether libc.h and unistd.h can be included together"""... $ac_c" 1>&6
-echo "configure:1809: checking "whether libc.h and unistd.h can be included together"" >&5
+echo "configure:1794: checking "whether libc.h and unistd.h can be included together"" >&5
if eval "test \"`echo '$''{'guile_cv_header_libc_with_unistd'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1816,7 +1801,7 @@ else
guile_cv_header_libc_with_unistd="yes"
else
cat > conftest.$ac_ext <<EOF
-#line 1820 "configure"
+#line 1805 "configure"
#include "confdefs.h"
# include <libc.h>
@@ -1826,7 +1811,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:1830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
guile_cv_header_libc_with_unistd=yes
else
@@ -1853,12 +1838,12 @@ EOF
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:1857: checking for uid_t in sys/types.h" >&5
+echo "configure:1842: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1862 "configure"
+#line 1847 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -1887,7 +1872,7 @@ EOF
fi
echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
-echo "configure:1891: checking type of array argument to getgroups" >&5
+echo "configure:1876: checking type of array argument to getgroups" >&5
if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1895,7 +1880,7 @@ else
ac_cv_type_getgroups=cross
else
cat > conftest.$ac_ext <<EOF
-#line 1899 "configure"
+#line 1884 "configure"
#include "confdefs.h"
/* Thanks to Mike Rendell for this test. */
@@ -1920,7 +1905,7 @@ main()
}
EOF
-if { (eval echo configure:1924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_type_getgroups=gid_t
else
@@ -1934,7 +1919,7 @@ fi
if test $ac_cv_type_getgroups = cross; then
cat > conftest.$ac_ext <<EOF
-#line 1938 "configure"
+#line 1923 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
@@ -1958,12 +1943,12 @@ EOF
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1962: checking return type of signal handlers" >&5
+echo "configure:1947: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1967 "configure"
+#line 1952 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -1980,7 +1965,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:1984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -1999,12 +1984,12 @@ EOF
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:2003: checking for mode_t" >&5
+echo "configure:1988: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2008 "configure"
+#line 1993 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2035,12 +2020,12 @@ fi
for ac_func in ctermid ftime getcwd geteuid lstat mkdir mknod nice putenv readlink rename rmdir select setegid seteuid setlocale setpgid setsid strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2039: checking for $ac_func" >&5
+echo "configure:2024: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2044 "configure"
+#line 2029 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2063,7 +2048,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2091,12 +2076,12 @@ done
for ac_func in inet_aton strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2095: checking for $ac_func" >&5
+echo "configure:2080: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2100 "configure"
+#line 2085 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2119,7 +2104,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2149,19 +2134,19 @@ done
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:2153: checking for working alloca.h" >&5
+echo "configure:2138: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2158 "configure"
+#line 2143 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:2165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -2182,12 +2167,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2186: checking for alloca" >&5
+echo "configure:2171: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2191 "configure"
+#line 2176 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -2210,7 +2195,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:2214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -2242,12 +2227,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2246: checking whether alloca needs Cray hooks" >&5
+echo "configure:2231: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2251 "configure"
+#line 2236 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2272,12 +2257,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2276: checking for $ac_func" >&5
+echo "configure:2261: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2281 "configure"
+#line 2266 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2300,7 +2285,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2327,7 +2312,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2331: checking stack direction for C alloca" >&5
+echo "configure:2316: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2335,7 +2320,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2339 "configure"
+#line 2324 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2354,7 +2339,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -2377,12 +2362,12 @@ fi
echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
-echo "configure:2381: checking for st_rdev in struct stat" >&5
+echo "configure:2366: checking for st_rdev in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2386 "configure"
+#line 2371 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -2390,7 +2375,7 @@ int main() {
struct stat s; s.st_rdev;
; return 0; }
EOF
-if { (eval echo configure:2394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_rdev=yes
else
@@ -2411,12 +2396,12 @@ EOF
fi
echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
-echo "configure:2415: checking for st_blksize in struct stat" >&5
+echo "configure:2400: checking for st_blksize in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2420 "configure"
+#line 2405 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -2424,7 +2409,7 @@ int main() {
struct stat s; s.st_blksize;
; return 0; }
EOF
-if { (eval echo configure:2428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blksize=yes
else
@@ -2445,12 +2430,12 @@ EOF
fi
echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
-echo "configure:2449: checking for st_blocks in struct stat" >&5
+echo "configure:2434: checking for st_blocks in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2454 "configure"
+#line 2439 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -2458,7 +2443,7 @@ int main() {
struct stat s; s.st_blocks;
; return 0; }
EOF
-if { (eval echo configure:2462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blocks=yes
else
@@ -2482,12 +2467,12 @@ fi
echo $ac_n "checking whether we need POSIX to get struct utimbuf""... $ac_c" 1>&6
-echo "configure:2486: checking whether we need POSIX to get struct utimbuf" >&5
+echo "configure:2471: checking whether we need POSIX to get struct utimbuf" >&5
if eval "test \"`echo '$''{'guile_cv_struct_utimbuf_needs_posix'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2491 "configure"
+#line 2476 "configure"
#include "confdefs.h"
#ifdef __EMX__
@@ -2499,7 +2484,7 @@ struct utime blah;
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2530,7 +2515,7 @@ xtra_PLUGIN_guile_libs=""
if test "$enable_dynamic_linking" = "yes"; then
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:2534: checking for dlopen in -ldl" >&5
+echo "configure:2519: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2538,7 +2523,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2542 "configure"
+#line 2527 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2549,7 +2534,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:2553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2584,7 +2569,7 @@ EOF
else
echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
-echo "configure:2588: checking for dld_link in -ldld" >&5
+echo "configure:2573: checking for dld_link in -ldld" >&5
ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2592,7 +2577,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2596 "configure"
+#line 2581 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2603,7 +2588,7 @@ int main() {
dld_link()
; return 0; }
EOF
-if { (eval echo configure:2607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2640,12 +2625,12 @@ else
for ac_func in shl_load
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2644: checking for $ac_func" >&5
+echo "configure:2629: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2649 "configure"
+#line 2634 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2668,7 +2653,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2713,13 +2698,13 @@ if test "$cross_compiling" = yes; then
echo "configure: warning: Guessing that stack grows down -- see scmconfig.h.in" 1>&2
else
cat > conftest.$ac_ext <<EOF
-#line 2717 "configure"
+#line 2702 "configure"
#include "confdefs.h"
aux (l) unsigned long l;
{ int x; exit (l >= ((unsigned long)&x)); }
main () { int q; aux((unsigned long)&q); }
EOF
-if { (eval echo configure:2723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
cat >> confdefs.h <<\EOF
#define SCM_STACK_GROWS_UP 1
@@ -2742,11 +2727,11 @@ EOF
echo "configure: warning: Guessing that sizeof(long) == sizeof(float) -- see scmconfig.h.in" 1>&2
else
cat > conftest.$ac_ext <<EOF
-#line 2746 "configure"
+#line 2731 "configure"
#include "confdefs.h"
main () { exit (sizeof(float) != sizeof(long)); }
EOF
-if { (eval echo configure:2750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
cat >> confdefs.h <<\EOF
#define SCM_SINGLES 1
@@ -2761,12 +2746,12 @@ fi
echo $ac_n "checking for struct linger""... $ac_c" 1>&6
-echo "configure:2765: checking for struct linger" >&5
+echo "configure:2750: checking for struct linger" >&5
if eval "test \"`echo '$''{'scm_cv_struct_linger'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2770 "configure"
+#line 2755 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -2775,7 +2760,7 @@ int main() {
struct linger lgr; lgr.l_linger = 100
; return 0; }
EOF
-if { (eval echo configure:2779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_struct_linger="yes"
else
@@ -2801,53 +2786,58 @@ fi
#
#--------------------------------------------------------------------
-FD_SETTER=""
-
-if test "x$FD_SETTER" = x; then
+echo $ac_n "checking how to set a stream file descriptor""... $ac_c" 1>&6
+echo "configure:2791: checking how to set a stream file descriptor" >&5
+if eval "test \"`echo '$''{'scm_cv_fd_setter'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
cat > conftest.$ac_ext <<EOF
-#line 2809 "configure"
+#line 2796 "configure"
#include "confdefs.h"
#include <stdio.h>
-
int main() {
stdout->_file = 1
; return 0; }
EOF
-if { (eval echo configure:2817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- FD_SETTER="((F)->_file = (D))"
+ scm_cv_fd_setter="_file"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-fi
-
-if test "x$FD_SETTER" = x; then
- cat > conftest.$ac_ext <<EOF
-#line 2829 "configure"
+ rm -rf conftest*
+ cat > conftest.$ac_ext <<EOF
+#line 2811 "configure"
#include "confdefs.h"
#include <stdio.h>
-
int main() {
-stdout->_fileno
+stdout->_fileno = 1
; return 0; }
EOF
-if { (eval echo configure:2837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- FD_SETTER="((F)->_fileno = (D))"
+ scm_cv_fd_setter="_fileno"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ scm_cv_fd_setter=""
+fi
+rm -f conftest*
fi
rm -f conftest*
fi
-test "x$FD_SETTER" != x && cat >> confdefs.h <<\EOF
-#define HAVE_FD_SETTER 1
+if test "$scm_cv_fd_setter"; then
+ echo "$ac_t""$scm_cv_fd_setter" 1>&6
+ cat >> confdefs.h <<EOF
+#define FD_SETTER $scm_cv_fd_setter
EOF
+else
+ echo "$ac_t""we couldn't do it!" 1>&6
+fi
#--------------------------------------------------------------------
# How to find out whether a FILE structure contains buffered data.
@@ -2862,19 +2852,19 @@ EOF
#--------------------------------------------------------------------
echo $ac_n "checking how to get buffer char count from FILE structure""... $ac_c" 1>&6
-echo "configure:2866: checking how to get buffer char count from FILE structure" >&5
+echo "configure:2856: checking how to get buffer char count from FILE structure" >&5
if eval "test \"`echo '$''{'scm_cv_struct_file_count'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2871 "configure"
+#line 2861 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_cnt = 0
; return 0; }
EOF
-if { (eval echo configure:2878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_struct_file_count="_cnt"
else
@@ -2882,14 +2872,14 @@ else
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 2886 "configure"
+#line 2876 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_r = 0
; return 0; }
EOF
-if { (eval echo configure:2893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_struct_file_count="_r"
else
@@ -2897,14 +2887,14 @@ else
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 2901 "configure"
+#line 2891 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->readCount = 0
; return 0; }
EOF
-if { (eval echo configure:2908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_struct_file_count="readCount"
else
@@ -2931,14 +2921,14 @@ if eval "test \"`echo '$''{'scm_cv_struct_file_gptr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2935 "configure"
+#line 2925 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_gptr = f->egptr;
; return 0; }
EOF
-if { (eval echo configure:2942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_struct_file_gptr=1
else
@@ -2961,14 +2951,14 @@ if eval "test \"`echo '$''{'scm_cv_struct_file_readptr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2965 "configure"
+#line 2955 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
FILE *f = stdin; f->_IO_read_ptr = f->_IO_read_end;
; return 0; }
EOF
-if { (eval echo configure:2972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
scm_cv_struct_file_readptr=1
else
@@ -2984,6 +2974,8 @@ if test "$scm_cv_struct_file_readptr"; then
#define FILE_CNT_READPTR $scm_cv_struct_file_readptr
EOF
+else
+ echo "$ac_t""we couldn't do it!" 1>&6
fi
fi
fi
@@ -3039,7 +3031,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3043: checking for $ac_word" >&5
+echo "configure:3035: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3067,15 +3059,6 @@ fi
test -n "$AWK" && break
done
-echo $ac_n "checking whether errno codes can be extracted from errno.h""... $ac_c" 1>&6
-echo "configure:3072: checking whether errno codes can be extracted from errno.h" >&5
-if test "$GCC" = yes ; then
- echo "$ac_t""yes" 1>&6
- ERRNO_EXTRACT="${CC-cc} -undef -dM -E $srcdir/errnos_get.c | egrep ' E.+' | cut -f2 -d' ' > errnos.list"
-else
- ERRNO_EXTRACT="cp $srcdir/errnos.default errnos.list"
- echo "$ac_t""no, using default" 1>&6
-fi
## If we're creating a shared library (using libtool!), then we'll
## need to generate a list of .lo files corresponding to the .o files
@@ -3097,8 +3080,6 @@ EOF
-
-
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@@ -3200,7 +3181,7 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "Makefile fd.h guile-snarf PLUGIN/guile.libs scmconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile guile-snarf PLUGIN/guile.libs scmconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -3251,8 +3232,6 @@ s%@LIBOBJS@%$LIBOBJS%g
s%@ALLOCA@%$ALLOCA%g
s%@xtra_PLUGIN_guile_libs@%$xtra_PLUGIN_guile_libs%g
s%@AWK@%$AWK%g
-s%@FD_SETTER@%$FD_SETTER%g
-s%@ERRNO_EXTRACT@%$ERRNO_EXTRACT%g
s%@LIBLOBJS@%$LIBLOBJS%g
CEOF
@@ -3295,7 +3274,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile fd.h guile-snarf PLUGIN/guile.libs"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile guile-snarf PLUGIN/guile.libs"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -3464,7 +3443,6 @@ fi; done
EOF
cat >> $CONFIG_STATUS <<EOF
-
EOF
cat >> $CONFIG_STATUS <<\EOF
test -z "$CONFIG_HEADER" || echo timestamp > stamp-h
diff --git a/libguile/configure.in b/libguile/configure.in
index 8e8a20d57..5e66808df 100644
--- a/libguile/configure.in
+++ b/libguile/configure.in
@@ -123,34 +123,23 @@ fi
#
#--------------------------------------------------------------------
-FD_SETTER=""
-
-if test "x$FD_SETTER" = x; then
- AC_TRY_COMPILE(#include <stdio.h>
-, stdout->_file = 1,
- FD_SETTER="((F)->_file = (D))")
-fi
+AC_MSG_CHECKING(how to set a stream file descriptor)
+AC_CACHE_VAL(scm_cv_fd_setter,
+ AC_TRY_COMPILE([#include <stdio.h>],
+ [stdout->_file = 1],
+ scm_cv_fd_setter="_file",
+ AC_TRY_COMPILE([#include <stdio.h>],
+ [stdout->_fileno = 1],
+ scm_cv_fd_setter="_fileno",
+ scm_cv_fd_setter="")))
-if test "x$FD_SETTER" = x; then
- AC_TRY_COMPILE(#include <stdio.h>
-, stdout->_fileno,
- FD_SETTER="((F)->_fileno = (D))")
+if test "$scm_cv_fd_setter"; then
+ AC_MSG_RESULT($scm_cv_fd_setter)
+ AC_DEFINE_UNQUOTED(FD_SETTER, $scm_cv_fd_setter)
+else
+ AC_MSG_RESULT(we couldn't do it!)
fi
-dnl
-dnl Add FD_SETTER tests for other systems here. Your test should
-dnl try a particular style of assigning to the descriptor
-dnl field(s) of a FILE* and define FD_SETTER accordingly.
-dnl
-dnl The value of FD_SETTER is used as a macro body, as in:
-dnl
-dnl #define SET_FILE_FD_FIELD(F,D) @FD_SETTER@
-dnl
-dnl F is a FILE* and D a descriptor (int).
-dnl
-
-test "x$FD_SETTER" != x && AC_DEFINE(HAVE_FD_SETTER)
-
#--------------------------------------------------------------------
# How to find out whether a FILE structure contains buffered data.
# From Tk we have the following list:
@@ -195,6 +184,8 @@ AC_CACHE_VAL(scm_cv_struct_file_readptr,
if test "$scm_cv_struct_file_readptr"; then
AC_MSG_RESULT(read_ptr)
AC_DEFINE_UNQUOTED(FILE_CNT_READPTR, $scm_cv_struct_file_readptr)
+else
+ AC_MSG_RESULT(we couldn't do it!)
fi
fi
fi
@@ -234,14 +225,6 @@ case "$GCC" in
esac
AC_PROG_AWK
-AC_MSG_CHECKING(whether errno codes can be extracted from errno.h)
-if test "$GCC" = yes ; then
- AC_MSG_RESULT(yes)
- ERRNO_EXTRACT="${CC-cc} -undef -dM -E $srcdir/errnos_get.c | egrep ' E.+' | cut -f2 -d' ' > errnos.list"
-else
- ERRNO_EXTRACT="cp $srcdir/errnos.default errnos.list"
- AC_MSG_RESULT([no, using default])
-fi
## If we're creating a shared library (using libtool!), then we'll
## need to generate a list of .lo files corresponding to the .o files
@@ -253,10 +236,8 @@ AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, "$GUILE_MINOR_VERSION")
AC_DEFINE_UNQUOTED(GUILE_VERSION, "$GUILE_VERSION")
AC_SUBST(AWK)
-AC_SUBST(FD_SETTER)
-AC_SUBST(ERRNO_EXTRACT)
AC_SUBST(LIBLOBJS)
-AC_OUTPUT([Makefile fd.h guile-snarf PLUGIN/guile.libs], [chmod +x guile-snarf])
+AC_OUTPUT([Makefile guile-snarf PLUGIN/guile.libs], [chmod +x guile-snarf])
dnl Local Variables:
dnl comment-start: "dnl "
diff --git a/libguile/cpp_cnvt.awk b/libguile/cpp_cnvt.awk
new file mode 100644
index 000000000..a01ba52a8
--- /dev/null
+++ b/libguile/cpp_cnvt.awk
@@ -0,0 +1,7 @@
+# Converts a list of symbols into C expressions which define the symbols
+# in Guile.
+{
+print "#ifdef " $0;
+print "scm_sysintern (\""$0"\", SCM_MAKINUM ("$0"));";
+print "#endif"
+}
diff --git a/libguile/cpp_errno.c b/libguile/cpp_errno.c
new file mode 100644
index 000000000..8ee25bad9
--- /dev/null
+++ b/libguile/cpp_errno.c
@@ -0,0 +1,3 @@
+/* this file is processed by gcc with special options to extract
+ a list of errno codes. */
+#include <errno.h>
diff --git a/libguile/cpp_signal.c b/libguile/cpp_signal.c
new file mode 100644
index 000000000..eb4ed9667
--- /dev/null
+++ b/libguile/cpp_signal.c
@@ -0,0 +1,3 @@
+/* this file is processed by gcc with special options to extract
+ a list of signal numbers. */
+#include <signal.h>
diff --git a/libguile/error.c b/libguile/error.c
index a2a8c7fcd..910ad5c19 100644
--- a/libguile/error.c
+++ b/libguile/error.c
@@ -287,7 +287,7 @@ scm_wta (arg, pos, s_subr)
void
scm_init_error ()
{
-#include "errnos.c"
+#include "cpp_err_symbols.c"
#include "error.x"
}
diff --git a/libguile/filesys.c b/libguile/filesys.c
index 297e341ed..70259a1c2 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -917,7 +917,7 @@ scm_input_waiting_p (f, caller)
return remir;
}
# else
- scm_misc_error ("char-ready?", "Not fully implemented\n");
+ scm_misc_error ("char-ready?", "Not fully implemented");
# endif
# endif
}
diff --git a/libguile/fports.h b/libguile/fports.h
index 13802d345..5f92367ab 100644
--- a/libguile/fports.h
+++ b/libguile/fports.h
@@ -2,7 +2,7 @@
#ifndef FPORTSH
#define FPORTSH
-/* Copyright (C) 1995,1996 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/libguile/ioext.c b/libguile/ioext.c
index 7914b4877..0fd45095e 100644
--- a/libguile/ioext.c
+++ b/libguile/ioext.c
@@ -42,7 +42,6 @@
#include <stdio.h>
-#include "fd.h"
#include "_scm.h"
#include "genio.h"
#include "read.h"
@@ -402,6 +401,9 @@ scm_primitive_move_to_fdes (port, fd)
return SCM_BOOL_T;
}
+#ifdef FD_SETTER
+#define SET_FILE_FD_FIELD(F,D) ((F)->FD_SETTER = (D))
+#endif
void
scm_setfileno (fs, fd)
@@ -411,15 +413,7 @@ scm_setfileno (fs, fd)
#ifdef SET_FILE_FD_FIELD
SET_FILE_FD_FIELD(fs, fd);
#else
- Configure could not guess the name of the correct field in a FILE *.
-
- This function needs to be ported to your system.
-
- SET_FILE_FD_FIELD should change the descriptor refered to by a stdio
- stream, and nothing else.
-
- The way to port this file is to add cases to configure.in. Search
- that file for "SET_FILE_FD_FIELD" and follow the examples there.
+ scm_misc_error ("scm_setfileno", "Not fully implemented");
#endif
}
diff --git a/libguile/posix.c b/libguile/posix.c
index 0ab49f05b..425777be5 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -433,7 +433,40 @@ scm_waitpid (pid, options)
#endif
}
+SCM_PROC (s_status_exit_val, "status:exit-val", 1, 0, 0, scm_status_exit_val);
+SCM
+scm_status_exit_val (status)
+ SCM status;
+{
+ SCM_ASSERT (SCM_INUMP (status), status, SCM_ARG1,s_status_exit_val);
+ if (WIFEXITED (SCM_INUM (status)))
+ return (SCM_MAKINUM (WEXITSTATUS (SCM_INUM (status))));
+ else
+ return SCM_BOOL_F;
+}
+SCM_PROC (s_status_term_sig, "status:term-sig", 1, 0, 0, scm_status_term_sig);
+SCM
+scm_status_term_sig (status)
+ SCM status;
+{
+ SCM_ASSERT (SCM_INUMP (status), status, SCM_ARG1,s_status_term_sig);
+ if (WIFSIGNALED (SCM_INUM (status)))
+ return SCM_MAKINUM (WTERMSIG (SCM_INUM (status)));
+ else
+ return SCM_BOOL_F;
+}
+SCM_PROC (s_status_stop_sig, "status:stop-sig", 1, 0, 0, scm_status_stop_sig);
+SCM
+scm_status_stop_sig (status)
+ SCM status;
+{
+ SCM_ASSERT (SCM_INUMP (status), status, SCM_ARG1,s_status_stop_sig);
+ if (WIFSTOPPED (SCM_INUM (status)))
+ return SCM_MAKINUM (WSTOPSIG (SCM_INUM (status)));
+ else
+ return SCM_BOOL_F;
+}
SCM_PROC (s_getppid, "getppid", 0, 0, 0, scm_getppid);
@@ -1228,105 +1261,6 @@ scm_init_posix ()
scm_sysintern ("WUNTRACED", SCM_MAKINUM (WUNTRACED));
#endif
-#ifdef SIGHUP
- scm_sysintern ("SIGHUP", SCM_MAKINUM (SIGHUP));
-#endif
-#ifdef SIGINT
- scm_sysintern ("SIGINT", SCM_MAKINUM (SIGINT));
-#endif
-#ifdef SIGQUIT
- scm_sysintern ("SIGQUIT", SCM_MAKINUM (SIGQUIT));
-#endif
-#ifdef SIGILL
- scm_sysintern ("SIGILL", SCM_MAKINUM (SIGILL));
-#endif
-#ifdef SIGTRAP
- scm_sysintern ("SIGTRAP", SCM_MAKINUM (SIGTRAP));
-#endif
-#ifdef SIGABRT
- scm_sysintern ("SIGABRT", SCM_MAKINUM (SIGABRT));
-#endif
-#ifdef SIGIOT
- scm_sysintern ("SIGIOT", SCM_MAKINUM (SIGIOT));
-#endif
-#ifdef SIGBUS
- scm_sysintern ("SIGBUS", SCM_MAKINUM (SIGBUS));
-#endif
-#ifdef SIGFPE
- scm_sysintern ("SIGFPE", SCM_MAKINUM (SIGFPE));
-#endif
-#ifdef SIGKILL
- scm_sysintern ("SIGKILL", SCM_MAKINUM (SIGKILL));
-#endif
-#ifdef SIGUSR1
- scm_sysintern ("SIGUSR1", SCM_MAKINUM (SIGUSR1));
-#endif
-#ifdef SIGSEGV
- scm_sysintern ("SIGSEGV", SCM_MAKINUM (SIGSEGV));
-#endif
-#ifdef SIGUSR2
- scm_sysintern ("SIGUSR2", SCM_MAKINUM (SIGUSR2));
-#endif
-#ifdef SIGPIPE
- scm_sysintern ("SIGPIPE", SCM_MAKINUM (SIGPIPE));
-#endif
-#ifdef SIGALRM
- scm_sysintern ("SIGALRM", SCM_MAKINUM (SIGALRM));
-#endif
-#ifdef SIGTERM
- scm_sysintern ("SIGTERM", SCM_MAKINUM (SIGTERM));
-#endif
-#ifdef SIGSTKFLT
- scm_sysintern ("SIGSTKFLT", SCM_MAKINUM (SIGSTKFLT));
-#endif
-#ifdef SIGCHLD
- scm_sysintern ("SIGCHLD", SCM_MAKINUM (SIGCHLD));
-#endif
-#ifdef SIGCONT
- scm_sysintern ("SIGCONT", SCM_MAKINUM (SIGCONT));
-#endif
-#ifdef SIGSTOP
- scm_sysintern ("SIGSTOP", SCM_MAKINUM (SIGSTOP));
-#endif
-#ifdef SIGTSTP
- scm_sysintern ("SIGTSTP", SCM_MAKINUM (SIGTSTP));
-#endif
-#ifdef SIGTTIN
- scm_sysintern ("SIGTTIN", SCM_MAKINUM (SIGTTIN));
-#endif
-#ifdef SIGTTOU
- scm_sysintern ("SIGTTOU", SCM_MAKINUM (SIGTTOU));
-#endif
-#ifdef SIGIO
- scm_sysintern ("SIGIO", SCM_MAKINUM (SIGIO));
-#endif
-#ifdef SIGPOLL
- scm_sysintern ("SIGPOLL", SCM_MAKINUM (SIGPOLL));
-#endif
-#ifdef SIGURG
- scm_sysintern ("SIGURG", SCM_MAKINUM (SIGURG));
-#endif
-#ifdef SIGXCPU
- scm_sysintern ("SIGXCPU", SCM_MAKINUM (SIGXCPU));
-#endif
-#ifdef SIGXFSZ
- scm_sysintern ("SIGXFSZ", SCM_MAKINUM (SIGXFSZ));
-#endif
-#ifdef SIGVTALRM
- scm_sysintern ("SIGVTALRM", SCM_MAKINUM (SIGVTALRM));
-#endif
-#ifdef SIGPROF
- scm_sysintern ("SIGPROF", SCM_MAKINUM (SIGPROF));
-#endif
-#ifdef SIGWINCH
- scm_sysintern ("SIGWINCH", SCM_MAKINUM (SIGWINCH));
-#endif
-#ifdef SIGLOST
- scm_sysintern ("SIGLOST", SCM_MAKINUM (SIGLOST));
-#endif
-#ifdef SIGPWR
- scm_sysintern ("SIGPWR", SCM_MAKINUM (SIGPWR));
-#endif
/* access() symbols. */
scm_sysintern ("R_OK", SCM_MAKINUM (R_OK));
scm_sysintern ("W_OK", SCM_MAKINUM (W_OK));
@@ -1354,5 +1288,6 @@ scm_init_posix ()
#ifdef LC_ALL
scm_sysintern ("LC_ALL", SCM_MAKINUM (LC_ALL));
#endif
+#include "cpp_sig_symbols.c"
#include "posix.x"
}
diff --git a/libguile/posix.h b/libguile/posix.h
index 5f5a943bc..04ebec778 100644
--- a/libguile/posix.h
+++ b/libguile/posix.h
@@ -65,6 +65,9 @@ extern SCM scm_getgrgid SCM_P ((SCM name));
extern SCM scm_setgrent SCM_P ((SCM arg));
extern SCM scm_kill SCM_P ((SCM pid, SCM sig));
extern SCM scm_waitpid SCM_P ((SCM pid, SCM options));
+extern SCM scm_status_exit_val SCM_P ((SCM status));
+extern SCM scm_status_term_sig SCM_P ((SCM status));
+extern SCM scm_status_stop_sig SCM_P ((SCM status));
extern SCM scm_getppid SCM_P ((void));
extern SCM scm_getuid SCM_P ((void));
extern SCM scm_getgid SCM_P ((void));
diff --git a/libguile/scmconfig.h.in b/libguile/scmconfig.h.in
index 31a698860..bf79dfecb 100644
--- a/libguile/scmconfig.h.in
+++ b/libguile/scmconfig.h.in
@@ -82,16 +82,8 @@
#undef READER_EXTENSIONS
/* Define this if your system has a way to set a stdio stream's file
- descriptor. You should also copy fd.h.in to fd.h, and give the
- macro SET_FILE_FD_FIELD an appropriate definition. See
- configure.in for more details. */
-#undef HAVE_FD_SETTER
-
-/* Define this if your system has a way to set a stdio stream's file
- descriptor. You should also copy fd.h.in to fd.h, and give the
- macro SET_FILE_FD_FIELD an appropriate definition. See
- configure.in for more details. */
-#undef HAVE_FD_SETTER
+ descriptor. */
+#undef FD_SETTER
/* Set this to the name of a field in FILE which contains the number
of buffered characters waiting to be read. */
diff --git a/libguile/strop.c b/libguile/strop.c
index bd1076a24..4adfed975 100644
--- a/libguile/strop.c
+++ b/libguile/strop.c
@@ -58,7 +58,7 @@ scm_i_index (str, chr, direction, sub_start, sub_end, pos, pos2, pos3, pos4,
SCM_ASSERT (SCM_INUMP (sub_start), sub_start, pos3, why);
lower = SCM_INUM (sub_start);
if (lower < 0
- || lower >= SCM_ROLENGTH (*str))
+ || lower > SCM_ROLENGTH (*str))
scm_out_of_range (why, sub_start);
if (sub_end == SCM_BOOL_F)