diff --git a/libguile/ChangeLog b/libguile/ChangeLog index ecb6f79d0..6da2b4ab2 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,12 @@ +2000-02-08 Gary Houston + + * __scm.h: don't define long_long or ulong_long if HAVE_LONG_LONGS + is not defined. + + * stime.c (scm_localtime, scm_mktime): if neither HAVE_TM_ZONE nor + HAVE_TZNAME are defined, use an empty string instead of giving two + spurious compile-time errors. + Tue Feb 8 13:57:46 2000 Greg J. Badros * ports.c: Doc patches from Richard Kim. Pasted from MIT Scheme. diff --git a/libguile/__scm.h b/libguile/__scm.h index 6bc66fa50..7e2f8f623 100644 --- a/libguile/__scm.h +++ b/libguile/__scm.h @@ -107,16 +107,19 @@ #define STACK_CHECKING #undef NO_CEVAL_STACK_CHECKING + +/* What did the configure script discover about the outside world? */ +#include "libguile/scmconfig.h" + +#ifdef HAVE_LONG_LONGS + /* Some auto-generated .h files contain unused prototypes * that need these typedefs. */ typedef long long long_long; typedef unsigned long long ulong_long; - - -/* What did the configure script discover about the outside world? */ -#include "libguile/scmconfig.h" +#endif /* HAVE_LONG_LONGS */ /* Write prototype declarations like this: diff --git a/libguile/stime.c b/libguile/stime.c index 64629d105..b28daab04 100644 --- a/libguile/stime.c +++ b/libguile/stime.c @@ -330,7 +330,6 @@ restorezone (SCM zone, char **oldenv, const char *subr) } } - SCM_DEFINE (scm_localtime, "localtime", 1, 1, 0, (SCM time, SCM zone), "Returns an object representing the broken down components of @var{time},\n" @@ -363,15 +362,13 @@ SCM_DEFINE (scm_localtime, "localtime", 1, 1, 0, { const char *ptr; - /* copy zone name before calling gmtime or tzset. */ -#ifdef HAVE_TM_ZONE + /* copy zone name before calling gmtime or restoring zone. */ +#if defined (HAVE_TM_ZONE) ptr = ltptr->tm_zone; -#else -# ifdef HAVE_TZNAME +#elif defined (HAVE_TZNAME) ptr = tzname[ (ltptr->tm_isdst == 1) ? 1 : 0 ]; -# else - SCM_MISC_ERROR ("Not fully implemented on this platform",_EOL); -# endif +#else + ptr = ""; #endif zname = SCM_MUST_MALLOC (strlen (ptr) + 1); strcpy (zname, ptr); @@ -498,16 +495,13 @@ SCM_DEFINE (scm_mktime, "mktime", 1, 1, 0, { const char *ptr; - /* copy zone name before calling gmtime or tzset. */ -#ifdef HAVE_TM_ZONE + /* copy zone name before calling gmtime or restoring the zone. */ +#if defined (HAVE_TM_ZONE) ptr = lt.tm_zone; -#else -# ifdef HAVE_TZNAME +#elif defined (HAVE_TZNAME) ptr = tzname[ (lt.tm_isdst == 1) ? 1 : 0 ]; -# else - scm_misc_error (s_mktime, "Not fully implemented on this platform", - SCM_EOL); -# endif +#else + ptr = ""; #endif zname = SCM_MUST_MALLOC (strlen (ptr) + 1); strcpy (zname, ptr);