diff options
author | Marek Olšák <[email protected]> | 2018-07-03 14:16:17 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-07-04 21:16:57 -0400 |
commit | 7149bffe669a5067bc332d017e8a501474333a7f (patch) | |
tree | 78f5607729896a779950907afd82f24e1d0327c3 /src/gallium | |
parent | 2e1e6511f76370870b5cde10caa9ca3b6d0dc65f (diff) |
gallium/os: use util_get_process_name when possible
Reviewed-by: Timothy Arceri <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/os/os_process.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/gallium/auxiliary/os/os_process.c b/src/gallium/auxiliary/os/os_process.c index 035bd228e76..87072f0b046 100644 --- a/src/gallium/auxiliary/os/os_process.c +++ b/src/gallium/auxiliary/os/os_process.c @@ -29,18 +29,13 @@ #include "pipe/p_config.h" #include "os/os_process.h" #include "util/u_memory.h" +#include "util/process.h" #if defined(PIPE_SUBSYSTEM_WINDOWS_USER) # include <windows.h> -#elif defined(__GLIBC__) || defined(__CYGWIN__) -# include <errno.h> -#elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_ANDROID) -# include <stdlib.h> #elif defined(PIPE_OS_HAIKU) # include <kernel/OS.h> # include <kernel/image.h> -#else -#warning unexpected platform in os_process.c #endif #if defined(PIPE_OS_LINUX) @@ -84,20 +79,13 @@ os_get_process_name(char *procname, size_t size) name = lpProcessName; -#elif defined(__GLIBC__) || defined(__CYGWIN__) - name = program_invocation_short_name; -#elif defined(PIPE_OS_BSD) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_ANDROID) - /* *BSD and OS X */ - name = getprogname(); #elif defined(PIPE_OS_HAIKU) image_info info; get_image_info(B_CURRENT_TEAM, &info); name = info.name; #else -#warning unexpected platform in os_process.c - return FALSE; + name = util_get_process_name(); #endif - } assert(size > 0); |