1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Just use getprogname().

This commit is contained in:
Bartosz Taudul 2019-02-21 11:40:56 +01:00
parent c4d46f1c24
commit e839a3153f

View File

@ -28,11 +28,6 @@
#endif #endif
#ifdef __APPLE__ #ifdef __APPLE__
# include <TargetConditionals.h>
# include <unistd.h>
# if TARGET_OS_IOS == 0
# include <libproc.h>
# endif
# include <sys/types.h> # include <sys/types.h>
# include <sys/sysctl.h> # include <sys/sysctl.h>
#endif #endif
@ -230,11 +225,8 @@ static const char* GetProcessName()
#elif defined _GNU_SOURCE || defined __CYGWIN__ #elif defined _GNU_SOURCE || defined __CYGWIN__
processName = program_invocation_short_name; processName = program_invocation_short_name;
#elif defined __APPLE__ #elif defined __APPLE__
# if TARGET_OS_IOS == 0 auto buf = getprogname();
static char buf[1024]; if( buf ) processName = buf;
proc_name( getpid(), buf, 1024 );
processName = buf;
# endif
#endif #endif
return processName; return processName;
} }