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
  • Loading branch information
2005m committed Mar 14, 2022
1 parent e7a2adb commit 529ac51
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 529ac51

Please sign in to comment.