瀏覽代碼

Check for tf_winlikewidestring in the target's flags instead of relying on the target being a Windows system when determining whether the system as the WideString type that's separate from UnicodeString

git-svn-id: trunk@33900 -
svenbarth 9 年之前
父節點
當前提交
17bb29ddc3
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 2 2
      compiler/ninl.pas
  2. 1 1
      compiler/options.pas

+ 2 - 2
compiler/ninl.pas

@@ -4296,7 +4296,7 @@ implementation
              write_system_parameter_lists('fpc_shortstr_insert');
              write_system_parameter_lists('fpc_shortstr_insert_char');
              write_system_parameter_lists('fpc_unicodestr_insert');
-             if target_info.system in systems_windows then
+             if tf_winlikewidestring in target_info.flags then
                write_system_parameter_lists('fpc_widestr_insert');
              write_system_parameter_lists('fpc_ansistr_insert');
              exit(cerrornode.create);
@@ -4328,7 +4328,7 @@ implementation
              CGMessagePos1(fileinfo,parser_e_wrong_parameter_size,'Delete');
              write_system_parameter_lists('fpc_shortstr_delete');
              write_system_parameter_lists('fpc_unicodestr_delete');
-             if target_info.system in systems_windows then
+             if tf_winlikewidestring in target_info.flags then
                write_system_parameter_lists('fpc_widestr_delete');
              write_system_parameter_lists('fpc_ansistr_delete');
              exit(cerrornode.create);

+ 1 - 1
compiler/options.pas

@@ -4071,7 +4071,7 @@ begin
   set_system_macro('FPC_PATCH',patch_nr);
   set_system_macro('FPC_FULLVERSION',Format('%d%.02d%.02d',[StrToInt(version_nr),StrToInt(release_nr),StrToInt(patch_nr)]));
 
-  if not(target_info.system in systems_windows) then
+  if not (tf_winlikewidestring in target_info.flags) then
     def_system_macro('FPC_WIDESTRING_EQUAL_UNICODESTRING');
 
   for i:=low(tfeature) to high(tfeature) do