mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-07 18:30:25 +02:00
* README: using Automake 1.2d
* configure.in: AC_CHECK_FUNCS: add "system". * simpos.c (scm_system): always define: use sysmissing if not available. Check for HAVE_SYSTEM instead of _Windows (does Windows lack system or does it have an unusable one?). Check for error conditions -1 and 127. Use SCM_DEFER_INTS. Let the argument be optional: if not supplied, call system(NULL). * ports.c (scm_close_port): relax the type check from OPPORTP to PORTP; closing a closed port is allowed.
This commit is contained in:
parent
8122b543c1
commit
341eaef04b
16 changed files with 468 additions and 378 deletions
|
@ -1,3 +1,14 @@
|
|||
Sun Dec 7 01:43:56 1997 Gary Houston <ghouston@actrix.gen.nz>
|
||||
|
||||
* simpos.c (scm_system): always define: use sysmissing if not
|
||||
available. Check for HAVE_SYSTEM instead of _Windows (does
|
||||
Windows lack system or does it have an unusable one?).
|
||||
Check for error conditions -1 and 127. Use SCM_DEFER_INTS.
|
||||
Let the argument be optional: if not supplied, call system(NULL).
|
||||
|
||||
* ports.c (scm_close_port): relax the type check from OPPORTP to
|
||||
PORTP; closing a closed port is allowed.
|
||||
|
||||
1997-12-04 Tim Pierce <twp@ppp39.Nantucket.net>
|
||||
|
||||
* fports.c (scm_fgets): Return if the last char in a chunk is
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Makefile.in generated automatically by automake 1.2c from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.2d from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
|
@ -49,12 +49,12 @@ INSTALL_DATA = @INSTALL_DATA@
|
|||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = true
|
||||
PRE_INSTALL = true
|
||||
POST_INSTALL = true
|
||||
NORMAL_UNINSTALL = true
|
||||
PRE_UNINSTALL = true
|
||||
POST_UNINSTALL = true
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AWK = @AWK@
|
||||
|
@ -245,7 +245,7 @@ OBJECTS = $(libguile_la_OBJECTS) $(guile_OBJECTS) $(gh_test_c_OBJECTS) $(gh_test
|
|||
default: all
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .x
|
||||
.SUFFIXES: .S .c .lo .o .s .x
|
||||
$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --foreign libguile/Makefile
|
||||
|
||||
|
@ -291,8 +291,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
|||
$(mkinstalldirs) $(libdir)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo "$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(libdir)/$$p"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(libdir)/$$p; \
|
||||
echo "$(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(libdir)/$$p"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL_DATA) $$p $(libdir)/$$p; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
|
@ -305,6 +305,12 @@ uninstall-libLTLIBRARIES:
|
|||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core
|
||||
|
||||
|
@ -318,11 +324,17 @@ maintainer-clean-compile:
|
|||
.c.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
.s.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
.S.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
|
||||
|
@ -459,14 +471,15 @@ uninstall-pkgincludeHEADERS:
|
|||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES)
|
||||
here=`pwd` && cd $(srcdir) && mkid -f$$here/ID $(SOURCES) $(HEADERS)
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) scmconfig.h.in $(TAGS_DEPENDENCIES)
|
||||
TAGS: $(HEADERS) $(SOURCES) scmconfig.h.in $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
test -z "$(ETAGS_ARGS)scmconfig.h.in$(SOURCES)$(HEADERS)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags scmconfig.h.in $(SOURCES) $(HEADERS) -o $$here/TAGS)
|
||||
test -z "$(ETAGS_ARGS)scmconfig.h.in$(SOURCES)$(HEADERS)$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags scmconfig.h.in $(SOURCES) $(HEADERS) $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
|
|
|
@ -418,7 +418,7 @@ scm_close_port (port)
|
|||
|
||||
port = SCM_COERCE_OUTPORT (port);
|
||||
|
||||
SCM_ASSERT (SCM_NIMP (port) && SCM_OPPORTP (port), port, SCM_ARG1,
|
||||
SCM_ASSERT (SCM_NIMP (port) && SCM_PORTP (port), port, SCM_ARG1,
|
||||
s_close_port);
|
||||
if (SCM_CLOSEDP (port))
|
||||
return SCM_BOOL_F;
|
||||
|
|
|
@ -314,6 +314,9 @@
|
|||
/* Define if you have the sync function. */
|
||||
#undef HAVE_SYNC
|
||||
|
||||
/* Define if you have the system function. */
|
||||
#undef HAVE_SYSTEM
|
||||
|
||||
/* Define if you have the tcgetpgrp function. */
|
||||
#undef HAVE_TCGETPGRP
|
||||
|
||||
|
|
|
@ -57,24 +57,38 @@
|
|||
extern int system();
|
||||
|
||||
|
||||
#ifndef _Windows
|
||||
SCM_PROC(s_system, "system", 1, 0, 0, scm_system);
|
||||
SCM_PROC(s_system, "system", 0, 1, 0, scm_system);
|
||||
|
||||
SCM
|
||||
scm_system(cmd)
|
||||
SCM cmd;
|
||||
{
|
||||
int rv;
|
||||
|
||||
if (SCM_UNBNDP (cmd))
|
||||
{
|
||||
#ifdef HAVE_SYSTEM
|
||||
rv = system (NULL);
|
||||
#else
|
||||
rv = 0;
|
||||
#endif
|
||||
return rv ? SCM_BOOL_T : SCM_BOOL_F;
|
||||
}
|
||||
SCM_ASSERT(SCM_NIMP(cmd) && SCM_ROSTRINGP(cmd), cmd, SCM_ARG1, s_system);
|
||||
#ifdef HAVE_SYSTEM
|
||||
SCM_DEFER_INTS;
|
||||
errno = 0;
|
||||
if (SCM_ROSTRINGP (cmd))
|
||||
cmd = scm_makfromstr (SCM_ROCHARS (cmd), SCM_ROLENGTH (cmd), 0);
|
||||
# ifdef AZTEC_C
|
||||
cmd = SCM_MAKINUM(Execute(SCM_ROCHARS(cmd), 0, 0));
|
||||
# else
|
||||
cmd = SCM_MAKINUM(0L+system(SCM_ROCHARS(cmd)));
|
||||
# endif
|
||||
return cmd;
|
||||
}
|
||||
rv = system(SCM_ROCHARS(cmd));
|
||||
if (rv == -1 || (rv == 127 && errno != 0))
|
||||
scm_syserror (s_system);
|
||||
SCM_ALLOW_INTS;
|
||||
return SCM_MAKINUM (rv);
|
||||
#else
|
||||
scm_sysmissing (s_system);
|
||||
#endif
|
||||
}
|
||||
|
||||
extern char *getenv();
|
||||
SCM_PROC (s_getenv, "getenv", 1, 0, 0, scm_getenv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue