-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcompat.h
More file actions
74 lines (55 loc) · 1.37 KB
/
compat.h
File metadata and controls
74 lines (55 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef _WIN32
#ifndef _COMPAT_H_DEFINED
#define _COMPAT_H_DEFINED
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <stdarg.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/types.h>
#include <dirent.h>
#include <fnmatch.h>
#include <sys/stat.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <stdio.h>
#include <stdint.h>
#include <limits.h>
#define _A_NORMAL 0x00
#define _A_SUBDIR 0x10
#define _MSC_VER
int sprintf_s(char *buffer, size_t sizeOfBuffer, const char *format, ...);
int rand_s(unsigned int *randomValue);
int strcpy_s(char* dest, size_t destsz, const char* src);
int strcat_s(char *dest, size_t destsz, const char *src);
#define _stricmp strcasecmp
#define GetCurrentProcessId() ((unsigned int)getpid())
#define _mkdir(path) mkdir((path), 0777)
#define _chdir chdir
#define _getcwd getcwd
#define _stat stat
#if !defined(__EMSCRIPTEN__)
typedef __time_t time_t;
#endif
typedef u_int32_t _fsize_t;
struct _finddata_t {
unsigned attrib;
time_t time_write;
size_t size;
char name[PATH_MAX];
};
typedef struct {
DIR *dir;
char pattern[PATH_MAX];
char path[PATH_MAX];
} _find_handle_t;
intptr_t _findfirst(const char *pattern, struct _finddata_t *data);
int _findnext(intptr_t h, struct _finddata_t *data);
int _findclose(intptr_t h);
#endif
#endif