mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-02 17:24:58 +02:00
build: Replace MAC_OSX macro with existing __APPLE__
Adopting `__APPLE__` aligns our project with broader industry practices, including those in prominent projects such as the Linux kernel (and even our own code). See: https://sourceforge.net/p/predef/wiki/OperatingSystems/#macos
This commit is contained in:
@@ -184,7 +184,7 @@ bool ArgsManager::ParseParameters(int argc, const char* const argv[], std::strin
|
||||
for (int i = 1; i < argc; i++) {
|
||||
std::string key(argv[i]);
|
||||
|
||||
#ifdef MAC_OSX
|
||||
#ifdef __APPLE__
|
||||
// At the first time when a user gets the "App downloaded from the
|
||||
// internet" warning, and clicks the Open button, macOS passes
|
||||
// a unique process serial number (PSN) as -psn_... command-line
|
||||
@@ -741,7 +741,7 @@ fs::path GetDefaultDataDir()
|
||||
pathRet = fs::path("/");
|
||||
else
|
||||
pathRet = fs::path(pszHome);
|
||||
#ifdef MAC_OSX
|
||||
#ifdef __APPLE__
|
||||
// macOS
|
||||
return pathRet / "Library/Application Support/Bitcoin";
|
||||
#else
|
||||
|
||||
@@ -70,7 +70,7 @@ void SetupEnvironment()
|
||||
#endif
|
||||
// On most POSIX systems (e.g. Linux, but not BSD) the environment's locale
|
||||
// may be invalid, in which case the "C.UTF-8" locale is used as fallback.
|
||||
#if !defined(WIN32) && !defined(MAC_OSX) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
|
||||
#if !defined(WIN32) && !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
|
||||
try {
|
||||
std::locale(""); // Raises a runtime error if current locale is invalid
|
||||
} catch (const std::runtime_error&) {
|
||||
|
||||
Reference in New Issue
Block a user