Selaa lähdekoodia

* Define char as AnsiChar

Michaël Van Canneyt 2 vuotta sitten
vanhempi
commit
adf9f98f7c
3 muutettua tiedostoa jossa 5 lisäystä ja 4 poistoa
  1. 1 0
      compiler/options.pas
  2. 3 3
      compiler/psystem.pas
  3. 1 1
      compiler/symdef.pas

+ 1 - 0
compiler/options.pas

@@ -4736,6 +4736,7 @@ procedure read_arguments(cmd:TCmdStr);
         def_system_macro('FPC_HAS_LWSYNC');
       {$endif}
 
+      def_system_macro('FPC_HAS_ANSICHAR_CHAR');
       { currently, all supported CPUs have an internal sar implementation }
         def_system_macro('FPC_HAS_INTERNAL_SAR');
       {$ifdef SUPPORT_GET_FRAME}

+ 3 - 3
compiler/psystem.pas

@@ -544,7 +544,7 @@ implementation
         addtype('LongInt',s32inttype);
         addtype('QWord',u64inttype);
         addtype('Int64',s64inttype);
-        addtype('Char',cansichartype);
+        addtype('AnsiChar',cansichartype);
         addtype('WideChar',cwidechartype);
         addtype('Text',cfiledef.createtext);
         addtype('TypedFile',cfiledef.createtyped(voidtype));
@@ -577,7 +577,7 @@ implementation
         addtype('$int64',s64inttype);
         addtype('$uint128',u128inttype);
         addtype('$int128',s128inttype);
-        addtype('$char',cansichartype);
+        addtype('$ansichar',cansichartype);
         addtype('$widechar',cwidechartype);
         addtype('$shortstring',cshortstringtype);
         addtype('$longstring',clongstringtype);
@@ -739,7 +739,7 @@ implementation
         loadtype('typedformal',ctypedformaltype);
         loadtype('void',voidtype);
         loadtype('void_pointer',voidpointertype);
-        loadtype('char',cansichartype);
+        loadtype('ansichar',cansichartype);
         loadtype('widechar',cwidechartype);
         loadtype('shortstring',cshortstringtype);
         loadtype('longstring',clongstringtype);

+ 1 - 1
compiler/symdef.pas

@@ -3543,7 +3543,7 @@ implementation
           'ShortInt','SmallInt','LongInt','Int64','Int128',
           'Boolean','Boolean8','Boolean16','Boolean32','Boolean64',
           'ByteBool','WordBool','LongBool','QWordBool',
-          'Char','WideChar','Currency','CustomRange');
+          'AnsiChar','WideChar','Currency','CustomRange');
 
       begin
          GetTypeName:=names[ordtype];