summaryrefslogtreecommitdiff
path: root/src/fixer.h
diff options
context:
space:
mode:
authorSteven Fuller <relnev@icculus.org>2001-07-28 04:44:27 +0000
committerPatryk Obara <dreamer.tan@gmail.com>2019-08-20 02:22:36 +0200
commitf759e35cd8399d8bffea4d59c5822db8f1002409 (patch)
treec0ab401aeb1fdd12bd934107f8a5a647c205ed2a /src/fixer.h
parent6d5a3cec554f6afc5f075722fba7e2aa464f5676 (diff)
More compilation.
Moved windows typedefs to a separate file. Included public domain md5 routines (from dpkg).
Diffstat (limited to 'src/fixer.h')
-rw-r--r--src/fixer.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/fixer.h b/src/fixer.h
new file mode 100644
index 0000000..2414e70
--- /dev/null
+++ b/src/fixer.h
@@ -0,0 +1,62 @@
+#ifndef __FIXER_H__
+#define __FIXER_H__
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <inttypes.h> // int64_t
+
+#define PACKED __attribute__((packed))
+
+#ifndef min
+#define min(a, b) (((a) < (b)) ? (a) : (b))
+#endif
+
+#ifndef max
+#define max(a, b) (((a) > (b)) ? (a) : (b))
+#endif
+
+#define __cdecl
+
+#define TRUE 1
+#define FALSE 0
+
+#define stricmp strcasecmp
+#define _stricmp strcasecmp
+
+/* windows junk */
+typedef int GUID;
+typedef int DPID;
+typedef int HINSTANCE;
+typedef int WPARAM;
+typedef int LPARAM;
+typedef int HANDLE;
+
+typedef int BOOL;
+
+typedef struct RECT
+{
+ int left;
+ int top;
+ int right;
+ int bottom;
+} RECT;
+
+typedef RECT RECT_AVP;
+
+typedef int64_t __int64;
+
+typedef int FILETIME;
+
+typedef struct SYSTEMTIME
+{
+//#warning "TODO: SYSTEMTIME format is not correct"
+ int wHour;
+ int wMinute;
+ int wSecond;
+ int wYear;
+ int wMonth;
+ int wDay;
+} SYSTEMTIME;
+
+#endif