Michael VAN CANNEYT пре 2 година
родитељ
комит
304372262a

+ 14 - 14
rtl/netwlibc/dos.pp

@@ -155,7 +155,7 @@ const maxargs=256;
 procedure exec(const path : pathstr;const comline : comstr);
 procedure exec(const path : pathstr;const comline : comstr);
 var c : comstr;
 var c : comstr;
     i : integer;
     i : integer;
-    args : array[0..maxargs] of pchar;
+    args : array[0..maxargs] of PAnsiChar;
     arg0 : pathstr;
     arg0 : pathstr;
     numargs,wstat : integer;
     numargs,wstat : integer;
     Wiring : TWiring;
     Wiring : TWiring;
@@ -189,13 +189,13 @@ begin
   //writeln (stderr,'calling procve');
   //writeln (stderr,'calling procve');
   i := procve(args[0],
   i := procve(args[0],
               PROC_CURRENT_SPACE+PROC_INHERIT_CWD,
               PROC_CURRENT_SPACE+PROC_INHERIT_CWD,
-              envP,         // const char * env[] If passed as NULL, the child process inherits the parent.s environment at the time of the call.
+              envP,         // const AnsiChar * env[] If passed as NULL, the child process inherits the parent.s environment at the time of the call.
               @Wiring,      // wiring_t *wiring, Pass NULL to inherit system defaults for wiring.
               @Wiring,      // wiring_t *wiring, Pass NULL to inherit system defaults for wiring.
               nil,          // struct fd_set *fds, Not currently implemented. Pass in NULL.
               nil,          // struct fd_set *fds, Not currently implemented. Pass in NULL.
               nil,          // void *appdata, Not currently implemented. Pass in NULL.
               nil,          // void *appdata, Not currently implemented. Pass in NULL.
               0,            // size_t appdata_size, Not currently implemented. Pass in 0
               0,            // size_t appdata_size, Not currently implemented. Pass in 0
               nil,          // void *reserved, Reserved. Pass NULL.
               nil,          // void *reserved, Reserved. Pass NULL.
-              @args);       // const char *argv[]
+              @args);       // const AnsiChar *argv[]
   //writeln (stderr,'Ok');
   //writeln (stderr,'Ok');
   if i <> -1 then
   if i <> -1 then
   begin
   begin
@@ -243,7 +243,7 @@ end;
 
 
 
 
 function diskfree(drive : byte) : int64;
 function diskfree(drive : byte) : int64;
