Define SDL_PLATFORM_* macros instead of underscored ones (#8875)

This commit is contained in:
Anonymous Maarten
2024-01-24 02:40:51 +01:00
committed by GitHub
parent ceccf24519
commit 31d133db40
208 changed files with 1293 additions and 1138 deletions

View File

@@ -30,15 +30,15 @@ const char *SDL_GetExeName()
/* TODO: Use a fallback if BSD has no mounted procfs (OpenBSD has no procfs at all) */
if (!proc_name) {
#if defined(__LINUX__) || defined(__FREEBSD__) || defined (__NETBSD__)
#if defined(SDL_PLATFORM_LINUX) || defined(SDL_PLATFORM_FREEBSD) || defined (SDL_PLATFORM_NETBSD)
static char linkfile[1024];
int linksize;
#if defined(__LINUX__)
#if defined(SDL_PLATFORM_LINUX)
const char *proc_path = "/proc/self/exe";
#elif defined(__FREEBSD__)
#elif defined(SDL_PLATFORM_FREEBSD)
const char *proc_path = "/proc/curproc/file";
#elif defined(__NETBSD__)
#elif defined(SDL_PLATFORM_NETBSD)
const char *proc_path = "/proc/curproc/exe";
#endif
linksize = readlink(proc_path, linkfile, sizeof(linkfile) - 1);