]> git.lyx.org Git - lyx.git/blob - src/support/os2_defines.h
Trivial fixes to some warnings thrown up by MSVS.Net 2003.
[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 #ifdef HAVE_STDLIB_H
23 # include <stdlib.h>
24 #endif
25 #define readlink(s, t, l) (-1)
26 #endif
27 #include <process.h>
28 #ifdef HAVE_UNISTD_H
29 # include <unistd.h>
30 #endif
31 #include <X11/Xlocale.h>
32 /* #include <malloc.h> */
33 #define lstat stat
34 #define S_ISLNK(x) false
35 #define S_ISBLK(x) false
36 /*#define mkfifo(p, m) (0) *//* LyXserver is temporary disabled. */
37 #define chdir _chdir2
38 #define strcasecmp stricmp
39 #if defined (__cplusplus)
40 extern "C" {
41 #endif
42 const char* __XOS2RedirRoot(const char* pathname);
43 #if defined (__cplusplus)
44 }
45 #endif
46 #undef LYX_DIR
47 #define LYX_DIR __XOS2RedirRoot("/XFree86/lib/X11/lyx")
48 #undef LOCALEDIR
49 #define LOCALEDIR __XOS2RedirRoot("/XFree86/lib/X11/locale")
50 #undef TOP_SRCDIR
51 #define TOP_SRCDIR ".."
52 /* I have the slightest idea what I am doing here... */
53 #define bindtextdomain bindtextdomain__
54 #define textdomain textdomain__
55
56 #endif /* _OS2_DEFINES_H */