gallium/utils: drop PIPE_SUBSYSTEM_WINDOWS_USER
authorEric Engestrom <eric.engestrom@intel.com>
Thu, 1 Aug 2019 21:49:05 +0000 (22:49 +0100)
committerEric Engestrom <eric.engestrom@intel.com>
Fri, 2 Aug 2019 17:38:52 +0000 (18:38 +0100)
This is basically just an alias for PIPE_OS_WINDOWS.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
scons/gallium.py
src/gallium/auxiliary/os/os_process.c
src/gallium/auxiliary/util/u_debug_refcnt.c
src/gallium/auxiliary/util/u_debug_refcnt.h
src/gallium/auxiliary/util/u_debug_symbol.c
src/gallium/auxiliary/util/u_network.c
src/gallium/auxiliary/util/u_network.h
src/gallium/include/pipe/p_config.h
src/util/os_misc.c
src/util/os_time.c

index 6f5fca00acfcaf500c3377e2f314f73cfd27e2df..21197c8d0d12bda8d3f48e98a4b1d348cc8bd3e5 100755 (executable)
@@ -403,8 +403,6 @@ def generate(env):
             ]
         if env['build'] in ('debug', 'checked'):
             cppdefines += ['_DEBUG']
             ]
         if env['build'] in ('debug', 'checked'):
             cppdefines += ['_DEBUG']
-    if platform == 'windows':
-        cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_USER']
     if env['embedded']:
         cppdefines += ['EMBEDDED_DEVICE']
     env.Append(CPPDEFINES = cppdefines)
     if env['embedded']:
         cppdefines += ['EMBEDDED_DEVICE']
     env.Append(CPPDEFINES = cppdefines)
index 766cf8061537b142e8caf0ca667e361890f3c254..a2c859b78b3d49520219c4598dd59fa6931820d2 100644 (file)
@@ -31,7 +31,7 @@
 #include "util/u_memory.h"
 #include "util/u_process.h"
 
 #include "util/u_memory.h"
 #include "util/u_process.h"
 
-#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#if defined(PIPE_OS_WINDOWS)
 #  include <windows.h>
 #elif defined(PIPE_OS_HAIKU)
 #  include <kernel/OS.h>
 #  include <windows.h>
 #elif defined(PIPE_OS_HAIKU)
 #  include <kernel/OS.h>
