OSDN Git Service

* mkstemp.c: Include gansidecl.h. Rename uint64_t to gcc_uint64_t.
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 27 Jun 1998 09:37:37 +0000 (09:37 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 27 Jun 1998 09:37:37 +0000 (09:37 +0000)
        (mkstemp): Remove size specifier for variable `letters'.  Call
        gettimeofday, not __gettimeofday.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20752 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/mkstemp.c

index 57e5b3b..b30f240 100644 (file)
@@ -1,5 +1,9 @@
 Sat Jun 27 07:35:21 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
+       * mkstemp.c: Include gansidecl.h.  Rename uint64_t to gcc_uint64_t.
+       (mkstemp): Remove size specifier for variable `letters'.  Call
+       gettimeofday, not __gettimeofday.
+
        * Makefile.in (EXPR_H): New dependency variable.
        (c-typeck.o): Depend on $(EXPR_H) instead of expr.h.
        (c-iterate.o): Likewise.
index 1ef90a5..d4d4b2b 100644 (file)
 #else
 #include "config.h"
 #include "system.h"
+#include "gansidecl.h"
 
-/* We need to provide a type for uint64_t.  */
+/* We need to provide a type for gcc_uint64_t.  */
 #ifdef __GNUC__
-typedef unsigned long long uint64_t;
+typedef unsigned long long gcc_uint64_t;
 #else
-typedef unsigned long uint64_t;
+typedef unsigned long gcc_uint64_t;
 #endif
 
 #ifndef TMP_MAX
@@ -49,9 +50,9 @@ int
 mkstemp (template)
      char *template;
 {
-  static const char letters[62]
+  static const char letters[]
     = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
-  static uint64_t value;
+  static gcc_uint64_t value;
 #ifdef HAVE_GETTIMEOFDAY
   struct timeval tv;
 #endif
@@ -70,15 +71,15 @@ mkstemp (template)
 
 #ifdef HAVE_GETTIMEOFDAY
   /* Get some more or less random data.  */
-  __gettimeofday (&tv, NULL);
-  value += ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec ^ getpid ();
+  gettimeofday (&tv, NULL);
+  value += ((gcc_uint64_t) tv.tv_usec << 16) ^ tv.tv_sec ^ getpid ();
 #else
   value += getpid ();
 #endif
 
   for (count = 0; count < TMP_MAX; ++count)
     {
-      uint64_t v = value;
+      gcc_uint64_t v = value;
       int fd;
 
       /* Fill in the random bits.  */