summaryrefslogtreecommitdiffstats
path: root/src/H5win32defs.h
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-08-05 23:11:13 (GMT)
committerGitHub <noreply@github.com>2022-08-05 23:11:13 (GMT)
commitb22984600a04120088f59bb5876c9d5258fd64b7 (patch)
tree9324ab3744739b1b10b5e35a659dbe32edd51baa /src/H5win32defs.h
parent54f116b42db2d2aabd6fdb58cebb99f04f106310 (diff)
downloadhdf5-b22984600a04120088f59bb5876c9d5258fd64b7.zip
hdf5-b22984600a04120088f59bb5876c9d5258fd64b7.tar.gz
hdf5-b22984600a04120088f59bb5876c9d5258fd64b7.tar.bz2
Adds platform-independent basename and dirname (#1951)
* Adds platform-independent basename and dirname * Tidy up H5_dirname and H5_basename implementations and add tests * Committing clang-format changes * Fix misspelling * Several fixes for H5_dirname/H5_basename from review * Committing clang-format changes * Add reason to VERIFY_STR macros in th5_system.c * Use H5MM_free instead of HDfree in H5_dirname/H5_basename tests Co-authored-by: Jordan Henderson <jhenderson@hdfgroup.org> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/H5win32defs.h')
-rw-r--r--src/H5win32defs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/H5win32defs.h b/src/H5win32defs.h
index 5f384bb..1039f23 100644
--- a/src/H5win32defs.h
+++ b/src/H5win32defs.h
@@ -82,6 +82,7 @@ struct timezone {
#define HDsleep(S) Sleep(S * 1000)
#define HDstat(S, B) _stati64(S, B)
#define HDstrcasecmp(A, B) _stricmp(A, B)
+#define HDstrndup(S, N) H5_strndup(S, N)
#define HDstrtok_r(X, Y, Z) strtok_s(X, Y, Z)
#define HDtzset() _tzset()
#define HDunlink(S) _unlink(S)
@@ -104,6 +105,7 @@ H5_DLL wchar_t *H5_get_utf16_str(const char *s);
H5_DLL int Wopen_utf8(const char *path, int oflag, ...);
H5_DLL int Wremove_utf8(const char *path);
H5_DLL int H5_get_win32_times(H5_timevals_t *tvs);
+H5_DLL char *H5_strndup(const char *s, size_t n);
#ifdef __cplusplus
}
#endif /* __cplusplus */