summaryrefslogtreecommitdiff
path: root/libguile/posix.h
AgeCommit message (Collapse)AuthorFilesLines
2021-01-18Move declaration for scm_mkstemp to filesys.hMichael Gran1-2/+1
The underlying function was moved to filesys.c in 073167ef7b803067bcc8be19925fac1a48577bd8 but the declaration didn't follow * libguile/filesys.h: add declaration for scm_mkstemp * libguile/posix.h: remove declaration for scm_mkstemp
2018-06-20Update license notices in all C filesAndy Wingo1-17/+17
Update to newest recommended license notices from the FSF. Everything stays LGPLv3+ except guile-readline which is GPLv3+.
2018-06-20Remove (C) from copyright statementsAndy Wingo1-1/+1
As the FSF advises, 'There is no legal significance to using the three-character sequence “(C)”, but it does no harm.' It does take up space though! For that reason, we remove it here from our C files.
2018-06-20Rename __scm.h to scm.hAndy Wingo1-1/+0
* libguile/scm.h: Rename. Update all includers.
2018-06-20Remove Emacs local variables comments in Guile sourceAndy Wingo1-6/+0
The .dir-locals.el file in the repository is sufficient for Emacs users. * libguile/__scm.h: * libguile/alist.c: * libguile/alist.h: * libguile/array-handle.c: * libguile/array-handle.h: * libguile/array-map.c: * libguile/array-map.h: * libguile/arrays.c: * libguile/arrays.h: * libguile/async.c: * libguile/async.h: * libguile/backtrace.c: * libguile/backtrace.h: * libguile/bitvectors.c: * libguile/bitvectors.h: * libguile/boolean.c: * libguile/boolean.h: * libguile/chars.c: * libguile/chars.h: * libguile/chooks.c: * libguile/chooks.h: * libguile/continuations.c: * libguile/continuations.h: * libguile/control.c: * libguile/conv-integer.i.c: * libguile/debug-malloc.h: * libguile/debug.c: * libguile/debug.h: * libguile/deprecation.c: * libguile/deprecation.h: * libguile/dynl.c: * libguile/dynl.h: * libguile/dynstack.c: * libguile/dynstack.h: * libguile/dynwind.c: * libguile/dynwind.h: * libguile/eq.c: * libguile/eq.h: * libguile/error.c: * libguile/error.h: * libguile/eval.c: * libguile/eval.h: * libguile/evalext.c: * libguile/evalext.h: * libguile/expand.c: * libguile/expand.h: * libguile/extensions.c: * libguile/extensions.h: * libguile/feature.c: * libguile/feature.h: * libguile/filesys.c: * libguile/filesys.h: * libguile/fluids.c: * libguile/fluids.h: * libguile/foreign.c: * libguile/fports.c: * libguile/fports.h: * libguile/frames.c: * libguile/frames.h: * libguile/gc-inline.h: * libguile/gc.c: * libguile/gc.h: * libguile/generalized-arrays.c: * libguile/generalized-arrays.h: * libguile/generalized-vectors.c: * libguile/generalized-vectors.h: * libguile/gettext.c: * libguile/gettext.h: * libguile/goops.c: * libguile/goops.h: * libguile/gsubr.c: * libguile/gsubr.h: * libguile/guardians.c: * libguile/guardians.h: * libguile/guile.c: * libguile/hash.c: * libguile/hash.h: * libguile/hashtab.c: * libguile/hashtab.h: * libguile/hooks.c: * libguile/hooks.h: * libguile/i18n.c: * libguile/i18n.h: * libguile/init.c: * libguile/init.h: * libguile/instructions.c: * libguile/instructions.h: * libguile/intrinsics.c: * libguile/intrinsics.h: * libguile/ioext.c: * libguile/ioext.h: * libguile/iselect.h: * libguile/keywords.c: * libguile/keywords.h: * libguile/list.c: * libguile/list.h: * libguile/load.c: * libguile/load.h: * libguile/loader.c: * libguile/loader.h: * libguile/macros.c: * libguile/macros.h: * libguile/mallocs.c: * libguile/mallocs.h: * libguile/memmove.c: * libguile/memoize.c: * libguile/memoize.h: * libguile/modules.c: * libguile/modules.h: * libguile/net_db.c: * libguile/net_db.h: * libguile/null-threads.c: * libguile/null-threads.h: * libguile/numbers.c: * libguile/numbers.h: * libguile/objprop.c: * libguile/objprop.h: * libguile/options.c: * libguile/options.h: * libguile/pairs.c: * libguile/pairs.h: * libguile/poll.c: * libguile/poll.h: * libguile/ports.c: * libguile/ports.h: * libguile/posix.c: * libguile/posix.h: * libguile/print.c: * libguile/print.h: * libguile/procprop.c: * libguile/procprop.h: * libguile/procs.c: * libguile/procs.h: * libguile/programs.c: * libguile/programs.h: * libguile/promises.c: * libguile/promises.h: * libguile/pthread-threads.h: * libguile/random.c: * libguile/random.h: * libguile/rdelim.c: * libguile/rdelim.h: * libguile/read.c: * libguile/read.h: * libguile/regex-posix.c: * libguile/regex-posix.h: * libguile/rw.c: * libguile/rw.h: * libguile/scmsigs.c: * libguile/scmsigs.h: * libguile/script.c: * libguile/script.h: * libguile/simpos.c: * libguile/simpos.h: * libguile/smob.c: * libguile/smob.h: * libguile/snarf.h: * libguile/socket.c: * libguile/socket.h: * libguile/sort.c: * libguile/sort.h: * libguile/srcprop.c: * libguile/srcprop.h: * libguile/stackchk.c: * libguile/stackchk.h: * libguile/stacks.c: * libguile/stacks.h: * libguile/stime.c: * libguile/stime.h: * libguile/strerror.c: * libguile/strings.c: * libguile/strings.h: * libguile/strorder.c: * libguile/strorder.h: * libguile/strports.c: * libguile/strports.h: * libguile/struct.c: * libguile/struct.h: * libguile/symbols.c: * libguile/symbols.h: * libguile/syntax.c: * libguile/syscalls.h: * libguile/tags.h: * libguile/threads.c: * libguile/threads.h: * libguile/throw.c: * libguile/throw.h: * libguile/trees.h: * libguile/unicode.c: * libguile/unicode.h: * libguile/uniform.c: * libguile/uniform.h: * libguile/values.c: * libguile/values.h: * libguile/variable.c: * libguile/variable.h: * libguile/vectors.c: * libguile/vectors.h: * libguile/version.c: * libguile/vm-engine.c: * libguile/vm-expand.h: * libguile/vm.c: * libguile/vm.h: * libguile/vports.c: * libguile/vports.h: * libguile/weak-list.h: * libguile/weak-set.c: * libguile/weak-set.h: * libguile/weak-table.c: * libguile/weak-table.h: * libguile/weak-vector.c: * libguile/weak-vector.h: Remove needless trailing comments.
2018-06-20Remove useless "classes: h_files" from Guile headers.Andy Wingo1-4/+2
* libguile/__scm.h: * libguile/alist.h: * libguile/array-handle.h: * libguile/array-map.h: * libguile/arrays.h: * libguile/async.h: * libguile/backtrace.h: * libguile/bitvectors.h: * libguile/boolean.h: * libguile/chars.h: * libguile/chooks.h: * libguile/continuations.h: * libguile/debug-malloc.h: * libguile/debug.h: * libguile/deprecation.h: * libguile/dynl.h: * libguile/dynstack.h: * libguile/dynwind.h: * libguile/eq.h: * libguile/error.h: * libguile/eval.h: * libguile/evalext.h: * libguile/expand.h: * libguile/extensions.h: * libguile/feature.h: * libguile/filesys.h: * libguile/fluids.h: * libguile/fports.h: * libguile/gc-inline.h: * libguile/gc.h: * libguile/generalized-arrays.h: * libguile/generalized-vectors.h: * libguile/gettext.h: * libguile/goops.h: * libguile/gsubr.h: * libguile/guardians.h: * libguile/hash.h: * libguile/hashtab.h: * libguile/hooks.h: * libguile/i18n.h: * libguile/init.h: * libguile/inline.h: * libguile/ioext.h: * libguile/iselect.h: * libguile/keywords.h: * libguile/list.h: * libguile/load.h: * libguile/macros.h: * libguile/mallocs.c: * libguile/mallocs.h: * libguile/memoize.h: * libguile/modules.h: * libguile/net_db.h: * libguile/null-threads.h: * libguile/numbers.h: * libguile/objprop.h: * libguile/options.h: * libguile/pairs.h: * libguile/poll.h: * libguile/ports.h: * libguile/posix-w32.h: * libguile/posix.h: * libguile/print.h: * libguile/procprop.h: * libguile/procs.h: * libguile/promises.h: * libguile/pthread-threads.h: * libguile/random.h: * libguile/rdelim.h: * libguile/read.h: * libguile/regex-posix.h: * libguile/rw.h: * libguile/scmsigs.h: * libguile/script.h: * libguile/simpos.h: * libguile/smob.h: * libguile/snarf.h: * libguile/socket.h: * libguile/sort.h: * libguile/srcprop.h: * libguile/stackchk.h: * libguile/stacks.h: * libguile/stime.h: * libguile/strings.h: * libguile/strorder.h: * libguile/strports.h: * libguile/struct.h: * libguile/symbols.h: * libguile/syscalls.h: * libguile/tags.h: * libguile/threads.h: * libguile/throw.h: * libguile/trees.h: * libguile/unicode.h: * libguile/uniform.h: * libguile/values.h: * libguile/variable.h: * libguile/vectors.h: * libguile/vports.h: * libguile/weak-list.h: * libguile/weak-set.h: * libguile/weak-table.h: * libguile/weak-vector.h: Remove "classes: h_files". Reformat copyrights if needed.
2016-08-31Move system* to posix.c, impl on open-processAndy Wingo1-0/+1
* libguile/simpos.c: Trim includes. (scm_system_star): Move to posix.c. * libguile/simpos.h (scm_system_star): Remove. * libguile/posix.h (scm_system_star): Add. * libguile/posix.c (scm_system_star): Move here and implement in terms of open-process. This lets system* work on Windows. Inspired by a patch by Eli Zaretskii. (start_child): Exit with 127 if the command isn't found.
2011-04-25Move `{total,current}-processor-count' outside of `posix.c'.Ludovic Courtès1-3/+2
* libguile/posix.c (scm_total_processor_count, scm_current_processor_count): Move to... * libguile/threads.c: ... here. * libguile/posix.h (scm_total_processor_count, scm_current_processor_count): Move declarations to... * libguile/threads.h: ... here. * test-suite/tests/posix.test ("nproc"): Move tests to... * test-suite/tests/threads.test: ... here.
2010-12-07Add `total-processor-count' and `current-processor-count'.Ludovic Courtès1-0/+2
* libguile/posix.c (scm_total_processor_count, scm_current_processor_count): New functions. * libguile/posix.h (scm_total_processor_count, scm_current_processor_count): New declarations. * test-suite/tests/posix.test ("nproc"): New test prefix. * doc/ref/posix.texi (Processes): Document `total-processor-count' and `current-processor-count'.
2010-12-03Add bindings to GNU `sched_setaffinity' and `sched_getaffinity'.Ludovic Courtès1-0/+2
* configure.ac: Add checks for `sched_setaffinity' and `sched_getaffinity'. * doc/ref/posix.texi (Processes): Document `getaffinity' and `setaffinity'. * libguile/posix.c (cpu_set_to_bitvector, scm_getaffinity)[HAVE_SCHED_GETAFFINITY]: New functions. (scm_setaffinity)[HAVE_SCHED_SETAFFINITY]: New function. * libguile/posix.h (scm_getaffinity, scm_setaffinity): New declarations. * test-suite/tests/posix.test ("affinity"): New test prefix.
2010-11-18deprecate cuseridAndy Wingo1-1/+0
* libguile/posix.c: * libguile/posix.h: * libguile/deprecated.h: * libguile/deprecated.c (scm_cuserid): Deprecate cuserid, as it only returns 8 bytes of a user's login. * doc/ref/posix.texi: Remove cuserid from docs.
2010-06-15Add tmpfile(3) to libguile.Thien-Thi Nguyen1-0/+1
* libguile/posix.c (scm_tmpfile): New primitive. * libguile/posix.h (scm_tmpfile): New func decl. * doc/ref/posix.texi (File System): Document `tmpfile'.
2010-05-28Fix the visibility of a few of internal symbols.Ludovic Courtès1-2/+2
* libguile/gc.h (scm_i_gc): Make internal. * libguile/posix.h (scm_i_locale_mutex): Likewise. * libguile/arrays.h (scm_i_tc16_array): Likewise. * libguile/numbers.c (scm_i_num_less_p): Likewise. * libguile/discouraged.h (scm_i_init_discouraged): Likewise. * libguile/continuations.c (scm_i_dummy): Made static. * libguile/gc.c (scm_i_cell_validation_already_running): Likewise. * libguile/discouraged.h (scm_i_init_discouraged): Likewise.
2010-01-17nanosecond timestamp support in stat and utimeAndy Wingo1-1/+2
* libguile/posix.h: * libguile/posix.c (scm_utime): Add optional nanosecond arguments. This is an incompatible change on the C level, but it's unlikely people are using this POSIX wrapper function, because they would just use the POSIX function directly. Hopefully, anyway. * module/system/base/compile.scm (call-with-output-file/atomic): Propagate source timestamps to targets with nanosecond precision, if available. Fixes build on systems with ext4 filesystems. * libguile/filesys.c (scm_stat2scm): * module/ice-9/posix.scm (stat:atimensec, stat:mtimensec) (stat:ctimensec): Add three new elements to Scheme stat structures, for nanosecond-level timestamps. * configure.ac: Add checks for utimensat, and for nanosecond fields in struct stat. We should switch to using Gnulib things for these, though. * doc/ref/posix.texi (File System): Add documentation for utime's additional arguments, and nanosecond stat timestamp accessors.
2009-12-27Add support for getsidNeil Jerram1-0/+1
* configure.ac: Check availability of getsid() C library call. * libguile/posix.c (scm_getsid): New primitive. * libguile/posix.h: Declaration for new primitive.
2009-11-14Replace `setbinary' by a public `%default-port-encoding' fluid.Ludovic Courtès1-2/+1
* doc/ref/api-evaluation.texi (Character Encoding of Source Files): Add reference to the "Ports" node. * doc/ref/api-io.texi (Ports): Document `%default-port-encoding'. * libguile/ports.c (scm_port_encoding_var): Rename to... (default_port_encoding_var): ... this; update callers. Make `static'. * libguile/posix.c (scm_setbinary): Remove. * libguile/posix.h: Adjust accordingly. * test-suite/tests/numbers.test: Remove unneeded `setbinary' call. * test-suite/tests/ports.test: Replace `setbinary' call by equivalent `%default-port-encoding' mutation and `set-port-encoding!' calls. * test-suite/tests/r6rs-ports.test: Replace `setbinary' call by equivalent `%default-port-encoding' mutation.
2009-08-25Add full Unicode capability to ports and the default readerMichael Gran1-0/+1
Ports are given two additional properties: a character encoding and a conversion failure strategy. These properties have getters and setters. The new properties are used to convert any locale text to/from the internal representation of strings. If unspecified, ports use a default value. The default value of these properties is held in a fluid. The default character encoding can be modified by calling setlocale. ISO-8859-1 is treated specially. Since it is a native encoding of strings, it can be processed more quickly. Source code is assumed to be ISO-8859-1 unless otherwise specified. The encoding of a source code file can be given as 'coding: XXXXX' in a magic comment at the top of a file. The C functions that deal with encoding often use a null pointer as shorthand for the native Latin-1 encoding, for efficiency's sake. * test-suite/tests/encoding-iso88591.test: new tests * test-suite/tests/encoding-iso88597.test: new tests * test-suite/tests/encoding-utf8.test: new tests * test-suite/tests/encoding-escapes.test: new tests * test-suite/tests/numbers.test: declare 'binary' encoding * test-suite/tests/ports.test: declare 'binary' encoding * test-suite/tests/r6rs-ports.test: declare 'binary' encoding * module/system/base/compile.scm (compile-file): use source-code file's self-declared encoding when compiling files * libguile/strports.c: store string ports in locale encoding (scm_strport_to_locale_u8vector, scm_call_with_output_locale_u8vector) (scm_open_input_locale_u8vector, scm_get_output_locale_u8vector): new functions * libguile/strings.h: new declaration for scm_i_string_contains_char * libguile/strings.c (scm_i_string_contains_char): new function (scm_from_stringn, scm_to_stringn): use NULL for Latin-1 (scm_from_locale_stringn, scm_to_locale_stringn): respect character encoding of input and output ports * libguile/read.h: declaration for scm_scan_for_encoding * libguile/read.c: (read_token): now takes scheme string instead of C string/length (read_complete_token): new function (scm_read_sexp, scm_read_number, scm_read_mixed_case_symbol) (scm_read_number_and_radix, scm_read_quote, scm_read_semicolon_comment) (scm_read_srfi4_vector, scm_read_bytevector, scm_read_guile_bit_vector) (scm_read_scsh_block_comment, scm_read_commented_expression) (scm_read_extended_symbol, scm_read_sharp_extension, scm_read_shart) (scm_read_expression): use scm_t_wchar for char type, use read_complete_token (scm_scan_for_encoding): new function to find a file's character encoding (scm_file_encoding): new function to find a port's character encoding * libguile/rdelim.c: don't unpack strings * libguile/print.h: declaration for modified function scm_i_charprint * libguile/print.c: use locale when printing characters and strings (scm_i_charprint): input parameter is now scm_t_wchar (scm_simple_format): don't unpack strings * libguile/posix.h: new declaration for scm_setbinary. * libguile/posix.c (scm_setlocale): set default and stdio port encodings based on the locale's character encoding (scm_setbinary): new function * libguile/ports.h (scm_t_port): add encoding and failed conversion handler to port type. Declarations for new or modified functions scm_getc, scm_unget_byte, scm_ungetc, scm_i_get_port_encoding, scm_i_set_port_encoding_x, scm_port_encoding, scm_set_port_encoding_x, scm_i_get_conversion_strategy, scm_i_set_conversion_strategy_x, scm_port_conversion_strategy, scm_set_port_conversion_strategy_x. * libguile/ports.c: assign the current ports to zero on startup so we can see if they've been set. (scm_current_input_port, scm_current_output_port, scm_current_error_port): return #f if the port is not yet initialized (scm_new_port_table_entry): set up a new port's encoding and illegal sequence handler based on the thread's current defaults (scm_i_remove_port): free port encoding name when port is removed (scm_i_mode_bits_n): now takes a scheme string instead of a c string and length. All callers changed. (SCM_MBCHAR_BUF_SIZE): new const (scm_getc): new function, since the scm_getc in inline.h is now scm_get_byte_or_eof. This pulls one codepoint from a port. (scm_lfwrite_substr, scm_lfwrite_str): now uses port's encoding (scm_unget_byte): new function, incorportaing the low-level functionality of scm_ungetc (scm_ungetc): uses scm_unget_byte * libguile/numbers.h (scm_t_wchar): compilation order problem with scm_t_wchar being use in functions in multiple headers. Forward declare scm_t_wchar. * libguile/load.c (scm_primitive_load): scan for file encoding at top of file and use it to set the load port's encoding * libguile/inline.h (scm_get_byte_or_eof): new function incorporating most of the functionality of scm_getc. * libguile/fports.c (fport_fill_input): now returns scm_t_wchar * libguile/chars.h (scm_t_wchar): avoid compilation order problem with declaration of scm_t_wchar
2009-06-17Change Guile license to LGPLv3+Neil Jerram1-6/+7
(Not quite finished, the following will be done tomorrow. module/srfi/*.scm module/rnrs/*.scm module/scripts/*.scm testsuite/*.scm guile-readline/* )
2009-03-27add getrlimit and setrlimit wrappersAndy Wingo1-0/+2
* README: Some rewording. * configure.in: Check for getrlimit and setrlimit. * libguile/posix.h: * libguile/posix.c: Add some getrlimit and setrlimit wrappers. They're documented, but I suspect something else has to be done to get them into the manual.
2008-07-04Don't declare `scm_i_locale_mutex' as `SCM_INTERNAL'.Ludovic Courtès1-1/+1
2008-05-31Add `SCM_INTERNAL' macro, use it.Ludovic Courtès1-3/+3
2006-11-18Changes from arch/CVS synchronizationLudovic Courtès1-2/+3
2006-04-17merge from 1.8 branchKevin Ryde1-1/+1
2005-05-23The FSF has a new address.Marius Vollmer1-1/+1
2003-07-27* posix.h (scm_setgroups): New prototype.Marius Vollmer1-1/+2
* 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-04-07* posix.h: change occurences of "id" to something else so we don'tRob Browning1-4/+4
cause trouble when included via objective-c (can't hurt, might help). Still have usage in debug.h, though.
2003-04-05Changed license terms to the plain LGPL thru-out.Marius Vollmer1-35/+11
2001-11-02Prefixed each each exported symbol with SCM_API.Marius Vollmer1-56/+56
2001-08-31* Remove deprecated macros and typenames.Dirk Herrmann1-7/+9
* Rename header macros to SCM_<filename>_H. * Prefer !SCM_<foo> over SCM_N<foo>.
2001-03-18 * posix.c (scm_tmpnam): check that return value from tmpnam is notGary Houston1-1/+2
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-09Added some new posix functions:Martin Grabmüller1-0/+10
(scm_crypt, scm_chroot, scm_getlogin, scm_cuserid), (scm_getpriority, scm_setpriority, scm_getpass, scm_flock), (scm_sethostname, scm_gethostname): New procedures.
2000-06-12Updated copyrightsMikael Djurfeldt1-1/+1
2000-03-19 * *.[hc]: add Emacs magic at the end of file, to ensure GNUMichael Livshin1-0/+6
indentation style.
2000-03-02* list.c: Moved append docs to append! Thanks Dirk Hermann. Also,Greg J. Badros1-45/+45
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!
1998-10-19* __scm.h, alist.c, async.c, async.h, backtrace.h, chars.c,Jim Blandy1-1/+1
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-09-06* posix.h (scm_tmpnam): Added prototype.Jim Blandy1-0/+1
1997-08-16* stime.h: prototype for scm_times.Gary Houston1-2/+3
* 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-05-26* Lots of files: New address for FSF.Jim Blandy1-3/+3
1997-04-12 * stime.c (scm_mktime): take an optional zone argument.Gary Houston1-2/+0
(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-05* posix.c (scm_putenv): don't check HAVE_PUTENV.Gary Houston1-3/+2
* 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-03-29* ioext.c (scm_setfileno): throw a runtime error if SET_FILE_FD_FIELDGary Houston1-0/+3
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-01-25 * ports.c: add SCM_PROC declarations for pt-size and pt-member.Gary Houston1-4/+1
* 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"
1996-10-28* configure.in: add tests for figuring out whether buffered dataGary Houston1-20/+20
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-14* __scm.h, alist.c, alist.h, append.c, append.h, appinit.c,Jim Blandy1-102/+46
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-09-11* numbers.h: Repeated declarations removed.Jim Blandy1-0/+12
* 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-05* alist.h, append.h, arbiters.h, async.h, boolean.h, chars.h,Jim Blandy1-1/+1
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-04Don't install the unwashed masses of Guile header files in theJim Blandy1-1/+1
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-07-25maintainer changed: was lord, now jimb; first importJim Blandy1-0/+145