summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-06-25 05:08:01 (GMT)
committerGitHub <noreply@github.com>2021-06-25 05:08:01 (GMT)
commit6dd051101d94b14ff21469b8045c4c26e2a446bd (patch)
treef1f9238d04c80cb8af220abecf88a9ef78135a34
parent34f2df48b7e0ae2151462a9835fd7096ef8c2925 (diff)
downloadhdf5-6dd051101d94b14ff21469b8045c4c26e2a446bd.zip
hdf5-6dd051101d94b14ff21469b8045c4c26e2a446bd.tar.gz
hdf5-6dd051101d94b14ff21469b8045c4c26e2a446bd.tar.bz2
Assume frexpl/f and fabsl/f, which are C99 (#799)
-rw-r--r--config/cmake/H5pubconf.h.in6
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake2
-rw-r--r--configure.ac4
-rw-r--r--src/H5private.h14
-rw-r--r--tools/test/perform/pio_standalone.h20
-rw-r--r--tools/test/perform/sio_standalone.h20
6 files changed, 14 insertions, 52 deletions
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 8a4db30..e14e212 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -156,12 +156,6 @@
/* Define to 1 if you have the `fork' function. */
#cmakedefine H5_HAVE_FORK @H5_HAVE_FORK@
-/* Define to 1 if you have the `frexpf' function. */
-#cmakedefine H5_HAVE_FREXPF @H5_HAVE_FREXPF@
-
-/* Define to 1 if you have the `frexpl' function. */
-#cmakedefine H5_HAVE_FREXPL @H5_HAVE_FREXPL@
-
/* Define to 1 if you have the `fseeko' function. */
#cmakedefine H5_HAVE_FSEEKO @H5_HAVE_FSEEKO@
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake
index f762a1f..ad8496a 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -467,8 +467,6 @@ CHECK_FUNCTION_EXISTS (alarm ${HDF_PREFIX}_HAVE_ALARM)
CHECK_FUNCTION_EXISTS (fcntl ${HDF_PREFIX}_HAVE_FCNTL)
CHECK_FUNCTION_EXISTS (flock ${HDF_PREFIX}_HAVE_FLOCK)
CHECK_FUNCTION_EXISTS (fork ${HDF_PREFIX}_HAVE_FORK)
-CHECK_FUNCTION_EXISTS (frexpf ${HDF_PREFIX}_HAVE_FREXPF)
-CHECK_FUNCTION_EXISTS (frexpl ${HDF_PREFIX}_HAVE_FREXPL)
CHECK_FUNCTION_EXISTS (gethostname ${HDF_PREFIX}_HAVE_GETHOSTNAME)
CHECK_FUNCTION_EXISTS (getrusage ${HDF_PREFIX}_HAVE_GETRUSAGE)
diff --git a/configure.ac b/configure.ac
index 75016ae..d9a6a5e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2007,8 +2007,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
## NOTE: clock_gettime may require linking to the rt or posix4 library
## so we'll search for it before calling AC_CHECK_FUNCS.
AC_SEARCH_LIBS([clock_gettime], [rt posix4])
-AC_CHECK_FUNCS([alarm clock_gettime difftime fcntl flock fork frexpf])
-AC_CHECK_FUNCS([frexpl gethostname getrusage gettimeofday])
+AC_CHECK_FUNCS([alarm clock_gettime difftime fcntl flock fork])
+AC_CHECK_FUNCS([gethostname getrusage gettimeofday])
AC_CHECK_FUNCS([lstat rand_r random setsysinfo])
AC_CHECK_FUNCS([siglongjmp sigsetjmp sigprocmask])
AC_CHECK_FUNCS([srandom strdup symlink])
diff --git a/src/H5private.h b/src/H5private.h
index 2478c2e..ed17d4c 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -766,12 +766,11 @@ typedef struct {
#ifndef HDfabs
#define HDfabs(X) fabs(X)
#endif /* HDfabs */
-/* use ABS() because fabsf() fabsl() are not common yet. */
#ifndef HDfabsf
-#define HDfabsf(X) ABS(X)
+#define HDfabsf(X) fabsf(X)
#endif /* HDfabsf */
#ifndef HDfabsl
-#define HDfabsl(X) ABS(X)
+#define HDfabsl(X) fabsl(X)
#endif /* HDfabsl */
#ifndef HDfclose
#define HDfclose(F) fclose(F)
@@ -863,20 +862,11 @@ H5_DLL H5_ATTR_CONST int Nflock(int fd, int operation);
#ifndef HDfrexp
#define HDfrexp(X, N) frexp(X, N)
#endif /* HDfrexp */
-/* Check for Cray-specific 'frexpf()' and 'frexpl()' routines */
#ifndef HDfrexpf
-#ifdef H5_HAVE_FREXPF
#define HDfrexpf(X, N) frexpf(X, N)
-#else /* H5_HAVE_FREXPF */
-#define HDfrexpf(X, N) frexp(X, N)
-#endif /* H5_HAVE_FREXPF */
#endif /* HDfrexpf */
#ifndef HDfrexpl
-#ifdef H5_HAVE_FREXPL
#define HDfrexpl(X, N) frexpl(X, N)
-#else /* H5_HAVE_FREXPL */
-#define HDfrexpl(X, N) frexp(X, N)
-#endif /* H5_HAVE_FREXPL */
#endif /* HDfrexpl */
/* fscanf() variable arguments */
#ifndef HDfseek
diff --git a/tools/test/perform/pio_standalone.h b/tools/test/perform/pio_standalone.h
index 82fabdc..2d89d30 100644
--- a/tools/test/perform/pio_standalone.h
+++ b/tools/test/perform/pio_standalone.h
@@ -108,10 +108,9 @@
#define HD_exit(N) _exit(N)
#define HDexp(X) exp(X)
#define HDfabs(X) fabs(X)
-/* use ABS() because fabsf() fabsl() are not common yet. */
-#define HDfabsf(X) ABS(X)
-#define HDfabsl(X) ABS(X)
-#define HDfclose(F) fclose(F)
+#define HDfabsf(X) fabsf(X)
+#define HDfabsl(X) fabsl(X)
+#define HDfclose(F) fclose(F)
/* fcntl() variable arguments */
#define HDfdopen(N, S) fdopen(N, S)
#define HDfeof(F) feof(F)
@@ -137,17 +136,8 @@
#define HDfree(M) free(M)
#define HDfreopen(S, M, F) freopen(S, M, F)
#define HDfrexp(X, N) frexp(X, N)
-/* Check for Cray-specific 'frexpf()' and 'frexpl()' routines */
-#ifdef H5_HAVE_FREXPF
-#define HDfrexpf(X, N) frexpf(X, N)
-#else /* H5_HAVE_FREXPF */
-#define HDfrexpf(X, N) frexp(X, N)
-#endif /* H5_HAVE_FREXPF */
-#ifdef H5_HAVE_FREXPL
-#define HDfrexpl(X, N) frexpl(X, N)
-#else /* H5_HAVE_FREXPL */
-#define HDfrexpl(X, N) frexp(X, N)
-#endif /* H5_HAVE_FREXPL */
+#define HDfrexpf(X, N) frexpf(X, N)
+#define HDfrexpl(X, N) frexpl(X, N)
/* fscanf() variable arguments */
#ifdef H5_HAVE_FSEEKO
#define HDfseek(F, O, W) fseeko(F, O, W)
diff --git a/tools/test/perform/sio_standalone.h b/tools/test/perform/sio_standalone.h
index 54e82fa..9bdac29 100644
--- a/tools/test/perform/sio_standalone.h
+++ b/tools/test/perform/sio_standalone.h
@@ -123,10 +123,9 @@
#define HD_exit(N) _exit(N)
#define HDexp(X) exp(X)
#define HDfabs(X) fabs(X)
-/* use ABS() because fabsf() fabsl() are not common yet. */
-#define HDfabsf(X) ABS(X)
-#define HDfabsl(X) ABS(X)
-#define HDfclose(F) fclose(F)
+#define HDfabsf(X) fabsf(X)
+#define HDfabsl(X) fabsl(X)
+#define HDfclose(F) fclose(F)
/* fcntl() variable arguments */
#define HDfdopen(N, S) fdopen(N, S)
#define HDfeof(F) feof(F)
@@ -152,17 +151,8 @@
#define HDfree(M) free(M)
#define HDfreopen(S, M, F) freopen(S, M, F)
#define HDfrexp(X, N) frexp(X, N)
-/* Check for Cray-specific 'frexpf()' and 'frexpl()' routines */
-#ifdef H5_HAVE_FREXPF
-#define HDfrexpf(X, N) frexpf(X, N)
-#else /* H5_HAVE_FREXPF */
-#define HDfrexpf(X, N) frexp(X, N)
-#endif /* H5_HAVE_FREXPF */
-#ifdef H5_HAVE_FREXPL
-#define HDfrexpl(X, N) frexpl(X, N)
-#else /* H5_HAVE_FREXPL */
-#define HDfrexpl(X, N) frexp(X, N)
-#endif /* H5_HAVE_FREXPL */
+#define HDfrexpf(X, N) frexpf(X, N)
+#define HDfrexpl(X, N) frexpl(X, N)
/* fscanf() variable arguments */
#ifdef H5_HAVE_FSEEKO
#define HDfseek(F, O, W) fseeko(F, O, W)