1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-13 15:10:34 +02:00

* tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move

HAVE_INTTYPES_H handling to scmconfig.h.  #include
"libguile/__scm.h".  Rework handling for scm_t_bits,
scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
SCM_SIZEOF_UNSIGNED_LONG.  Rename usage of HAVE_ARRAYS to
SCM_HAVE_ARRAYS.
This commit is contained in:
Rob Browning 2003-03-26 00:00:58 +00:00
parent cf00748508
commit 353d4770e6

View file

@ -50,34 +50,31 @@
** It is here that tag bits are assigned for various purposes. ** It is here that tag bits are assigned for various purposes.
**/ **/
#ifdef HAVE_STDINT_H /* picks up scmconfig.h too */
#include <stdint.h> #include "libguile/__scm.h"
#endif
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
/* In the beginning was the Word: /* In the beginning was the Word:
*/ */
#ifdef HAVE_UINTPTR_T #if SCM_SIZEOF_INTPTR_T != 0 && defined(INTPTR_MAX) && defined(INTPTR_MIN)
typedef uintptr_t scm_t_bits; typedef scm_t_intptr scm_t_signed_bits;
typedef intptr_t scm_t_signed_bits;
#define SIZEOF_SCM_T_BITS SIZEOF_UINTPTR_T
#define SCM_T_BITS_MAX UINTPTR_MAX
#define SCM_T_SIGNED_BITS_MAX INTPTR_MAX #define SCM_T_SIGNED_BITS_MAX INTPTR_MAX
#define SCM_T_SIGNED_BITS_MIN INTPTR_MIN #define SCM_T_SIGNED_BITS_MIN INTPTR_MIN
#else #else
typedef unsigned long scm_t_bits;
typedef signed long scm_t_signed_bits; typedef signed long scm_t_signed_bits;
#define SIZEOF_SCM_T_BITS SIZEOF_LONG
#define SCM_T_BITS_MAX ULONG_MAX
#define SCM_T_SIGNED_BITS_MAX LONG_MAX #define SCM_T_SIGNED_BITS_MAX LONG_MAX
#define SCM_T_SIGNED_BITS_MIN LONG_MIN #define SCM_T_SIGNED_BITS_MIN LONG_MIN
#endif #endif
#if SCM_SIZEOF_UINTPTR_T != 0 && defined(UINTPTR_MAX)
typedef uintptr_t scm_t_bits;
#define SIZEOF_SCM_T_BITS SCM_SIZEOF_UINTPTR_T
#define SCM_T_BITS_MAX UINTPTR_MAX
#else
typedef unsigned long scm_t_bits;
#define SIZEOF_SCM_T_BITS SCM_SIZEOF_UNSIGNED_LONG
#define SCM_T_BITS_MAX ULONG_MAX
#endif
/* But as external interface, we use SCM, which may, according to the desired /* But as external interface, we use SCM, which may, according to the desired
* level of type checking, be defined in several ways: * level of type checking, be defined in several ways:
*/ */
@ -333,7 +330,7 @@ typedef signed long scm_t_signed_bits;
*/ */
#define scm_tc7_pws 31 #define scm_tc7_pws 31
#ifdef HAVE_ARRAYS #ifdef SCM_HAVE_ARRAYS
#define scm_tc7_llvect 29 #define scm_tc7_llvect 29
#define scm_tc7_uvect 37 #define scm_tc7_uvect 37
/* free 39 */ /* free 39 */