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

136 commits

Author SHA1 Message Date
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
Ludovic Courtès
41185bfe2a Changes from arch/CVS synchronization 2007-05-16 07:51:52 +00:00
Kevin Ryde
bf5df489e2 merge from 1.8 branch 2007-03-07 22:46:00 +00:00
Ludovic Courtès
a2f00b9b36 Changes from arch/CVS synchronization 2007-01-31 20:58:20 +00:00
Kevin Ryde
9a18d8d431 merge from 1.8 2007-01-15 23:22:36 +00:00
Ludovic Courtès
b89c494395 Changes from arch/CVS synchronization 2006-11-18 18:14:55 +00:00
Kevin Ryde
40296bab81 merge from 1.8 branch 2006-10-09 22:47:06 +00:00
Kevin Ryde
23f2b9a3de merge from 1.8 branch 2006-06-17 23:15:59 +00:00
Kevin Ryde
1b09b607dd merge from 1.8 branch 2006-04-16 23:18:55 +00:00
Kevin Ryde
99d1677605 (Network Address Conversion, Network Databases)
(Network Sockets and Communication, Internet Socket Examples): Misc
tweaks.
2006-02-04 01:00:57 +00:00
Kevin Ryde
20b988f88d (Time): In strftime, note systems vary for %Z. 2005-10-31 23:41:46 +00:00
Kevin Ryde
32ff73707c (Network Socket Address): Add scm_make_socket_address,
scm_c_make_socket_address, scm_from_sockaddr, scm_to_sockaddr.  This
change by Ludovic Courtès and revised a bit by me.
2005-10-28 23:00:19 +00:00
Kevin Ryde
13ed23db8e (Network Address Conversion): Move INADDR_ANY to here.
(Network Socket Address): New section, move sockaddr bits to here, add
new make-socket-address.
(Network Sockets and Communication): In connect, bind, and sendto, now
take socket address object.  In bind, leave INADDR constants for
"Network Address Conversion" node.  In those plus accept, getsockname,
getpeername, reword a bit for clarity.
2005-10-27 01:05:43 +00:00
Kevin Ryde
4b08cab6dd (Time): Revise strftime for clarity, cross reference man
3 strftime (suggested by Greg Troxel), note locale character set when
setlocale has been called.
2005-10-23 22:21:33 +00:00
Kevin Ryde
7381c1de51 Untabify 2005-10-23 21:57:08 +00:00
Kevin Ryde
8b6b6ce5ad (Network Sockets and Communication): Combine and revise
getsockopt and setsockopt.  Add OPTNAME constants, including new
IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.
2005-10-23 21:50:41 +00:00
Kevin Ryde
0b0715f1b2 (File System): In tmpnam, clarify security and use of
O_EXCL.  In mkstemp!, in fact posix doesn't specify permissions.
2005-02-14 23:37:28 +00:00
Kevin Ryde
61fdb55797 (File System): In mkstemp!, in fact posix doesn't specify
the permissions mode.  Add an example setting 666 less umask.
2005-02-04 22:40:21 +00:00
Kevin Ryde
b0fb230659 (Time): In mktime, clarify fields of sbd-time used, and
the handling of tm:isdst.
2005-02-03 23:16:35 +00:00
Kevin Ryde
91f5e9f7ec (Signals): In sigaction, add SA_NOCLDSTOP, make it
clearer SA_RESTART is a variable.
2005-01-28 21:09:30 +00:00
Kevin Ryde
67bcd1103b (Ports and File Descriptors): In flock, for LOCK_NB note
logior for LOCK_NB and EWOULDBLOCK error, and note flock doesn't work
over NFS.
2005-01-19 23:32:44 +00:00
Kevin Ryde
2afd305b11 (User Information): Note cuserid gone from POSIX.
Prompted by Roland Besserer.
2005-01-13 23:18:09 +00:00
Kevin Ryde
f3dfb8acf8 Various further index entries. 2005-01-07 23:48:25 +00:00
Kevin Ryde
24ec486cf7 (File System): In mkstemp!, note 0600 creation mode. 2005-01-07 23:29:33 +00:00
Kevin Ryde
cb62d8e556 * posix.texi (Pipes): Expand and clarify a bit. Describe port
inheritance.  Caution against waitpid WAIT_ANY.
2005-01-01 23:54:46 +00:00
Marius Vollmer
7064e449bd Added open-pipe* and open-input-output-pipe. 2004-12-22 15:01:53 +00:00
Kevin Ryde
01357a75f0 (System Identification): Remove software-type, it doesn't
exist in the guile core.
2004-09-07 01:02:12 +00:00
Kevin Ryde
bdd46043c0 (Locales): Use @var for category arg. 2004-09-07 00:30:44 +00:00
Kevin Ryde
a8d0313f69 (Internet Socket Examples): Correction to socket calls,
should be PF_INET not AF_INET (though generally the two are the same
value).
2004-08-18 00:12:44 +00:00