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

34 commits

Author SHA1 Message Date
Andy Wingo
b2f38e4f45 remove mention of GUILE_DEBUG_FREELIST
* libguile/__scm.h: Remove commented-out GUILE_DEBUG_FREELIST define.
* libguile/gen-scmconfig.c: Remove mention of GUILE_DEBUG_FREELIST.
2011-05-15 15:34:15 +02:00
Andy Wingo
fc7bd367ab remove all deprecated code
* libguile/async.c:
* libguile/async.h:
* libguile/debug.h:
* libguile/deprecated.c:
* libguile/deprecated.h:
* libguile/evalext.h:
* libguile/gc-malloc.c:
* libguile/gc.h:
* libguile/gen-scmconfig.c:
* libguile/numbers.c:
* libguile/ports.c:
* libguile/ports.h:
* libguile/procprop.c:
* libguile/procprop.h:
* libguile/read.c:
* libguile/socket.c:
* libguile/srfi-4.h:
* libguile/strings.c:
* libguile/strings.h:
* libguile/tags.h:
* module/ice-9/boot-9.scm:
* module/ice-9/deprecated.scm: Remove all deprecated code.  CPP defines
  that were not previously issuing warnings were changed so that their
  expansions would indicate the replacement forms to use,
  e.g. scm_sizet__GONE__REPLACE_WITH__size_t.

  The two exceptions were SCM_LISTN, which did not produce warnings
  before, and the string-filter argument order stuff.

  Drops the initial dirty memory usage of Guile down to 2.8 MB on my
  machine, from 4.4 MB.
2011-05-12 14:01:26 +02:00
Andy Wingo
ad378da975 check for iconveh values at configure-time
* configure.ac: Check for the iconveh values here, instead of relying on
  gen-scmconfig to know them.  That doesn't work in general because
  gen-scmconfig runs on the build machine, not the target machine.

* libguile/Makefile.am (gen-scmconfig.$(OBJEXT)): Revert rule to the
  revision before 533d8212.

* libguile/gen-scmconfig.h.in (SCM_I_GSC_ICONVEH_ERROR):
  (SCM_I_GSC_ICONVEH_QUESTION_MARK):
  (SCM_I_GSC_ICONVEH_ESCAPE_SEQUENCE):
* libguile/gen-scmconfig.c: Use configure-time substitutions to set
  SCM_ICONVEH_ERROR_HANDLER et al.
2011-04-28 22:39:20 +02:00
Andy Wingo
90fed973ab pthread-threads.h: only redirect to GC_pthread_sigmask if it is present
* configure.ac: Check for pthread_sigmask.
* libguile/gen-scmconfig.c: Create SCM_HAVE_GC_PTHREAD_SIGMASK.
* libguile/pthread-threads.h (scm_i_pthread_sigmask): Only redirect to
  GC_pthread_sigmask if GC_pthread_sigmask is present.
2011-04-03 22:03:56 +02:00
Andy Wingo
8cf49d836f fix compilation with libgc 7.0, 7.1
* configure.ac: Check for GC_pthread_exit and GC_pthread_cancel.

* libguile/gen-scmconfig.c: Write HAVE_GC_PTHREAD_CANCEL and
  HAVE_GC_PTHREAD_EXIT into scmconfig.h.

* libguile/pthread-threads.h (scm_i_pthread_exit, scm_i_pthread_cancel):
  Only redefine to their GC_pthread_* variants if we have those
  functions, which is not the case in libgc < 7.2.
2011-03-29 13:21:44 +02:00
Ludovic Courtès
2e65b52f8a Use Gnulib's isnan' and isinf' modules.
This updates Gnulib to v0.0-4219-g84cdd8b.

* m4/gnulib-cache.m4: Add `isinf' and `isnan'.

* configure.ac: Remove checks for `floatingpoint.h', `ieeefp.h', and
  `nan.h'.

* libguile/gen-scmconfig.c (main): Remove definitions of
  `SCM_HAVE_FLOATINGPOINT_H', `SCM_HAVE_IEEEFP_H', and
  `SCM_HAVE_NAN_H'.

* libguile/numbers.c (isnan)[SCO && !HAVE_ISNAN]: Remove.
  (isinf)[SCO && !HAVE_ISINF]: Remove.
  (xisinf, xisnan): Remove.  Change callers to use `isinf' and `isnan'.
  (guile_ieee_init): Remove the `defined HAVE_ISINF' and `define
  HAVE_ISNAN' conditions.

* libguile/numbers.h: Remove code conditional on
  `SCM_HAVE_FLOATINGPOINT_H', `SCM_HAVE_IEEEFP_H', or `SCM_HAVE_NAN_H'.
