swebb2066 commented on PR #389:
URL: https://github.com/apache/logging-log4cxx/pull/389#issuecomment-2224622850
> Also MinGW apps are native Windows and shouldn't have any issue with \
used in paths.
I believe locationinfo.h needs to set LOG4CXX_SHORT_FILENAME_SPLIT_CHAR
based on the compiler, not the system
The following change fixes `patternlayouttest` failure
```
diff --git a/src/main/include/log4cxx/spi/location/locationinfo.h
b/src/main/include/log4cxx/spi/location/locationinfo.h
index 3b68d531..c4af54e4 100644
--- a/src/main/include/log4cxx/spi/location/locationinfo.h
+++ b/src/main/include/log4cxx/spi/location/locationinfo.h
@@ -22,7 +22,7 @@
#include <string>
#include <string.h>
-#if defined(_WIN32)
+#if defined(_MSC_VER)
#define LOG4CXX_SHORT_FILENAME_SPLIT_CHAR '\\'
#else
#define LOG4CXX_SHORT_FILENAME_SPLIT_CHAR '/'
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]