3 * \brief Header: %global definitions for compatibility
5 * This file should be included after all system includes and before all local includes.
12 #if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
14 /* An ANSI string.h and pre-ANSI memory.h might conflict */
15 # if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)
17 # endif /* !STDC_HEADERS & HAVE_MEMORY_H */
19 #else /* !STDC_HEADERS & !HAVE_STRING_H */
21 /* memory and strings.h conflict on other systems */
22 #endif /* !STDC_HEADERS & !HAVE_STRING_H */
24 #ifdef HAVE_SYS_PARAM_H
25 # include <sys/param.h>
28 /* The O_BINARY definition was taken from gettext */
29 #if !defined O_BINARY && defined _O_BINARY
30 /* For MSC-compatible compilers. */
31 # define O_BINARY _O_BINARY
34 /* BeOS 5 has O_BINARY, but is has no effect. */
37 /* On reasonable systems, binary I/O is the default. */
42 /* Replacement for O_NONBLOCK */
44 #ifdef O_NDELAY /* SYSV */
45 #define O_NONBLOCK O_NDELAY
47 #define O_NONBLOCK FNDELAY
48 #endif /* !O_NDELAY */
49 #endif /* !O_NONBLOCK */
51 #ifdef HAVE_SYS_SELECT_H
52 # include <sys/select.h>
55 #if defined(__QNX__) && !defined(__QNXNTO__)
56 /* exec*() from <process.h> */
61 #include "glibcompat.h"
64 # define __attribute__(x)
69 # define _(String) gettext (String)
71 # define N_(String) gettext_noop (String)
73 # define N_(String) (String)
75 #else /* Stubs that do something close enough. */
76 # define textdomain(String)
77 # define gettext(String) (String)
78 # define ngettext(String1,String2,Num) (((Num) == 1) ? (String1) : (String2))
79 # define dgettext(Domain,Message) (Message)
80 # define dcgettext(Domain,Message,Type) (Message)
81 # define bindtextdomain(Domain,Directory)
82 # define _(String) (String)
83 # define N_(String) (String)
84 #endif /* !ENABLE_NLS */
89 #ifdef USE_MAINTAINER_MODE
90 #include "lib/logging.h"
93 extern const char *home_dir
;
103 #define min(x, y) ((x) > (y) ? (y) : (x))
104 #define max(x, y) ((x) > (y) ? (x) : (y))
106 /* Just for keeping Your's brains from invention a proper size of the buffer :-) */
107 #define BUF_10K 10240L
112 #define BUF_LARGE BUF_1K
113 #define BUF_MEDIUM 512
114 #define BUF_SMALL 128
117 void refresh_screen (void *);
119 /* AIX compiler doesn't understand '\e' */
120 #define ESC_CHAR '\033'
121 #define ESC_STR "\033"
123 /* C++ style type casts */
124 #define const_cast(m_type, m_expr) ((m_type) (m_expr))
127 #ifdef MC_ENABLE_DEBUGGING_CODE
135 #define MC_ERROR mc_main_error_quark ()
136 GQuark
mc_main_error_quark (void);