فهرست منبع

Merged revisions 7452-7455,7460-7461 via svnmerge from
svn+ssh://[email protected]/FPC/svn/fpc/trunk

........
r7452 | jonas | 2007-05-24 13:38:07 +0200 (Thu, 24 May 2007) | 6 lines

* fixed for solaris:
* iconv is in libc for solaris
* use official names for unicode encodings (UTF-16BE/UTF-16LE instead
of unofficial UNICODEBIG/UNICODELITTLE aliases, which are not supported
by solaris' iconv)

........
r7453 | jonas | 2007-05-24 14:02:23 +0200 (Thu, 24 May 2007) | 3 lines

* fixed fpu rte code for invalid, inexact and "subscript out of range"
errors (216 -> 207)

........
r7454 | jonas | 2007-05-24 14:06:35 +0200 (Thu, 24 May 2007) | 2 lines

* skip test for cpus with alignment constraints

........
r7455 | jonas | 2007-05-24 14:24:45 +0200 (Thu, 24 May 2007) | 2 lines

* initialise/finalise critical section

........
r7460 | jonas | 2007-05-25 00:50:33 +0200 (Fri, 25 May 2007) | 3 lines

* another sparc/linux fix for stat (record must NOT be packed, or
variables of that type will not be aligned properly)

........
r7461 | jonas | 2007-05-25 00:58:12 +0200 (Fri, 25 May 2007) | 3 lines

* fixed Do_IsDevice for sparc (TCGETS constant; the entire termios.inc
also needs to be fixed for sparc)

........

git-svn-id: branches/fixes_2_2@7467 -

Jonas Maebe 18 سال پیش
والد
کامیت
fc31c883a5
5فایلهای تغییر یافته به همراه14 افزوده شده و 9 حذف شده
  1. 4 1
      rtl/linux/sparc/stat.inc
  2. 4 0
      rtl/linux/sysos.inc
  3. 0 5
      rtl/solaris/sparc/sighnd.inc
  4. 5 3
      rtl/unix/cwstring.pp
  5. 1 0
      tests/webtbs/tw5641.pp

+ 4 - 1
rtl/linux/sparc/stat.inc

@@ -14,7 +14,10 @@
 
 {$IFNDEF FPC_USE_LIBC}
 
-  Stat = packed record  // No unix typing because of differences
+  { do NOT declare this record as packed, because it needs to be aligned }
+  { to its largest member (i.e., 8 bytes), and declaring it as packed    }
+  { disables that                                                        }
+  Stat = record  // No unix typing because of differences
     case byte of
     0:
       (dev   : culonglong;

+ 4 - 0
rtl/linux/sysos.inc

@@ -143,9 +143,13 @@ Function Do_IsDevice(Handle:THandle):boolean;
 const
 {$if defined(PowerPC) or defined(PowerPc64)}
   IOCtl_TCGETS=$402c7413;
+{$else}
+{$if defined(sparc)}
+  IOCtl_TCGETS=$40245408;
 {$else}
   IOCtl_TCGETS=$5401; // TCGETS is also in termios.inc, but the sysunix needs only this
 {$endif}
+{$endif}
 var
   Data : array[0..255] of byte; {Large enough for termios info}
 begin

+ 0 - 5
rtl/solaris/sparc/sighnd.inc

@@ -52,7 +52,6 @@ begin
   case sig of
     SIGFPE :
         begin
-          res := 207;
           case  siginfo^.si_code of
             FPE_INTDIV:
               res:=200;
@@ -64,10 +63,6 @@ begin
               res:=205;
             FPE_FLTUND:
               res:=206;
-            FPE_FLTRES,
-            FPE_FLTINV,
-            FPE_FLTSUB:
-              res:=216;
             else
               res:=207;
           end;

+ 5 - 3
rtl/unix/cwstring.pp

@@ -25,7 +25,7 @@ implementation
 
 {$linklib c}
 
-{$ifndef linux}  // Linux (and maybe glibc platforms in general), have iconv in glibc.
+{$if not defined(linux) and not defined(solaris)}  // Linux (and maybe glibc platforms in general), have iconv in glibc.
  {$linklib iconv}
  {$define useiconv}
 {$endif linux}
@@ -87,9 +87,9 @@ const
 
 { unicode encoding name }
 {$ifdef FPC_LITTLE_ENDIAN}
-  unicode_encoding = 'UNICODELITTLE';
+  unicode_encoding = 'UTF-16LE';
 {$else  FPC_LITTLE_ENDIAN}
-  unicode_encoding = 'UNICODEBIG';
+  unicode_encoding = 'UTF-16BE';
 {$endif  FPC_LITTLE_ENDIAN}
 
 type
@@ -371,11 +371,13 @@ end;
 
 initialization
   SetCWideStringManager;
+  initcriticalsection(iconv_lock);
   { init conversion tables }
   iconv_wide2ansi:=iconv_open(nl_langinfo(CODESET),unicode_encoding);
   iconv_ansi2wide:=iconv_open(unicode_encoding,nl_langinfo(CODESET));
   iconv_ucs42ansi:=iconv_open(nl_langinfo(CODESET),'UCS4');
   iconv_ansi2ucs4:=iconv_open('UCS4',nl_langinfo(CODESET));
 finalization
+  donecriticalsection(iconv_lock);
   iconv_close(iconv_ansi2wide);
 end.

+ 1 - 0
tests/webtbs/tw5641.pp

@@ -1,3 +1,4 @@
+{ %cpu=i386,powerpc,powerpc64,x86_64 }
 {%SKIPTARGET=wince}
 // Title: bad construction status of object.
 {$C+}