diff options
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | windows.c | 139 | ||||
| -rw-r--r-- | windows.h | 115 | 
3 files changed, 6 insertions, 254 deletions
| @@ -1,3 +1,9 @@ +1998-09-12  Ben Elliston  <bje@cygnus.com> + +	* windows.h: No longer needed; remove. + +	* windows.c: Likewise. +  Sat Sep 12 20:09:24 1998  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>  	* windows.h: Remove error number definitions. These are in <errno.h> diff --git a/windows.c b/windows.c deleted file mode 100644 index d55a9d7..0000000 --- a/windows.c +++ /dev/null @@ -1,139 +0,0 @@ -/* - * 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; -} - -LPVOID TlsGetValue(DWORD index) -{ -	DIAG("TlsGetValue"); -	return 0; -} - -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; -} diff --git a/windows.h b/windows.h deleted file mode 100644 index 89843f6..0000000 --- a/windows.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * windows.h - * - * NOT THE REAL windows.h. We're not necessarily concerned - * that value are correct. Just that the types are defined. - * - */ - -#ifndef WINDOWS_H -#define WINDOWS_H - -#ifndef TRUE -#define TRUE 1 -#endif /* TRUE */ - -#ifndef FALSE -#define FALSE 0 -#endif /* FALSE */ - -#define WINAPI - -#define CONST const - -#define DLL_THREAD_ATTACH 0 - -#define DLL_THREAD_DETACH 1 - -#define DLL_PROCESS_ATTACH 2 - -#define DLL_PROCESS_DETACH 3 - -#define INFINITE 42 - -#define WAIT_OBJECT_0 0 - -#define WAIT_FAILED 1 - -/* Priority levels */ - -enum { -  THREAD_PRIORITY_LOWEST, -  THREAD_PRIORITY_NORMAL, -  THREAD_PRIORITY_HIGHEST -}; - -enum { -  THREAD_PRIORITY_ERROR_RETURN -}; - -typedef void VOID; - -typedef int BOOL; - -typedef unsigned long DWORD; - -typedef unsigned long ULONG; - -typedef void * LPVOID; - -typedef DWORD * LPDWORD; - -typedef char * LPCTSTR; - -typedef unsigned long HANDLE; - -typedef HANDLE HINSTANCE; - -typedef void * LPSECURITY_ATTRIBUTES; - -typedef int CRITICAL_SECTION; - -typedef CRITICAL_SECTION * LPCRITICAL_SECTION; - -HANDLE CreateEvent(LPSECURITY_ATTRIBUTES security, -		   BOOL manualReset, -		   BOOL initialState, -		   LPCTSTR name); - -BOOL SetEvent(HANDLE event); - -BOOL ResetEvent(HANDLE event); - -VOID EnterCriticalSection(LPCRITICAL_SECTION criticalSection); - -VOID LeaveCriticalSection(LPCRITICAL_SECTION criticalSection); - -VOID DeleteCriticalSection(LPCRITICAL_SECTION criticalSection); - -VOID InitializeCriticalSection(LPCRITICAL_SECTION criticalSection); - -BOOL TryEnterCriticalSection(LPCRITICAL_SECTION criticalSection); - -DWORD WaitForMultipleObjects(DWORD numObjects, -			     CONST HANDLE * objectArray, -			     BOOL waitForAll, -			     DWORD timeout); - -DWORD WaitForSingleObject(HANDLE object, -			  DWORD timeout); - -DWORD TlsAlloc(); - -BOOL TlsFree(DWORD index); - -BOOL TlsSetValue(DWORD index, LPVOID value); - -LPVOID TlsGetValue(DWORD index); - -BOOL SetThreadPriority(HANDLE threadHandle, int priority); - -int GetThreadPriority(HANDLE threadHandle); - -DWORD GetVersion(VOID); - -#endif /* WINDOWS_H */ | 