-{VAR Buf                 : ARRAY [0..255] OF CHAR;
+{VAR Buf                 : ARRAY [0..255] OF AnsiChar;
     TotalBlocks         : WORD;
     TotalBlocks         : WORD;
     SectorsPerBlock     : WORD;
     SectorsPerBlock     : WORD;
     availableBlocks     : WORD;
     availableBlocks     : WORD;
@@ -274,7 +274,7 @@ end;
 
 
 
 
 function disksize(drive : byte) : int64;
 function disksize(drive : byte) : int64;
-{VAR Buf                 : ARRAY [0..255] OF CHAR;
+{VAR Buf                 : ARRAY [0..255] OF AnsiChar;
     TotalBlocks         : WORD;
     TotalBlocks         : WORD;
     SectorsPerBlock     : WORD;
     SectorsPerBlock     : WORD;
     availableBlocks     : WORD;
     availableBlocks     : WORD;
@@ -370,7 +370,7 @@ end;
 
 
 procedure findfirst(const path : pathstr;attr : word;var f : searchRec);
 procedure findfirst(const path : pathstr;attr : word;var f : searchRec);
 var
 var
-  path0 : array[0..256] of char;
+  path0 : array[0..256] of AnsiChar;
   p     : longint;
   p     : longint;
 begin
 begin
   IF path = '' then
   IF path = '' then
@@ -559,14 +559,14 @@ var
 {$ifndef FPC_ANSI_TEXTFILEREC}
 {$ifndef FPC_ANSI_TEXTFILEREC}
   r: rawbytestring;
   r: rawbytestring;
 {$endif not FPC_ANSI_TEXTFILEREC}
 {$endif not FPC_ANSI_TEXTFILEREC}
-  p: pchar;
+  p: PAnsiChar;
 begin
 begin
   doserror := 0;
   doserror := 0;
 {$ifdef FPC_ANSI_TEXTFILEREC}
 {$ifdef FPC_ANSI_TEXTFILEREC}
   p := @filerec(f).name;
   p := @filerec(f).name;
 {$else FPC_ANSI_TEXTFILEREC}
 {$else FPC_ANSI_TEXTFILEREC}
   r := ToSingleByteFileSystemEncodedFileName(filerec(f).name);
   r := ToSingleByteFileSystemEncodedFileName(filerec(f).name);
-  p := pchar(r);
+  p := PAnsiChar(r);
 {$endif FPC_ANSI_TEXTFILEREC}
 {$endif FPC_ANSI_TEXTFILEREC}
   if Fpstat (p, StatBuf) = 0 then
   if Fpstat (p, StatBuf) = 0 then
     attr := nwattr2dosattr (StatBuf.st_mode)
     attr := nwattr2dosattr (StatBuf.st_mode)
@@ -585,13 +585,13 @@ var
 {$ifndef FPC_ANSI_TEXTFILEREC}
 {$ifndef FPC_ANSI_TEXTFILEREC}
   r: rawbytestring;
   r: rawbytestring;
 {$endif not FPC_ANSI_TEXTFILEREC}
 {$endif not FPC_ANSI_TEXTFILEREC}
-  p: pchar;
+  p: PAnsiChar;
 begin
 begin
 {$ifdef FPC_ANSI_TEXTFILEREC}
 {$ifdef FPC_ANSI_TEXTFILEREC}
   p := @filerec(f).name;
   p := @filerec(f).name;
 {$else FPC_ANSI_TEXTFILEREC}
 {$else FPC_ANSI_TEXTFILEREC}
   r := ToSingleByteFileSystemEncodedFileName(filerec(f).name);
   r := ToSingleByteFileSystemEncodedFileName(filerec(f).name);
-  p := pchar(r);
+  p := PAnsiChar(r);
 {$endif FPC_ANSI_TEXTFILEREC}
 {$endif FPC_ANSI_TEXTFILEREC}
   if Fpstat (p,StatBuf) = 0 then
   if Fpstat (p,StatBuf) = 0 then
   begin
   begin
@@ -620,7 +620,7 @@ end;
 Function EnvCount: Longint;
 Function EnvCount: Longint;
 var
 var
   envcnt : longint;
   envcnt : longint;
-  p      : ppchar;
+  p      : PPAnsiChar;
 Begin
 Begin
   envcnt:=0;
   envcnt:=0;
   p:=envp;      {defined in system}
   p:=envp;      {defined in system}
@@ -636,7 +636,7 @@ End;
 Function EnvStr (Index: longint): String;
 Function EnvStr (Index: longint): String;
 Var
 Var
   i : longint;
   i : longint;
-  p : ppchar;
+  p : PPAnsiChar;
 Begin
 Begin
   if Index <= 0 then
   if Index <= 0 then
     envstr:=''
     envstr:=''
@@ -659,8 +659,8 @@ end;
 
 
 { works fine (at least with netware 6.5) }
 { works fine (at least with netware 6.5) }
 Function  GetEnv(envvar: string): string;
 Function  GetEnv(envvar: string): string;
-var envvar0 : array[0..512] of char;
-    p       : pchar;
+var envvar0 : array[0..512] of AnsiChar;
+    p       : PAnsiChar;
     SearchElement : string[255];
     SearchElement : string[255];
     i,isDosPath,res : longint;
     i,isDosPath,res : longint;
 begin
 begin

+ 1 - 1
rtl/netwlibc/dynlibs.inc

@@ -30,7 +30,7 @@ end;
 Function SysGetProcedureAddress(Lib : TLibHandle; const ProcName : AnsiString) : Pointer;
 Function SysGetProcedureAddress(Lib : TLibHandle; const ProcName : AnsiString) : Pointer;
 
 
 begin
 begin
-  Result:=dlsym(lib,pchar(ProcName));
+  Result:=dlsym(lib,PAnsiChar(ProcName));
 end;
 end;
 
 
 Function SysUnloadLibrary(Lib : TLibHandle) : Boolean;
 Function SysUnloadLibrary(Lib : TLibHandle) : Boolean;

Разлика између датотеке није приказан због своје велике величине
+ 294 - 294
rtl/netwlibc/libc.pp


+ 3 - 3
rtl/netwlibc/sysdir.inc

@@ -20,7 +20,7 @@
 Procedure do_MkDir(const s: rawbytestring);
 Procedure do_MkDir(const s: rawbytestring);
 var Res: LONGINT;
 var Res: LONGINT;
 BEGIN
 BEGIN
-  Res := FpMkdir (pchar(s),S_IRWXU);
+  Res := FpMkdir (PAnsiChar(s),S_IRWXU);
   if Res = 0 then
   if Res = 0 then
     InOutRes:=0
     InOutRes:=0
   else
   else
@@ -30,7 +30,7 @@ end;
 procedure do_RmDir(const s: rawbytestring);
 procedure do_RmDir(const s: rawbytestring);
 var Res: longint;
 var Res: longint;
 begin
 begin
-  Res := FpRmdir (pchar(s));
+  Res := FpRmdir (PAnsiChar(s));
   if Res = 0 then
   if Res = 0 then
     InOutRes:=0
     InOutRes:=0
   else
   else
@@ -50,7 +50,7 @@ end;
 
 
 
 
 procedure do_getdir(drivenr : byte;var dir : rawbytestring);
 procedure do_getdir(drivenr : byte;var dir : rawbytestring);
-var P : array [0..255] of CHAR;
+var P : array [0..255] of AnsiChar;
     i : LONGINT;
     i : LONGINT;
 begin
 begin
   P[0] := #0;
   P[0] := #0;

+ 4 - 4
rtl/netwlibc/sysfile.inc

@@ -84,7 +84,7 @@ begin
     InOutRes := 0;
     InOutRes := 0;
 end;
 end;
 
 
-procedure do_erase(p : pchar; pchangeable: boolean);
+procedure do_erase(p : PAnsiChar; pchangeable: boolean);
 VAR res : LONGINT;
 VAR res : LONGINT;
 begin
 begin
   res := unlink (p);
   res := unlink (p);
@@ -94,7 +94,7 @@ begin
     InOutRes := 0;
     InOutRes := 0;
 end;
 end;
 
 
-procedure do_rename(p1,p2 : pchar; p1changeable, p2changeable: boolean);
+procedure do_rename(p1,p2 : PAnsiChar; p1changeable, p2changeable: boolean);
 VAR res : LONGINT;
 VAR res : LONGINT;
 begin
 begin
   res := rename (p1,p2);
   res := rename (p1,p2);
@@ -221,7 +221,7 @@ end;
 
 
 {$ifdef IOpossix}
 {$ifdef IOpossix}
 // mostly stolen from syslinux
 // mostly stolen from syslinux
-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
   filerec and textrec have both handle and mode as the first items so
   they could use the same routine for opening/creating.
   they could use the same routine for opening/creating.
@@ -306,7 +306,7 @@ end;
 
 
 
 
 {$else}
 {$else}
-procedure do_open(var f;p:pchar;flags:longint);
+procedure do_open(var f;p:PAnsiChar;flags:longint);
 {
 {
   filerec and textrec have both handle and mode as the first items so
   filerec and textrec have both handle and mode as the first items so
   they could use the same routine for opening/creating.
   they could use the same routine for opening/creating.

+ 16 - 16
rtl/netwlibc/system.pp

@@ -48,8 +48,8 @@ const
  DriveSeparator = ':';
  DriveSeparator = ':';
  ExtensionSeparator = '.';
  ExtensionSeparator = '.';
  PathSeparator = ';';
  PathSeparator = ';';
- AllowDirectorySeparators : set of char = ['\','/'];
- AllowDriveSeparators : set of char = [':'];
+ AllowDirectorySeparators : set of AnsiChar = ['\','/'];
+ AllowDriveSeparators : set of AnsiChar = [':'];
 { FileNameCaseSensitive and FileNameCasePreserving are defined separately below!!! }
 { FileNameCaseSensitive and FileNameCasePreserving are defined separately below!!! }
  maxExitCode = $ffff;
  maxExitCode = $ffff;
  MaxPathLen = 256;
  MaxPathLen = 256;
@@ -76,7 +76,7 @@ type
 
 
 VAR
 VAR
    ArgC                : INTEGER;
    ArgC                : INTEGER;
-   ArgV                : ppchar;
+   ArgV                : PPAnsiChar;
    NetwareCheckFunction: TNWCheckFunction;
    NetwareCheckFunction: TNWCheckFunction;
    NWLoggerScreen      : pointer = nil;
    NWLoggerScreen      : pointer = nil;
 
 
@@ -86,7 +86,7 @@ const
   Dll_Thread_Attach_Hook  : TDLL_Entry_Hook = nil;
   Dll_Thread_Attach_Hook  : TDLL_Entry_Hook = nil;
   Dll_Thread_Detach_Hook  : TDLL_Entry_Hook = nil;
   Dll_Thread_Detach_Hook  : TDLL_Entry_Hook = nil;
   NetwareUnloadProc       : pointer = nil;  {like exitProc but for nlm unload only}
   NetwareUnloadProc       : pointer = nil;  {like exitProc but for nlm unload only}
-  envp : ppchar = nil;
+  envp : PPAnsiChar = nil;
 
 
 
 
 
 
@@ -101,11 +101,11 @@ procedure NWSysSetThreadFunctions (atv:TSysReleaseThreadVars;
 
 
 
 
 procedure _ConsolePrintf (s :shortstring);
 procedure _ConsolePrintf (s :shortstring);
-procedure _ConsolePrintf (FormatStr : PCHAR; Param : LONGINT);
-procedure _ConsolePrintf (FormatStr : PCHAR; Param : pchar);
-procedure _ConsolePrintf (FormatStr : PCHAR; P1,P2 : LONGINT);
-procedure _ConsolePrintf (FormatStr : PCHAR; P1,P2,P3 : LONGINT);
-procedure _ConsolePrintf (FormatStr : PCHAR);
+procedure _ConsolePrintf (FormatStr : PAnsiChar; Param : LONGINT);
+procedure _ConsolePrintf (FormatStr : PAnsiChar; Param : PAnsiChar);
+procedure _ConsolePrintf (FormatStr : PAnsiChar; P1,P2 : LONGINT);
+procedure _ConsolePrintf (FormatStr : PAnsiChar; P1,P2,P3 : LONGINT);
+procedure _ConsolePrintf (FormatStr : PAnsiChar);
 procedure __EnterDebugger;cdecl;external '!netware' name 'EnterDebugger';
 procedure __EnterDebugger;cdecl;external '!netware' name 'EnterDebugger';
 
 
 function NWGetCodeStart : pointer;  // needed for Lineinfo
 function NWGetCodeStart : pointer;  // needed for Lineinfo
@@ -255,7 +255,7 @@ begin
   _ConsolePrintf (@s[1]);
   _ConsolePrintf (@s[1]);
 end;
 end;
 
 
-procedure _ConsolePrintf (FormatStr : PCHAR);
+procedure _ConsolePrintf (FormatStr : PAnsiChar);
 begin
 begin
   if NWLoggerScreen = nil then
   if NWLoggerScreen = nil then
     NWLoggerScreen := getnetwarelogger;
     NWLoggerScreen := getnetwarelogger;
@@ -263,7 +263,7 @@ begin
     screenprintf (NWLoggerScreen,FormatStr);
     screenprintf (NWLoggerScreen,FormatStr);
 end;
 end;
 
 
-procedure _ConsolePrintf (FormatStr : PCHAR; Param : LONGINT);
+procedure _ConsolePrintf (FormatStr : PAnsiChar; Param : LONGINT);
 begin
 begin
   if NWLoggerScreen = nil then
   if NWLoggerScreen = nil then
     NWLoggerScreen := getnetwarelogger;
     NWLoggerScreen := getnetwarelogger;
@@ -271,12 +271,12 @@ begin
     screenprintf (NWLoggerScreen,FormatStr,Param);
     screenprintf (NWLoggerScreen,FormatStr,Param);
 end;
 end;
 
 
-procedure _ConsolePrintf (FormatStr : PCHAR; Param : pchar);
+procedure _ConsolePrintf (FormatStr : PAnsiChar; Param : PAnsiChar);
 begin
 begin
   _ConsolePrintf (FormatStr,longint(Param));
   _ConsolePrintf (FormatStr,longint(Param));
 end;
 end;
 
 
-procedure _ConsolePrintf (FormatStr : PCHAR; P1,P2 : LONGINT);
+procedure _ConsolePrintf (FormatStr : PAnsiChar; P1,P2 : LONGINT);
 begin
 begin
   if NWLoggerScreen = nil then
   if NWLoggerScreen = nil then
     NWLoggerScreen := getnetwarelogger;
     NWLoggerScreen := getnetwarelogger;
@@ -284,7 +284,7 @@ begin
     screenprintf (NWLoggerScreen,FormatStr,P1,P2);
     screenprintf (NWLoggerScreen,FormatStr,P1,P2);
 end;
 end;
 
 
-procedure _ConsolePrintf (FormatStr : PCHAR; P1,P2,P3 : LONGINT);
+procedure _ConsolePrintf (FormatStr : PAnsiChar; P1,P2,P3 : LONGINT);
 begin
 begin
   if NWLoggerScreen = nil then
   if NWLoggerScreen = nil then
     NWLoggerScreen := getnetwarelogger;
     NWLoggerScreen := getnetwarelogger;
@@ -326,7 +326,7 @@ end;
 
 
 
 
 {$ifdef StdErrToConsole}
 {$ifdef StdErrToConsole}
-var ConsoleBuff : array [0..512] of char;
+var ConsoleBuff : array [0..512] of AnsiChar;
 
 
 Function ConsoleWrite(Var F: TextRec): Integer;
 Function ConsoleWrite(Var F: TextRec): Integer;
 var
 var
@@ -447,7 +447,7 @@ begin
 end;
 end;
 
 
 // this is called by main.as, setup args and call PASCALMAIN
 // this is called by main.as, setup args and call PASCALMAIN
-procedure nlm_main (_ArgC : LONGINT; _ArgV : ppchar); cdecl; [public,alias: '_FPC_NLM_Entry'];
+procedure nlm_main (_ArgC : LONGINT; _ArgV : PPAnsiChar); cdecl; [public,alias: '_FPC_NLM_Entry'];
 BEGIN
 BEGIN
   ArgC := _ArgC;
   ArgC := _ArgC;
   ArgV := _ArgV;
   ArgV := _ArgV;

+ 22 - 22
rtl/netwlibc/sysutils.pp

@@ -108,7 +108,7 @@ begin
     1 : NWOpenFlags:=NWOpenFlags or O_WRONLY;
     1 : NWOpenFlags:=NWOpenFlags or O_WRONLY;
     2 : NWOpenFlags:=NWOpenFlags or O_RDWR;
     2 : NWOpenFlags:=NWOpenFlags or O_RDWR;
   end;
   end;
-  FileOpen := Fpopen (pchar(SystemFileName),NWOpenFlags);
+  FileOpen := Fpopen (PAnsiChar(SystemFileName),NWOpenFlags);
 
 
   //!! We need to set locking based on Mode !!
   //!! We need to set locking based on Mode !!
 end;
 end;
@@ -118,7 +118,7 @@ Function FileCreate (Const FileName : RawByteString) : THandle;
 var SystemFileName: RawByteString;
 var SystemFileName: RawByteString;
 begin
 begin
   SystemFileName:=ToSingleByteFileSystemEncodedFileName(FileName);
   SystemFileName:=ToSingleByteFileSystemEncodedFileName(FileName);
-  FileCreate:=Fpopen(Pchar(SystemFileName),O_RdWr or O_Creat or O_Trunc or O_Binary);
+  FileCreate:=Fpopen(PAnsiChar(SystemFileName),O_RdWr or O_Creat or O_Trunc or O_Binary);
   if FileCreate >= 0 then
   if FileCreate >= 0 then
     FileSetAttr (Filename, 0);  // dont know why but open always sets ReadOnly flag
     FileSetAttr (Filename, 0);  // dont know why but open always sets ReadOnly flag
 end;
 end;
@@ -207,7 +207,7 @@ var Info : TStat;
     SystemFileName: RawByteString;
     SystemFileName: RawByteString;
 begin
 begin
   SystemFileName:=ToSingleByteFileSystemEncodedFileName(FileName);
   SystemFileName:=ToSingleByteFileSystemEncodedFileName(FileName);
-  If Fpstat (pchar(SystemFileName),Info) <> 0 then
+  If Fpstat (PAnsiChar(SystemFileName),Info) <> 0 then
     exit(-1)
     exit(-1)
   else
   else
     begin
     begin
@@ -229,7 +229,7 @@ VAR Info : TStat;
     SystemFileName: RawByteString;
     SystemFileName: RawByteString;
 begin
 begin
   SystemFileName:=ToSingleByteFileSystemEncodedFileName(FileName);
   SystemFileName:=ToSingleByteFileSystemEncodedFileName(FileName);
-  FileExists:=(Fpstat(pchar(SystemFileName),Info) = 0);
+  FileExists:=(Fpstat(PAnsiChar(SystemFileName),Info) = 0);
 end;
 end;
 
 
 
 
@@ -258,7 +258,7 @@ begin
       name := Pdirent(FindData.EntryP)^.d_name;
       name := Pdirent(FindData.EntryP)^.d_name;
       SetCodePage(name, DefaultFileSystemCodePage, False);
       SetCodePage(name, DefaultFileSystemCodePage, False);
       fname := FindData._dir + name;
       fname := FindData._dir + name;
-      if Fpstat (pchar(fname),StatBuf) = 0 then
+      if Fpstat (PAnsiChar(fname),StatBuf) = 0 then
         time := UnixToWinAge (StatBuf.st_mtim.tv_sec)
         time := UnixToWinAge (StatBuf.st_mtim.tv_sec)
       else
       else
         time := 0;
         time := 0;
@@ -309,7 +309,7 @@ begin
   if Rslt.FindData._mask = '*' then Rslt.FindData._mask := '';
   if Rslt.FindData._mask = '*' then Rslt.FindData._mask := '';
   if Rslt.FindData._mask = '*.*' then Rslt.FindData._mask := '';
   if Rslt.FindData._mask = '*.*' then Rslt.FindData._mask := '';
   //writeln (stderr,'mask: "',Rslt._mask,'" dir:"',path0,'"');
   //writeln (stderr,'mask: "',Rslt._mask,'" dir:"',path0,'"');
-  Pdirent(Rslt.FindData.DirP) := opendir (pchar(Rslt.FindData._dir));
+  Pdirent(Rslt.FindData.DirP) := opendir (PAnsiChar(Rslt.FindData._dir));
   if Rslt.FindData.DirP = nil then
   if Rslt.FindData.DirP = nil then
     result := 18
     result := 18
   else begin
   else begin
@@ -384,7 +384,7 @@ Var Info : TStat;
     SystemFileName: RawByteString;
     SystemFileName: RawByteString;
 begin
 begin
   SystemFileName:=ToSingleByteFileSystemEncodedFileName(FileName);
   SystemFileName:=ToSingleByteFileSystemEncodedFileName(FileName);
-  If Fpstat (pchar(SystemFileName),Info) <> 0 then
+  If Fpstat (PAnsiChar(SystemFileName),Info) <> 0 then
     Result:=-1
     Result:=-1
   Else
   Else
     Result := (Info.st_mode shr 16) and $ffff;
     Result := (Info.st_mode shr 16) and $ffff;
@@ -398,7 +398,7 @@ var
   SystemFileName: RawByteString;
   SystemFileName: RawByteString;
 begin
 begin
   SystemFileName:=ToSingleByteFileSystemEncodedFileName(FileName);
   SystemFileName:=ToSingleByteFileSystemEncodedFileName(FileName);
-  if Fpstat (pchar(SystemFilename),StatBuf) = 0 then
+  if Fpstat (PAnsiChar(SystemFilename),StatBuf) = 0 then
   begin
   begin
     {what should i do here ?
     {what should i do here ?
      only support sysutils-standard attributes or also support the extensions defined
      only support sysutils-standard attributes or also support the extensions defined
@@ -414,7 +414,7 @@ begin
       newmode := StatBuf.st_mode and ($ffff0000-M_A_RDONLY-M_A_HIDDEN- M_A_SYSTEM-M_A_SUBDIR-M_A_ARCH);
       newmode := StatBuf.st_mode and ($ffff0000-M_A_RDONLY-M_A_HIDDEN- M_A_SYSTEM-M_A_SUBDIR-M_A_ARCH);
       newmode := newmode or (attr shl 16) or M_A_BITS_SIGNIFICANT;
       newmode := newmode or (attr shl 16) or M_A_BITS_SIGNIFICANT;
     end;
     end;
-    if Fpchmod (pchar(SystemFilename),newMode) < 0 then
+    if Fpchmod (PAnsiChar(SystemFilename),newMode) < 0 then
       result := ___errno^ else
       result := ___errno^ else
       result := 0;
       result := 0;
   end else
   end else
@@ -427,7 +427,7 @@ var
   SystemFileName: RawByteString;
   SystemFileName: RawByteString;
 begin
 begin
   SystemFileName:=ToSingleByteFileSystemEncodedFileName(FileName);
   SystemFileName:=ToSingleByteFileSystemEncodedFileName(FileName);
-  Result:= (libc.UnLink (pchar(SystemFileName)) = 0);
+  Result:= (libc.UnLink (PAnsiChar(SystemFileName)) = 0);
 end;
 end;
 
 
 
 
@@ -437,7 +437,7 @@ var
 begin
 begin
   OldSystemFileName:=ToSingleByteFileSystemEncodedFileName(OldName);
   OldSystemFileName:=ToSingleByteFileSystemEncodedFileName(OldName);
   NewSystemFileName:=ToSingleByteFileSystemEncodedFileName(NewName);
   NewSystemFileName:=ToSingleByteFileSystemEncodedFileName(NewName);
-  RenameFile:=(libc.rename(pchar(OldSystemFileName),pchar(NewSystemFileName)) = 0);
+  RenameFile:=(libc.rename(PAnsiChar(OldSystemFileName),PAnsiChar(NewSystemFileName)) = 0);
 end;
 end;
 
 
 
 
@@ -458,7 +458,7 @@ end;
   They both return -1 when a failure occurs.
   They both return -1 when a failure occurs.
 }
 }
 Const
 Const
-  FixDriveStr : array[0..3] of pchar=(
+  FixDriveStr : array[0..3] of PAnsiChar=(
     '.',
     '.',
     'a:.',
     'a:.',
     'b:.',
     'b:.',
@@ -466,7 +466,7 @@ Const
     );
     );
 var
 var
   Drives   : byte;
   Drives   : byte;
-  DriveStr : array[4..26] of pchar;
+  DriveStr : array[4..26] of PAnsiChar;
 
 
 Procedure AddDisk(const path:string);
 Procedure AddDisk(const path:string);
 begin
 begin
@@ -515,7 +515,7 @@ var
   SystemFileName: RawByteString;
   SystemFileName: RawByteString;
 begin
 begin
   SystemFileName:=ToSingleByteFileSystemEncodedFileName(Directory);
   SystemFileName:=ToSingleByteFileSystemEncodedFileName(Directory);
-  If Fpstat (pchar(SystemFileName),Info) <> 0 then
+  If Fpstat (PAnsiChar(SystemFileName),Info) <> 0 then
     exit(false)
     exit(false)
   else
   else
     Exit ((Info.st_mode and M_A_SUBDIR) <> 0);
     Exit ((Info.st_mode and M_A_SUBDIR) <> 0);
@@ -596,7 +596,7 @@ end;
 Function GetEnvironmentVariable(Const EnvVar : String) : String;
 Function GetEnvironmentVariable(Const EnvVar : String) : String;
 
 
 begin
 begin
-  Result:=libc.getenv(PChar(EnvVar));
+  Result:=libc.getenv(PAnsiChar(EnvVar));
 end;
 end;
 
 
 Function GetEnvironmentVariableCount : Integer;
 Function GetEnvironmentVariableCount : Integer;
@@ -616,12 +616,12 @@ function ExecuteProcess(Const Path: AnsiString; Const ComLine: AnsiString;Flags:
 var
 var
   params:array of AnsiString;
   params:array of AnsiString;
   count,i: longint;
   count,i: longint;
-  Buf  : pchar;
-  p    : pchar;
+  Buf  : PAnsiChar;
+  p    : PAnsiChar;
   CLine: AnsiString;
   CLine: AnsiString;
 begin
 begin
   cLine := ComLine;
   cLine := ComLine;
-  buf:=pchar(CLine);
+  buf:=PAnsiChar(CLine);
   count:=0;
   count:=0;
   while(buf^<>#0) do
   while(buf^<>#0) do
   begin
   begin
@@ -633,7 +633,7 @@ begin
   end;
   end;
   i := 0;
   i := 0;
   setlength(params,count);
   setlength(params,count);
-  buf:=pchar(CLine);
+  buf:=PAnsiChar(CLine);
   while(buf^<>#0) do
   while(buf^<>#0) do
   begin
   begin
     while (buf^ in [' ',#9,#10]) do
     while (buf^ in [' ',#9,#10]) do
@@ -668,7 +668,7 @@ function ExecuteProcess (const Path: AnsiString;
                                   const ComLine: array of AnsiString;Flags:TExecuteFlags=[]): integer;
                                   const ComLine: array of AnsiString;Flags:TExecuteFlags=[]): integer;
 var c : comstr;
 var c : comstr;
     i : integer;
     i : integer;
-    args : array[0..maxargs+1] of pchar;
+    args : array[0..maxargs+1] of PAnsiChar;
     arg0 : string;
     arg0 : string;
     numargs,wstat : integer;
     numargs,wstat : integer;
     Wiring : TWiring;
     Wiring : TWiring;
@@ -679,13 +679,13 @@ begin
     arg0 := fexpand(path+'.nlm')
     arg0 := fexpand(path+'.nlm')
   else
   else
     arg0 := fexpand (path);
     arg0 := fexpand (path);
-  args[0] := pchar(arg0);
+  args[0] := PAnsiChar(arg0);
   numargs := 0;
   numargs := 0;
   for I := 0 to High (ComLine) do
   for I := 0 to High (ComLine) do
     if numargs < maxargs then
     if numargs < maxargs then
     begin
     begin
       inc(numargs);
       inc(numargs);
-      args[numargs] := pchar(ComLine[i]);
+      args[numargs] := PAnsiChar(ComLine[i]);
     end;
     end;
   args[numargs+1] := nil;
   args[numargs+1] := nil;
   Wiring.infd := StdInputHandle;  //textrec(Stdin).Handle;
   Wiring.infd := StdInputHandle;  //textrec(Stdin).Handle;

+ 3 - 3
rtl/netwlibc/tthread.inc

@@ -89,7 +89,7 @@ begin
 end;
 end;
 
 
 procedure SemaphorePost(const FSem: Pointer);
 procedure SemaphorePost(const FSem: Pointer);
-var c : char;
+var c : AnsiChar;
 begin
 begin
   c := #0;
   c := #0;
   fpwrite(PFilDes(FSem)^[1], c, 1);
   fpwrite(PFilDes(FSem)^[1], c, 1);
@@ -206,7 +206,7 @@ end;
 function ThreadFunc(parameter: Pointer): LongInt;
 function ThreadFunc(parameter: Pointer): LongInt;
 var
 var
   LThread: TThread;
   LThread: TThread;
-  c: char;
+  c: AnsiChar;
 begin
 begin
   WRITE_DEBUG('ThreadFunc is here...'#13#10);
   WRITE_DEBUG('ThreadFunc is here...'#13#10);
   LThread := TThread(parameter);
   LThread := TThread(parameter);
@@ -237,7 +237,7 @@ begin
     end;
     end;
   except
   except
     on e: exception do begin
     on e: exception do begin
-      WRITE_DEBUG('got exception: %s'#13#10,pchar(e.message));
+      WRITE_DEBUG('got exception: %s'#13#10,PAnsiChar(e.message));
       LThread.FFatalException :=  TObject(AcquireExceptionObject);
       LThread.FFatalException :=  TObject(AcquireExceptionObject);
       // not sure if we should really do this...
       // not sure if we should really do this...
       // but .Destroy was called, so why not try FreeOnTerminate?
       // but .Destroy was called, so why not try FreeOnTerminate?

Неке датотеке нису приказане због велике количине промена