summaryrefslogtreecommitdiff
path: root/windows.c
diff options
context:
space:
mode:
authorbje <bje>1998-08-03 01:28:20 +0000
committerbje <bje>1998-08-03 01:28:20 +0000
commitbd354ffc95e1f3ef53f781b9c15641d9b6da9208 (patch)
tree6cd637521e22fd3997e72279c8e292e5d4e37bb3 /windows.c
parentb8ae98223a2602290e8578ba0a8ef3b7c03f4f05 (diff)
1998-08-02 Ben Elliston <bje@cygnus.com>
* windows.h: Remove duplicate TlsSetValue() prototype. Add TlsGetValue() prototype. (FALSE): Define. (TRUE): Likewise. Add forgotten errno values. Guard against multiple #includes. * windows.c: New file. Implement stubs for Win32 functions. * Makefile (SRCS): Remove. Not explicitly needed. (CFLAGS): Add -Wall for all warnings with GCC.
Diffstat (limited to 'windows.c')
-rw-r--r--windows.c139
1 files changed, 139 insertions, 0 deletions
diff --git a/windows.c b/windows.c
new file mode 100644
index 0000000..2549f33
--- /dev/null
+++ b/windows.c
@@ -0,0 +1,139 @@
+/*
+ * windows.c
+ *
+ * This translation unit implements stubs for all of the Windows API
+ * calls. If debugging is on, we dump out diagnostic output for
+ * reassurance.
+ *
+ */
+
+#include <stdio.h>
+
+#include "windows.h"
+
+#define DEBUG 1
+
+#ifdef DEBUG
+#define DIAG(fn) fprintf(stderr, "called: %s\n", fn)
+#endif /* DEBUG */
+
+HANDLE CreateEvent(LPSECURITY_ATTRIBUTES security,
+ BOOL manualReset,
+ BOOL initialState,
+ LPCTSTR name)
+{
+ DIAG("CreateEvent");
+ return 0;
+}
+
+BOOL SetEvent(HANDLE event)
+{
+ DIAG("SetEvent");
+ return TRUE;
+}
+
+BOOL ResetEvent(HANDLE event)
+{
+ DIAG("ResetEvent");
+ return TRUE;
+}
+
+VOID EnterCriticalSection(LPCRITICAL_SECTION criticalSection)
+{
+ DIAG("EnterCriticalSection");
+}
+
+VOID LeaveCriticalSection(LPCRITICAL_SECTION criticalSection)
+{
+ DIAG("LeaveCriticalSection");
+}
+
+VOID DeleteCriticalSection(LPCRITICAL_SECTION criticalSection)
+{
+ DIAG("DeleteCriticalSection");
+}
+
+VOID InitializeCriticalSection(LPCRITICAL_SECTION criticalSection)
+{
+ DIAG("InitializeCriticalSection");
+}
+
+BOOL TryEnterCriticalSection(LPCRITICAL_SECTION criticalSection)
+{
+ DIAG("TryEnterCriticalSection");
+ return TRUE;
+}
+
+DWORD WaitForMultipleObjects(DWORD numObjects,
+ CONST HANDLE * objectArray,
+ BOOL waitForAll,
+ DWORD timeout)
+{
+ DIAG("WaitForMultipleObjects");
+ return 0;
+}
+
+DWORD WaitForSingleObject(HANDLE object,
+ DWORD timeout)
+{
+ DIAG("WaitForSingleObject");
+ return 0;
+}
+
+DWORD TlsAlloc()
+{
+ DIAG("TlsAlloc");
+ return 0;
+}
+
+BOOL TlsFree(DWORD index)
+{
+ DIAG("TlsFree");
+ return TRUE;
+}
+
+BOOL TlsSetValue(DWORD index, LPVOID value)
+{
+ DIAG("TlsSetValue");
+ return TRUE;
+}
+
+BOOL TlsGetValue(DWORD index, LPVOID value)
+{
+ DIAG("TlsGetValue");
+ return TRUE;
+}
+
+BOOL SetThreadPriority(HANDLE threadHandle, int priority)
+{
+ DIAG("SetThreadPriority");
+ return TRUE;
+}
+
+int GetThreadPriority(HANDLE threadHandle)
+{
+ DIAG("GetThreadPriority");
+ return 0;
+}
+
+HANDLE _beginthreadex(LPSECURITY_ATTRIBUTES security,
+ DWORD stack,
+ unsigned (* start_routine)(void *),
+ LPVOID param,
+ DWORD flags,
+ LPDWORD threadID)
+{
+ DIAG("_beginthreadex");
+ return 0;
+}
+
+VOID _endthreadex(DWORD thread)
+{
+ DIAG("_endthreadex");
+}
+
+DWORD GetVersion(VOID)
+{
+ DIAG("GetVersion");
+ return 0;
+}