]> git.lyx.org Git - lyx.git/blobdiff - src/os2_defines.h
Yet another tweak from J�rgen.
[lyx.git] / src / os2_defines.h
index 7a3cb1d47c110f2dadd15e521a005992b58b93b7..aa2b0c785500348f334632bc75d9c302cc46a941 100644 (file)
@@ -5,7 +5,7 @@
 *           LyX, The Document Processor
 *        
 *           Copyright 1995 Matthias Ettrich
-*           Copyright 1995-2000 The LyX Team.
+*           Copyright 1995-2001 The LyX Team.
 *
 * ====================================================== 
  A few prototypes and definitions needed for OS/2 */
 #ifndef OS2_DEFINES_H
 #define OS2_DEFINES_H
 
+#if defined (__cplusplus)
 #include <cctype>
-#include <process.h>
 #include <cstdlib>
+
+extern "C"
+inline int readlink(const char *, char *, size_t) {return -1;}
+
+#else
+#include <ctype.h>
+#include <stdlib.h>
+#define readlink(s, t, l) (-1)
+#endif
+#include <process.h>
 #include <unistd.h>
 #include <X11/Xlocale.h>
 /* #include <malloc.h> */
 #define lstat stat
 #define S_ISLNK(x) false
 #define S_ISBLK(x) false
-#define readlink(s, t, l) (strcpy(t, s), strlen(t))
 /*#define mkfifo(p, m) (0) *//* LyXserver is temporary disabled. */
-#define getcwd _getcwd2
 #define chdir _chdir2
 #define strcasecmp stricmp
 #if defined (__cplusplus)