From 2a7b2583167fb5bc5d8a657b7789fa6f43cbf9d3 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Tue, 25 Mar 2003 23:57:26 +0000 Subject: [PATCH] * mkstemp.c: #include if HAVE_CONFIG_H. #include "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of scm_t_uint64 and rename usages. --- libguile/mkstemp.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/libguile/mkstemp.c b/libguile/mkstemp.c index 6e35f40df..ace4b0a61 100644 --- a/libguile/mkstemp.c +++ b/libguile/mkstemp.c @@ -41,7 +41,11 @@ whether to permit this exception to apply to your modifications. If you do not wish that, delete this exception notice. */ -#include "libguile/scmconfig.h" +#if HAVE_CONFIG_H +# include +#endif + +#include "libguile/__scm.h" #ifdef HAVE_STDLIB_H #include @@ -62,13 +66,6 @@ #include #endif -/* We need to provide a type for gcc_uint64_t. */ -#ifdef __GNUC__ -typedef unsigned long long gcc_uint64_t; -#else -typedef unsigned long gcc_uint64_t; -#endif - #ifndef TMP_MAX #define TMP_MAX 16384 #endif @@ -89,7 +86,7 @@ mkstemp (template) { static const char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; - static gcc_uint64_t value; + static scm_t_uint64 value; #ifdef HAVE_GETTIMEOFDAY struct timeval tv; #endif @@ -110,14 +107,14 @@ mkstemp (template) #ifdef HAVE_GETTIMEOFDAY /* Get some more or less random data. */ gettimeofday (&tv, NULL); - value += ((gcc_uint64_t) tv.tv_usec << 16) ^ tv.tv_sec ^ getpid (); + value += ((scm_t_uint64) tv.tv_usec << 16) ^ tv.tv_sec ^ getpid (); #else value += getpid (); #endif for (count = 0; count < TMP_MAX; ++count) { - gcc_uint64_t v = value; + scm_t_uint64 v = value; int fd; /* Fill in the random bits. */