1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

24 commits

Author SHA1 Message Date
Marius Vollmer
f360a962d4 * posix.h (scm_setgroups): New prototype.
* posix.c (scm_setgroups): New.  Thanks to Paul Jarc!
(scm_getgroups): Handle groups ids that don't fit into a fixnum.
Don't use SCM_WRITABLE_VELTS.
2003-07-27 16:20:21 +00:00
Rob Browning
4adf1363a7 * posix.h: change occurences of "id" to something else so we don't
cause trouble when included via objective-c (can't hurt, might
help).  Still have usage in debug.h, though.
2003-04-07 01:50:16 +00:00
Marius Vollmer
73be1d9e8e Changed license terms to the plain LGPL thru-out. 2003-04-05 19:15:35 +00:00
Marius Vollmer
33b001fd89 Prefixed each each exported symbol with SCM_API. 2001-11-02 00:19:12 +00:00
Dirk Herrmann
b29058ffee * Remove deprecated macros and typenames.
* Rename header macros to SCM_<filename>_H.
* Prefer !SCM_<foo> over SCM_N<foo>.
2001-08-31 11:17:06 +00:00
Gary Houston
6d163216bd * posix.c (scm_tmpnam): check that return value from tmpnam is not
NULL.  rewrote the docstring.
	(scm_mkstemp): new procedure implementing "mkstemp!".
	* posix.h: declare scm_mkstemp.

	* net_db.c: declare h_errno if configure didn't define HAVE_H_ERRNO.
	normally it would be found in netdb.h.
2001-03-18 20:29:58 +00:00
Martin Grabmüller
94e6d79391 Added some new posix functions:
(scm_crypt, scm_chroot, scm_getlogin, scm_cuserid),
	(scm_getpriority, scm_setpriority, scm_getpass, scm_flock),
	(scm_sethostname, scm_gethostname): New procedures.
2001-03-09 10:03:47 +00:00
Mikael Djurfeldt
f2c9fcb07e Updated copyrights 2000-06-12 12:28:24 +00:00
Michael Livshin
89e00824a0 * *.[hc]: add Emacs magic at the end of file, to ensure GNU
indentation style.
2000-03-19 19:01:16 +00:00
Greg J. Badros
7866a09b5b * list.c: Moved append docs to append! Thanks Dirk Hermann. Also,
added append docs from R4RS.

* strings.c: Docstring typo fix, + eliminate unneeded IMP tests.
Thanks Dirk Hermann!

* chars.h: Provide SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR and
deprecate SCM_ICHRP, SCM_ICHR, SCM_MAKICHR.  Thanks Dirk Hermann!

* *.h, *.c: Use SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR throughout.
Drop use of SCM_P for function prototypes... assume an ANSI C
compiler.  Thanks Dirk Hermann!
2000-03-02 20:54:43 +00:00
Jim Blandy
7dc6e7547a * __scm.h, alist.c, async.c, async.h, backtrace.h, chars.c,
continuations.c, debug.c, debug.h, dynl-dl.c, dynl.c, dynl.h,
dynwind.c, dynwind.h, eq.c, error.c, error.h, eval.c, eval.h,
feature.c, filesys.c, filesys.h, fports.c, fports.h, gc.c, gc.h,
genio.c, genio.h, gh.h, gh_data.c, gsubr.c, gsubr.h, hash.c,
hashtab.c, init.c, init.h, ioext.c, ioext.h, kw.c, libguile.h,
list.c, list.h, load.c, load.h, mallocs.c, markers.c,
mit-pthreads.c, net_db.c, numbers.c, numbers.h, options.c,
ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
procprop.h, procs.c, procs.h, ramap.c, ramap.h, regex-posix.c,
regex-posix.h, root.c, root.h, scmsigs.c, scmsigs.h, script.c,
script.h, simpos.c, simpos.h, smob.c, smob.h, snarf.h, socket.c,
srcprop.c, stackchk.c, stackchk.h, stacks.c, stime.c, stime.h,
strings.c, strings.h, strports.c, struct.c, struct.h, symbols.c,
symbols.h, tags.h, threads.c, throw.h, unif.c, variable.c,
vectors.c, vectors.h, version.h, vports.c, weaks.c: Update
copyright years.
1998-10-19 21:36:50 +00:00
Jim Blandy
522158de92 * posix.h (scm_tmpnam): Added prototype. 1998-09-06 18:57:07 +00:00
Gary Houston
6afcd3b2b6 * stime.h: prototype for scm_times.
* stime.c (scm_times): new procedure.
* ioext.c (scm_fseek): if the first argument is a file descriptor
call lseek.
(scm_ftell): if the first argument is a file descriptor call lseek
(sic).
* filesys.h: prototypes for scm_open_fdes, scm_fsync.
* filesys.c (scm_chmod): if the first argument is a file descriptor,
call fchmod.
(scm_chown): if the first argument is a port or file descriptor,
call fchown.
(scm_truncate_file): new procedure.
Add DEFER/ALLOW INTS to a few other procedures.
(scm_fsync): new procedure.
(scm_open_fdes): new procedure.
(scm_open): use scm_open_fdes.  If mode isn't specified, 666 will
now be used.
(scm_fcntl): the first argument can now be a file descriptor.  The
third argument is now optional.

