From 06ca7993a59b7b9fbcc2ce79eef8c1ca0a4c2735 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sun, 15 Oct 2017 13:04:45 +0000 Subject: Replace remaining calls to getcwd() with fl_getcwd(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12501 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- fluid/fluid.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index db652f416..39a3f37ab 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -53,7 +53,6 @@ // Some of these functions are also defined in ISO C99... #if defined(_MSC_VER) # define chdir _chdir -# define getcwd _getcwd #endif // _MSC_VER #if defined(WIN32) && !defined(__CYGWIN__) @@ -133,11 +132,11 @@ void goto_source_dir() { strlcpy(buffer, filename, sizeof(buffer)); int n = (int)(p-filename); if (n>1) n--; buffer[n] = 0; if (!pwd) { - pwd = getcwd(0,FL_PATH_MAX); - if (!pwd) {fprintf(stderr,"getwd : %s\n",strerror(errno)); return;} + 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 (chdir(buffer) < 0) {fprintf(stderr, "Can't chdir to %s : %s\n", + buffer, strerror(errno)); return;} in_source_dir = 1; } -- cgit v1.2.3