From a213c56d8e2e72cb41fd3343a279016199975594 Mon Sep 17 00:00:00 2001 From: kichik Date: Mon, 25 Oct 2004 23:34:07 +0000 Subject: [PATCH] include unistd.h for chdir() git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3758 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/script.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Source/script.cpp b/Source/script.cpp index ab8fb036..425bc3c3 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -11,11 +11,14 @@ #include "exehead/resource.h" #include // for assert(3) -#ifndef _WIN32 +#ifdef _WIN32 +# include +#else # include # include # include # include // for O_RDONLY +# include #endif #define MAX_INCLUDEDEPTH 10 @@ -2711,11 +2714,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) } return PS_OK; case TOK_P_CD: -#ifdef _WIN32 - if (!line.gettoken_str(1)[0] || !SetCurrentDirectory(line.gettoken_str(1))) -#else if (!line.gettoken_str(1)[0] || chdir(line.gettoken_str(1))) -#endif { ERROR_MSG("!cd: error changing to: \"%s\"\n",line.gettoken_str(1)); return PS_ERROR;