summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2021-03-02 11:22:50 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2021-03-02 11:22:50 (GMT)
commitf1bc0c97a93b84ef429b2240e4ae8466029ed4db (patch)
tree0febf7d18f7c1c5f84605ebe99dfd894ba325a90 /test
parent6639693cff48bb16bddb05121a73c063c9f92ca2 (diff)
downloadhdf5-f1bc0c97a93b84ef429b2240e4ae8466029ed4db.zip
hdf5-f1bc0c97a93b84ef429b2240e4ae8466029ed4db.tar.gz
hdf5-f1bc0c97a93b84ef429b2240e4ae8466029ed4db.tar.bz2
Makes libgen.h functions ready for implementation on Windows
Diffstat (limited to 'test')
-rw-r--r--test/page_buffer.c5
-rw-r--r--test/vfd_swmr_bigset_writer.c3
-rw-r--r--test/vfd_swmr_group_writer.c3
-rw-r--r--test/vfd_swmr_zoo_writer.c4
4 files changed, 5 insertions, 10 deletions
diff --git a/test/page_buffer.c b/test/page_buffer.c
index 88b3317..112ea77 100644
--- a/test/page_buffer.c
+++ b/test/page_buffer.c
@@ -20,7 +20,6 @@
*************************************************************/
#include <err.h>
-#include <libgen.h>
#include "h5test.h"
@@ -151,8 +150,8 @@ swmr_fapl_augment(hid_t fapl, const char *filename, uint32_t max_lag)
HDfprintf(stderr, "temporary string allocation failed\n");
return -1;
}
- dname = dirname(tname[0]);
- bname = basename(tname[1]);
+ dname = HDdirname(tname[0]);
+ bname = HDbasename(tname[1]);
snprintf(config.md_file_path, sizeof(config.md_file_path),
"%s/%s.shadow", dname, bname);
free(tname[0]);
diff --git a/test/vfd_swmr_bigset_writer.c b/test/vfd_swmr_bigset_writer.c
index 4bf08fd..7b0f451 100644
--- a/test/vfd_swmr_bigset_writer.c
+++ b/test/vfd_swmr_bigset_writer.c
@@ -67,7 +67,6 @@
*/
#include <err.h>
-#include <libgen.h>
#define H5C_FRIEND /*suppress error about including H5Cpkg */
#define H5F_FRIEND /*suppress error about including H5Fpkg */
@@ -271,7 +270,7 @@ state_init(state_t *s, int argc, char **argv)
*s = state_initializer();
esnprintf(tfile, sizeof(tfile), "%s", argv[0]);
- esnprintf(s->progname, sizeof(s->progname), "%s", basename(tfile));
+ esnprintf(s->progname, sizeof(s->progname), "%s", HDbasename(tfile));
while ((ch = getopt(argc, argv, "FMSVWa:bc:d:n:qr:s:u:")) != -1) {
switch (ch) {
diff --git a/test/vfd_swmr_group_writer.c b/test/vfd_swmr_group_writer.c
index 155e9b1..2f355c2 100644
--- a/test/vfd_swmr_group_writer.c
+++ b/test/vfd_swmr_group_writer.c
@@ -12,7 +12,6 @@
*/
#include <err.h>
-#include <libgen.h>
#define H5F_FRIEND /*suppress error about including H5Fpkg */
@@ -85,7 +84,7 @@ state_init(state_t *s, int argc, char **argv)
*s = ALL_HID_INITIALIZER;
esnprintf(tfile, sizeof(tfile), "%s", argv[0]);
- esnprintf(s->progname, sizeof(s->progname), "%s", basename(tfile));
+ esnprintf(s->progname, sizeof(s->progname), "%s", HDbasename(tfile));
while ((ch = getopt(argc, argv, "SWa:bn:qu:")) != -1) {
switch (ch) {
diff --git a/test/vfd_swmr_zoo_writer.c b/test/vfd_swmr_zoo_writer.c
index 901e1cb..1792a93 100644
--- a/test/vfd_swmr_zoo_writer.c
+++ b/test/vfd_swmr_zoo_writer.c
@@ -12,7 +12,6 @@
*/
#include <err.h>
-#include <libgen.h> /* basename(3) */
#define H5C_FRIEND /* suppress error about including H5Cpkg */
#define H5F_FRIEND /* suppress error about including H5Fpkg */
@@ -23,7 +22,6 @@
#include "H5retry_private.h"
#include "H5Cpkg.h"
#include "H5Fpkg.h"
-// #include "H5Iprivate.h"
#include "H5HGprivate.h"
#include "H5VLprivate.h"
@@ -225,7 +223,7 @@ main(int argc, char **argv)
const char *seedvar = "H5_ZOO_STEP_SEED";
bool use_vfd_swmr = true;
bool print_estack = false;
- const char *progname = basename(argv[0]);
+ const char *progname = HDbasename(argv[0]);
const char *personality = strstr(progname, "vfd_swmr_zoo_");
estack_state_t es;
char step = 'b';