* posix.c (scm_execl, scm_execlp): make the filename argument
compulsory, since omitting it causes SEGV.
(scm_sync): return unspecified instead of #f.
(scm_execle): new procedure.
(environ_list_to_c): new procedure.
(scm_environ): use environ_list_to_c.  disable interrupts.
(scm_convert_exec_args): take pos and subr arguments and
improve error checking.

* boot-9.scm: define tms accessors: clock, utime, stime, cutime,
cstime.
1997-08-16 18:48:44 +00:00
Jim Blandy
82892beda5 * Lots of files: New address for FSF. 1997-05-26 22:34:48 +00:00
Gary Houston
b9525b92bb * stime.c (scm_mktime): take an optional zone argument.
(scm_localtime): check putenv return value.
	(scm_strftime, scm_strptime): moved from posix.c.  move #include
	sequences.h too.
	stime.h, posix.h: update prototypes.
	(bdtime2c, setzone, restorezone): new static procedures.
	(scm_mktime, scm_strftime): use them.
	(scm_strftime): don't call mktime before strftime.  Use
	filltime for return value.
	(filltime): convert NULL zname to #f.
*	(scm_strptime): return a count of characters consumed, not
	the remaining string.

	* stime.c (scm_localtime): check HAVE_TM_ZONE and HAVE_TZNAME.
	(scm_mktime): likewise.
	Declare *tzname[].
	Uncomment localtime and mktime.

	* configure.in: add AC_STRUCT_TIMEZONE.
1997-04-12 20:18:12 +00:00
Gary Houston
19468effd0 * posix.c (scm_putenv): don't check HAVE_PUTENV.
* Makefile.am (EXTRA_libguile_la_SOURCES): add putenv.c.
* configure.in: move putenv from AC_CHECK_FUNCS to AC_REPLACE_FUNCS.
* putenv.c: new file, from sh-utils 1.12.

* posix.c (scm_environ): use malloc in place of scm_must_malloc
since allocation isn't for Scheme objects.
(scm_putenv): copy strings before placing in the environment.

* stime.c (scm_current_time): throw an error if time returns -1,
instead of returning #f.
(scm_get_internal_real_time, scm_get_internal_real_time): use
scm_long2num for return value instead of SCM_MAKINUM.

* stime.h: prototypes updated.

* stime.c (scm_time_in_msec): apparently unused, deleted.

	* configure.in: check for gettimeofday.

	* stime.c (scm_time_plus_ticks): new procedure, an scsh interface
	which may be more usefully portable than a gettimeofday interface.

	* stime.c (filltime): recovered static procedure.
	(scm_localtime, scm_gmtime, scm_mktime, scm_tzset): recovered from
	an earlier Guile.

	* posix.h: add prototype for scm_close_pipe, remove prototypes for
	scm_open_input_pipe, scm_open_output_pipe, change scm_mknod prototype.

*	* posix.c (scm_mknod): split the mode argument into type and perms
	arguments, like the extra fields returned by stat.

	* fports.c (scm_pipob): set the close, free and print procedures.
	(scm_close_pipe): new procedure.

	* posix.c (scm_open_input_pipe, scm_open_output_pipe): deleted,
	define them in boot-9.scm
