mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Merge branch 'broken-windows'
This commit is contained in:
commit
e32486291a
@ -1177,6 +1177,7 @@ CHECK_FUNCTION_EXISTS(strtoull HAVE_STROULL)
|
||||
CHECK_FUNCTION_EXISTS(strstr HAVE_STRSTR)
|
||||
CHECK_FUNCTION_EXISTS(mkstemp HAVE_MKSTEMP)
|
||||
CHECK_FUNCTION_EXISTS(rand HAVE_RAND)
|
||||
CHECK_FUNCTION_EXISTS(random HAVE_RANDOM)
|
||||
CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
|
||||
CHECK_FUNCTION_EXISTS(fsync HAVE_FSYNC)
|
||||
CHECK_FUNCTION_EXISTS(MPI_Comm_f2C HAVE_MPI_COMM_F2C)
|
||||
|
@ -272,6 +272,7 @@ are set when opening a binary file on Windows. */
|
||||
#cmakedefine HAVE_STRSTR
|
||||
#cmakedefine HAVE_MKSTEMP
|
||||
#cmakedefine HAVE_RAND
|
||||
#cmakedefine HAVE_RANDOM
|
||||
#cmakedefine HAVE_GETTIMEOFDAY
|
||||
#cmakedefine HAVE_MPI_COMM_F2C
|
||||
#cmakedefine HAVE_MEMMOVE
|
||||
|
@ -750,7 +750,7 @@ AC_HEADER_STDBOOL
|
||||
# Check for these functions...
|
||||
AC_CHECK_FUNCS([strlcat strerror snprintf strchr strrchr strcat strcpy \
|
||||
strdup strcasecmp strtod strtoll strtoull strstr \
|
||||
mkstemp rand memcmp \
|
||||
mkstemp rand random memcmp \
|
||||
getrlimit gettimeofday fsync MPI_Comm_f2c])
|
||||
|
||||
# Does the user want to use NC_DISKLESS?
|
||||
|
@ -35,7 +35,11 @@ static int isPrime(unsigned long val)
|
||||
|
||||
for (i = 9; i--;)
|
||||
{
|
||||
#ifdef HAVE_RANDOM
|
||||
unsigned long a = ((unsigned long)random() % (val-4)) + 2;
|
||||
#else
|
||||
unsigned long a = ((unsigned long)rand() % (val - 4)) + 2;
|
||||
#endif
|
||||
unsigned long p = 1;
|
||||
unsigned long exp = val-1;
|
||||
while (exp)
|
||||
|
Loading…
Reference in New Issue
Block a user