From bd354ffc95e1f3ef53f781b9c15641d9b6da9208 Mon Sep 17 00:00:00 2001 From: bje Date: Mon, 3 Aug 1998 01:28:20 +0000 Subject: 1998-08-02 Ben Elliston * 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. --- windows.c | 139 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 windows.c (limited to 'windows.c') 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 + +#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; +} -- cgit v1.2.3