@@ -62,7 +62,7 @@ os_get_process_name(char *procname, size_t size)
    if (!name) {
       /* do normal query */
 
    if (!name) {
       /* do normal query */
 
-#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#if defined(PIPE_OS_WINDOWS)
       char szProcessPath[MAX_PATH];
       char *lpProcessName;
       char *lpProcessExt;
       char szProcessPath[MAX_PATH];
       char *lpProcessName;
       char *lpProcessExt;
@@ -112,7 +112,7 @@ os_get_process_name(char *procname, size_t size)
 boolean
 os_get_command_line(char *cmdline, size_t size)
 {
 boolean
 os_get_command_line(char *cmdline, size_t size)
 {
-#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#if defined(PIPE_OS_WINDOWS)
    const char *args = GetCommandLine();
    if (args) {
       strncpy(cmdline, args, size);
    const char *args = GetCommandLine();
    if (args) {
       strncpy(cmdline, args, size);
index 728dbee9735ee60841d457d86c8b2573923276d7..ec95f87260cd18ffd3f697130b7e69976d0d71db 100644 (file)
@@ -85,7 +85,7 @@ debug_serial(void *p, unsigned *pserial)
 {
    unsigned serial;
    boolean found = TRUE;
 {
    unsigned serial;
    boolean found = TRUE;
-#ifdef PIPE_SUBSYSTEM_WINDOWS_USER
+#ifdef PIPE_OS_WINDOWS
    static boolean first = TRUE;
 
    if (first) {
    static boolean first = TRUE;
 
    if (first) {
index e1b4adbaf731fd18a86408f8b4e8c3c071077a30..78f690b025f424bbb90836d0901907e43e34b187 100644 (file)
@@ -36,7 +36,7 @@ extern "C" {
 
 typedef void (*debug_reference_descriptor)(char*, const struct pipe_reference*);
 
 
 typedef void (*debug_reference_descriptor)(char*, const struct pipe_reference*);
 
-#if defined(DEBUG) && (!defined(PIPE_OS_WINDOWS) || defined(PIPE_SUBSYSTEM_WINDOWS_USER))
+#if defined(DEBUG)
 
 extern int debug_refcnt_state;
 
 
 extern int debug_refcnt_state;
 
index 5bc1c3d4fb28a5f92f87c1ac041a01c92b6248d8..4ea6c8d07b02a732c3510e7e01550d68e9c9a7c6 100644 (file)
@@ -292,7 +292,7 @@ const char*
 debug_symbol_name_cached(const void *addr)
 {
    const char* name;
 debug_symbol_name_cached(const void *addr)
 {
    const char* name;
-#ifdef PIPE_SUBSYSTEM_WINDOWS_USER
+#ifdef PIPE_OS_WINDOWS
    static boolean first = TRUE;
 
    if (first) {
    static boolean first = TRUE;
 
    if (first) {
index 15c30f375b0f17ff5c823b5d6978653162d667d0..a87ddab0bdee4284e37a10a81545b69933aaf8e2 100644 (file)
@@ -5,7 +5,7 @@
 #include "util/u_string.h"
 
 #include <stdio.h>
 #include "util/u_string.h"
 
 #include <stdio.h>
-#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#if defined(PIPE_OS_WINDOWS)
 #  include <winsock2.h>
 #  include <windows.h>
 #  include <ws2tcpip.h>
 #  include <winsock2.h>
 #  include <windows.h>
 #  include <ws2tcpip.h>
@@ -22,7 +22,7 @@
 boolean
 u_socket_init(void)
 {
 boolean
 u_socket_init(void)
 {
-#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#if defined(PIPE_OS_WINDOWS)
    WORD wVersionRequested;
    WSADATA wsaData;
    int err;
    WORD wVersionRequested;
    WSADATA wsaData;
    int err;
@@ -46,7 +46,7 @@ u_socket_init(void)
 void
 u_socket_stop(void)
 {
 void
 u_socket_stop(void)
 {
-#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#if defined(PIPE_OS_WINDOWS)
    WSACleanup();
 #endif
 }
    WSACleanup();
 #endif
 }
@@ -60,7 +60,7 @@ u_socket_close(int s)
 #if defined(PIPE_OS_UNIX)
    shutdown(s, SHUT_RDWR);
    close(s);
 #if defined(PIPE_OS_UNIX)
    shutdown(s, SHUT_RDWR);
    close(s);
-#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#elif defined(PIPE_OS_WINDOWS)
    shutdown(s, SD_BOTH);
    closesocket(s);
 #else
    shutdown(s, SD_BOTH);
    closesocket(s);
 #else
@@ -189,7 +189,7 @@ u_socket_block(int s, boolean block)
       fcntl(s, F_SETFL, old & ~O_NONBLOCK);
    else
       fcntl(s, F_SETFL, old | O_NONBLOCK);
       fcntl(s, F_SETFL, old & ~O_NONBLOCK);
    else
       fcntl(s, F_SETFL, old | O_NONBLOCK);
-#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#elif defined(PIPE_OS_WINDOWS)
    u_long iMode = block ? 0 : 1;
    ioctlsocket(s, FIONBIO, &iMode);
 #else
    u_long iMode = block ? 0 : 1;
    ioctlsocket(s, FIONBIO, &iMode);
 #else
index 2b7ce3f4bd2a4c9dc41c0fd0d01cea5464ada148..be1fa00dcb4745c60e131c9597c1a938a9ecc0db 100644 (file)
@@ -4,7 +4,7 @@
 
 #include "pipe/p_compiler.h"
 
 
 #include "pipe/p_compiler.h"
 
-#if defined(PIPE_SUBSYSTEM_WINDOWS_USER) || defined(PIPE_OS_UNIX)
+#if defined(PIPE_OS_WINDOWS) || defined(PIPE_OS_UNIX)
 #  define PIPE_HAVE_SOCKETS
 #endif
 
 #  define PIPE_HAVE_SOCKETS
 #endif
 
index 859e4c4db2aa22b8cd4577b1249dafb7131f7636..ca14da66ef7ba32a9fdc9c031ecad6b5517ebc10 100644 (file)
 
 /*
  * Auto-detect the operating system family.
 
 /*
  * Auto-detect the operating system family.
- * 
- * See subsystem below for a more fine-grained distinction.
  */
 
 #if defined(__linux__)
  */
 
 #if defined(__linux__)
 #define PIPE_OS_UNIX
 #endif
 
 #define PIPE_OS_UNIX
 #endif
 
-/*
- * Try to auto-detect the subsystem.
- * 
- * NOTE: There is no way to auto-detect most of these.
- */
-
-#if defined(PIPE_OS_WINDOWS)
-#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
-/* Windows User-space Library */
-#else
-#define PIPE_SUBSYSTEM_WINDOWS_USER
-#endif
-#endif /* PIPE_OS_WINDOWS */
-
-
 #endif /* P_CONFIG_H_ */
 #endif /* P_CONFIG_H_ */
index 3a1e7eaddabfbfd81997b8198c6acd2f270e6e66..b6359ed195ca847ecd9eb14ac8e967bde0d84ed4 100644 (file)
@@ -31,7 +31,7 @@
 #include <stdarg.h>
 
 
 #include <stdarg.h>
 
 
-#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#if DETECT_OS_WINDOWS
 
 #ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN      // Exclude rarely-used stuff from Windows headers
 
 #ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN      // Exclude rarely-used stuff from Windows headers
@@ -88,7 +88,7 @@ os_log_message(const char *message)
          fout = stderr;
    }
 
          fout = stderr;
    }
 
-#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#if DETECT_OS_WINDOWS
    OutputDebugStringA(message);
    if(GetConsoleWindow() && !IsDebuggerPresent()) {
       fflush(stdout);
    OutputDebugStringA(message);
    if(GetConsoleWindow() && !IsDebuggerPresent()) {
       fflush(stdout);
@@ -99,7 +99,7 @@ os_log_message(const char *message)
       fputs(message, fout);
       fflush(fout);
    }
       fputs(message, fout);
       fflush(fout);
    }
-#else /* !PIPE_SUBSYSTEM_WINDOWS_USER */
+#else /* !DETECT_OS_WINDOWS */
    fflush(stdout);
    fputs(message, fout);
    fflush(fout);
    fflush(stdout);
    fputs(message, fout);
    fflush(fout);
index ac488b2287cb63b7c6c0dd62cc5c4027c15d23a4..22195c5a6699067356f75f119a57c3dac80f5dee 100644 (file)
@@ -45,7 +45,7 @@
 #  include <sys/time.h> /* timeval */
 #  include <sched.h> /* sched_yield */
 #  include <errno.h>
 #  include <sys/time.h> /* timeval */
 #  include <sched.h> /* sched_yield */
 #  include <errno.h>
-#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#elif DETECT_OS_WINDOWS
 #  include <windows.h>
 #else
 #  error Unsupported OS
 #  include <windows.h>
 #else
 #  error Unsupported OS
@@ -67,7 +67,7 @@ os_time_get_nano(void)
    gettimeofday(&tv, NULL);
    return tv.tv_usec*INT64_C(1000) + tv.tv_sec*INT64_C(1000000000);
 
    gettimeofday(&tv, NULL);
    return tv.tv_usec*INT64_C(1000) + tv.tv_sec*INT64_C(1000000000);
 
-#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#elif DETECT_OS_WINDOWS
 
    static LARGE_INTEGER frequency;
    LARGE_INTEGER counter;
 
    static LARGE_INTEGER frequency;
    LARGE_INTEGER counter;
@@ -104,7 +104,7 @@ os_time_sleep(int64_t usecs)
 #elif defined(PIPE_OS_UNIX)
    usleep(usecs);
 
 #elif defined(PIPE_OS_UNIX)
    usleep(usecs);
 
-#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#elif DETECT_OS_WINDOWS
    DWORD dwMilliseconds = (DWORD) ((usecs + 999) / 1000);
    /* Avoid Sleep(O) as that would cause to sleep for an undetermined duration */
    if (dwMilliseconds) {
    DWORD dwMilliseconds = (DWORD) ((usecs + 999) / 1000);
    /* Avoid Sleep(O) as that would cause to sleep for an undetermined duration */
    if (dwMilliseconds) {