summaryrefslogtreecommitdiff
path: root/fluid
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2017-11-12 18:00:45 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2017-11-12 18:00:45 +0000
commitf3896460d64f06a6203da05bdcdabf7e133c8f10 (patch)
tree2df682cb9955be34d3d1e120219ec1ae3b8c430c /fluid
parentcfdc38f760edf69b99aa6e625d522da9eeffbebe (diff)
Replace chdir() with new wrapper fl_chdir().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12558 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid')
-rw-r--r--fluid/fluid.cxx18
1 files changed, 7 insertions, 11 deletions
diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx
index 39a3f37ab..b75e8f571 100644
--- a/fluid/fluid.cxx
+++ b/fluid/fluid.cxx
@@ -48,13 +48,6 @@
#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 chdir _chdir
-#endif // _MSC_VER
-
#if defined(WIN32) && !defined(__CYGWIN__)
# include <direct.h>
# include <windows.h>
@@ -135,15 +128,18 @@ void goto_source_dir() {
pwd = fl_getcwd(0, FL_PATH_MAX);
if (!pwd) {fprintf(stderr, "getwd : %s\n",strerror(errno)); return;}
}
- if (chdir(buffer) < 0) {fprintf(stderr, "Can't chdir to %s : %s\n",
- buffer, strerror(errno)); return;}
+ if (fl_chdir(buffer) < 0) {
+ fprintf(stderr, "Can't chdir to %s : %s\n", buffer, strerror(errno));
+ return;
+ }
in_source_dir = 1;
}
void leave_source_dir() {
if (!in_source_dir) return;
- if (chdir(pwd)<0) {fprintf(stderr, "Can't chdir to %s : %s\n",
- pwd, strerror(errno));}
+ if (fl_chdir(pwd) < 0) {
+ fprintf(stderr, "Can't chdir to %s : %s\n", pwd, strerror(errno));
+ }
in_source_dir = 0;
}