浏览代码

* Char -> AnsiChar

Michael VAN CANNEYT 2 年之前
父节点
当前提交
57353df68f
共有 7 个文件被更改,包括 82 次插入82 次删除
  1. 20 20
      rtl/emx/dos.pas
  2. 7 7
      rtl/emx/sysdir.inc
  3. 6 6
      rtl/emx/sysfile.inc
  4. 5 5
      rtl/emx/sysos.inc
  5. 15 15
      rtl/emx/system.pas
  6. 1 1
      rtl/emx/systhrd.inc
  7. 28 28
      rtl/emx/sysutils.pp

+ 20 - 20
rtl/emx/dos.pas

@@ -98,7 +98,7 @@ const
 
 {OS/2 specific functions}
 
-function GetEnvPChar (EnvVar: string): PChar;
+function GetEnvPChar (EnvVar: string): PAnsiChar;
 
 
 threadvar
@@ -127,7 +127,7 @@ threadvar
 
 var
   EnvC: longint; external name '_envc';
-  EnvP: ppchar; external name '_environ';
+  EnvP: PPAnsiChar; external name '_environ';
 
 type
   TBA = array [1..SizeOf (SearchRec)] of byte;
@@ -370,14 +370,14 @@ var args:Pbytearray;
     d:dirstr;
     n:namestr;
     e:extstr;
-    p : ppchar;
+    p : PPAnsiChar;
     j : integer;
 const
     ArgsSize = 2048; (* Amount of memory reserved for arguments in bytes. *)
 
 begin
     getmem(args,ArgsSize);
-    GetMem(env, envc*sizeof(pchar)+16384);
+    GetMem(env, envc*sizeof(PAnsiChar)+16384);
     GetMem (Path2, 260);
     {Now setup the arguments. The first argument should be the program
      name without directory and extension.}
@@ -427,7 +427,7 @@ begin
         movl envp,%esi      {Load env. strings.}
         xorl %edx,%edx      {Count environment size.}
 .Lexa1:
-        lodsl               {Load a Pchar.}
+        lodsl               {Load a PAnsiChar.}
         xchgl %eax,%ebx
 .Lexa2:
         movb (%ebx),%al     {Load a byte.}
@@ -472,7 +472,7 @@ begin
     end ['eax', 'ebx', 'ecx', 'edx', 'esi', 'edi'];
 
     FreeMem (Path2, 260);
-    FreeMem(env, envc*sizeof(pchar)+16384);
+    FreeMem(env, envc*sizeof(PAnsiChar)+16384);
     freemem(args,ArgsSize);
     {Phew! That's it. This was the most sophisticated procedure to call
      a system function I ever wrote!}
@@ -752,13 +752,13 @@ begin
                 end;
         for i:=namesize-1 downto 0 do
             f.name[i+1]:=f.name[i];
-        f.name[0]:=char(l);
+        f.name[0]:=AnsiChar(l);
         Move (F, LastSR, SizeOf (LastSR));
     end;
 end;
 
 
-    procedure _findfirst(path:pchar;attr:word;var f:searchrec);
+    procedure _findfirst(path:PAnsiChar;attr:word;var f:searchrec);
 
     begin
         asm
@@ -780,7 +780,7 @@ end;
 procedure FindFirst (const Path: PathStr; Attr: word; var F: SearchRec);
 
 
-var path0: array[0..255] of char;
+var path0: array[0..255] of AnsiChar;
     Count: cardinal;
 
 begin
@@ -855,7 +855,7 @@ end ['EAX'];
 
 function envstr(index : longint) : string;
 
-var hp:Pchar;
+var hp:PAnsiChar;
 
 begin
     if (index<=0) or (index>envcount) then
@@ -868,10 +868,10 @@ begin
 end;
 
 
-function GetEnvPChar (EnvVar: string): PChar;
+function GetEnvPChar (EnvVar: string): PAnsiChar;
 (* The assembler version is more than three times as fast as Pascal. *)
 var
- P: PChar;
+ P: PAnsiChar;
 begin
  EnvVar := UpCase (EnvVar);
 {$ASMMODE INTEL}
@@ -941,7 +941,7 @@ procedure getfattr(var f;var attr : word);
  { properly (CEC)                       }
 var
  path:  pathstr;
- buffer:array[0..255] of char;
+ buffer:array[0..255] of AnsiChar;
 begin
   DosError := 0;
 {$ifdef FPC_ANSI_TEXTFILEREC}
