From 08b8c6948da44bb5cdcc6077ae207dd19319672e Mon Sep 17 00:00:00 2001 From: Gary Houston Date: Sat, 18 Sep 1999 17:13:38 +0000 Subject: [PATCH] 1999-09-18 Gary Houston * configure.in: use AC_SYS_RESTARTABLE_SYSCALLS instead of testing for SA_RESTART. 1999-09-18 Gary Houston * _scm.h, scmsigs.c: replace HAVE_RESTARTS with HAVE_RESTARTABLE_SYSCALLS. --- ChangeLog | 5 ++ Makefile.in | 48 ++++++++--- configure | 175 +++++++++++++++++++++------------------- configure.in | 13 +-- libguile/ChangeLog | 3 + libguile/_scm.h | 2 +- libguile/scmconfig.h.in | 7 +- libguile/scmsigs.c | 2 +- 8 files changed, 148 insertions(+), 107 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2d651d33f..5a3fbbdb5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-09-18 Gary Houston + + * configure.in: use AC_SYS_RESTARTABLE_SYSCALLS instead of + testing for SA_RESTART. + 1999-09-12 Mikael Djurfeldt * configure.in: Removed ice-9/version.scm from AC_OUTPUT. diff --git a/Makefile.in b/Makefile.in index e07c5057d..e2e8fa0be 100644 --- a/Makefile.in +++ b/Makefile.in @@ -104,9 +104,10 @@ CONFIG_CLEAN_FILES = DATA = $(aclocal_DATA) DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ -Makefile.in NEWS THANKS TODO acinclude.m4 aclocal.m4 config.guess \ -config.sub configure configure.in install-sh ltconfig ltmain.sh \ -mdate-sh missing mkinstalldirs +Makefile.in NEWS THANKS TODO acconfig.h acinclude.m4 aclocal.m4 \ +config.guess config.sub configure configure.in install-sh \ +libguile/scmconfig.h.in libguile/stamp-h.in ltconfig ltmain.sh mdate-sh \ +missing mkinstalldirs DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) @@ -130,6 +131,34 @@ config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) +libguile/scmconfig.h: libguile/stamp-h + @if test ! -f $@; then \ + rm -f libguile/stamp-h; \ + $(MAKE) libguile/stamp-h; \ + else :; fi +libguile/stamp-h: $(srcdir)/libguile/scmconfig.h.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES= CONFIG_HEADERS=libguile/scmconfig.h \ + $(SHELL) ./config.status + @echo timestamp > libguile/stamp-h 2> /dev/null +$(srcdir)/libguile/scmconfig.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/libguile/stamp-h.in + @if test ! -f $@; then \ + rm -f $(srcdir)/libguile/stamp-h.in; \ + $(MAKE) $(srcdir)/libguile/stamp-h.in; \ + else :; fi +$(srcdir)/libguile/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h + cd $(top_srcdir) && $(AUTOHEADER) + @echo timestamp > $(srcdir)/libguile/stamp-h.in 2> /dev/null + +mostlyclean-hdr: + +clean-hdr: + +distclean-hdr: + -rm -f libguile/scmconfig.h + +maintainer-clean-hdr: + install-aclocalDATA: $(aclocal_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(aclocaldir) @@ -338,29 +367,30 @@ distclean-generic: -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: -mostlyclean-am: mostlyclean-tags mostlyclean-generic +mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic mostlyclean: mostlyclean-recursive -clean-am: clean-tags clean-generic mostlyclean-am +clean-am: clean-hdr clean-tags clean-generic mostlyclean-am clean: clean-recursive -distclean-am: distclean-tags distclean-generic clean-am +distclean-am: distclean-hdr distclean-tags distclean-generic clean-am -rm -f libtool distclean: distclean-recursive -rm -f config.status -maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \ - distclean-am +maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \ + maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-recursive -rm -f config.status -.PHONY: uninstall-aclocalDATA install-aclocalDATA install-data-recursive \ +.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ +uninstall-aclocalDATA install-aclocalDATA install-data-recursive \ uninstall-data-recursive install-exec-recursive \ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ all-recursive check-recursive installcheck-recursive info-recursive \ diff --git a/configure b/configure index 082c5d506..d24d2f76b 100755 --- a/configure +++ b/configure @@ -3630,51 +3630,64 @@ done echo $ac_n "checking for restartable system calls""... $ac_c" 1>&6 echo "configure:3633: checking for restartable system calls" >&5 -if eval "test \"`echo '$''{'scm_cv_restarts'+set}'`\" = set"; then +if eval "test \"`echo '$''{'ac_cv_sys_restartable_syscalls'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test $ac_cv_func_sigaction = yes; then - cat > conftest.$ac_ext <&2; exit 1; } +else + cat > conftest.$ac_ext < #include -int main() { -int a = SA_RESTART -; return 0; } +ucatch (isig) { } +main () { + int i = fork (), status; + if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); } + signal (SIGINT, ucatch); + status = wait(&i); + if (status == -1) wait(&i); + exit (status == -1); +} + EOF -if { (eval echo configure:3646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - scm_cv_restarts=yes +if { (eval echo configure:3659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_sys_restartable_syscalls=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - scm_cv_restarts=no + rm -fr conftest* + ac_cv_sys_restartable_syscalls=no fi -rm -f conftest* - else - scm_cv_restarts=no - fi +rm -fr conftest* fi -echo "$ac_t""$scm_cv_restarts" 1>&6 -if test $scm_cv_restarts = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_RESTARTS 1 +fi + +echo "$ac_t""$ac_cv_sys_restartable_syscalls" 1>&6 +if test $ac_cv_sys_restartable_syscalls = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_RESTARTABLE_SYSCALLS 1 EOF fi + if test "$ac_cv_header_regex_h" = yes || test "$ac_cv_header_rxposix_h" = yes || test "$ac_cv_header_rx_rxposix_h" = yes; then echo $ac_n "checking for regcomp""... $ac_c" 1>&6 -echo "configure:3673: checking for regcomp" >&5 +echo "configure:3686: checking for regcomp" >&5 if eval "test \"`echo '$''{'ac_cv_func_regcomp_norx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_regcomp_norx=yes" else @@ -3715,7 +3728,7 @@ if eval "test \"`echo '$ac_cv_func_'regcomp'_'norx`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lrx""... $ac_c" 1>&6 -echo "configure:3719: checking for main in -lrx" >&5 +echo "configure:3732: checking for main in -lrx" >&5 ac_lib_var=`echo rx'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3723,14 +3736,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lrx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3758,12 +3771,12 @@ else fi echo $ac_n "checking for regcomp""... $ac_c" 1>&6 -echo "configure:3762: checking for regcomp" >&5 +echo "configure:3775: checking for regcomp" >&5 if eval "test \"`echo '$''{'ac_cv_func_regcomp_rx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_regcomp_rx=yes" else @@ -3820,12 +3833,12 @@ fi for ac_func in inet_aton putenv strerror memmove do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3824: checking for $ac_func" >&5 +echo "configure:3837: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3881,19 +3894,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:3885: checking for working alloca.h" >&5 +echo "configure:3898: 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 < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -3914,12 +3927,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3918: checking for alloca" >&5 +echo "configure:3931: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -3979,12 +3992,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:3983: checking whether alloca needs Cray hooks" >&5 +echo "configure:3996: 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 <&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:4013: checking for $ac_func" >&5 +echo "configure:4026: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4064,7 +4077,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:4068: checking stack direction for C alloca" >&5 +echo "configure:4081: 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 @@ -4072,7 +4085,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -4115,12 +4128,12 @@ fi if test "$ALLOCA" = "alloca.o"; then LIBOBJS="alloca.o $LIBOBJS"; fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:4119: checking for st_rdev in struct stat" >&5 +echo "configure:4132: 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 < #include @@ -4128,7 +4141,7 @@ int main() { struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -4149,12 +4162,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:4153: checking for st_blksize in struct stat" >&5 +echo "configure:4166: 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 < #include @@ -4162,7 +4175,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:4166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -4186,12 +4199,12 @@ fi # We could use AC_STRUCT_ST_BLOCKS here, but that adds fileblocks.o to # LIBOBJS, which we don't need. This seems more direct. echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:4190: checking for st_blocks in struct stat" >&5 +echo "configure:4203: 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 < #include @@ -4199,7 +4212,7 @@ int main() { struct stat s; s.st_blocks; ; return 0; } EOF -if { (eval echo configure:4203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blocks=yes else @@ -4220,12 +4233,12 @@ EOF fi echo $ac_n "checking for S_ISLNK in sys/stat.h""... $ac_c" 1>&6 -echo "configure:4224: checking for S_ISLNK in sys/stat.h" >&5 +echo "configure:4237: checking for S_ISLNK in sys/stat.h" >&5 if eval "test \"`echo '$''{'ac_cv_macro_S_ISLNK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifndef S_ISLNK @@ -4233,7 +4246,7 @@ else #endif EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4257,12 +4270,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:4261: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:4274: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4270,7 +4283,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:4274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -4291,12 +4304,12 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:4295: checking for tm_zone in struct tm" >&5 +echo "configure:4308: checking for tm_zone in struct tm" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> @@ -4304,7 +4317,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:4308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -4324,12 +4337,12 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:4328: checking for tzname" >&5 +echo "configure:4341: checking for tzname" >&5 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ @@ -4339,7 +4352,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:4343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -4362,12 +4375,12 @@ fi echo $ac_n "checking whether we need POSIX to get struct utimbuf""... $ac_c" 1>&6 -echo "configure:4366: checking whether we need POSIX to get struct utimbuf" >&5 +echo "configure:4379: 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 <&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4412,13 +4425,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 <= ((unsigned long)&x)); } main () { int q; aux((unsigned long)&q); } EOF -if { (eval echo configure:4422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cat >> confdefs.h <<\EOF #define SCM_STACK_GROWS_UP 1 @@ -4433,7 +4446,7 @@ fi echo $ac_n "checking whether floats fit in longs""... $ac_c" 1>&6 -echo "configure:4437: checking whether floats fit in longs" >&5 +echo "configure:4450: checking whether floats fit in longs" >&5 if eval "test \"`echo '$''{'guile_cv_type_float_fits_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4441,11 +4454,11 @@ else guile_cv_type_float_fits_long=guess-yes else cat > conftest.$ac_ext < sizeof(long)); } EOF -if { (eval echo configure:4449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then guile_cv_type_float_fits_long=yes else @@ -4479,12 +4492,12 @@ esac echo $ac_n "checking for struct linger""... $ac_c" 1>&6 -echo "configure:4483: checking for struct linger" >&5 +echo "configure:4496: 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 < @@ -4493,7 +4506,7 @@ int main() { struct linger lgr; lgr.l_linger = 100 ; return 0; } EOF -if { (eval echo configure:4497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* scm_cv_struct_linger="yes" else @@ -4553,7 +4566,7 @@ fi ### Turn $with_threads into either the name of a threads package, like ### `qt', or `no', meaning that threads should not be supported. echo $ac_n "checking whether to support threads""... $ac_c" 1>&6 -echo "configure:4557: checking whether to support threads" >&5 +echo "configure:4570: checking whether to support threads" >&5 case "$with_threads" in "yes" | "qt" | "coop" | "") with_threads=qt @@ -4577,7 +4590,7 @@ case "${with_threads}" in echo $ac_n "checking QuickThreads configuration""... $ac_c" 1>&6 -echo "configure:4581: checking QuickThreads configuration" >&5 +echo "configure:4594: checking QuickThreads configuration" >&5 # How can we refer to the qt source directory from within the qt build # directory? For headers, we can rely on the fact that the qt src # directory appears in the #include path. @@ -4722,7 +4735,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:4726: checking for $ac_word" >&5 +echo "configure:4739: 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 diff --git a/configure.in b/configure.in index 2c372f78b..28fedfd5a 100644 --- a/configure.in +++ b/configure.in @@ -208,18 +208,7 @@ AC_CHECK_FUNCS(sethostent gethostent endhostent dnl dnl -AC_CACHE_CHECK([for restartable system calls], scm_cv_restarts, - if test $ac_cv_func_sigaction = yes; then - [AC_TRY_COMPILE([#include ], - [int a = SA_RESTART], - scm_cv_restarts=yes, - scm_cv_restarts=no)] - else - scm_cv_restarts=no - fi) -if test $scm_cv_restarts = yes; then - AC_DEFINE(HAVE_RESTARTS) -fi +AC_SYS_RESTARTABLE_SYSCALLS if test "$ac_cv_header_regex_h" = yes || test "$ac_cv_header_rxposix_h" = yes || diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 7cd349f22..1f1fdf319 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,5 +1,8 @@ 1999-09-18 Gary Houston + * _scm.h, scmsigs.c: replace HAVE_RESTARTS with + HAVE_RESTARTABLE_SYSCALLS. + * strports.c (scm_strport_to_string): create the string from pt->read_buf instead of an expression that evaluates to the same thing. diff --git a/libguile/_scm.h b/libguile/_scm.h index d8662881d..7bc1ce1e5 100644 --- a/libguile/_scm.h +++ b/libguile/_scm.h @@ -83,7 +83,7 @@ when installing signal handlers. */ -#ifdef HAVE_RESTARTS +#ifdef HAVE_RESTARTABLE_SYSCALLS #define SCM_SYSCALL(line) line #endif diff --git a/libguile/scmconfig.h.in b/libguile/scmconfig.h.in index 0f330e713..e938d1326 100644 --- a/libguile/scmconfig.h.in +++ b/libguile/scmconfig.h.in @@ -30,6 +30,10 @@ /* Define if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H +/* Define if system calls automatically restart after interruption + by a signal. */ +#undef HAVE_RESTARTABLE_SYSCALLS + /* Define if your struct stat has st_blksize. */ #undef HAVE_ST_BLKSIZE @@ -140,9 +144,6 @@ /* Define if dlsym automatically supplies a leading underscore. */ #undef DLSYM_ADDS_USCORE -/* Define if the operating system can restart system calls. */ -#undef HAVE_RESTARTS - /* Define if the system supports Unix-domain (file-domain) sockets. */ #undef HAVE_UNIX_DOMAIN_SOCKETS diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c index f8daff4ef..ede2df30e 100644 --- a/libguile/scmsigs.c +++ b/libguile/scmsigs.c @@ -441,7 +441,7 @@ scm_init_scmsigs () orig_handlers[i] = SIG_ERR; #endif -#ifdef HAVE_RESTARTS +#ifdef HAVE_RESTARTABLE_SYSCALLS /* ensure that system calls will be restarted for all signals. */ /* sigintterupt would be simpler, but it seems better to avoid dependency on another system call. */