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>
]
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)
#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>
if (!name) {
/* do normal query */
-#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#if defined(PIPE_OS_WINDOWS)
char szProcessPath[MAX_PATH];
char *lpProcessName;
char *lpProcessExt;
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);
{
unsigned serial;
boolean found = TRUE;
-#ifdef PIPE_SUBSYSTEM_WINDOWS_USER
+#ifdef PIPE_OS_WINDOWS
static boolean first = TRUE;
if (first) {
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;
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) {
#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>
boolean
u_socket_init(void)
{
-#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#if defined(PIPE_OS_WINDOWS)
WORD wVersionRequested;
WSADATA wsaData;
int err;
void
u_socket_stop(void)
{
-#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#if defined(PIPE_OS_WINDOWS)
WSACleanup();
#endif
}
#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
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
#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
/*
* Auto-detect the operating system family.
- *
- * See subsystem below for a more fine-grained distinction.
*/
#if defined(__linux__)
#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_ */
#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
fout = stderr;
}
-#if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
+#if DETECT_OS_WINDOWS
OutputDebugStringA(message);
if(GetConsoleWindow() && !IsDebuggerPresent()) {
fflush(stdout);
fputs(message, fout);
fflush(fout);
}
-#else /* !PIPE_SUBSYSTEM_WINDOWS_USER */
+#else /* !DETECT_OS_WINDOWS */
fflush(stdout);
fputs(message, fout);
fflush(fout);
# 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
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;
#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) {