diff --git a/src/ChangeLog b/src/ChangeLog index f4fdce376..a4a8c652c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2001-07-17 Pavel Roskin + + * util.c (mc_mkstemps): Always use "unsigned long" for enthropy, + since gcc-2.7.2.1 on SunOS doesn't understand __extension__ and + checking for "long long" is not worth the trouble. + Reported by David Martin + 2001-07-16 Pavel Roskin * utilunix.c (mc_doublepopen): Use _exit() instead of exit() diff --git a/src/util.c b/src/util.c index 462f15f43..f7ef4c457 100644 --- a/src/util.c +++ b/src/util.c @@ -1355,13 +1355,6 @@ concat_dir_and_file (const char *dir, const char *file) /* Following code heavily borrows from libiberty, mkstemps.c */ -/* Use 64-bit "enthropy" if available */ -#ifdef __GNUC__ -__extension__ typedef unsigned long long gcc_uint64_t; -#else -typedef unsigned long gcc_uint64_t; -#endif - /* Number of attempts to create a temporary file */ #ifndef TMP_MAX #define TMP_MAX 16384 @@ -1381,7 +1374,7 @@ int mc_mkstemps(char **pname, const char *prefix, const char *suffix) { static const char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; - static gcc_uint64_t value; + static unsigned long value; struct timeval tv; char *tmpdir; char *tmpbase; @@ -1407,7 +1400,7 @@ int mc_mkstemps(char **pname, const char *prefix, const char *suffix) value += (tv.tv_usec << 16) ^ tv.tv_sec ^ getpid (); for (count = 0; count < TMP_MAX; ++count) { - gcc_uint64_t v = value; + unsigned long v = value; int fd; /* Fill in the random bits. */