]> git.lyx.org Git - lyx.git/blob - src/support/os2_defines.h
another safety belt
[lyx.git] / src / support / os2_defines.h
1 /* -*- C++ -*- */
2 /**
3  * \file os2_defines.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * Prototypes and definitions needed for OS/2.
8  */
9
10 #ifndef OS2_DEFINES_H
11 #define OS2_DEFINES_H
12
13 #if defined (__cplusplus)
14 #include <cctype>
15 #include <cstdlib>
16
17 extern "C"
18 inline int readlink(const char *, char *, size_t) {return -1;}
19
20 #else
21 #include <ctype.h>
22 #include <stdlib.h>
23 #define readlink(s, t, l) (-1)
24 #endif
25 #include <process.h>
26 #include <unistd.h>
27 #include <X11/Xlocale.h>
28 /* #include <malloc.h> */
29 #define lstat stat
30 #define S_ISLNK(x) false
31 #define S_ISBLK(x) false
32 /*#define mkfifo(p, m) (0) *//* LyXserver is temporary disabled. */
33 #define chdir _chdir2
34 #define strcasecmp stricmp
35 #if defined (__cplusplus)
36 extern "C" {
37 #endif
38 const char* __XOS2RedirRoot(const char* pathname);
39 #if defined (__cplusplus)
40 }
41 #endif
42 #undef LYX_DIR
43 #define LYX_DIR __XOS2RedirRoot("/XFree86/lib/X11/lyx")
44 #undef LOCALEDIR
45 #define LOCALEDIR __XOS2RedirRoot("/XFree86/lib/X11/locale")
46 #undef TOP_SRCDIR
47 #define TOP_SRCDIR ".."
48 /* I have the slightest idea what I am doing here... */
49 #define bindtextdomain bindtextdomain__
50 #define textdomain textdomain__
51
52 #endif /* _OS2_DEFINES_H */