summaryrefslogtreecommitdiff
path: root/windows.h
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.h
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.h')
-rw-r--r--windows.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/windows.h b/windows.h
index 31e2d0c..08fd326 100644
--- a/windows.h
+++ b/windows.h
@@ -6,6 +6,17 @@
*
*/
+#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
@@ -18,13 +29,23 @@
#define DLL_PROCESS_DETACH 3
+#define INFINITE 42
+
+#define WAIT_OBJECT_0 0
+
+#define WAIT_FAILED 1
+
/* Error numbers */
enum {
EINVAL,
ENOMEM,
ENOSYS,
- EAGAIN
+ EAGAIN,
+ EDEADLK,
+ EBUSY,
+ ENOSUP,
+ ESRCH
};
typedef void VOID;
@@ -68,7 +89,7 @@ VOID DeleteCriticalSection(LPCRITICAL_SECTION criticalSection);
VOID InitializeCriticalSection(LPCRITICAL_SECTION criticalSection);
-VOID TryEnterCriticalSection(LPCRITICAL_SECTION criticalSection);
+BOOL TryEnterCriticalSection(LPCRITICAL_SECTION criticalSection);
DWORD WaitForMultipleObjects(DWORD numObjects,
CONST HANDLE * objectArray,
@@ -84,7 +105,7 @@ BOOL TlsFree(DWORD index);
BOOL TlsSetValue(DWORD index, LPVOID value);
-BOOL TlsSetValue(DWORD index, LPVOID value);
+LPVOID TlsGetValue(DWORD index);
BOOL SetThreadPriority(HANDLE threadHandle, int priority);
@@ -101,3 +122,4 @@ VOID _endthreadex(DWORD);
DWORD GetVersion(VOID);
+#endif /* WINDOWS_H */