Browse Source

--- Merging r22364 into '.':
U rtl/unix/bunxovlh.inc
--- Merging r22368 into '.':
C compiler/globals.pas
Summary of conflicts:
Text conflicts: 1

# revisions: 22364,22368
r22364 | marco | 2012-09-10 11:01:24 +0200 (Mon, 10 Sep 2012) | 2 lines
Changed paths:
M /trunk/rtl/unix/bunxovlh.inc

* deprecated old shortstring getenv func.
r22368 | marco | 2012-09-10 19:40:07 +0200 (Mon, 10 Sep 2012) | 3 lines
Changed paths:
M /trunk/compiler/globals.pas

* workaround breakage due to fpgetenv deprecation in combination with
-Se.

git-svn-id: branches/fixes_2_6@22699 -

marco 12 years ago
parent
commit
22389f4132
2 changed files with 4 additions and 4 deletions
  1. 3 3
      compiler/globals.pas
  2. 1 1
      rtl/unix/bunxovlh.inc

+ 3 - 3
compiler/globals.pas

@@ -448,7 +448,7 @@ interface
     procedure DefaultReplacements(var s:ansistring);
 
     function Shell(const command:ansistring): longint;
-    function  GetEnvPChar(const envname:string):pchar;
+    function  GetEnvPChar(const envname:ansistring):pchar;
     procedure FreeEnvPChar(p:pchar);
 
     function is_number_float(d : double) : boolean;
@@ -809,7 +809,7 @@ implementation
                                OS Dependent things
  ****************************************************************************}
 
-    function GetEnvPChar(const envname:string):pchar;
+    function GetEnvPChar(const envname:ansistring):pchar;
       {$ifdef win32}
       var
         s     : string;
@@ -818,7 +818,7 @@ implementation
       {$endif}
       begin
       {$ifdef hasunix}
-        GetEnvPchar:=BaseUnix.fpGetEnv(envname);
+        GetEnvPchar:=BaseUnix.fpGetEnv(pansichar(envname));
         {$define GETENVOK}
       {$endif}
       {$ifdef win32}

+ 1 - 1
rtl/unix/bunxovlh.inc

@@ -65,7 +65,7 @@ function  fptime    :time_t; inline;
 Function fpSelect   (N:cint;readfds,writefds,exceptfds:pfdset;TimeOut:cint):cint;
 Function fpSelect   (var T:Text;TimeOut :PTimeval):cint;
 Function fpSelect   (var T:Text;TimeOut :time_t):cint;
-Function FpGetEnv   (name : String): pChar;
+Function FpGetEnv   (name : String): pChar; deprecated; // because shortstring
 
 // macro's