summaryrefslogtreecommitdiff
path: root/fluid
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2017-10-15 10:46:16 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2017-10-15 10:46:16 +0000
commita8b58f6b79da340030d0646ba7036ba40f62e528 (patch)
treedb1f3b6ed1dafbffa33ac6f50cb61cdc3d3fad92 /fluid
parent1af23ab32f55b7b5f6bc00840d0f8faa70102cec (diff)
Replace inappropriate usage of __WATCOM__ with _MSC_VER.
Note: this is in parts temporary since some of the functions redefined for Visual Studio will be replaced with fl_*() functions in later commits. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12498 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid')
-rw-r--r--fluid/fluid.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx
index 7c5131829..67f46bba8 100644
--- a/fluid/fluid.cxx
+++ b/fluid/fluid.cxx
@@ -48,6 +48,15 @@
#include "function_panel.h"
#include "template_panel.h"
+// Visual C++ 2005 incorrectly displays a warning about the use of
+// POSIX APIs on Windows, which is supposed to be POSIX compliant...
+// Some of these functions are also defined in ISO C99...
+#if defined(_MSC_VER)
+# define access _access
+# define chdir _chdir
+# define getcwd _getcwd
+#endif // _MSC_VER
+
#if defined(WIN32) && !defined(__CYGWIN__)
# include <direct.h>
# include <windows.h>
@@ -55,13 +64,6 @@
# include <fcntl.h>
# include <commdlg.h>
# include <FL/x.H>
-# ifndef __WATCOMC__
-// Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs
-// on Windows, which is supposed to be POSIX compliant...
-# define access _access
-# define chdir _chdir
-# define getcwd _getcwd
-# endif // !__WATCOMC__
#else
# include <unistd.h>
#endif