From 4df2348fa0926b55b7e7c94381b96b9c58d94b8a Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Fri, 14 May 2010 14:35:17 +0000 Subject: [PATCH] fix win32 compile --- Common/Context.cpp | 8 ++++---- Common/OS.cpp | 2 +- Common/OS.h | 2 +- Parser/Gmsh.tab.cpp | 2 +- Parser/Gmsh.y | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Common/Context.cpp b/Common/Context.cpp index bc79e31fa5..32322fb745 100644 --- a/Common/Context.cpp +++ b/Common/Context.cpp @@ -23,13 +23,13 @@ CTX::CTX() bigEndian = (byte[0] ? 0 : 1); const char *tmp; - if((tmp = GetEnvironmentVariable("GMSH_HOME"))) + if((tmp = GetEnvironmentVar("GMSH_HOME"))) homeDir = tmp; - else if((tmp = GetEnvironmentVariable("HOME"))) + else if((tmp = GetEnvironmentVar("HOME"))) homeDir = tmp; - else if((tmp = GetEnvironmentVariable("TMP"))) + else if((tmp = GetEnvironmentVar("TMP"))) homeDir = tmp; - else if((tmp = GetEnvironmentVariable("TEMP"))) + else if((tmp = GetEnvironmentVar("TEMP"))) homeDir = tmp; else homeDir = ""; diff --git a/Common/OS.cpp b/Common/OS.cpp index 0c163ec6e6..9cc026dd7c 100644 --- a/Common/OS.cpp +++ b/Common/OS.cpp @@ -34,7 +34,7 @@ #include "GmshMessage.h" -const char *GetEnvironmentVariable(const char *var) +const char *GetEnvironmentVar(const char *var) { #if !defined(WIN32) return getenv(var); diff --git a/Common/OS.h b/Common/OS.h index 4ec4681012..2a4e3edf8d 100644 --- a/Common/OS.h +++ b/Common/OS.h @@ -8,7 +8,7 @@ #include <string> -const char *GetEnvironmentVariable(const char *var); +const char *GetEnvironmentVar(const char *var); double GetTimeInSeconds(); void SleepInSeconds(double s); void CheckResources(); diff --git a/Parser/Gmsh.tab.cpp b/Parser/Gmsh.tab.cpp index 0eee92b74a..8b7e01b193 100644 --- a/Parser/Gmsh.tab.cpp +++ b/Parser/Gmsh.tab.cpp @@ -8711,7 +8711,7 @@ yyreduce: case 382: #line 4080 "Gmsh.y" { - const char *env = GetEnvironmentVariable((yyvsp[(3) - (4)].c)); + const char *env = GetEnvironmentVar((yyvsp[(3) - (4)].c)); if(!env) env = ""; (yyval.c) = (char *)Malloc((sizeof(env) + 1) * sizeof(char)); strcpy((yyval.c), env); diff --git a/Parser/Gmsh.y b/Parser/Gmsh.y index f1a7d6e5a6..6cc10169ab 100644 --- a/Parser/Gmsh.y +++ b/Parser/Gmsh.y @@ -4078,7 +4078,7 @@ StringExpr : } | tGetEnv '(' StringExprVar ')' { - const char *env = GetEnvironmentVariable($3); + const char *env = GetEnvironmentVar($3); if(!env) env = ""; $$ = (char *)Malloc((sizeof(env) + 1) * sizeof(char)); strcpy($$, env); -- GitLab