mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
* 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.
This commit is contained in:
parent
9337637f9a
commit
67ec36676e
18 changed files with 359 additions and 393 deletions
|
@ -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
|
* net_db.c (scm_gethost): don't check HAVE_GETHOSTENT, since
|
||||||
configure doesn't know about it.
|
configure doesn't know about it.
|
||||||
|
|
||||||
|
|
|
@ -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 \
|
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 \
|
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
|
## FIXME: shouldn't directly generate file; instead generate temp file
|
||||||
## and "mv". Consider using timestamp file as well, to avoid
|
## 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.
|
## Add -MG to make the .x magic work with auto-dep code.
|
||||||
MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||||
|
|
||||||
errnos.list: $(srcdir)/errnos.default
|
cpp_err_symbols.c: cpp_err_symbols
|
||||||
$(ERRNO_EXTRACT)
|
$(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols > \
|
||||||
|
cpp_err_symbols.c
|
||||||
errnos.c: errnos.list
|
|
||||||
$(AWK) -f $(srcdir)/errnos_cnvt.awk < errnos.list > errnos.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
|
||||||
|
|
|
@ -39,8 +39,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
transform = @program_transform_name@
|
transform = @program_transform_name@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
host_alias = @host_alias@
|
host_alias = @host_alias@
|
||||||
ERRNO_EXTRACT = @ERRNO_EXTRACT@
|
|
||||||
FD_SETTER = @FD_SETTER@
|
|
||||||
LIBLOBJS = @LIBLOBJS@
|
LIBLOBJS = @LIBLOBJS@
|
||||||
AWK = @AWK@
|
AWK = @AWK@
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
|
@ -49,8 +47,8 @@ VERSION = @VERSION@
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
RANLIB = @RANLIB@
|
RANLIB = @RANLIB@
|
||||||
MAINT = @MAINT@
|
MAINT = @MAINT@
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
|
||||||
xtra_PLUGIN_guile_libs = @xtra_PLUGIN_guile_libs@
|
xtra_PLUGIN_guile_libs = @xtra_PLUGIN_guile_libs@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
PACKAGE = @PACKAGE@
|
PACKAGE = @PACKAGE@
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = foreign
|
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 \
|
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 \
|
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
|
SUFFIXES = .x
|
||||||
|
|
||||||
MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
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
|
ACLOCAL = $(top_srcdir)/aclocal.m4
|
||||||
CONFIG_HEADER_IN = scmconfig.h.in
|
CONFIG_HEADER_IN = scmconfig.h.in
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
|
||||||
CONFIG_HEADER = scmconfig.h
|
CONFIG_HEADER = scmconfig.h
|
||||||
CONFIG_CLEAN_FILES = fd.h guile-snarf
|
CONFIG_CLEAN_FILES = guile-snarf
|
||||||
PROGRAMS = $(lib_PROGRAMS)
|
PROGRAMS = $(lib_PROGRAMS)
|
||||||
|
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ DATA = $(modinclude_DATA)
|
||||||
HEADERS = $(include_HEADERS) $(modinclude_HEADERS)
|
HEADERS = $(include_HEADERS) $(modinclude_HEADERS)
|
||||||
|
|
||||||
DIST_COMMON = COPYING ChangeLog Makefile.am Makefile.in acconfig.h \
|
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
|
scmconfig.h.in stamp-h.in
|
||||||
|
|
||||||
|
|
||||||
|
@ -202,8 +202,6 @@ distclean-hdr:
|
||||||
rm -f $(CONFIG_HEADER)
|
rm -f $(CONFIG_HEADER)
|
||||||
|
|
||||||
maintainer-clean-hdr:
|
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
|
guile-snarf: $(top_builddir)/config.status guile-snarf.in
|
||||||
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
|
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
|
||||||
|
|
||||||
|
@ -496,11 +494,39 @@ libpath.h: Makefile
|
||||||
.c.x:
|
.c.x:
|
||||||
./guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@
|
./guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@
|
||||||
|
|
||||||
errnos.list: $(srcdir)/errnos.default
|
cpp_err_symbols.c: cpp_err_symbols
|
||||||
$(ERRNO_EXTRACT)
|
$(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols > \
|
||||||
|
cpp_err_symbols.c
|
||||||
|
|
||||||
errnos.c: errnos.list
|
cpp_sig_symbols.c: cpp_sig_symbols
|
||||||
$(AWK) -f $(srcdir)/errnos_cnvt.awk < errnos.list > errnos.c
|
$(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.
|
# 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.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
|
|
@ -7,16 +7,8 @@
|
||||||
#undef READER_EXTENSIONS
|
#undef READER_EXTENSIONS
|
||||||
|
|
||||||
/* Define this if your system has a way to set a stdio stream's file
|
/* 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
|
descriptor. */
|
||||||
macro SET_FILE_FD_FIELD an appropriate definition. See
|
#undef FD_SETTER
|
||||||
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
|
|
||||||
|
|
||||||
/* Set this to the name of a field in FILE which contains the number
|
/* Set this to the name of a field in FILE which contains the number
|
||||||
of buffered characters waiting to be read. */
|
of buffered characters waiting to be read. */
|
||||||
|
|
35
libguile/aclocal.m4
vendored
35
libguile/aclocal.m4
vendored
|
@ -145,8 +145,7 @@ AC_DEFUN(AM_MAINTAINER_MODE,
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# serial 1 AM_PROG_LIBTOOL
|
||||||
# serial 4 AM_PROG_LIBTOOL
|
|
||||||
AC_DEFUN(AM_PROG_LIBTOOL,
|
AC_DEFUN(AM_PROG_LIBTOOL,
|
||||||
[AC_REQUIRE([AC_CANONICAL_HOST])
|
[AC_REQUIRE([AC_CANONICAL_HOST])
|
||||||
AC_REQUIRE([AC_PROG_CC])
|
AC_REQUIRE([AC_PROG_CC])
|
||||||
|
@ -166,42 +165,12 @@ libtool_flags="$libtool_shared"
|
||||||
test "$silent" = yes && libtool_flags="$libtool_flags --silent"
|
test "$silent" = yes && libtool_flags="$libtool_flags --silent"
|
||||||
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
|
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.
|
# Actually configure libtool. ac_aux_dir is where install-sh is found.
|
||||||
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LD="$LD" RANLIB="$RANLIB" \
|
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LD="$LD" RANLIB="$RANLIB" \
|
||||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
|
$ac_aux_dir/ltconfig $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|
||||||
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|
|
||||||
|| AC_MSG_ERROR([libtool configure failed])
|
|| 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
|
||||||
dnl CY_AC_WITH_THREADS determines which thread library the user intends
|
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
|
dnl to put underneath guile. Pass it the path to find the guile top-level
|
||||||
|
|
318
libguile/configure
vendored
318
libguile/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -123,34 +123,23 @@ fi
|
||||||
#
|
#
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
|
|
||||||
FD_SETTER=""
|
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
|
if test "$scm_cv_fd_setter"; then
|
||||||
AC_TRY_COMPILE(#include <stdio.h>
|
AC_MSG_RESULT($scm_cv_fd_setter)
|
||||||
, stdout->_file = 1,
|
AC_DEFINE_UNQUOTED(FD_SETTER, $scm_cv_fd_setter)
|
||||||
FD_SETTER="((F)->_file = (D))")
|
else
|
||||||
|
AC_MSG_RESULT(we couldn't do it!)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$FD_SETTER" = x; then
|
|
||||||
AC_TRY_COMPILE(#include <stdio.h>
|
|
||||||
, stdout->_fileno,
|
|
||||||
FD_SETTER="((F)->_fileno = (D))")
|
|
||||||
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.
|
# How to find out whether a FILE structure contains buffered data.
|
||||||
# From Tk we have the following list:
|
# 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
|
if test "$scm_cv_struct_file_readptr"; then
|
||||||
AC_MSG_RESULT(read_ptr)
|
AC_MSG_RESULT(read_ptr)
|
||||||
AC_DEFINE_UNQUOTED(FILE_CNT_READPTR, $scm_cv_struct_file_readptr)
|
AC_DEFINE_UNQUOTED(FILE_CNT_READPTR, $scm_cv_struct_file_readptr)
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(we couldn't do it!)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -234,14 +225,6 @@ case "$GCC" in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
AC_PROG_AWK
|
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
|
## 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
|
## 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_DEFINE_UNQUOTED(GUILE_VERSION, "$GUILE_VERSION")
|
||||||
|
|
||||||
AC_SUBST(AWK)
|
AC_SUBST(AWK)
|
||||||
AC_SUBST(FD_SETTER)
|
|
||||||
AC_SUBST(ERRNO_EXTRACT)
|
|
||||||
AC_SUBST(LIBLOBJS)
|
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 Local Variables:
|
||||||
dnl comment-start: "dnl "
|
dnl comment-start: "dnl "
|
||||||
|
|
7
libguile/cpp_cnvt.awk
Normal file
7
libguile/cpp_cnvt.awk
Normal file
|
@ -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"
|
||||||
|
}
|
3
libguile/cpp_errno.c
Normal file
3
libguile/cpp_errno.c
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
/* this file is processed by gcc with special options to extract
|
||||||
|
a list of errno codes. */
|
||||||
|
#include <errno.h>
|
3
libguile/cpp_signal.c
Normal file
3
libguile/cpp_signal.c
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
/* this file is processed by gcc with special options to extract
|
||||||
|
a list of signal numbers. */
|
||||||
|
#include <signal.h>
|
|
@ -287,7 +287,7 @@ scm_wta (arg, pos, s_subr)
|
||||||
void
|
void
|
||||||
scm_init_error ()
|
scm_init_error ()
|
||||||
{
|
{
|
||||||
#include "errnos.c"
|
#include "cpp_err_symbols.c"
|
||||||
#include "error.x"
|
#include "error.x"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -917,7 +917,7 @@ scm_input_waiting_p (f, caller)
|
||||||
return remir;
|
return remir;
|
||||||
}
|
}
|
||||||
# else
|
# else
|
||||||
scm_misc_error ("char-ready?", "Not fully implemented\n");
|
scm_misc_error ("char-ready?", "Not fully implemented");
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#ifndef FPORTSH
|
#ifndef FPORTSH
|
||||||
#define 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -42,7 +42,6 @@
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "fd.h"
|
|
||||||
#include "_scm.h"
|
#include "_scm.h"
|
||||||
#include "genio.h"
|
#include "genio.h"
|
||||||
#include "read.h"
|
#include "read.h"
|
||||||
|
@ -402,6 +401,9 @@ scm_primitive_move_to_fdes (port, fd)
|
||||||
return SCM_BOOL_T;
|
return SCM_BOOL_T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef FD_SETTER
|
||||||
|
#define SET_FILE_FD_FIELD(F,D) ((F)->FD_SETTER = (D))
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
scm_setfileno (fs, fd)
|
scm_setfileno (fs, fd)
|
||||||
|
@ -411,15 +413,7 @@ scm_setfileno (fs, fd)
|
||||||
#ifdef SET_FILE_FD_FIELD
|
#ifdef SET_FILE_FD_FIELD
|
||||||
SET_FILE_FD_FIELD(fs, fd);
|
SET_FILE_FD_FIELD(fs, fd);
|
||||||
#else
|
#else
|
||||||
Configure could not guess the name of the correct field in a FILE *.
|
scm_misc_error ("scm_setfileno", "Not fully implemented");
|
||||||
|
|
||||||
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.
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
133
libguile/posix.c
133
libguile/posix.c
|
@ -433,7 +433,40 @@ scm_waitpid (pid, options)
|
||||||
#endif
|
#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);
|
SCM_PROC (s_getppid, "getppid", 0, 0, 0, scm_getppid);
|
||||||
|
|
||||||
|
@ -1228,105 +1261,6 @@ scm_init_posix ()
|
||||||
scm_sysintern ("WUNTRACED", SCM_MAKINUM (WUNTRACED));
|
scm_sysintern ("WUNTRACED", SCM_MAKINUM (WUNTRACED));
|
||||||
#endif
|
#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. */
|
/* access() symbols. */
|
||||||
scm_sysintern ("R_OK", SCM_MAKINUM (R_OK));
|
scm_sysintern ("R_OK", SCM_MAKINUM (R_OK));
|
||||||
scm_sysintern ("W_OK", SCM_MAKINUM (W_OK));
|
scm_sysintern ("W_OK", SCM_MAKINUM (W_OK));
|
||||||
|
@ -1354,5 +1288,6 @@ scm_init_posix ()
|
||||||
#ifdef LC_ALL
|
#ifdef LC_ALL
|
||||||
scm_sysintern ("LC_ALL", SCM_MAKINUM (LC_ALL));
|
scm_sysintern ("LC_ALL", SCM_MAKINUM (LC_ALL));
|
||||||
#endif
|
#endif
|
||||||
|
#include "cpp_sig_symbols.c"
|
||||||
#include "posix.x"
|
#include "posix.x"
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,6 +65,9 @@ extern SCM scm_getgrgid SCM_P ((SCM name));
|
||||||
extern SCM scm_setgrent SCM_P ((SCM arg));
|
extern SCM scm_setgrent SCM_P ((SCM arg));
|
||||||
extern SCM scm_kill SCM_P ((SCM pid, SCM sig));
|
extern SCM scm_kill SCM_P ((SCM pid, SCM sig));
|
||||||
extern SCM scm_waitpid SCM_P ((SCM pid, SCM options));
|
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_getppid SCM_P ((void));
|
||||||
extern SCM scm_getuid SCM_P ((void));
|
extern SCM scm_getuid SCM_P ((void));
|
||||||
extern SCM scm_getgid SCM_P ((void));
|
extern SCM scm_getgid SCM_P ((void));
|
||||||
|
|
|
@ -82,16 +82,8 @@
|
||||||
#undef READER_EXTENSIONS
|
#undef READER_EXTENSIONS
|
||||||
|
|
||||||
/* Define this if your system has a way to set a stdio stream's file
|
/* 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
|
descriptor. */
|
||||||
macro SET_FILE_FD_FIELD an appropriate definition. See
|
#undef FD_SETTER
|
||||||
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
|
|
||||||
|
|
||||||
/* Set this to the name of a field in FILE which contains the number
|
/* Set this to the name of a field in FILE which contains the number
|
||||||
of buffered characters waiting to be read. */
|
of buffered characters waiting to be read. */
|
||||||
|
|
|
@ -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);
|
SCM_ASSERT (SCM_INUMP (sub_start), sub_start, pos3, why);
|
||||||
lower = SCM_INUM (sub_start);
|
lower = SCM_INUM (sub_start);
|
||||||
if (lower < 0
|
if (lower < 0
|
||||||
|| lower >= SCM_ROLENGTH (*str))
|
|| lower > SCM_ROLENGTH (*str))
|
||||||
scm_out_of_range (why, sub_start);
|
scm_out_of_range (why, sub_start);
|
||||||
|
|
||||||
if (sub_end == SCM_BOOL_F)
|
if (sub_end == SCM_BOOL_F)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue