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

114 commits

Author SHA1 Message Date
Andy Wingo
a5b5cb422e Merge commit '8cf2a7ba74' 2015-01-22 13:24:30 +01:00
Ludovic Courtès
d1447c717b doc: Clarify behavior of 'select' in the presence of signal interruptions.
Fixes <http://bugs.gnu.org/18988>.
Reported by Chris Vine <chris@cvine.freeserve.co.uk>.

* libguile/filesys.c (scm_select): Clarify handling of signal
  interruptions.
* doc/ref/posix.texi (Ports and File Descriptors): Adjust accordingly.
2014-11-20 21:32:44 +01:00
Mark H Weaver
856d318a9f Merge branch 'stable-2.0'
Conflicts:
	benchmark-suite/benchmarks/ports.bm
	libguile/async.h
	libguile/bytevectors.c
	libguile/foreign.c
	libguile/gsubr.c
	libguile/srfi-1.c
	libguile/vm-engine.h
	libguile/vm-i-scheme.c
	module/Makefile.am
	module/language/tree-il/analyze.scm
	module/language/tree-il/peval.scm
	module/scripts/compile.scm
	module/scripts/disassemble.scm
	test-suite/tests/asm-to-bytecode.test
	test-suite/tests/peval.test
	test-suite/tests/rdelim.test
2014-09-30 03:50:47 -04:00
Ludovic Courtès
447af515a3 Add 'EXIT_SUCCESS' and 'EXIT_FAILURE'.
Suggested by Frank Terbeck <ft@bewatermyfriend.org>.

* libguile/posix.c (scm_init_posix): Define 'EXIT_SUCCESS' and
  'EXIT_FAILURE'.
* doc/ref/posix.texi (Processes): Document them.
2014-09-22 22:51:39 +02:00
Andy Wingo
966d4bdd70 Fix setitimer documentation. Allow microseconds >= 1e6.
* doc/ref/posix.texi (Signals): Fix the documentation for setitimer; it
  was wrong.

* libguile/scmsigs.c (pack_tv): New helper.  Allow usecs >= 1e6.
  (unpack_tv): New helper.
  (scm_setitimer): Use the new helpers.

* test-suite/tests/signals.test: Add setitimer tests.
2014-02-28 10:31:12 +01:00
Andy Wingo
c8b7b0dad3 Merge commit 'b9b88351ea'
Conflicts:
	libguile/deprecated.h
	test-suite/tests/00-socket.test
2014-02-08 14:55:16 +01:00
Andy Wingo
b9b88351ea Deprecate htons, htonl, ntohs, ntohl
* libguile/sockets.h:
* libguile/sockets.c:
* libguile/deprecated.h:
* libguile/deprecated.c (scm_htons, scm_htonl, scm_ntohs, scm_ntohl):
  Deprecate.  Bytevectors adequately subsume their functionality.

* doc/ref/posix.texi:
* test-suite/tests/00-socket.test: Update.
2014-02-08 14:28:07 +01:00
Andy Wingo
e140d85d53 Merge commit '122f24cc8a'
Conflicts:
	libguile/fports.c
	libguile/ports.c
2014-02-07 14:39:01 +01:00
Ludovic Courtès
122f24cc8a Prepare 'setvbuf' to support for non-file ports.
* libguile/ports-internal.h (struct scm_port_internal): Add
  setvbuf' field.  Change 'pending_eof' to a 1-bit unsigned char.
* libguile/ports.c (scm_new_port_table_entry): Clear 'pti->setvbuf'.
* libguile/fports.c (scm_setvbuf): Accept any open port, and error out
  when PORT's setvbuf' field is NULL.  Remove explicit 'scm_gc_free' calls.
  (scm_i_fdes_to_port): Set PORT's 'setvbuf' field.
* test-suite/tests/ports.test ("setvbuf")["closed port", "string port"]:
  New tests.
* doc/ref/posix.texi (Ports and File Descriptors): Suggest that
  'setvbuf' works for different port types.
2014-01-18 22:52:07 +01:00
Mark H Weaver
f6f4feb0a2 Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	GUILE-VERSION
	libguile/array-map.c
	libguile/fports.h
	libguile/gc.h
	libguile/inline.h
	libguile/ports.c
	libguile/ports.h
	libguile/print.c
	libguile/r6rs-ports.c
	libguile/read.c
	test-suite/tests/00-socket.test
2013-04-14 02:48:33 -04:00
Ludovic Courtès
e0886e0780 Change `sendfile' to loop until everything has been sent.
* libguile/filesys.c (scm_sendfile)[HAVE_SYS_SENDFILE_H &&
  HAVE_SENDFILE]: Compare RESULT with C_COUNT.  Loop until C_COUNT bytes
  have been sent.
* doc/ref/posix.texi (File System): Update the description.  Explain the
  new semantics.
* test-suite/tests/filesys.test ("sendfile"): Rewrite using
  `pass-if-equal'.  Check the return value for all the tests.
  ["file with offset past the end", "file with offset near the end"]:
  New tests.
2013-04-07 23:47:38 +02:00
Ludovic Courtès
7d39b48875 doc: Warn against misuses of `file-name-separator-string'.
* doc/ref/posix.texi (File System): Warn against misuses of
  `file-name-separator-string'.
2013-04-07 11:51:58 +02:00
Ludovic Courtès
66750b78c7 doc: Document file name separator procedures.
* doc/ref/posix.texi (File System): Document
  `system-file-name-convention', `file-name-separator?',
  `absolute-file-name?', and `file-name-separator-string'.
2013-04-06 13:07:01 +02:00
Mark H Weaver
86cf4773ff Merge remote-tracking branch 'origin/stable-2.0' 2013-03-30 22:56:27 -04:00
Ludovic Courtès
df3d365a99 build: Build and check (ice-9 popen) only when --enable-posix and HAVE_FORK.
Fixes <http://bugs.gnu.org/13848>.
Reported by Jan Schukat <shookie@email.de>.

* configure.ac: Rename `HAVE_FORK' conditional to `BUILD_ICE_9_POPEN'.
  Set it when both $enable_posix and $ac_cv_func_fork are true.
* libguile/posix.c (scm_init_posix): Add the `fork' feature.
* doc/ref/api-options.texi (Common Feature Symbols): Add `fork'.
* doc/ref/posix.texi (Pipes): Add footnote mentioning the `fork'
  feature.
* module/Makefile.am (SCRIPTS_SOURCES): Make `scripts/autofrisk.scm' and
  `scripts/scan-api.scm' conditional on `BUILD_ICE_9_POPEN'.
* test-suite/tests/popen.test (if-supported): New macro.
  Wrap body in `if-supported'.
2013-03-29 19:20:01 +01:00
Mark H Weaver
26d148066f Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	configure.ac
	libguile/deprecated.c
	libguile/deprecated.h
	libguile/filesys.h
	libguile/fluids.c
	libguile/fports.c
	libguile/gc.c
	libguile/guile.c
	libguile/numbers.c
	libguile/objcodes.c
	libguile/r6rs-ports.c
	libguile/smob.c
	libguile/socket.c
	libguile/threads.h
	module/language/scheme/decompile-tree-il.scm
	module/language/tree-il/peval.scm
	test-suite/tests/syncase.test
2013-03-28 05:09:53 -04:00
Ludovic Courtès
5bb40f9df0 getaddrinfo: Document the missing errno value for EAI_SYSTEM.
In response to <http://bugs.gnu.org/13958>.
Reported by Lluís Batlle i Rossell <viric@viric.name>.

* doc/ref/posix.texi (Network Databases): Document the missing errno
  value for EAI_SYSTEM.
* libguile/net_db.c (scm_getaddrinfo): Likewise.
2013-03-25 22:46:53 +01:00
Ludovic Courtès
fbac7c6113 Add bindings for `sendfile'.
* configure.ac: Check for <sys/sendfile.h> and `sendfile'.
* libguile/filesys.c (scm_sendfile): New function.
* libguile/filesys.h (scm_sendfile): New declaration.
* test-suite/tests/filesys.test ("sendfile"): New test prefix.
* doc/ref/posix.texi (File System): Document `sendfile'.
2013-03-22 22:21:13 +01:00
Mike Gran
14ae4725ab Document quit and exit
* doc/ref/posix.texi (Processes): document `quit' and `exit'
* doc/ref/r6rs.texi (rnrs programs): xref exit
2013-03-21 09:20:31 -07:00
Ludovic Courtès
5f24f1b53e Define the new Linux-specific `SO_REUSEPORT'.
* libguile/socket.c (scm_init_socket)[SO_REUSEPORT]: Define
  `SO_REUSEPORT'.
  (scm_setsockopt, scm_getsockopt): Update docstring.
* doc/ref/posix.texi (Network Sockets and Communication): List
  `SO_REUSEPORT'.
2013-03-18 22:30:13 +01:00
Andy Wingo
a796d0a954 warn on multithreaded fork
* libguile/posix.c (scm_fork): Issue a warning on a multithreaded fork.
* doc/ref/posix.texi (Processes): Add note about multithreaded fork.

* test-suite/tests/00-socket.test: Moved here, from socket.test, so as
  to run before any threads are created.
* test-suite/Makefile.am: Adapt.
2013-01-17 12:38:56 +01:00
Andy Wingo
22cdf986db warning instead of error on multithreaded fork
* libguile/posix.c (scm_fork): Issue a warning instead of an error on a
  multithreaded fork.
* doc/ref/posix.texi (Processes): Add note about multithreaded fork.
2013-01-17 12:25:52 +01:00
Bake Timmons
5f6ffd6652 Improve consistency of definitions of C functions in manual.
* doc/ref/api-compound.texi
* doc/ref/api-evaluation.texi
* doc/ref/api-foreign.texi
* doc/ref/api-io.texi
* doc/ref/posix.texi
* doc/ref/srfi-modules.texi: Add missing parentheses and commas to definitions
  of C functions.

* doc/ref/api-data.texi: Change from @deffn to @deftypefn for C function
  with arguments not of SCM type.
2012-02-04 00:10:14 +01:00
Bake Timmons
df0a100250 Make notation for Scheme repeated arguments more consistent in manual.
* doc/ref/api-compound.texi
* doc/ref/api-control.texi
* doc/ref/api-data.texi
* doc/ref/api-debug.texi
* doc/ref/api-evaluation.texi
* doc/ref/api-macros.texi
* doc/ref/api-memory.texi
* doc/ref/api-modules.texi
* doc/ref/api-procedures.texi
* doc/ref/api-regex.texi
* doc/ref/api-scheduling.texi
* doc/ref/api-utility.texi
* doc/ref/goops.texi
* doc/ref/match.texi
* doc/ref/misc-modules.texi
* doc/ref/posix.texi
* doc/ref/r6rs.texi
* doc/ref/scheme-using.texi
* doc/ref/srfi-modules.texi
* doc/ref/sxml-match.texi: Make notation for Scheme repeated arguments more
  consistent in manual.
2012-02-04 00:10:13 +01:00
Ludovic Courtès
1ba05158eb tests: Have `getaddrinfo' test work for Darwin 8.
* doc/ref/posix.texi (Network Databases): Update description of
  `EAI_NODATA' to mention that Darwin provides it.

* libguile/net_db.c (scm_getaddrinfo): Likewise.

* test-suite/tests/net-db.test ("getaddrinfo")["wrong service name"]:
  Accept `EAI_NODATA' too.  Reported by David Fang <fang@csl.cornell.edu>,
  see <http://bugs.gnu.org/10684>.
2012-02-03 10:30:52 +01:00
Bake Timmons
64de6db5c6 Make consistent the usage of variable names in the function definitions found in the Texinfo docs.
* doc/r5rs/r5rs.texi:
* doc/ref/api-compound.texi:
* doc/ref/api-data.texi:
* doc/ref/api-debug.texi:
* doc/ref/api-evaluation.texi:
* doc/ref/api-io.texi:
* doc/ref/api-modules.texi:
* doc/ref/api-procedures.texi:
* doc/ref/api-scheduling.texi:
* doc/ref/api-smobs.texi:
* doc/ref/compiler.texi:
* doc/ref/misc-modules.texi:
* doc/ref/posix.texi:
* doc/ref/scheme-using.texi:
* doc/ref/srfi-modules.texi:
* doc/ref/vm.texi:
* doc/ref/web.texi:
* doc/sources/env.texi: Make usage of variable names of function definitions
  more consistent.
2012-02-02 12:04:16 +01:00
Ludovic Courtès
46e78202f0 doc: Add link from `opendir' to (ice-9 ftw).
* doc/ref/posix.texi (File System): Add link to "File Tree Walk".
2011-12-18 21:27:56 +01:00
Neil Jerram
679cceeda4 Misc textual editing
* doc/ref/api-scheduling.texi (Asyncs): "queueing" -> "queuing".

* benchmark-suite/lib.scm, doc/sources/unix.texi (Unix conventions),
  test-suite/lib.scm: "postpend" -> "append".

* doc/ref/api-compound.texi (Array Syntax, Dictionary Types),
  doc/ref/api-control.texi (Catch), doc/ref/api-data.texi (Complex
  Numbers, Conversion, Random, Symbol Props, Symbol Uninterned),
  doc/ref/api-options.texi (Build Config, Common Feature Symbols),
  doc/ref/api-regex.texi (Match Structures),
  doc/ref/api-undocumented.texi, doc/ref/compiler.texi (Tree-IL,
  GLIL), doc/ref/data-rep.texi (Immediate objects), doc/ref/goops.texi
  (Slot Description Example), doc/ref/history.texi (A Scheme of Many
  Maintainers, Status), doc/ref/libguile-program.texi (Available
  Functionality), doc/ref/misc-modules.texi (Formatted Output),
  doc/ref/mod-getopt-long.texi (getopt-long Reference),
  doc/ref/posix.texi (Network Socket Address, Network Sockets and
  Communication), doc/ref/srfi-modules.texi (SRFI-1 Association Lists,
  SRFI-10, SRFI-19 String to date, SRFI-27 Random Sources),
  doc/ref/vm.texi (Instruction Set, Top-Level Environment
  Instructions, Procedure Call and Return Instructions),
  doc/sources/unix.texi (Unix conventions): Correct spacing after
  "i.e." and "e.g.".
2011-02-13 22:13:33 +00:00
Ralf Wildenhues
ecb8733562 docs: fix typos in manual, and a couple in code comments.
* doc/ref/api-binding.texi, doc/ref/api-compound.texi,
doc/ref/api-control.texi, doc/ref/api-debug.texi,
doc/ref/api-io.texi, doc/ref/api-macros.texi,
doc/ref/api-procedures.texi, doc/ref/api-scheduling.texi,
doc/ref/api-undocumented.texi, doc/ref/api-utility.texi,
doc/ref/compiler.texi, doc/ref/goops.texi,
doc/ref/libguile-concepts.texi, doc/ref/misc-modules.texi,
doc/ref/posix.texi, doc/ref/r6rs.texi, doc/ref/slib.texi,
doc/ref/srfi-modules.texi, doc/ref/sxml-match.texi,
doc/ref/tools.texi, doc/ref/vm.texi, doc/ref/web.texi,
doc/sources/env.texi, doc/sources/jimb-org.texi,
doc/sources/scheme-concepts.texi, doc/sources/unix.texi,
module/ice-9/optargs.scm: Fix typos.
* doc/r4rs/r5rs.texi: Likewise.  Do not capitalize code symbols
even at the start of a sentence.
* doc/ref/api-data.texi: Likewise.  Also, remove executable bit.
2011-02-09 22:28:49 +00:00
Ludovic Courtès
d21a1dc841 Have recv!', send', etc. accept a bytevector.
* libguile/socket.c (scm_recv, scm_send, scm_recvfrom, scm_sendto):
  Expect the buffer to be a bytevector.  Move the string-handling
  code under `#if SCM_ENABLE_DEPRECATED == 1' and issue a deprecation
  warning.

* test-suite/tests/socket.test ("AF_UNIX/SOCK_DGRAM")["sendto",
  "sendto/sockaddr"]: Adjust accordingly.

* doc/ref/posix.texi (Network Sockets and Communication): Update
  documentation of `recv!', `send', `recvfrom!', and `sendto'.
2011-01-29 21:36:59 +01:00
Ludovic Courtès
66d8613108 Change getaddrinfo' test to handle the GNU-specific EAI_NODATA'.
* doc/ref/posix.texi (Network Databases): Mention `EAI_NODATA'.

* libguile/net_db.c (scm_getaddrinfo): Likewise for the docstring.

* test-suite/tests/net-db.test ("getaddrinfo")["no name"]: Handle
  `EAI_NODATA'.
2011-01-05 22:17:26 +01:00
Andy Wingo
60905b80d4 multicast manual updates
* doc/ref/posix.texi (Network Sockets and Communication): Add
  IP_MULTICAST_TTL and IP_MULTICAST_IF docs, from the docstring.

* NEWS: Update.
2010-12-17 13:04:23 +01:00
Ludovic Courtès
f0c0141fe4 Add total-processor-count' and current-processor-count'.
* 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-07 23:13:20 +01:00
Ludovic Courtès
3ae78cac88 Improve doc of getaffinity' and setaffinity'.
* doc/ref/posix.texi (Processes): Add cross-reference from `setaffinity'
  and `getaffinity' to the corresponding node in the glibc manual.

* libguile/posix.c (scm_getaffinity, scm_setaffinity): Likewise.
2010-12-07 23:13:20 +01:00
Ludovic Courtès
fe613fe25d Add bindings to GNU sched_setaffinity' and sched_getaffinity'.
* 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-12-03 00:38:29 +01:00
Andy Wingo
cd28785f79 deprecate cuserid
* 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-11-18 11:15:16 +01:00
Thien-Thi Nguyen
cd53bd3668 Add tmpfile(3) to libguile.
* libguile/posix.c (scm_tmpfile): New primitive.
* libguile/posix.h (scm_tmpfile): New func decl.

* doc/ref/posix.texi (File System): Document `tmpfile'.
2010-06-15 23:06:00 +02:00
Ludovic Courtès
477e42195c Change occurrences of "filesystem" to "file system".
* doc/ref/posix.texi (File System): Change "filesystem" to "file
  system".

* libguile/posix.c (scm_utime): Ditto.
2010-05-28 17:02:13 +02:00
Ludovic Courtès
d2add8ae11 Remove misplaced tabs from the manual.
* doc/ref/posix.texi (Network Databases): Remove tabs from `getaddrinfo'
  example.

* .dir-locals.el: Set `indent-tabs-mode' to `t' for `texinfo-mode'.
2010-02-17 00:31:04 +01:00
Ludovic Courtès
55ae00ea73 Add `getaddrinfo' and related procedures.
* libguile/net_db.c (sym_getaddrinfo_error, sym_ai_passive,
  sym_ai_canonname, sym_ai_numerichost, sym_ai_numericserv,
  sym_ai_v4mapped, sym_ai_all, sym_ai_addrconfig, sym_eai_badflags,
  sym_eai_noname, sym_eai_again, sym_eai_fail, sym_eai_family,
  sym_eai_socktype, sym_eai_service, sym_eai_memory, sym_eai_system,
  sym_eai_overflow, sym_eai_nodata, sym_eai_addrfamily,
  sym_eai_inprogress, sym_eai_canceled, sym_eai_notcanceled,
  sym_eai_alldone, sym_eai_intr, sym_eai_idn_encode): New variables.
  (scm_from_addrinfo, scm_getaddrinfo, scm_gai_strerror): New functions.

* libguile/net_db.h (scm_getaddrinfo, scm_gai_strerror): New functions.

* module/ice-9/networking.scm (addrinfo:flags, addrinfo:fam,
  addrinfo:socktype, addrinfo:protocol, addrinfo:addr,
  addrinfo:canonname): New procedures.

* test-suite/tests/net-db.test: New file.

* test-suite/Makefile.am (SCM_TESTS): Add `tests/net-db.test'.

* doc/ref/posix.texi (Network Databases)[getaddrinfo]: New subsection.
  [The Host Database]: Suggest using `getaddrinfo'.
2010-02-14 20:56:47 +01:00
Andy Wingo
06bfe276c8 nanosecond timestamp support in stat and utime
* 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.
2010-01-17 16:56:34 +01:00
Neil Jerram
211a5b0425 Doc for getsid
* NEWS: Note new getsid primitive.

* doc/ref/posix.texi (Processes): Document getsid.
2009-12-27 18:44:41 +00:00
Ludovic Courtès
3452e6667f Deprecate inet-ntoa' and inet-aton'.
Suggested by Bruno Haible.

* libguile/inet_aton.c: Remove.

* libguile/Makefile.am (EXTRA_libguile_la_SOURCES): Remove
  `inet_aton.c'.

* libguile/deprecated.c (scm_inet_aton, scm_inet_ntoa): New functions.

* libguile/deprecated.h: Update accordingly.

* libguile/socket.c (scm_inet_aton, scm_inet_ntoa): Remove.

* doc/ref/posix.texi (Network Address Conversion): Mark `inet-ntoa' and
  `inet-aton' as deprecated.
2009-11-16 09:23:47 +01:00
Neil Jerram
187a43907f Fix doc for inet-ntop: always produces a string
Thanks to Scott McPeak for reporting this.

* libguile/socket.c (scm_inet_ntop): In docstring, add quotes around
  IPv6 address (+ reflow a bit).

* doc/ref/posix.texi (Network Address Conversion): Corresponding
  change.

* doc/maint/guile.texi: Corresponding change.
2009-10-01 23:38:57 +01:00
Neil Jerram
32bc92570e Fix incorrect doc mentions of INADDR_LOCALHOST
Thanks to Scott McPeak for reporting this.

* doc/ref/posix.texi (Network Sockets and Communication): Change
  INADDR_LOCALHOST to INADDR_LOOPBACK.
2009-10-01 22:27:41 +01:00
Neil Jerram
aba0dff5f7 In general, use @lisp in preference to @smalllisp
because it looks better in the DVI output.  Exceptions are

- wide examples, which would cause overfull hboxes if they
  used the bigger @lisp font

- very large examples, which may look too big at the @lisp size.
2009-08-09 15:04:08 +01:00
Neil Jerram
0ebbcf43c4 Remove AC_SYS_RESTARTABLE_SYSCALLS and related code
As the Autoconf documentation says, "These days portable programs
[...] should not rely on `HAVE_RESTARTABLE_SYSCALLS', since nowadays
whether a system call is restartable is a dynamic issue, not a
configuration-time issue."

In other words, if we ever rely on HAVE_RESTARTABLE_SYSCALLS, we are
at the mercy of any code that Guile happens to be linked with, because
that code could install a signal handler without the SA_RESTART flag,
and then a Guile system call could unexpectedly return EINTR.

The readline part of this goes back to this problem report:
http://sources.redhat.com/ml/guile/2000-05/msg00177.html; and is an
excellent example of the above paragraph.  It was noted during the
discussion that undefining HAVE_RESTARTABLE_SYSCALLS would fix the
problem, but that solution wasn't adopted - I guess because Guile was
still using cooperative threads then (not pthreads) and so there was a
significant concern (whether founded or not) that not using
restartable syscalls (where available) could lead to a loss of
performance.

Now Guile's default mode of operation is with pthreads, where we
already don't assume that HAVE_RESTARTABLE_SYSCALLS is reliable, so
there is no possible further performance loss.  And in any case we
really have no choice, if we want correct operation.

Thanks to Sylvain Beucler for reporting this and suggesting the fix.

* configure.in (AC_SYS_RESTARTABLE_SYSCALLS): Removed.

* doc/ref/posix.texi (Signals): Remove statement that Guile always
  sets SA_RESTART flag.

* guile-readline/configure.in (GUILE_SIGWINCH_SA_RESTART_CLEARED):
  Remove this setting, together with its test code.
  (HAVE_RL_PRE_INPUT_HOOK): Remove this setting and its code, as no
  longer needed.

* guile-readline/readline.c (sigwinch_enable_restart): Removed.
  (scm_init_readline): Remove setting of rl_pre_input_hook.

* libguile/_scm.h (SCM_SYSCALL): Remove the definition that relies on
  HAVE_RESTARTABLE_SYSCALLS.

* libguile/scmsigs.c (scm_sigaction_for_thread): Don't always set the
  SA_RESTART flag if available.  Update docstring accordingly.
  (scm_init_scmsigs): Remove code that sets SA_RESTART flag for all
  signals.

* THANKS: Add Sylvain.
2009-06-23 23:04:41 +01:00
Ludovic Courtès
f8c01b6f68 Fix strftime' documentation wrt. %Z'.
* doc/ref/posix.texi (Time)[strftime]: Remove erroneous note saying
  that `%Z' ignores `tm:zone'.  Reported by Neil Jerram.
2008-09-18 23:13:42 +02:00
Ludovic Courtès
69f23174d3 Use Gnulib's `strftime' to address bug #24130.
* libguile/stime.c (scm_strftime): Use `nstrftime ()' from Gnulib.
  This provides the same semantics on all platforms, thereby fixing
  bug #24130.

* doc/ref/posix.texi (Time): Remove note about non-portable `%Z'
  behavior.  Describe the new, portable behavior.

* test-suite/tests/time.test ("strftime")["strftime %Z doesn't return
  garbage"]: Reinstate.
  ["C99 %z format"](have-strftime-%z): Remove.
  ("GMT", "EST+5"): Don't use `have-strftime-%z'.
2008-09-02 21:58:58 +02:00
Neil Jerram
839e63263c Document file-exists? 2008-04-17 21:37:47 +01:00