Skip to content

Commit b01c45c

Browse files
2005mKristofferC
authored andcommitted
avoid warning about macro redefinition on Windows + clang: (#44412)
(cherry picked from commit 529ac51)
1 parent 8a032f7 commit b01c45c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/support/dirpath.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@
66
#ifdef _OS_WINDOWS_
77
#define PATHSEPSTRING "\\"
88
#define PATHLISTSEPSTRING ";"
9+
#if defined(PATH_MAX)
910
#define JL_PATH_MAX PATH_MAX
10-
#if defined(_COMPILER_CLANG_)
11+
#else // _COMPILER_CLANG_ may have the name reversed
1112
#define JL_PATH_MAX MAX_PATH
1213
#endif
1314
#else
1415
#define PATHSEPSTRING "/"
1516
#define PATHLISTSEPSTRING ":"
16-
#ifndef JL_PATH_MAX // many platforms don't have a max path, we define one anyways
17+
#if defined(PATH_MAX)
18+
#define JL_PATH_MAX PATH_MAX
19+
#else // many platforms don't have a max path, we define one anyways
1720
#define JL_PATH_MAX 1024
1821
#endif
1922
#endif

0 commit comments

Comments
 (0)