@@ -975,7 +975,7 @@ procedure setfattr(var f;attr : word);
  { properly (CEC)                       }
 var
  path:  pathstr;
- buffer:array[0..255] of char;
+ buffer:array[0..255] of AnsiChar;
 begin
   DosError := 0;
 {$ifdef FPC_ANSI_TEXTFILEREC}
@@ -1003,8 +1003,8 @@ end;
 procedure InitEnvironment;
 var
  cnt : integer;
- ptr : pchar;
- base : pchar;
+ ptr : PAnsiChar;
+ base : PAnsiChar;
  i: integer;
  PIB: PProcessInfoBlock;
  TIB: PThreadInfoBlock;
@@ -1017,7 +1017,7 @@ begin
   cnt := 0;
   { count number of environment pointers }
   DosGetInfoBlocks (PPThreadInfoBlock (@TIB), PPProcessInfoBlock (@PIB));
-  ptr := pchar(PIB^.env);
+  ptr := PAnsiChar(PIB^.env);
   { stringz,stringz...,#0 }
   i := 0;
   repeat
@@ -1032,9 +1032,9 @@ begin
   { save environment count }
   envc := cnt;
   { got count of environment strings }
-  GetMem(envp, cnt*sizeof(pchar)+16384);
+  GetMem(envp, cnt*sizeof(PAnsiChar)+16384);
   cnt := 0;
-  ptr := pchar(PIB^.env);
+  ptr := PAnsiChar(PIB^.env);
   i:=0;
   repeat
     envp[cnt] := ptr;
@@ -1053,7 +1053,7 @@ procedure DoneEnvironment;
 begin
   { it is allocated on the stack for DOS/DPMI }
   if os_mode = osOs2 then
-     FreeMem(envp, envc*sizeof(pchar)+16384);
+     FreeMem(envp, envc*sizeof(PAnsiChar)+16384);
 end;
 
 var

+ 7 - 7
rtl/emx/sysdir.inc

@@ -40,7 +40,7 @@ begin
   if os_mode = osOs2 then
    begin
     DoDirSeparators (S);
-    RC := DosCreateDir (pchar(S), nil);
+    RC := DosCreateDir (PAnsiChar(S), nil);
     if RC <> 0 then
      begin
       InOutRes := RC;
@@ -67,7 +67,7 @@ begin
    if os_mode = osOs2 then
     begin
      DoDirSeparators (S);
-     RC := DosDeleteDir (pchar(S));
+     RC := DosDeleteDir (PAnsiChar(S));
      if RC <> 0 then
       begin
        InOutRes := RC;
@@ -108,7 +108,7 @@ begin
          DoDirSeparators (S);
          if (S [Len] = DirectorySeparator) and (Len <> 3) then
           S [Len] := #0;
-         RC := DosSetCurrentDir (pchar(S));
+         RC := DosSetCurrentDir (PAnsiChar(S));
          if RC <> 0 then
           begin
            InOutRes := RC;
@@ -121,7 +121,7 @@ begin
       DoDirSeparators (S);
       if (Len > 1) and (S [Len] = DirectorySeparator) then
        S [Len] := #0;
-      RC := DosSetCurrentDir (pchar(S));
+      RC := DosSetCurrentDir (PAnsiChar(S));
       if RC <> 0 then
        begin
         InOutRes:= RC;
@@ -173,14 +173,14 @@ procedure do_GetDir (DriveNr: byte; var Dir: RawByteString);
 
 {Written by Michael Van Canneyt.}
 
-var sof:Pchar;
+var sof:PAnsiChar;
     i:byte;
 
 begin
     SetLength(Dir,260);
     Dir [4] := #0;
     { Used in case the specified drive isn't available }
-    sof:=pchar(@dir[4]);
+    sof:=PAnsiChar(@dir[4]);
     { dir[1..3] will contain '[drivenr]:\', but is not }
     { supplied by DOS, so we let dos string start at   }
     { dir[4]                                           }
@@ -220,7 +220,7 @@ begin
                 addb $65,%al
                 movb %al,i
             end ['eax'];
-            dir[1]:=char(i);
+            dir[1]:=AnsiChar(i);
         end;
     SetCodePage(dir,DefaultFileSystemCodePage,false);
     { upcase the string (FPC function) }

+ 6 - 6
rtl/emx/sysfile.inc

@@ -40,9 +40,9 @@ begin
    end;
 end;
 
-procedure do_erase(p:Pchar; pchangeable: boolean);
+procedure do_erase(p:PAnsiChar; pchangeable: boolean);
 var
-  oldp: pchar;
+  oldp: PAnsiChar;
 begin
     oldp:=p;
     DoDirSeparators(p,pchangeable);
@@ -58,9 +58,9 @@ begin
       freemem(p);
 end;
 
-procedure do_rename(p1,p2:Pchar; p1changeable, p2changeable: boolean);
+procedure do_rename(p1,p2:PAnsiChar; p1changeable, p2changeable: boolean);
 var
-  oldp1, oldp2 : pchar;
+  oldp1, oldp2 : PAnsiChar;
 begin
     oldp1:=p1;
     oldp2:=p2;
@@ -265,7 +265,7 @@ begin
         end;
 end;
 
-procedure do_open(var f;p:pchar;flags:longint; pchangeable: boolean);
+procedure do_open(var f;p:PAnsiChar;flags:longint; pchangeable: boolean);
 
 {
   filerec and textrec have both handle and mode as the first items so
@@ -277,7 +277,7 @@ procedure do_open(var f;p:pchar;flags:longint; pchangeable: boolean);
 
 var
   Action: cardinal;
-  oldp : pchar;
+  oldp : PAnsiChar;
 begin
     { close first if opened }
     if ((flags and $10000)=0) then

+ 5 - 5
rtl/emx/sysos.inc

@@ -28,11 +28,11 @@ procedure DosGetInfoBlocks (PATIB: PPThreadInfoBlock;
                             PAPIB: PPProcessInfoBlock); cdecl;
                             external 'DOSCALLS' index 312;
 
-function DosLoadModule (ObjName: PChar; ObjLen: cardinal; DLLName: PChar;
+function DosLoadModule (ObjName: PAnsiChar; ObjLen: cardinal; DLLName: PAnsiChar;
                                         var Handle: cardinal): cardinal; cdecl;
 external 'DOSCALLS' index 318;
 
-function DosQueryProcAddr (Handle, Ordinal: cardinal; ProcName: PChar;
+function DosQueryProcAddr (Handle, Ordinal: cardinal; ProcName: PAnsiChar;
                                         var Address: pointer): cardinal; cdecl;
 external 'DOSCALLS' index 321;
 
@@ -40,7 +40,7 @@ function DosSetRelMaxFH (var ReqCount: longint; var CurMaxFH: cardinal):
                                                                cardinal; cdecl;
 external 'DOSCALLS' index 382;
 
-function DosSetCurrentDir (Name:PChar): cardinal; cdecl;
+function DosSetCurrentDir (Name:PAnsiChar): cardinal; cdecl;
 external 'DOSCALLS' index 255;
 
 function DosSetDefaultDisk (DiskNum:cardinal): cardinal; cdecl;
@@ -49,10 +49,10 @@ external 'DOSCALLS' index 220;
 { This is not real prototype, but is close enough }
 { for us (the 2nd parameter is actually a pointer }
 { to a structure).                                }
-function DosCreateDir (Name: PChar; P: pointer): cardinal; cdecl;
+function DosCreateDir (Name: PAnsiChar; P: pointer): cardinal; cdecl;
 external 'DOSCALLS' index 270;
 
-function DosDeleteDir (Name: PChar): cardinal; cdecl;
+function DosDeleteDir (Name: PAnsiChar): cardinal; cdecl;
 external 'DOSCALLS' index 226;
 
 {This is the correct way to call external assembler procedures.}

+ 15 - 15
rtl/emx/system.pas

@@ -40,8 +40,8 @@ const
  DriveSeparator = ':';
  ExtensionSeparator = '.';
  PathSeparator = ';';
- AllowDirectorySeparators : set of char = ['\','/'];
- AllowDriveSeparators : set of char = [':'];
+ AllowDirectorySeparators : set of AnsiChar = ['\','/'];
+ AllowDriveSeparators : set of AnsiChar = [':'];
 { FileNameCaseSensitive and FileNameCasePreserving are defined separately below!!! }
  maxExitCode = 255;
  MaxPathLen = 256;
@@ -103,12 +103,12 @@ const   UnusedHandle=-1;
 var
 { C-compatible arguments and environment }
   argc  : longint;external name '_argc';
-  argv  : ppchar;external name '_argv';
-  envp  : ppchar;external name '_environ';
+  argv  : PPAnsiChar;external name '_argv';
+  envp  : PPAnsiChar;external name '_environ';
   EnvC: cardinal; external name '_envc';
 
 (* Pointer to the block of environment variables - used e.g. in unit Dos. *)
-  Environment: PChar;
+  Environment: PAnsiChar;
 
 var
 (* Type / run mode of the current process: *)
@@ -137,7 +137,7 @@ const
   OSErrorWatch: TOSErrorWatch = @NoErrorTracking;
 
 type
-  TDosOpenL = function (FileName: PChar; var Handle: THandle;
+  TDosOpenL = function (FileName: PAnsiChar; var Handle: THandle;
                         var Action: cardinal; InitSize: int64;
                         Attrib, OpenFlags, FileMode: cardinal;
                                                  EA: pointer): cardinal; cdecl;
@@ -204,7 +204,7 @@ end {['EAX']};
 
 function paramstr(l:longint):string;
 
-var p:^Pchar;
+var p:^PAnsiChar;
 
 begin
     { There seems to be a problem with EMX for DOS when trying to }
@@ -223,7 +223,7 @@ begin
                 mov eax, 7F33h
                 call syscall    { error handle already with empty string }
             end ['eax', 'ecx', 'edx'];
-            ParamStr := StrPas (PChar (P));
+            ParamStr := StrPas (PAnsiChar (P));
             FreeMem (P, 260);
         end
     else
@@ -265,7 +265,7 @@ end {['eax', 'ecx', 'edx']};
 
 type
   TWinMessageBox = function (Parent, Owner: cardinal;
-         BoxText, BoxTitle: PChar; Identity, Style: cardinal): cardinal; cdecl;
+         BoxText, BoxTitle: PAnsiChar; Identity, Style: cardinal): cardinal; cdecl;
   TWinInitialize = function (Options: cardinal): cardinal; cdecl;
   TWinCreateMsgQueue = function (Handle: cardinal; cmsg: longint): cardinal;
                                                                          cdecl;
@@ -282,7 +282,7 @@ const
   EnvSize: cardinal = 0;
 
 var
-  ErrorBuf: array [0..ErrorBufferLength] of char;
+  ErrorBuf: array [0..ErrorBufferLength] of AnsiChar;
   ErrorLen: longint;
   PMWinHandle: cardinal;
 
@@ -291,7 +291,7 @@ function ErrorWrite (var F: TextRec): integer;
   An error message should always end with #13#10#13#10
 }
 var
-  P: PChar;
+  P: PAnsiChar;
   I: longint;
 begin
   if F.BufPos > 0 then
@@ -318,7 +318,7 @@ begin
      I := 4;
    if (I = 4) then
     begin
-      WinMessageBox (0, 0, @ErrorBuf, PChar ('Error'), 0, MBStyle);
+      WinMessageBox (0, 0, @ErrorBuf, PAnsiChar ('Error'), 0, MBStyle);
       ErrorLen := 0;
     end;
   F.BufPos := 0;
@@ -329,7 +329,7 @@ function ErrorClose (var F: TextRec): integer;
 begin
   if ErrorLen > 0 then
    begin
-     WinMessageBox (0, 0, @ErrorBuf, PChar ('Error'), 0, MBStyle);
+     WinMessageBox (0, 0, @ErrorBuf, PAnsiChar ('Error'), 0, MBStyle);
      ErrorLen := 0;
    end;
   ErrorLen := 0;
@@ -355,7 +355,7 @@ end;
 
 procedure DosEnvInit;
 var
- Q: PPChar;
+ Q: PPAnsiChar;
  I: cardinal;
 begin
 (* It's a hack, in fact - DOS stores the environment the same way as OS/2 does,
@@ -502,7 +502,7 @@ var TIB: PThreadInfoBlock;
     PIB: PProcessInfoBlock;
 
 const
- FatalHeap: array [0..33] of char = 'FATAL: Cannot initialize heap!!'#13#10'$';
+ FatalHeap: array [0..33] of AnsiChar = 'FATAL: Cannot initialize heap!!'#13#10'$';
 
 begin
     {Determine the operating system we are running on.}

+ 1 - 1
rtl/emx/systhrd.inc

@@ -44,7 +44,7 @@ function DosCreateThread (var TID: cardinal; Address: pointer;
 procedure DosExit (Action, Result: cardinal); cdecl;
                                                  external 'DOSCALLS' index 234;
 
-function DosCreateMutExSem (Name: PChar; var Handle: longint; Attr: cardinal;
+function DosCreateMutExSem (Name: PAnsiChar; var Handle: longint; Attr: cardinal;
                State: boolean): cardinal; cdecl; external 'DOSCALLS' index 331;
 
 function DosCloseMutExSem (Handle: longint): cardinal; cdecl;

+ 28 - 28
rtl/emx/sysutils.pp

@@ -209,14 +209,14 @@ type
                case byte of
                 0:
                  (DateFormat: cardinal;     {1=ddmmyy 2=yymmdd 3=mmddyy}
-                  CurrencyUnit: array [0..4] of char;
-                  ThousandSeparator: char;  {Thousands separator.}
+                  CurrencyUnit: array [0..4] of AnsiChar;
+                  ThousandSeparator: AnsiChar;  {Thousands separator.}
                   Zero1: byte;              {Always zero.}
-                  DecimalSeparator: char;   {Decimals separator,}
+                  DecimalSeparator: AnsiChar;   {Decimals separator,}
                   Zero2: byte;
-                  DateSeparator: char;      {Date separator.}
+                  DateSeparator: AnsiChar;      {Date separator.}
                   Zero3: byte;
-                  TimeSeparator: char;      {Time separator.}
+                  TimeSeparator: AnsiChar;      {Time separator.}
                   Zero4: byte;
                   CurrencyFormat,           {Bit field:
                                              Bit 0: 0=indicator before value
@@ -230,20 +230,20 @@ type
                                              currency indication.}
                   TimeFormat: TTimeFmt;     {12/24 hour.}
                   Reserve1: array [0..1] of word;
-                  DataSeparator: char;      {Data list separator}
+                  DataSeparator: AnsiChar;      {Data list separator}
                   Zero5: byte;
                   Reserve2: array [0..4] of word);
                 1:
                  (fsDateFmt: cardinal;      {1=ddmmyy 2=yymmdd 3=mmddyy}
-                  szCurrency: array [0..4] of char;
+                  szCurrency: array [0..4] of AnsiChar;
                                             {null terminated currency symbol}
-                  szThousandsSeparator: array [0..1] of char;
+                  szThousandsSeparator: array [0..1] of AnsiChar;
                                             {Thousands separator + #0}
-                  szDecimal: array [0..1] of char;
+                  szDecimal: array [0..1] of AnsiChar;
                                             {Decimals separator + #0}
-                  szDateSeparator: array [0..1] of char;
+                  szDateSeparator: array [0..1] of AnsiChar;
                                             {Date separator + #0}
-                  szTimeSeparator: array [0..1] of char;
+                  szTimeSeparator: array [0..1] of AnsiChar;
                                             {Time separator + #0}
                   fsCurrencyFmt,            {Bit field:
                                              Bit 0: 0=indicator before value
@@ -257,7 +257,7 @@ type
                                              currency indication}
                   fsTimeFmt: byte;          {0=12,1=24 hours}
                   abReserved1: array [0..1] of word;
-                  szDataSeparator: array [0..1] of char;
+                  szDataSeparator: array [0..1] of AnsiChar;
                                             {Data list separator + #0}
                   abReserved2: array [0..4] of word);
               end;
@@ -288,24 +288,24 @@ type
   Related:word;               {Independent/child session (0/1).}
   FgBg:word;                  {Foreground/background (0/1).}
   TraceOpt:word;              {No trace/trace this/trace all (0/1/2).}
-  PgmTitle:PChar;             {Program title.}
-  PgmName:PChar;              {Filename to program.}
-  PgmInputs:PChar;            {Command parameters (nil allowed).}
-  TermQ:PChar;                {System queue. (nil allowed).}
-  Environment:PChar;          {Environment to pass (nil allowed).}
+  PgmTitle:PAnsiChar;             {Program title.}
+  PgmName:PAnsiChar;              {Filename to program.}
+  PgmInputs:PAnsiChar;            {Command parameters (nil allowed).}
+  TermQ:PAnsiChar;                {System queue. (nil allowed).}
+  Environment:PAnsiChar;          {Environment to pass (nil allowed).}
   InheritOpt:word;            {Inherit environment from shell/
                                inherit environment from parent (0/1).}
   SessionType:word;           {Auto/full screen/window/presentation
                                manager/full screen Dos/windowed Dos
                                (0/1/2/3/4/5/6/7).}
-  Iconfile:PChar;             {Icon file to use (nil allowed).}
+  Iconfile:PAnsiChar;             {Icon file to use (nil allowed).}
   PgmHandle:cardinal;         {0 or the program handle.}
   PgmControl:word;            {Bitfield describing initial state
                                of windowed sessions.}
   InitXPos,InitYPos:word;     {Initial top coordinates.}
   InitXSize,InitYSize:word;   {Initial size.}
   Reserved:word;
-  ObjectBuffer:PChar;         {If a module cannot be loaded, its
+  ObjectBuffer:PAnsiChar;         {If a module cannot be loaded, its
                                name will be returned here.}
   ObjectBuffLen:cardinal;     {Size of your buffer.}
  end;
@@ -401,10 +401,10 @@ function DosQueryFileInfo (Handle: THandle; InfoLevel: cardinal;
            AFileStatus: PFileStatus; FileStatusLen: cardinal): cardinal; cdecl;
                                                  external 'DOSCALLS' index 279;
 
-function DosScanEnv (Name: PChar; var Value: PChar): cardinal; cdecl;
+function DosScanEnv (Name: PAnsiChar; var Value: PAnsiChar): cardinal; cdecl;
                                                  external 'DOSCALLS' index 227;
 
-function DosFindFirst (FileMask: PChar; var Handle: THandle; Attrib: cardinal;
+function DosFindFirst (FileMask: PAnsiChar; var Handle: THandle; Attrib: cardinal;
                        AFileStatus: PFileStatus; FileStatusLen: cardinal;
                     var Count: cardinal; InfoLevel: cardinal): cardinal; cdecl;
                                                  external 'DOSCALLS' index 264;
@@ -421,12 +421,12 @@ function DosQueryCtryInfo (Size: cardinal; var Country: TCountryCode;
                                                         external 'NLS' index 5;
 
 function DosMapCase (Size: cardinal; var Country: TCountryCode;
-                      AString: PChar): cardinal; cdecl; external 'NLS' index 7;
+                      AString: PAnsiChar): cardinal; cdecl; external 'NLS' index 7;
 
 procedure DosSleep (MSec: cardinal); cdecl; external 'DOSCALLS' index 229;
 
 function DosCreateQueue (var Handle: THandle; Priority:longint;
-                        Name: PChar): cardinal; cdecl;
+                        Name: PAnsiChar): cardinal; cdecl;
                                                   external 'QUECALLS' index 16;
 
 function DosReadQueue (Handle: THandle; var ReqBuffer: TRequestData;
@@ -703,10 +703,10 @@ begin
     Rslt.FindHandle := THandle ($FFFFFFFF);
     Count := 1;
     if FSApi64 then
-     Err := DosFindFirst (PChar (SystemEncodedPath), Rslt.FindHandle,
+     Err := DosFindFirst (PAnsiChar (SystemEncodedPath), Rslt.FindHandle,
             Attr and FindResvdMask, FStat, SizeOf (FStat^), Count, ilStandardL)
     else
-     Err := DosFindFirst (PChar (SystemEncodedPath), Rslt.FindHandle,
+     Err := DosFindFirst (PAnsiChar (SystemEncodedPath), Rslt.FindHandle,
             Attr and FindResvdMask, FStat, SizeOf (FStat^), Count, ilStandard);
     if (Err = 0) and (Count = 0) then
      Err := 18;
@@ -1193,7 +1193,7 @@ begin
           DecimalSeparator := CtryInfo.DecimalSeparator;
           ThousandSeparator := CtryInfo.ThousandSeparator;
           CurrencyFormat := CtryInfo.CurrencyFormat;
-          CurrencyString := PChar (CtryInfo.CurrencyUnit);
+          CurrencyString := PAnsiChar (CtryInfo.CurrencyUnit);
       end;
   InitAnsi;
   InitInternationalGeneric;
@@ -1266,8 +1266,8 @@ begin
    FillChar (SD, SizeOf (SD), 0);
    SD.Length := 24;
    SD.Related := ssf_Related_Child;
-   SD.PgmName := PChar (Path);
-   SD.PgmInputs := PChar (ComLine);
+   SD.PgmName := PAnsiChar (Path);
+   SD.PgmInputs := PAnsiChar (ComLine);
    Str (GetProcessID, SPID);
    Str (ThreadID, STID);
    QName := '\QUEUES\FPC_ExecuteProcess_p' + SPID + 't' + STID + '.QUE'#0;