diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2021-03-09 14:50:13 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2021-03-09 14:50:13 (GMT) |
commit | 22723e87d8de3b768f5a70e1658f17eb4ad85000 (patch) | |
tree | eae5407f9044cfd585770195658ba08524adfdf9 /src/H5private.h | |
parent | d72405e43d44a3ac9ec27bb9d7a84e638a7aea10 (diff) | |
download | hdf5-22723e87d8de3b768f5a70e1658f17eb4ad85000.zip hdf5-22723e87d8de3b768f5a70e1658f17eb4ad85000.tar.gz hdf5-22723e87d8de3b768f5a70e1658f17eb4ad85000.tar.bz2 |
Replaces basename and dirname with code that will work everywhere
Diffstat (limited to 'src/H5private.h')
-rw-r--r-- | src/H5private.h | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/H5private.h b/src/H5private.h index 66763b2..4e190a6 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -154,13 +154,6 @@ #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. */ @@ -741,9 +734,6 @@ 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 */ @@ -820,9 +810,6 @@ 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 */ @@ -2863,6 +2850,8 @@ H5_DLL double H5_get_time(void); /* Functions for building paths, etc. */ H5_DLL herr_t H5_build_extpath(const char *name, char **extpath /*out*/); H5_DLL herr_t H5_combine_path(const char *path1, const char *path2, char **full_name /*out*/); +H5_DLL herr_t H5_dirname(const char *path, char **dirname/*out*/); +H5_DLL herr_t H5_basename(const char *path, char **basename/*out*/); #ifdef H5_HAVE_PARALLEL /* Generic MPI functions */ |