gallium/utils: drop PIPE_SUBSYSTEM_WINDOWS_USER
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>
This commit is contained in:
@@ -403,8 +403,6 @@ def generate(env):
|
|||||||
]
|
]
|
||||||
if env['build'] in ('debug', 'checked'):
|
if env['build'] in ('debug', 'checked'):
|
||||||
cppdefines += ['_DEBUG']
|
cppdefines += ['_DEBUG']
|
||||||
if platform == 'windows':
|
|
||||||
cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_USER']
|
|
||||||
if env['embedded']:
|
if env['embedded']:
|
||||||
cppdefines += ['EMBEDDED_DEVICE']
|
cppdefines += ['EMBEDDED_DEVICE']
|
||||||
env.Append(CPPDEFINES = cppdefines)
|
env.Append(CPPDEFINES = cppdefines)
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
#include "util/u_memory.h"
|
#include "util/u_memory.h"
|
||||||
#include "util/u_process.h"
|
#include "util/u_process.h"
|
||||||
|
|
||||||
#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
|
#if defined(PIPE_OS_WINDOWS)
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#elif defined(PIPE_OS_HAIKU)
|
#elif defined(PIPE_OS_HAIKU)
|
||||||
# include <kernel/OS.h>
|
# include <kernel/OS.h>
|
||||||
@@ -62,7 +62,7 @@ os_get_process_name(char *procname, size_t size)
|
|||||||
if (!name) {
|
if (!name) {
|
||||||
/* do normal query */
|
/* do normal query */
|
||||||
|
|
||||||
#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
|
#if defined(PIPE_OS_WINDOWS)
|
||||||
char szProcessPath[MAX_PATH];
|
char szProcessPath[MAX_PATH];
|
||||||
char *lpProcessName;
|
char *lpProcessName;
|
||||||
char *lpProcessExt;
|
char *lpProcessExt;
|
||||||
@@ -112,7 +112,7 @@ os_get_process_name(char *procname, size_t size)
|
|||||||
boolean
|
boolean
|
||||||
os_get_command_line(char *cmdline, size_t size)
|
os_get_command_line(char *cmdline, size_t size)
|
||||||
{
|
{
|
||||||
#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
|
#if defined(PIPE_OS_WINDOWS)
|
||||||
const char *args = GetCommandLine();
|
const char *args = GetCommandLine();
|
||||||
if (args) {
|
if (args) {
|
||||||
strncpy(cmdline, args, size);
|
strncpy(cmdline, args, size);
|
||||||
|
@@ -85,7 +85,7 @@ debug_serial(void *p, unsigned *pserial)
|
|||||||
{
|
{
|
||||||
unsigned serial;
|
unsigned serial;
|
||||||
boolean found = TRUE;
|
boolean found = TRUE;
|
||||||
#ifdef PIPE_SUBSYSTEM_WINDOWS_USER
|
#ifdef PIPE_OS_WINDOWS
|
||||||
static boolean first = TRUE;
|
static boolean first = TRUE;
|
||||||
|
|
||||||
if (first) {
|
if (first) {
|
||||||
|
@@ -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;
|
||||||
|
|
||||||
|
@@ -292,7 +292,7 @@ const char*
|
|||||||
debug_symbol_name_cached(const void *addr)
|
debug_symbol_name_cached(const void *addr)
|
||||||
{
|
{
|
||||||
const char* name;
|
const char* name;
|
||||||
#ifdef PIPE_SUBSYSTEM_WINDOWS_USER
|
#ifdef PIPE_OS_WINDOWS
|
||||||
static boolean first = TRUE;
|
static boolean first = TRUE;
|
||||||
|
|
||||||
if (first) {
|
if (first) {
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#include "util/u_string.h"
|
#include "util/u_string.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
|
#if defined(PIPE_OS_WINDOWS)
|
||||||
# include <winsock2.h>
|
# include <winsock2.h>
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include <ws2tcpip.h>
|
# include <ws2tcpip.h>
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
boolean
|
boolean
|
||||||
u_socket_init(void)
|
u_socket_init(void)
|
||||||
{
|
{
|
||||||
#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
|
#if defined(PIPE_OS_WINDOWS)
|
||||||
WORD wVersionRequested;
|
WORD wVersionRequested;
|
||||||
WSADATA wsaData;
|
WSADATA wsaData;
|
||||||
int err;
|
int err;
|
||||||
@@ -46,7 +46,7 @@ u_socket_init(void)
|
|||||||
void
|
void
|
||||||
u_socket_stop(void)
|
u_socket_stop(void)
|
||||||
{
|
{
|
||||||
#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
|
#if defined(PIPE_OS_WINDOWS)
|
||||||
WSACleanup();
|
WSACleanup();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -60,7 +60,7 @@ u_socket_close(int s)
|
|||||||
#if defined(PIPE_OS_UNIX)
|
#if defined(PIPE_OS_UNIX)
|
||||||
shutdown(s, SHUT_RDWR);
|
shutdown(s, SHUT_RDWR);
|
||||||
close(s);
|
close(s);
|
||||||
#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
|
#elif defined(PIPE_OS_WINDOWS)
|
||||||
shutdown(s, SD_BOTH);
|
shutdown(s, SD_BOTH);
|
||||||
closesocket(s);
|
closesocket(s);
|
||||||
#else
|
#else
|
||||||
@@ -189,7 +189,7 @@ u_socket_block(int s, boolean block)
|
|||||||
fcntl(s, F_SETFL, old & ~O_NONBLOCK);
|
fcntl(s, F_SETFL, old & ~O_NONBLOCK);
|
||||||
else
|
else
|
||||||
fcntl(s, F_SETFL, old | O_NONBLOCK);
|
fcntl(s, F_SETFL, old | O_NONBLOCK);
|
||||||
#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
|
#elif defined(PIPE_OS_WINDOWS)
|
||||||
u_long iMode = block ? 0 : 1;
|
u_long iMode = block ? 0 : 1;
|
||||||
ioctlsocket(s, FIONBIO, &iMode);
|
ioctlsocket(s, FIONBIO, &iMode);
|
||||||
#else
|
#else
|
||||||
|
@@ -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
|
# define PIPE_HAVE_SOCKETS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -143,8 +143,6 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* 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__)
|
||||||
@@ -213,19 +211,4 @@
|
|||||||
#define PIPE_OS_UNIX
|
#define PIPE_OS_UNIX
|
||||||
#endif
|
#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_ */
|
||||||
|
@@ -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
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
#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);
|
OutputDebugStringA(message);
|
||||||
if(GetConsoleWindow() && !IsDebuggerPresent()) {
|
if(GetConsoleWindow() && !IsDebuggerPresent()) {
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
@@ -99,7 +99,7 @@ os_log_message(const char *message)
|
|||||||
fputs(message, fout);
|
fputs(message, fout);
|
||||||
fflush(fout);
|
fflush(fout);
|
||||||
}
|
}
|
||||||
#else /* !PIPE_SUBSYSTEM_WINDOWS_USER */
|
#else /* !DETECT_OS_WINDOWS */
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
fputs(message, fout);
|
fputs(message, fout);
|
||||||
fflush(fout);
|
fflush(fout);
|
||||||
|
@@ -45,7 +45,7 @@
|
|||||||
# include <sys/time.h> /* timeval */
|
# include <sys/time.h> /* timeval */
|
||||||
# include <sched.h> /* sched_yield */
|
# include <sched.h> /* sched_yield */
|
||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
|
#elif DETECT_OS_WINDOWS
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#else
|
#else
|
||||||
# error Unsupported OS
|
# error Unsupported OS
|
||||||
@@ -67,7 +67,7 @@ os_time_get_nano(void)
|
|||||||
gettimeofday(&tv, NULL);
|
gettimeofday(&tv, NULL);
|
||||||
return tv.tv_usec*INT64_C(1000) + tv.tv_sec*INT64_C(1000000000);
|
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;
|
static LARGE_INTEGER frequency;
|
||||||
LARGE_INTEGER counter;
|
LARGE_INTEGER counter;
|
||||||
@@ -104,7 +104,7 @@ os_time_sleep(int64_t usecs)
|
|||||||
#elif defined(PIPE_OS_UNIX)
|
#elif defined(PIPE_OS_UNIX)
|
||||||
usleep(usecs);
|
usleep(usecs);
|
||||||
|
|
||||||
#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
|
#elif DETECT_OS_WINDOWS
|
||||||
DWORD dwMilliseconds = (DWORD) ((usecs + 999) / 1000);
|
DWORD dwMilliseconds = (DWORD) ((usecs + 999) / 1000);
|
||||||
/* Avoid Sleep(O) as that would cause to sleep for an undetermined duration */
|
/* Avoid Sleep(O) as that would cause to sleep for an undetermined duration */
|
||||||
if (dwMilliseconds) {
|
if (dwMilliseconds) {
|
||||||
|
Reference in New Issue
Block a user