mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-16 06:45:59 +00:00
Define SDL_PLATFORM_* macros instead of underscored ones (#8875)
This commit is contained in:

committed by
GitHub

parent
ceccf24519
commit
31d133db40
@@ -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);
|
||||
|
Reference in New Issue
Block a user