* vfs.c (vfs_init) [!WITH_MCFS]: Don't register mcfs.
[midnight-commander.git] / src / global.h
blob6adc1fe33aca6558b5dc0aae48ded2a379ebc550
1 /*
2 * This file should be included after all system includes and before
3 * all local includes.
4 */
6 #ifndef __MC_GLOBAL_H
7 #define __MC_GLOBAL_H
9 #include <stdlib.h> /* for free() and other usefull routins */
11 #ifdef _OS_NT
12 # include <windows.h>
13 # include <io.h>
14 #ifdef _MSC_VER
15 # include <direct.h> /* from mkdir() */
16 #endif
17 #endif
19 #ifdef HAVE_SYS_PARAM_H
20 # include <sys/param.h>
21 #endif
23 #ifdef HAVE_SYS_TIMEB_H
24 # include <sys/timeb.h>
25 #endif
27 #ifdef TIME_WITH_SYS_TIME
28 # include <sys/time.h>
29 # include <time.h>
30 #else
31 # ifdef HAVE_SYS_TIME_H
32 # include <sys/time.h>
33 # else
34 # include <time.h>
35 # endif
36 #endif
38 #if !defined(HAVE_SYS_TIME_H) && !defined(_OS_NT)
39 struct timeval {
40 long int tv_sec; /* seconds */
41 long int tv_usec; /* microseconds */
43 #endif /* !HAVE_SYS_TIME_H */
45 #ifdef HAVE_UTIME_H
46 # include <utime.h>
47 #elif defined(HAVE_SYS_UTIME_H)
48 # include <sys/utime.h>
49 #endif
51 #ifdef HAVE_SYS_WAIT_H
52 # include <sys/wait.h>
53 #endif
55 #ifdef HAVE_SYS_SELECT_H
56 # include <sys/select.h>
57 #endif
59 #ifdef HAVE_GRP_H
60 # include <grp.h>
61 #endif
63 #ifdef HAVE_PWD_H
64 # include <pwd.h>
65 #endif
67 #if defined(__QNX__) && !defined(__QNXNTO__)
68 /* exec*() from <process.h> */
69 # include <unix.h>
70 #endif
72 #include <glib.h>
74 #ifndef __GNUC__
75 # define __attribute__(x)
76 #endif
78 #ifndef HAVE_GETUID
79 # define getuid() 0
80 #endif
81 #ifndef HAVE_GETGID
82 # define getgid() 0
83 #endif
84 #ifndef HAVE_GETEUID
85 # define geteuid() getuid()
86 #endif
87 #ifndef HAVE_GETEGID
88 # define getegid() getgid()
89 #endif
91 #include "fs.h"
92 #include "mem.h"
93 #include "util.h"
94 #include "mad.h"
96 #include "textconf.h"
98 extern char *home_dir;
100 #ifdef min
101 #undef min
102 #endif
104 #ifdef max
105 #undef max
106 #endif
108 #define min(x, y) ((x) > (y) ? (y) : (x))
109 #define max(x, y) ((x) > (y) ? (x) : (y))
111 /* Just for keeping Your's brains from invention a proper size of the buffer :-) */
112 #define BUF_10K 10240L
113 #define BUF_8K 8192L
114 #define BUF_4K 4096L
115 #define BUF_1K 1024L
117 #define BUF_LARGE BUF_1K
118 #define BUF_MEDIUM 512
119 #define BUF_SMALL 128
120 #define BUF_TINY 64
122 void refresh_screen (void *);
124 /* AIX compiler doesn't understand '\e' */
125 #define ESC_CHAR '\033'
126 #define ESC_STR "\033"
128 #define xgetch getch
130 #endif /* !__MC_GLOBAL_H */