summaryrefslogtreecommitdiff
path: root/src/fixer.h
diff options
context:
space:
mode:
authorSteven Fuller <relnev@icculus.org>2001-07-29 20:57:33 +0000
committerPatryk Obara <dreamer.tan@gmail.com>2019-08-20 02:22:36 +0200
commit4db15e7459ab06860cb7a7e162ca6d2b52a68b9c (patch)
treed26b85d52ff351d029f8138b58fbebee3464c1e1 /src/fixer.h
parent5c497c61a656f338eb9599fb5f364ad853d0eccf (diff)
More compiling. Things are starting to get hacky (adding stubs, commenting
out unimplemented windows stuff, and so on).
Diffstat (limited to 'src/fixer.h')
-rw-r--r--src/fixer.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/fixer.h b/src/fixer.h
index 3913c05..b9baf5d 100644
--- a/src/fixer.h
+++ b/src/fixer.h
@@ -8,6 +8,7 @@ extern "C" {
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <limits.h>
#include <inttypes.h> // int64_t
#define PACKED __attribute__((packed))
@@ -42,6 +43,8 @@ size_t _mbclen(const unsigned char *s);
#define RGBA_MAKE(r,g,b,a) (((r) << 24) | ((g) << 16) | ((b) << 8) | (a))
+#define MAX_PATH PATH_MAX
+
/* windows junk */
typedef int GUID;
typedef int DPID;
@@ -86,17 +89,18 @@ typedef struct SYSTEMTIME
int wDay;
} SYSTEMTIME;
-#define INVALID_HANDLE_VALUE -1
-#define GENERIC_WRITE 0
-#define CREATE_ALWAYS 1
-#define FILE_FLAG_RANDOM_ACCESS 2
-#define GENERIC_READ 3
-#define OPEN_EXISTING 4
-#define FILE_ATTRIBUTE_READONLY 5
-#define FILE_CURRENT 6
-#define FILE_BEGIN 7
-#define FILE_END 8
-#define FILE_SHARE_READ 9
+#define INVALID_HANDLE_VALUE -1
+#define GENERIC_WRITE 0
+#define CREATE_ALWAYS 1
+#define FILE_FLAG_RANDOM_ACCESS 2
+#define GENERIC_READ 3
+#define OPEN_EXISTING 4
+#define FILE_ATTRIBUTE_READONLY 5
+#define FILE_CURRENT 6
+#define FILE_BEGIN 7
+#define FILE_END 8
+#define FILE_SHARE_READ 9
+#define FILE_ATTRIBUTE_DIRECTORY 10
HANDLE CreateFile(const char *file, int write, int x, int y, int flags, int flags2, int z);
HANDLE CreateFileA(const char *file, int write, int x, int y, int flags, int flags2, int z);
@@ -106,7 +110,7 @@ int GetFileSize(HANDLE file, int x);
int CloseHandle(HANDLE file);
int DeleteFile(const char *file);
int DeleteFileA(const char *file);
-int GetDiskFreeSpace(int x, unsigned long *a, unsigned long *b, unsigned long *c, unsigned long *d);
+int GetDiskFreeSpace(int x, unsigned long *a, unsigned long *b, unsigned long *c, unsigned long *d);
int CreateDirectory(char *dir, int x);
int MoveFile(const char *newfile, const char *oldfile);
int MoveFileA(const char *newfile, const char *oldfile);