be #included at all.
* aclocal.m4 (GUILE_HEADER_LIBC_WITH_UNISTD): New autoconf macro.
* configure.in: Call it.
* acconfig.h (LIBC_H_WITH_UNISTD_H): New CPP symbol.
* posix.c, filesys.c: Use its results to decide whether or not to
#include <libc.h>.
* configure, scmconfig.h.in: Rebuilt with autoconf and
autoheader.
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.
eval.h, feature.c, filesys.c, fports.c, gc.c, gsubr.c, init.c,
ioext.c, kw.c, list.c, load.c, mallocs.c, numbers.c, numbers.h,
pairs.c, pairs.h, ports.c, ports.h, posix.c, procprop.c, procs.c,
procs.h, ramap.c, read.c, root.c, srcprop.c, srcprop.h,
strports.c, symbols.c, tags.h, throw.c, unif.c, variable.c,
vports.c: Cleaned up use of pairs: Don't make any special
assumptions about the internal structure of selectors and
mutators: SCM_CXR (<e1>) = <e2> --> SCM_SETCXR (<e1>, <e2>),
SCM_CXR (<e1>) &= <e2> --> SCM_SETAND_CXR (<e1>, <e2>) etc.
(Among other things, this change makes it easier to build Guile
with certain compilers which have problems with casted lvalues.)
wta for range errors (ASSERT still needs work).
* error.c, error.h (scm_out_of_range): new procedure.
* error.c, error.h (scm_out_of_range_key): new key.
* posix.c (scm_sync): #else was missing.
* error.c, error.h: append _key to names scm_num_overflow and
scm_system_error.
* __scm.h (SCM_SYSMISSING, SCM_NUM_OVERFLOW): use SCM_BOOL_F instead
of consing an empty list.
(SCM_SYSERROR etc.): move into error.c, make them procedures instead
of macros, saves code and string space.
error.c, fports.c, numbers.c, posix.c, ioext.c, filesys.c, socket.c,
fdsocket.c, simpos.c: change names of SCM_SYSERROR etc., to
lower case. Rename scm_syserror_m to scm_syserror_msg.
error.h: prototypes for new procedures.
#define _POSIX_SOURCE before #including it.
* aclocal.m4 (GUILE_STRUCT_UTIMBUF): New test.
* acconfig.h: New comment text for above CPP symbol.
* configure.in: Call it.
* posix.c: #define _POSIX_SOURCE if it seems necessary.
* configure.in (AC_CHECK_HEADERS): Include sys/utime.h and utime.h
in the list.
* posix.c: Check HAVE_SYS_UTIME_H and HAVE_UTIME_H, instead of
testing for __EMX__.
* posix.c: #include <libc.h>, if it exists.
* posix.c: Cast the return result to GETGROUPS_T, not gid_t; we
don't even know if the latter exists.
* posix.c (s_sys_setpgid, s_sys_setsid, s_sys_ctermid,
s_sys_tcgetpgrp, s_sys_tcsetpgrp): Renamed from s_setpgid,
s_setsid, s_ctermid, s_tcgetpgrp, s_tcsetpgrp, for consistency.
* posix.c (R_OK, W_OK, X_OK, F_OK): #define these if the system's
header files don't.
(scm_init_posix): Use them when initializing the Scheme constants
of the same name.
symbols, when defining the scheme values R_OK, W_OK, X_OK, and F_OK.
The symbols aren't available on some systems, and I'm pretty sure
their values are fixed by common widespread practice.
* ioext.c (scm_init_ioext): Code here defined them too; remove it.
* configure.in (AC_CHECK_FUNCS): Add ctermid, setpgid, setsid,
tcgetpgrp, tcsetpgrp, and waitpid to the list of functions to
check for.
* configure, scmconfig.h.in: Updated, using autoconf and autoheader.
* posix.c (scm_sys_ctermid, scm_sys_setpgid, scm_sys_setsid,
scm_sys_tcgetpgrp, scm_sys_tcsetpgrp, scm_sys_waitpid): Put the
bodies of these functions in "#ifdef HAVE_MUMBLE" clauses, with a
stub that signals an error as the #else.