Skip to content

Commit

Permalink
avoid warning about macro redefinition on Windows + clang: (#44412)
Browse files Browse the repository at this point in the history
(cherry picked from commit 529ac51)
  • Loading branch information
2005m authored and KristofferC committed Mar 16, 2022
1 parent 0f04c8e commit 484b622
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/support/dirpath.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@
#ifdef _OS_WINDOWS_
#define PATHSEPSTRING "\\"
#define PATHLISTSEPSTRING ";"
#if defined(PATH_MAX)
#define JL_PATH_MAX PATH_MAX
#if defined(_COMPILER_CLANG_)
#else // _COMPILER_CLANG_ may have the name reversed
#define JL_PATH_MAX MAX_PATH
#endif
#else
#define PATHSEPSTRING "/"
#define PATHLISTSEPSTRING ":"
#ifndef JL_PATH_MAX // many platforms don't have a max path, we define one anyways
#if defined(PATH_MAX)
#define JL_PATH_MAX PATH_MAX
#else // many platforms don't have a max path, we define one anyways
#define JL_PATH_MAX 1024
#endif
#endif
Expand Down

0 comments on commit 484b622

Please sign in to comment.