diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2021-03-02 11:22:50 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2021-03-02 11:22:50 (GMT) |
commit | f1bc0c97a93b84ef429b2240e4ae8466029ed4db (patch) | |
tree | 0febf7d18f7c1c5f84605ebe99dfd894ba325a90 /src/H5private.h | |
parent | 6639693cff48bb16bddb05121a73c063c9f92ca2 (diff) | |
download | hdf5-f1bc0c97a93b84ef429b2240e4ae8466029ed4db.zip hdf5-f1bc0c97a93b84ef429b2240e4ae8466029ed4db.tar.gz hdf5-f1bc0c97a93b84ef429b2240e4ae8466029ed4db.tar.bz2 |
Makes libgen.h functions ready for implementation on Windows
Diffstat (limited to 'src/H5private.h')
-rw-r--r-- | src/H5private.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/H5private.h b/src/H5private.h index 3e11b4f..6479032 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -154,6 +154,13 @@ #endif /* + * Needed for dirname and basename on POSIX systems + */ +#ifdef H5_HAVE_LIBGEN_H +#include <libgen.h> +#endif + +/* * Dynamic library handling. These are needed for dynamically loading I/O * filters and VFDs. */ @@ -727,6 +734,9 @@ typedef struct { #ifndef HDatoll #define HDatoll(S) atoll(S) #endif /* HDatol */ +#ifndef HDbasename + #define HDbasename(P) basename(P) +#endif /* HDbasename */ #ifndef HDbind #define HDbind(A,B,C) bind((A),(B),(C)) /* mirror VFD */ #endif /* HDbind */ @@ -803,6 +813,9 @@ typedef struct { #define HDdifftime(X,Y) ((double)(X)-(double)(Y)) #endif /* H5_HAVE_DIFFTIME */ #endif /* HDdifftime */ +#ifndef HDdirname + #define HDdirname(P) dirname(P) +#endif /* HDdirname */ #ifndef HDdiv #define HDdiv(X,Y) div(X,Y) #endif /* HDdiv */ |