summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-05-10 10:33:54 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-05-10 10:33:54 (GMT)
commitad8f72ca29699dea6cd87bd1b0c04e539aef77ee (patch)
treeff56bc67b920d23137b195174e96609a9b44a603
parentf7bfa60bf9f591f03963137c8bb41b0d2b90a1c1 (diff)
downloadhdf5-ad8f72ca29699dea6cd87bd1b0c04e539aef77ee.zip
hdf5-ad8f72ca29699dea6cd87bd1b0c04e539aef77ee.tar.gz
hdf5-ad8f72ca29699dea6cd87bd1b0c04e539aef77ee.tar.bz2
Removed HDgets macros since gets was deprecated in C99 and removed
in C11 (gets() is not used in our repo).
-rw-r--r--src/H5private.h7
-rw-r--r--tools/test/perform/pio_standalone.h2
-rw-r--r--tools/test/perform/sio_standalone.h2
3 files changed, 7 insertions, 4 deletions
diff --git a/src/H5private.h b/src/H5private.h
index 95d4885..2236ee6 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1030,9 +1030,12 @@ typedef off_t h5_stat_size_t;
#ifndef HDgetrusage
#define HDgetrusage(X,S) getrusage(X,S)
#endif /* HDgetrusage */
-#ifndef HDgets
- #define HDgets(S) gets(S)
+
+/* Don't define HDgets - gets() was deprecated in C99 and removed in C11 */
+#ifdef HDgets
+ #undef HDgets
#endif /* HDgets */
+
#ifndef HDgettimeofday
#define HDgettimeofday(S,P) gettimeofday(S,P)
#endif /* HDgettimeofday */
diff --git a/tools/test/perform/pio_standalone.h b/tools/test/perform/pio_standalone.h
index cf6d980..f2cda4f 100644
--- a/tools/test/perform/pio_standalone.h
+++ b/tools/test/perform/pio_standalone.h
@@ -213,7 +213,7 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
#define HDgetpwnam(S) getpwnam(S)
#define HDgetpwuid(U) getpwuid(U)
#define HDgetrusage(X,S) getrusage(X,S)
-#define HDgets(S) gets(S)
+/* Don't define a macro for gets() - it was removed in C11 */
#ifdef H5_HAVE_WIN32_API
H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz);
#define HDgettimeofday(V,Z) Wgettimeofday(V,Z)
diff --git a/tools/test/perform/sio_standalone.h b/tools/test/perform/sio_standalone.h
index 45f6d25..99e13bc 100644
--- a/tools/test/perform/sio_standalone.h
+++ b/tools/test/perform/sio_standalone.h
@@ -228,7 +228,7 @@ H5_DLL int HDfprintf (FILE *stream, const char *fmt, ...);
#define HDgetpwnam(S) getpwnam(S)
#define HDgetpwuid(U) getpwuid(U)
#define HDgetrusage(X,S) getrusage(X,S)
-#define HDgets(S) gets(S)
+/* Don't define a macro for gets() - it was removed in C11 */
#ifdef H5_HAVE_WIN32_API
H5_DLL int Wgettimeofday(struct timeval *tv, struct timezone *tz);
#define HDgettimeofday(V,Z) Wgettimeofday(V,Z)