-
Notifications
You must be signed in to change notification settings - Fork 1
/
libft_compat.h
74 lines (55 loc) · 1.71 KB
/
libft_compat.h
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* libft_compat.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ksticks <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/17 16:31:42 by ksticks #+# #+# */
/* Updated: 2019/10/17 16:31:43 by ksticks ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef LIBFT_COMPAT_H
# define LIBFT_COMPAT_H
# include "limits.h"
# ifdef _WIN32
# include <io.h>
# define read _read
# define sleep(x) _sleep(x)
# else
# include <unistd.h>
# endif
# ifndef ulong
typedef unsigned long t_ulong;
# define ulong t_ulong
# endif
# ifndef ullong
typedef unsigned long long t_ullong;
# define ullong t_ullong
# endif
# ifndef uint
typedef unsigned int t_uint;
# define uint t_uint
# endif
# ifndef byte
typedef unsigned char t_byte;
# define byte t_byte
# endif
# ifndef ULLONG_MAX
# define ULLONG_MAX ULONG_LONG_MAX
# endif
# ifdef __APPLE__
# define MACOS 1
# else
# define MACOS 0
# endif
# ifndef STDOUT_FILENO
# define STDIN_FILENO 0
# define STDOUT_FILENO 1
# define STDERR_FILENO 2
# endif
# ifndef LITTLE_ENDIAN
# define LITTLE_ENDIAN 1234
# define BIG_ENDIAN 4321
# endif
#endif