1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-22 04:30:19 +02:00

* __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.
This commit is contained in:
Gary Houston 2000-02-08 22:16:15 +00:00
parent 4ba473028c
commit 43ff3170df
3 changed files with 26 additions and 20 deletions

View file

@ -1,3 +1,12 @@
2000-02-08 Gary Houston <ghouston@arglist.com>
* __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 <gjb@cs.washington.edu>
* ports.c: Doc patches from Richard Kim. Pasted from MIT Scheme.

View file

@ -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:

View file

@ -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
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
ptr = "";
#endif
zname = SCM_MUST_MALLOC (strlen (ptr) + 1);
strcpy (zname, ptr);