Despite claims that it's ANSI compliant, the native C compiler on Digital OSF1
doesn't accept leading spaces on pre-processor directives, so all the nicely
formatted
#ifdef SOMETHING
#define SOMETHING_ELSE
.
.
.
break the build.
Also, the native cc needs to be invoked with -std1 if the __STDC__
macro is to be defined. I found that if it wasn't then libguile/list.c
wouldn't compile because it attempts to use the <varargs.h> which seems to be
broken in some way (whether on this platform or whether it is being mis-used
in list.c I don't know.)
Here's a patch for the #defines :
*** tags.h.orig Tue Jun 20 13:29:54 2000
--- tags.h Tue Jun 20 13:30:48 2000
***************
*** 66,80 ****
#if (SCM_DEBUG_TYPING_STRICTNESS == 1)
typedef union { struct { scm_bits_t n; } n; } SCM;
static SCM scm_pack(scm_bits_t b) { SCM s; s.n.n = b; return s; }
! #define SCM_UNPACK(x) ((x).n.n)
! #define SCM_PACK(x) (scm_pack ((scm_bits_t) (x)))
#elif defined (SCM_VOIDP_TEST)
/* This is the default, which provides an intermediate level of compile time
* type checking while still resulting in very efficient code.
*/
typedef void * SCM;
! #define SCM_UNPACK(x) ((scm_bits_t) (x))
! #define SCM_PACK(x) ((SCM) (x))
#else
/* This should be used as a fall back solution for machines on which casting
* to a pointer may lead to loss of bit information, e. g. in the three least
--- 66,80 ----
#if (SCM_DEBUG_TYPING_STRICTNESS == 1)
typedef union { struct { scm_bits_t n; } n; } SCM;
static SCM scm_pack(scm_bits_t b) { SCM s; s.n.n = b; return s; }
! #define SCM_UNPACK(x) ((x).n.n)
! #define SCM_PACK(x) (scm_pack ((scm_bits_t) (x)))
#elif defined (SCM_VOIDP_TEST)
/* This is the default, which provides an intermediate level of compile time
* type checking while still resulting in very efficient code.
*/
typedef void * SCM;
! #define SCM_UNPACK(x) ((scm_bits_t) (x))
! #define SCM_PACK(x) ((SCM) (x))
#else
/* This should be used as a fall back solution for machines on which casting
* to a pointer may lead to loss of bit information, e. g. in the three least
***************
*** 81,88 ****
* significant bits.
*/
typedef scm_bits_t SCM;
! #define SCM_UNPACK(x) (x)
! #define SCM_PACK(x) ((scm_bits_t) (x))
#endif
--- 81,88 ----
* significant bits.
*/
typedef scm_bits_t SCM;
! #define SCM_UNPACK(x) (x)
! #define SCM_PACK(x) ((scm_bits_t) (x))
#endif
*** gc.h.orig Tue Jun 20 13:30:07 2000
--- gc.h Tue Jun 20 13:31:04 2000
***************
*** 74,84 ****
* pointers to scm_vector elts, functions, &c are not munged.
*/
#ifdef _UNICOS
! #define SCM2PTR(x) ((SCM_CELLPTR) (SCM_UNPACK (x) >> 3))
! #define PTR2SCM(x) (SCM_PACK (((scm_bits_t) (x)) << 3))
#else
! #define SCM2PTR(x) ((SCM_CELLPTR) (SCM_UNPACK (x)))
! #define PTR2SCM(x) (SCM_PACK ((scm_bits_t) (x)))
#endif /* def _UNICOS */
--- 74,84 ----
* pointers to scm_vector elts, functions, &c are not munged.
*/
#ifdef _UNICOS
! #define SCM2PTR(x) ((SCM_CELLPTR) (SCM_UNPACK (x) >> 3))
! #define PTR2SCM(x) (SCM_PACK (((scm_bits_t) (x)) << 3))
#else
! #define SCM2PTR(x) ((SCM_CELLPTR) (SCM_UNPACK (x)))
! #define PTR2SCM(x) (SCM_PACK ((scm_bits_t) (x)))
#endif /* def _UNICOS */
--
Ian Grant, Computer Lab., New Museums Site, Pembroke Street, Cambridge
Phone: +44 1223 334420 Personal e-mail: iang at pobox dot com