1997-04-05 21:50:31 +00:00
Gary Houston
67ec36676e * 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.
1997-03-29 18:42:43 +00:00
Gary Houston
1146b6cda2 * ports.c: add SCM_PROC declarations for pt-size and pt-member.
* Makefile.am: remove AWK=@AWK@.
	Add a rule for generating errnos.list.
	(CLEANFILES): put errnos.list here instead of in DISTCLEANFILES.

	* configure.in: add AC_SUBST(AWK) and AC_SUBST(ERRNO_EXTRACT).
	don't extract errnos, just set a variable (avoids the
	need to recompile error.c just because configure is run.)

	* unif.h: update prototypes.
	* unif.c (scm_uniform_array_read,write): change the offset and
	length arguments to start and end, for consistency.

	* __scm.h: uncomment SCM_ARG6 and SCM_ARG7, I needed SCM_ARG6.

	* ioext.h: update prototypes.
*	* ioext.c (scm_read_delimited_x): replaces scm_read_line and
	scm_read_line_x, it's a more general procedure using an
	interface from scsh.  read-line and read-line! are now defined
	in boot-9.scm.
*  	Note that the new read-line trims the terminator
	by default, previously it was appended to the returned string.  An
	optional argument specifies how to process the terminator (scsh
	compatible).  For the old behaviour: (read-line port 'concat).
	scm_read_line, scm_read_line_x: deleted.  (read-line port 'split)
	returns a pair, but is converted to multiple values if the scsh
	module is loaded.

	socket.h: update prototypes.
	* socket.c (scm_recvfrom): for consistency with other procedures,
	take start and end as separate optional arguments.
*	(scm_recv, scm_recvfrom): don't allow the second argument
	to be a size, only a buffer.  Change the scheme names to
	recv! and recvfrom!.  Don't return the buffer.

	* ioext.h, posix.h: move prototypes too.
	* ioext.c, posix.c (scm_read_line, scm_read_line_x, scm_write_line:
	moved back from posix.c to ioext.c.  Also move #includes of "genio.h"
	"read.h" and "unif.h".
	* ioext.c: include "chars.h"
1997-01-25 18:23:49 +00:00
Gary Houston
f93ddd3985 * configure.in: add tests for figuring out whether buffered data
is available in a FILE structure, which is needed by char-ready.

* acconfig.h: define FILE_CNT_FIELD, FILE_CNT_GPTR and
FILE_CNT_READPTR.

* simpos.c (scm_getenv): renamed from scm_sys_getenv.  Throw
exceptions using misc_error instead of syserror.  It seems a bit
odd to throw an exception if a string can't be found in the
environment, but it's consistent with open-file, stat etc.
(simpos.h): remove sys_ from getenv.

* posix.c (scm_putenv): renamed from scm_sys_putenv.  If an error
occurs, throw an error instead of returning errno.  Return value
is now unspecified.
(numerous in posix.c and posix.h): removed superfluous sys_ from names.
1996-10-28 09:44:07 +00:00
Jim Blandy
1cc91f1b29 * __scm.h, alist.c, alist.h, append.c, append.h, appinit.c,
arbiters.c, arbiters.h, async.c, async.h, boolean.c, boolean.h,
chars.c, chars.h, continuations.c, continuations.h, debug.c,
debug.h, dynwind.c, dynwind.h, eq.c, eq.h, error.c, eval.c,
eval.h, extchrs.c, extchrs.h, fdsocket.c, fdsocket.h, filesys.c,
filesys.h, fports.c, fports.h, gc.c, gdb_interface.h, gdbint.c,
gdbint.h, genio.c, genio.h, gscm.c, gscm.h, gsubr.c, gsubr.h,
hash.c, hash.h, hashtab.c, hashtab.h, init.c, ioext.c, ioext.h,
kw.c, kw.h, libguile.h, mallocs.c, mallocs.h, markers.c,
markers.h, mbstrings.c, mbstrings.h, numbers.c, numbers.h,
objprop.c, objprop.h, options.c, options.h, pairs.c, pairs.h,
ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c,
procprop.h, procs.c, procs.h, ramap.c, ramap.h, read.c, read.h,
root.c, scmsigs.c, scmsigs.h, sequences.c, sequences.h, simpos.c,
simpos.h, smob.c, socket.c, socket.h, srcprop.c, srcprop.h,
stackchk.c, stackchk.h, stime.c, stime.h, strings.c, strings.h,
strop.c, strop.h, strorder.c, strorder.h, strports.c, strports.h,
struct.c, struct.h, symbols.c, symbols.h, tag.c, tag.h, unif.c,
unif.h, variable.c, variable.h, vectors.c, vectors.h, version.c,
version.h, vports.c, vports.h, weaks.c, weaks.h: Use SCM_P to
declare functions with prototypes.  (Patch thanks to Marius
Vollmer.)
1996-10-14 01:33:50 +00:00
Jim Blandy
5e840c2e1a * numbers.h: Repeated declarations removed.
* ports.h (scm_close_all_ports_except): Declaration for the
function defined in ports.c added.

* posix.h: Missing declarations added.

* procs.h (scm_make_subr_opt): Missing declaration added.

* socket.h (scm_sys_gethost): Missing declaration added.

* socket.h: Redundant declarations removed (they are in fdsocket.h).

* srcprop.h (scm_set_source_property_x, scm_finish_srcprop):
Missing declarations added.

* stime.h (scm_get_internal_real_time): Repeated declarations removed.

* struct.c: Uninitialized variable `SCM answer' may be used.

* unif.c (l2ra): Declaration prototype.

* unif.c (scm_array_equal_p): Dummy definition removed (it is
defined in ramap.c).

* unif.h (scm_raprin1, scm_istr2bve, scm_array_equal_p):
Redundant declarations removed (they are in ramap.h).

* variable.h (scm_make_udvariable,
scm_make_undefined_variable): Declaration corrected to
correspond variable.c.

* vectors.h (scm_vector_move_left_x, scm_vector_move_right_x):
Missing declarations added.
1996-09-11 20:29:44 +00:00
Jim Blandy
b4309c3c5a * alist.h, append.h, arbiters.h, async.h, boolean.h, chars.h,
continuations.h, debug.h, dynwind.h, error.h, eval.h, fdsocket.h,
feature.h, filesys.h, fports.h, gc.h, gdbint.h, genio.h, gsubr.h,
hash.h, init.h, ioext.h, kw.h, list.h, markers.h, marksweep.h,
mbstrings.h, numbers.h, objprop.h, options.h, pairs.h, ports.h,
posix.h, print.h, procprop.h, procs.h, ramap.h, read.h, root.h,
sequences.h, smob.h, socket.h, srcprop.h, stackchk.h, stime.h,
strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
tag.h, throw.h, unif.h, variable.h, vectors.h, version.h,
vports.h, weaks.h: #include "libguile/__scm.h", not
<libguile/__scm.h>.  This allows 'gcc -MM' to determine which
dependencies are within libguile properly.
1996-09-05 21:19:08 +00:00
Jim Blandy
cd4f61de2f Don't install the unwashed masses of Guile header files in the
main #include path; put most of them in a subdirectory called
'libguile'.  This avoids naming conflicts between Guile header
files and system header files (of which there were a few).
* Makefile.in (pkgincludedir): Deleted.
(innerincludedir): New variable; this and $(includedir) are enough.
(INCLUDE_CFLAGS): Search for headers in "-I$(srcdir)/..".
(installed_h_files): Divide this up.  Now this variable lists
those header files which should go into $(includedir) (i.e. appear
directly in the #include path), and ...
(inner_h_files): ... this new variable says which files appear in
a subdirectory, and are referred to as <libguile/mumble.h>.
(h_files): List them both.
(install): Create innerincludedir, not pkgincludedir.  Put
the installed_h_files and inner_h_files in their proper places.
(uninstall): Corresponding changes.
* alist.h, append.h, arbiters.h, async.h, boolean.h, chars.h,
continuations.h, debug.h, dynwind.h, error.h, eval.h, fdsocket.h,
feature.h, fports.h, gc.h, genio.h, gsubr.h, hash.h, init.h,
ioext.h, kw.h, libguile.h, list.h, markers.h, marksweep.h,
mbstrings.h, numbers.h, options.h, pairs.h, ports.h, posix.h,
print.h, procprop.h, procs.h, ramap.h, read.h, root.h,
sequences.h, smob.h, socket.h, srcprop.h, stackchk.h, stime.h,
strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
tag.h, throw.h, unif.h, variable.h, vectors.h, version.h,
vports.h, weaks.h: Find __scm.h in its new location.
* __scm.h: Find scmconfig.h and tags.h in their new locations
(they're both "inner" files).
1996-09-04 06:21:08 +00:00
Jim Blandy
0f2d19dd46 maintainer changed: was lord, now jimb; first import 1996-07-25 22:56:11 +00:00