mirror of
https://github.com/curl/curl.git
synced 2024-11-27 05:50:21 +08:00
unit1307: tidy up Apple OS detection
Use `__APPLE__` macro to detect Apple OS instead of relying on the string in `CURL_OS`. This also fixes detection with default CMake builds where `CURL_OS` is `Darwin`. The code before this patch was expecting this substring in lowercase. Closes #15461
This commit is contained in:
parent
9640a8ef6f
commit
329a8e9daa
@ -280,11 +280,11 @@ UNITTEST_START
|
||||
enum system machine;
|
||||
|
||||
#ifdef HAVE_FNMATCH
|
||||
if(strstr(CURL_OS, "apple") || strstr(CURL_OS, "darwin")) {
|
||||
machine = SYSTEM_MACOS;
|
||||
}
|
||||
else
|
||||
machine = SYSTEM_LINUX;
|
||||
#ifdef __APPLE__
|
||||
machine = SYSTEM_MACOS;
|
||||
#else
|
||||
machine = SYSTEM_LINUX;
|
||||
#endif
|
||||
printf("Tested with system fnmatch(), %s-style\n",
|
||||
machine == SYSTEM_LINUX ? "linux" : "mac");
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user