]> git.lyx.org Git - lyx.git/blob - src/os2_defines.h
Fix crash when running lyx -dbg insets -e ...
[lyx.git] / src / os2_defines.h
1 /* -*- C++ -*- */
2 /* This file is part of
3 * ====================================================== 
4
5 *           LyX, The Document Processor
6 *        
7 *           Copyright 1995 Matthias Ettrich
8 *           Copyright 1995-2001 The LyX Team.
9 *
10 * ====================================================== 
11  A few prototypes and definitions needed for OS/2 */
12
13 #ifndef OS2_DEFINES_H
14 #define OS2_DEFINES_H
15
16 #if defined (__cplusplus)
17 #include <cctype>
18 #include <cstdlib>
19 extern "C" inline int readlink(const char *, char *, size_t) {return -1;}
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 */