2010-09-08 00:34:27 +02:00
Andy Wingo
8a4ed2dd34 remove "discouraged" infrastructure
* libguile/discouraged.h: Remove.

* libguile/deprecated.c (scm_internal_select, scm_thread_sleep)
  (scm_thread_usleep): Deprecate formerly discouraged names.

* libguile/eq.h (SCM_EQ_P):
* libguile/pairs.h (SCM_NULLP, SCM_NNULLP, SCM_CONSP, SCM_NCONSP):
* libguile/boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
  (SCM_NEGATE_BOOL, SCM_BOOL_NOT): Undiscourage these names, because I'm
  not sure deprecating them will do any good.

* libguile.h:
* libguile/gen-scmconfig.c:
* libguile/numbers.c:
* libguile/init.c:
* libguile/Makefile.am:
* configure.ac: Remove bits that referenced discouraged.h, and dealt
  with the "discouraging" system.
2010-08-08 14:15:47 +02:00
Andy Wingo
4ca4826997 remove SCM_HAVE_T_INT64, SCM_HAVE_T_UINT64
* libguile/__scm.h:
* libguile/numbers.h:
* libguile/random.c:
* libguile/srfi-4.c:
* libguile/srfi-4.h:
* libguile/numbers.c:
* test-suite/standalone/test-conversion.c:
* libguile/gen-scmconfig.c: As we require 64-bit integers in
  configure.ac, remove conditional definition of 64-bit types.
2010-07-26 15:00:49 +02:00
Andy Wingo
c1b7c940ec lisp nil always enabled
* configure.ac: Remove --disable-elisp option. Lisp nil is always
  enabled.

* libguile/boolean.h:
* libguile/gen-scmconfig.c:
* libguile/gen-scmconfig.h.in:
* libguile/init.c:
* libguile/lang.c:
* libguile/lang.h:
* libguile/pairs.h:
* libguile/private-options.h:
* libguile/read.c: Remove conditionals for disabling elisp.
2010-04-09 14:03:02 +02:00
Ludovic Courtès
83a7171bf3 Remove obsolete compile-time option for freelist debugging.
* configure.ac: Remove `--enable-debug-freelist' option and
  `SCM_I_GSC_GUILE_DEBUG_FREELIST' substitution variable.

* libguile/gen-scmconfig.c (main): Remove references to
  `SCM_I_GSC_GUILE_DEBUG_FREELIST' and `GUILE_DEBUG_FREELIST'.

* libguile/gen-scmconfig.h.in (SCM_I_GSC_GUILE_DEBUG_FREELIST): Remove.
2010-03-05 00:36:47 +01:00
Ludovic Courtès
114bc68ac9 Don't rely on `HAVE_' macros in public header "tags.h".
* configure.ac: Check for `intptr_t' and `uintptr_t'.  Substitute
  `SCM_I_GSC_T_INTPTR' and `SCM_I_GSC_T_UINPTR'.

* libguile/__scm.h (SCM_T_UINTPTR_MAX, SCM_T_INTPTR_MIN,
  SCM_T_INTPTR_MAX): New macros.

* libguile/_scm.h (SIZEOF_SCM_T_BITS): New macro.

* libguile/gen-scmconfig.c (main): Produce typedefs for `scm_t_intptr'
  and `scm_t_uintptr'.

* libguile/gen-scmconfig.h.in (SCM_I_GSC_T_INTPTR, SCM_I_GSC_T_UINPTR):
  New macros.

* libguile/tags.h: Don't check for `HAVE_INTTYPES_H' and
  `HAVE_STDINT_H'; don't include <inttypes.h> nor <stdint.h>.
  (scm_t_signed_bits, scm_t_bits): Define unconditionally as aliases for
  `scm_t_intptr' and `scm_t_uintptr', respectively.
  (SCM_T_SIGNED_BITS_MAX, SCM_T_SIGNED_BITS_MIN, SCM_T_BITS_MAX):
  Likewise.
  (SIZEOF_SCM_T_BITS): Remove.
2009-11-24 23:12:03 +01:00
Ludovic Courtès
56a3dcd431 Remove references to undefined macros.
The intent is to allow compilation with `-Wundef', which in turn should
make it easier to catch erroneous uses of nonexistent macros.

* libguile/__scm.h: Don't assume `BUILDING_LIBGUILE' is defined.

* libguile/conv-uinteger.i.c (SCM_TO_TYPE_PROTO): Remove unneeded CPP
  conditional on `TYPE_MIN == 0'.

* libguile/fports.c: Check for the definition of `HAVE_CHSIZE' and
  `HAVE_FTRUNCATE', not for their value.

* libguile/ports.c: Likewise.

* libguile/numbers.c (guile_ieee_init): Likewise with `HAVE_DINFINITY'
  and `HAVE_DQNAN'.

* test-suite/standalone/test-conversion.c (ieee_init): Likewise.

* libguile/strings.c: Likewise with `SCM_STRING_LENGTH_HISTOGRAM'.

* libguile/strings.h: Likewise.

* libguile/tags.h: Likewise with `HAVE_INTTYPES_H' and `HAVE_STDINT_H'.

* libguile/threads.c: Likewise with `HAVE_PTHREAD_GET_STACKADDR_NP'.

* libguile/vm-engine.c (VM_NAME): Likewise with `VM_CHECK_IP'.

* libguile/gen-scmconfig.c (main): Use "#ifdef HAVE_", not "#if HAVE_".

* libguile/socket.c (scm_setsockopt): Likewise.
2009-11-17 23:42:22 +01:00
Ludovic Courtès
705edb959b Use TLS when available for `SCM_I_CURRENT_THREAD'.
* acinclude.m4 (GUILE_THREAD_LOCAL_STORAGE): New macro.

* configure.ac: Use it.

* libguile/__scm.h (SCM_THREAD_LOCAL): New macro.

* libguile/gen-scmconfig.c (main): Define `SCM_HAVE_THREAD_STORAGE_CLASS'.

* libguile/gen-scmconfig.h.in (SCM_I_GSC_HAVE_THREAD_STORAGE_CLASS):
  New.

* libguile/threads.c
  (scm_i_current_thread)[SCM_HAVE_THREAD_STORAGE_CLASS]: New.
  (SET_CURRENT_THREAD): New macro.
  (guilify_self_1, on_thread_exit, init_thread_key): Use it.

* libguile/threads.h
  (scm_i_current_thread)[SCM_HAVE_THREAD_STORAGE_CLASS]: New
  declaration.
  (SCM_I_CURRENT_THREAD)[SCM_HAVE_THREAD_STORAGE_CLASS]: New macro.
  (init_thread_key_once, init_thread_key): Conditionalize on
  `!defined SCM_HAVE_THREAD_STORAGE_CLASS'.
  (scm_i_init_thread_for_guile): Update accordingly.
2009-10-09 14:10:05 +02:00
Michael Gran
eca29b0202 Don't include libunistring headers in Guile public headers
This requres the creation of a new type
scm_t_string_failed_conversion_handler to replace libunistring's
enum iconveh_ilseq_handler.

* libguile/strings.h: don't include <uniconv.h>
(scm_t_string_failed_conversion_handler): new enum type
(SCM_FAILED_CONVERSION_ERROR, SCM_FAILED_CONVERSION_QUESTION_MARK):
(SCM_FAILED_CONVERSION_ESCAPE_SEQUENCE): new enum type values

* libguile/strings.c (scm_to_stringn): now takes type
scm_t_string_failed_conversion_handler.  All callers changed.

* libguile/print.c: include <uniconv.h>

* libguile/ports.c (scm_lfwrite_substr): use
scm_t_string_conversion_handler's constants

* libguile/gen-scmconfig.c (SCM_ICONVEH_ERROR):
(SCM_ICONVEH_QUESTION_MARK, SCM_ICONVEH_ESCAPE_SEQUENCE): store
iconveh_ilseq_hander constants as #define's
2009-08-12 09:21:55 -07:00
Ludovic Courtès
ba4c43dc3b Remove the long_long' and ulong_long' types.
* libguile/gen-scmconfig.c (main): Don't emit typedefs for `long_long'
  and `ulong_long'.  This was already deprecated in 1.8 and known to
  cause conflicts with other libraries such as HDF5, as reported by Mark
  Patterson <mpatterson@physics.queensu.ca>
  (http://lists.gnu.org/archive/html/bug-guile/2009-02/msg00003.html).
2009-07-15 00:32:25 +02:00
Ludovic Courtès
f1ce919933 Add scm_t_off' type so that scm_t_port' has a fixed layout.
* libguile/gen-scmconfig.c (main): Produce a definition for
  `scm_t_off'.

* libguile/ports.h (scm_t_port)[read_buf_size, saved_read_buf_size,
  write_buf_size, seek, truncate]: Use `scm_t_off' instead of `off_t' so
  that the layout and size of the structure does not depend on the
  application's `_FILE_OFFSET_BITS' value.  Reported by Bill
  Schottstaedt, see
  http://lists.gnu.org/archive/html/bug-guile/2009-06/msg00018.html.
  (scm_set_port_seek, scm_set_port_truncate): Update.

* libguile/ports.c (scm_set_port_seek, scm_set_port_truncate): Use
  `scm_t_off' and `off_t_or_off64_t'.

* libguile/fports.c (fport_seek, fport_truncate): Use `scm_t_off'
  instead of `off_t'.

* libguile/r6rs-ports.c (bip_seek, cbp_seek, bop_seek): Use `scm_t_off'
  instead of `off_t'.

* libguile/rw.c (scm_write_string_partial): Likewise.

* libguile/strports.c (st_resize_port, st_seek, st_truncate): Likewise.

* doc/ref/api-io.texi (Port Implementation): Update prototype of
  `scm_set_port_seek ()' and `scm_set_port_truncate ()'.

* NEWS: Update.
2009-06-25 23:32:44 +02:00
Ludovic Courtès
dbb605f575 Include <config.h> in all C files; use #ifdef HAVE_CONFIG_H' rather than #if'. 2008-09-13 15:35:27 +02:00
Ludovic Courtès
450be18dff Handle lack of struct dirent64' and readdir64_r ()' on HP-UX 11.11. 2008-07-17 00:20:31 +02:00
Ludovic Courtès
535b3592b2 Don't use "-I$(srcdir)", so that our "random.h" doesn't shadow libc's on Tru64. 2008-04-24 19:37:54 +02:00
Ludovic Courtès
6630261802 Changes from arch/CVS synchronization 2007-10-10 16:46:26 +00:00
Kevin Ryde
8ab3d8a068 merge from 1.8 branch 2006-10-09 23:40:48 +00:00
Marius Vollmer
657bdfeae3 (SCM_I_GSC_USE_COOP_THREADS, SCM_USE_COOP_THREADS): Removed. 2005-03-02 19:58:26 +00:00
Marius Vollmer
0fb1d2642c Hard code SCM_HAVE_ARRAYS to "1", for real now. 2005-01-02 21:04:50 +00:00
Marius Vollmer
9c6e33c62a * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
* gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
2005-01-02 19:43:36 +00:00
Marius Vollmer
dee91fb9d4 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
* gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
2004-08-02 16:10:17 +00:00
Marius Vollmer
4627df5a6b * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New. 2004-07-29 15:48:54 +00:00
Marius Vollmer
e88d45aa73 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.

* __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
2004-07-29 14:03:40 +00:00
Marius Vollmer
d199059254 Instead of hard-coding the numbers, compute them by assuming
twos-complement.
2004-07-08 15:31:39 +00:00
Marius Vollmer
76bd98fa16 * gen-scmconfig.h.in: Added all the new SCM_I_GSC_*_LIMITS that
configure now produces.
* gen-scmconfig.c: Use them to output SCM_T_INT8_MIN, etc
definitions, giving the limits of the integer types defined by
Guile. Also, output a hard coded SCM_I_LLONG_MIN, etc since
LLONG_MIN or LONG_LONG_MIN is hard to get at.
2004-07-07 15:18:31 +00:00
Marius Vollmer
fc54d9376d Arrange for scm_t_intmax and scm_t_uintmax to be defined in
scmconfig.h
2003-12-26 19:04:55 +00:00
Rob Browning
9ca20a9c88 * gen-scmconfig.c (main): remove public definition of
SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
direct typedef of long_long and ulong_long inside deprecated block
when appropriate.
2003-11-18 06:10:39 +00:00
Stefan Jahn
fcc5d734fc 2003-06-14 Stefan Jahn <stefan@lkcc.org>
* configure.in: Checking for __int64 as possible candidate for
        the SCM_I_GSC_T_INT64 define.

2003-06-14  Stefan Jahn  <stefan@lkcc.org>

        * threads.h: Redefined scm_getspecific() and scm_setspecific()
        to be functions instead of macros.

        * threads.c: Conditionalized inclusion of <sys/time.h> and
        <unistd.h>.
        (scm_getspecific, scm_setspecific): Made these two function
        real part of the API.

        * posix.c (s_scm_putenv): Added some code to make a
        (putenv "FOO="), i.e. setting an empty string, work also on
        Win32 systems.  Thanks to Kevin Ryde for the proposal.
2003-06-14 05:36:02 +00:00
Rob Browning
005f04cd6c * gen-scmconfig.c: change most new public symbols to be defined to
0 or 1 rather than being either 1 or undefined.
2003-03-27 20:07:17 +00:00
Rob Browning
caeef9cb7c * gen-scmconfig.c: new file -- see comments in file for details. 2003-03-25 23:48:53 +00:00