* m4/gnulib-cache.m4: Add `inet_ntop' and `inet_pton'.
* configure.ac: Don't check for `inet_ntop' and `inet_pton'.
* libguile/socket.c (scm_inet_pton, scm_inet_ntop): Compile regardless
of `HAVE_INET_PTON' and `HAVE_INET_NTOP' respectively.
* libguile/filesys.c: Use <stdlib.h> instead of <canonicalize.h>.
* libguile/filesys.h:
* libguile/filesys.c (scm_canonicalize_path): New function,
canonicalize-path.
* module/system/base/compile.scm (compiled-file-name): Canonicalize the
filename so that compiling e.g. ../foo.scm doesn't compile to
~/.guile-ccache/1.9/../foo.scm.
* libguile/filesys.h:
* libguile/filesys.c (scm_stat): Add optional arg, exception-on-error,
which if #f (not the default) will just return #f instead of raising an
exception if the stat fails.
print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
scm_uintprint to print unsigned integers, raw heap words, and
adresses, using a cast to scm_t_bits to turn pointers into
integers.
* configure.in (isinf): Let configure find the isinf() function
on MinGW32 systems.
2004-09-03 Stefan Jahn <stefan@lkcc.org>
* threads.c (scm_threads_mark_stacks): Fixed local variable
definitions.
* strings.c (scm_i_substring_copy, s_scm_string_append): Fixed
local variable definitions.
* stime.c (_POSIX_C_SOURCE): Do not define this item on
MinGW32 because it conflicts with its pthread headers.
(s_scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
(s_scm_strftime): Using scm_from_locale_string() instead of
scm_makfrom0str().
* posix.c (s_scm_putenv): Fixed typo in the !HAVE_UNSETENV
part.
* numbers.c (scm_init_numbers): Removed check_sanity() call
inside GUILE_DEBUG. The function has been removed somewhen...
* filesys.c (_POSIX_C_SOURCE): Do not define this item on
MinGW32 because it conflicts with its pthread headers.
2004-09-03 Stefan Jahn <stefan@lkcc.org>
* srfi-1.c, srfi-1.h: Renamed any 'lst1' into 'list1' because
lst1 is a #define on Win32 systems.
Use them instead of SCM_SYSCALL when one or two strings need to be
converted into locale strings.
(my_rename): New, gathers platform dependent code for renaming.
(scm_rename): Use it.
(scm_readlink, scm_copy_file): Convert SCM strings to locale
strings instead of accessing their internals.
(scm_basename, scm_dirname): Use SCM_I_STRING_CHARS and
SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS and
SCM_STRING_LENGTH.
net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
Replaced uses of SCM_STRING_CHARS with proper uses of
scm_to_locale_string. Replaced SCM_STRINGP with scm_is_string.
Replaced scm_mem2string with scm_from_locale_string.
* simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
Removed, replaced all uses with scm_i_allocate_string_pointers.
stat on the filename, to be certain a file rename can't mean we get
info on one filesystem object but open another. This fstat usage is
similar to Emacs copy-file.
Discouraged by moving to discouraged.h and discouraged.c.
Replaced all uses with scm_from_double.
(scm_num2float, scm_num2double): Discouraged by moving prototype
to discouraged.h and rewriting in terms of scm_to_double.
Replaced all uses with scm_to_double.
scm_ushort2num, scm_int2num, scm_uint2num, scm_long2num,
scm_ulong2num, scm_size2num, scm_ptrdiff2num, scm_num2short,
scm_num2ushort, scm_num2int, scm_num2uint, scm_num2long,
scm_num2ulong, scm_num2size, scm_num2ptrdiff, scm_long_long2num,
scm_ulong_long2num, scm_num2long_long, scm_num2ulong_long):
Discouraged by moving to discouraged.h and discouraged.c and
reimplementing in terms of scm_from_* and scm_to_*. Changed all uses
to the new scm_from_* and scm_to_* functions.
it's not thread safe.
(scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
advantage of this.
* fports.c (scm_open_file): Use scm_strerror likewise.
* filesys.c (scm_stat, scm_lstat): Ditto.
SCM_INUM): Deprecated by reenaming them to SCM_I_INUMP, SCM_I_NINUMP
and SCM_I_INUM, respectively and adding deprecated versions to
deprecated.h and deprecated.c. Changed all uses to either use the
SCM_I_ variants or scm_is_*, scm_to_*, or scm_from_*, as appropriate.
SCM_VALIDATE_BIGINT, SCM_VALIDATE_INUM_MIN,
SCM_VALIDATE_INUM_MIN_COPY,
SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
fixnum/bignum distinction visible. Changed all uses to scm_to_size_t
or similar.
SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into "deprecated.h".
Replaced all uses with scm_is_false, scm_is_true, scm_from_bool, and
scm_is_bool, respectively.
* configure.in: Removed -lm check and added a cached check for
__libc_stack_end to get it building for mingw32 hosts.
2003-05-29 Stefan Jahn <stefan@lkcc.org>
* win32-dirent.c: Use malloc() instead of scm_malloc().
* stime.c (s_scm_strftime): Add a type cast to avoid compiler
warning.
* posix.c (s_scm_putenv): Disable use of unsetenv() for the
mingw32 build.
* modules.c (s_scm_module_import_interface): Renamed local
variable interface to _interface. Seems like 'interface'
is a special compiler directive for the mingw32 compiler.
* mkstemp.c: Provide prototype to avoid compiler warning.
* load.c (s_scm_search_path): Fixed absolute and relative
path detections for native Windows platforms.
* gc.h, threads.h: Export some more symbols using SCM_API
(necessary to build on mingw32).
* gc-freelist.c ("s_scm_map_free_list",
"s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
* fports.c (fport_fill_input): Disable use of
fport_wait_for_input() on Win32 platforms.
* filesys.c (s_scm_basename): Fixed __MINGW32__ code.
* Makefile.am: Modified some rules for cross compiling.
2003-05-29 Stefan Jahn <stefan@lkcc.org>
* raw-ltdl.c: Some more modifications for mingw32 platforms.
2003-05-29 Stefan Jahn <stefan@lkcc.org>
* Makefile.am (libguile_srfi_srfi_1_la_LDFLAGS,
libguile_srfi_srfi_4_la_LDFLAGS,
libguile_srfi_srfi_13_14__la_LDFLAGS): Added the -no-undefined
option for the mingw32 build.
2003-05-29 Stefan Jahn <stefan@lkcc.org>
* standalone/Makefile.am: Setup to build on mingw32.
* *.c: add space after commas everywhere.
* *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
Document cases where SCM_WRITABLE_VELTS() is used.
* vectors.h (SCM_VELTS): prepare for write barrier, and let
SCM_VELTS() return a const pointer
(SCM_VECTOR_SET): add macro.
* autogen.sh (mscripts): find and check version number of
autoconf. Complain if 2.53 is not found.
non-zero is returned from a port or smob free function.
(scm_malloc, scm_realloc, scm_strndup, scm_strdup,
scm_gc_register_collectable_memory,
scm_gc_unregister_collectable_memory, scm_gc_malloc,
scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
* backtrace.c, continuations.c, convert.i.c, coop-threads.c,
debug-malloc.c, dynl.c, environments.c, environments.h,
extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
appropriate. Return zero from smob and port free functions.
* debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
* fports.c (scm_setvbuf): Reset read buffer to saved values when
it is pointing to the putback buffer.