summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/os/os_process.c6
-rw-r--r--src/gallium/auxiliary/util/u_debug_refcnt.c2
-rw-r--r--src/gallium/auxiliary/util/u_debug_refcnt.h2
-rw-r--r--src/gallium/auxiliary/util/u_debug_symbol.c2
-rw-r--r--src/gallium/auxiliary/util/u_network.c10
-rw-r--r--src/gallium/auxiliary/util/u_network.h2
-rw-r--r--src/gallium/include/pipe/p_config.h17
-rw-r--r--src/util/os_misc.c6
-rw-r--r--src/util/os_time.c6
9 files changed, 18 insertions, 35 deletions
diff --git a/src/gallium/auxiliary/os/os_process.c b/src/gallium/auxiliary/os/os_process.c
index 766cf806153..a2c859b78b3 100644
--- a/src/gallium/auxiliary/os/os_process.c
+++ b/src/gallium/auxiliary/os/os_process.c
@@ -31,7 +31,7 @@
#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>
@@ -62,7 +62,7 @@ os_get_process_name(char *procname, size_t size)
if (!name) {
/* do normal query */
-#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#if defined(PIPE_OS_WINDOWS)
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)
{
-#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#if defined(PIPE_OS_WINDOWS)
const char *args = GetCommandLine();
if (args) {
strncpy(cmdline, args, size);
diff --git a/src/gallium/auxiliary/util/u_debug_refcnt.c b/src/gallium/auxiliary/util/u_debug_refcnt.c
index 728dbee9735..ec95f87260c 100644
--- a/src/gallium/auxiliary/util/u_debug_refcnt.c
+++ b/src/gallium/auxiliary/util/u_debug_refcnt.c
@@ -85,7 +85,7 @@ debug_serial(void *p, unsigned *pserial)
{
unsigned serial;
boolean found = TRUE;
-#ifdef PIPE_SUBSYSTEM_WINDOWS_USER
+#ifdef PIPE_OS_WINDOWS
static boolean first = TRUE;
if (first) {
diff --git a/src/gallium/auxiliary/util/u_debug_refcnt.h b/src/gallium/auxiliary/util/u_debug_refcnt.h
index e1b4adbaf73..78f690b025f 100644
--- a/src/gallium/auxiliary/util/u_debug_refcnt.h
+++ b/src/gallium/auxiliary/util/u_debug_refcnt.h
@@ -36,7 +36,7 @@ extern "C" {
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;
diff --git a/src/gallium/auxiliary/util/u_debug_symbol.c b/src/gallium/auxiliary/util/u_debug_symbol.c
index 5bc1c3d4fb2..4ea6c8d07b0 100644
--- a/src/gallium/auxiliary/util/u_debug_symbol.c
+++ b/src/gallium/auxiliary/util/u_debug_symbol.c
@@ -292,7 +292,7 @@ const char*
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) {
diff --git a/src/gallium/auxiliary/util/u_network.c b/src/gallium/auxiliary/util/u_network.c
index 15c30f375b0..a87ddab0bde 100644
--- a/src/gallium/auxiliary/util/u_network.c
+++ b/src/gallium/auxiliary/util/u_network.c
@@ -5,7 +5,7 @@
#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>
@@ -22,7 +22,7 @@
boolean
u_socket_init(void)
{
-#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#if defined(PIPE_OS_WINDOWS)
WORD wVersionRequested;
WSADATA wsaData;
int err;
@@ -46,7 +46,7 @@ u_socket_init(void)
void
u_socket_stop(void)
{
-#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#if defined(PIPE_OS_WINDOWS)
WSACleanup();
#endif
}
@@ -60,7 +60,7 @@ u_socket_close(int 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
@@ -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);
-#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#elif defined(PIPE_OS_WINDOWS)
u_long iMode = block ? 0 : 1;
ioctlsocket(s, FIONBIO, &iMode);
#else
diff --git a/src/gallium/auxiliary/util/u_network.h b/src/gallium/auxiliary/util/u_network.h
index 2b7ce3f4bd2..be1fa00dcb4 100644
--- a/src/gallium/auxiliary/util/u_network.h
+++ b/src/gallium/auxiliary/util/u_network.h
@@ -4,7 +4,7 @@
#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
diff --git a/src/gallium/include/pipe/p_config.h b/src/gallium/include/pipe/p_config.h
index 859e4c4db2a..ca14da66ef7 100644
--- a/src/gallium/include/pipe/p_config.h
+++ b/src/gallium/include/pipe/p_config.h
@@ -143,8 +143,6 @@
/*
* Auto-detect the operating system family.
- *
- * See subsystem below for a more fine-grained distinction.
*/
#if defined(__linux__)
@@ -213,19 +211,4 @@
#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_ */
diff --git a/src/util/os_misc.c b/src/util/os_misc.c
index 3a1e7eaddab..b6359ed195c 100644
--- a/src/util/os_misc.c
+++ b/src/util/os_misc.c
@@ -31,7 +31,7 @@
#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
@@ -88,7 +88,7 @@ os_log_message(const char *message)
fout = stderr;
}
-#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#if DETECT_OS_WINDOWS
OutputDebugStringA(message);
if(GetConsoleWindow() && !IsDebuggerPresent()) {
fflush(stdout);
@@ -99,7 +99,7 @@ os_log_message(const char *message)
fputs(message, fout);
fflush(fout);
}
-#else /* !PIPE_SUBSYSTEM_WINDOWS_USER */
+#else /* !DETECT_OS_WINDOWS */
fflush(stdout);
fputs(message, fout);
fflush(fout);
diff --git a/src/util/os_time.c b/src/util/os_time.c
index ac488b2287c..22195c5a669 100644
--- a/src/util/os_time.c
+++ b/src/util/os_time.c
@@ -45,7 +45,7 @@
# 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
@@ -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);
-#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#elif DETECT_OS_WINDOWS
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_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) {