mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 10:12:28 +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:
@@ -117,7 +117,7 @@ bool FileCommit(FILE* file)
|
||||
LogPrintf("FlushFileBuffers failed: %s\n", Win32ErrorString(GetLastError()));
|
||||
return false;
|
||||
}
|
||||
#elif defined(MAC_OSX) && defined(F_FULLFSYNC)
|
||||
#elif defined(__APPLE__) && defined(F_FULLFSYNC)
|
||||
if (fcntl(fileno(file), F_FULLFSYNC, 0) == -1) { // Manpage says "value other than -1" is returned on success
|
||||
LogPrintf("fcntl F_FULLFSYNC failed: %s\n", SysErrorString(errno));
|
||||
return false;
|
||||
@@ -195,7 +195,7 @@ void AllocateFileRange(FILE* file, unsigned int offset, unsigned int length)
|
||||
nFileSize.u.HighPart = nEndPos >> 32;
|
||||
SetFilePointerEx(hFile, nFileSize, 0, FILE_BEGIN);
|
||||
SetEndOfFile(hFile);
|
||||
#elif defined(MAC_OSX)
|
||||
#elif defined(__APPLE__)
|
||||
// OSX specific version
|
||||
// NOTE: Contrary to other OS versions, the OSX version assumes that
|
||||
// NOTE: offset is the size of the file.
|
||||
|
||||
@@ -29,7 +29,7 @@ static void SetThreadName(const char* name)
|
||||
::prctl(PR_SET_NAME, name, 0, 0, 0);
|
||||
#elif (defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__))
|
||||
pthread_set_name_np(pthread_self(), name);
|
||||
#elif defined(MAC_OSX)
|
||||
#elif defined(__APPLE__)
|
||||
pthread_setname_np(name);
|
||||
#else
|
||||
// Prevent warnings for unused parameters...
|
||||
|
||||
Reference in New Issue
Block a user