help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] [2.0.7] on sparc


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] [2.0.7] on sparc
Date: Thu, 24 Oct 2002 17:40:09 +0200
User-agent: Mutt/1.4i

It is a misalignment problem.  The following patch against 2.0d solves it
and all other problems that happen under Solaris; 2.0.8 will have a
similar one as well as the September one which did not go in by mistake.

Paolo

diff -rC3 tmp/smalltalk-2.0d//i18n/i18n.c smalltalk-2.0d/i18n/i18n.c
*** tmp/smalltalk-2.0d//i18n/i18n.c     Tue Jun 25 20:35:55 2002
--- smalltalk-2.0d/i18n/i18n.c  Thu Oct 24 17:25:57 2002
***************
*** 150,156 ****
  
    if (!setlocale (LC_ALL, string))
      {
!       xfree (oldLocale);
        return NULL;
      }
  
--- 150,156 ----
  
    if (!setlocale (LC_ALL, string))
      {
!       free (oldLocale);
        return NULL;
      }
  
***************
*** 233,240 ****
  
    charset = locale_charset ();
    setlocale (LC_ALL, oldLocale);
!   xfree (oldLocale);
!   xfree (ourLocale);
  
    return charset;
  }
--- 233,240 ----
  
    charset = locale_charset ();
    setlocale (LC_ALL, oldLocale);
!   free (oldLocale);
!   free (ourLocale);
  
    return charset;
  }
diff -rC3 tmp/smalltalk-2.0d//lib-src/acosl.c smalltalk-2.0d/lib-src/acosl.c
*** tmp/smalltalk-2.0d//lib-src/acosl.c Wed Aug  7 15:25:40 2002
--- smalltalk-2.0d/lib-src/acosl.c      Thu Oct 24 17:28:15 2002
***************
*** 9,14 ****
--- 9,16 ----
   * ====================================================
   */
  
+ #include "mathl.h"
+ 
  /*
    Long double expansions contributed by
    Stephen L. Moshier <address@hidden>
diff -rC3 tmp/smalltalk-2.0d//lib-src/asinl.c smalltalk-2.0d/lib-src/asinl.c
*** tmp/smalltalk-2.0d//lib-src/asinl.c Mon Jul 22 15:27:24 2002
--- smalltalk-2.0d/lib-src/asinl.c      Thu Oct 24 17:28:29 2002
***************
*** 9,14 ****
--- 9,16 ----
   * ====================================================
   */
  
+ #include "mathl.h"
+ 
  /*
    Long double expansions contributed by
    Stephen L. Moshier <address@hidden>
diff -rC3 tmp/smalltalk-2.0d//lib-src/atanl.c smalltalk-2.0d/lib-src/atanl.c
*** tmp/smalltalk-2.0d//lib-src/atanl.c Mon Jul 22 15:23:01 2002
--- smalltalk-2.0d/lib-src/atanl.c      Thu Oct 24 17:28:43 2002
***************
*** 44,49 ****
--- 44,51 ----
  
  /* Copyright 2001 by Stephen L. Moshier <address@hidden>  */
  
+ #include "mathl.h"
+ 
  #include <math.h>
  
  /* arctan(k/8), k = 0, ..., 82 */
diff -rC3 tmp/smalltalk-2.0d//lib-src/ceill.c smalltalk-2.0d/lib-src/ceill.c
*** tmp/smalltalk-2.0d//lib-src/ceill.c Mon Jul 22 15:23:01 2002
--- smalltalk-2.0d/lib-src/ceill.c      Thu Oct 24 17:28:49 2002
***************
*** 30,35 ****
--- 30,37 ----
  
  #include <float.h>
  
+ #include "mathl.h"
+ 
  /* To compute the integer part of X, sum a big enough
     integer so that the precision of the floating point
     number is exactly 1.  */
diff -rC3 tmp/smalltalk-2.0d//lib-src/cosl.c smalltalk-2.0d/lib-src/cosl.c
*** tmp/smalltalk-2.0d//lib-src/cosl.c  Mon Jul 22 15:27:24 2002
--- smalltalk-2.0d/lib-src/cosl.c       Thu Oct 24 17:28:56 2002
***************
*** 46,51 ****
--- 46,53 ----
  
  #include <math.h>
  
+ #include "mathl.h"
+ 
  #include "trigl.h"
  #ifdef HAVE_SINL
  #include "trigl.c"
diff -rC3 tmp/smalltalk-2.0d//lib-src/expl.c smalltalk-2.0d/lib-src/expl.c
*** tmp/smalltalk-2.0d//lib-src/expl.c  Mon Jul 22 15:27:24 2002
--- smalltalk-2.0d/lib-src/expl.c       Thu Oct 24 17:29:01 2002
***************
*** 31,36 ****
--- 31,38 ----
  #include <float.h>
  #include <math.h>
  
+ #include "mathl.h"
+ 
  static const long double C[] = {
  /* Chebyshev polynom coeficients for (exp(x)-1)/x */
  #define P1 C[0]
diff -rC3 tmp/smalltalk-2.0d//lib-src/floorl.c smalltalk-2.0d/lib-src/floorl.c
*** tmp/smalltalk-2.0d//lib-src/floorl.c        Mon Jul 22 15:23:01 2002
--- smalltalk-2.0d/lib-src/floorl.c     Thu Oct 24 17:29:06 2002
***************
*** 30,35 ****
--- 30,37 ----
  
  #include <float.h>
  
+ #include "mathl.h"
+ 
  /* To compute the integer part of X, sum a big enough
     integer so that the precision of the floating point
     number is exactly 1.  */
diff -rC3 tmp/smalltalk-2.0d//lib-src/frexpl.c smalltalk-2.0d/lib-src/frexpl.c
*** tmp/smalltalk-2.0d//lib-src/frexpl.c        Wed Aug  7 14:23:38 2002
--- smalltalk-2.0d/lib-src/frexpl.c     Thu Oct 24 17:29:11 2002
***************
*** 31,36 ****
--- 31,38 ----
  #include <float.h>
  #include <math.h>
  
+ #include "mathl.h"
+ 
  /* Binary search.  Quite inefficient but portable. */
  long double
  frexpl(long double x, int *exp)
diff -rC3 tmp/smalltalk-2.0d//lib-src/ldexpl.c smalltalk-2.0d/lib-src/ldexpl.c
*** tmp/smalltalk-2.0d//lib-src/ldexpl.c        Mon Jul 22 15:27:24 2002
--- smalltalk-2.0d/lib-src/ldexpl.c     Thu Oct 24 17:29:15 2002
***************
*** 31,36 ****
--- 31,38 ----
  #include <float.h>
  #include <math.h>
  
+ #include "mathl.h"
+ 
  long double
  ldexpl(long double x, int exp)
  {
diff -rC3 tmp/smalltalk-2.0d//lib-src/logl.c smalltalk-2.0d/lib-src/logl.c
*** tmp/smalltalk-2.0d//lib-src/logl.c  Mon Jul 22 15:23:01 2002
--- smalltalk-2.0d/lib-src/logl.c       Thu Oct 24 17:29:20 2002
***************
*** 44,49 ****
--- 44,51 ----
  
  #include <math.h>
  
+ #include "mathl.h"
+ 
  /* Copyright 2001 by Stephen L. Moshier <address@hidden> */
  
  /* log(1+x) = x - .5 x^2 + x^3 l(x)
diff -rC3 tmp/smalltalk-2.0d//lib-src/mathl.h smalltalk-2.0d/lib-src/mathl.h
*** tmp/smalltalk-2.0d//lib-src/mathl.h Mon Jul 22 15:23:01 2002
--- smalltalk-2.0d/lib-src/mathl.h      Thu Oct 24 17:30:11 2002
***************
*** 28,33 ****
--- 28,36 ----
   *
   ***********************************************************************/
  
+ #ifndef GST_MATHL_H
+ #define GST_MATHL_H
+ 
  extern long double acosl(long double x);
  extern long double asinl (long double x);
  extern long double atanl (long double x);
***************
*** 41,43 ****
--- 44,48 ----
  extern long double sinl (long double x);
  extern long double sqrtl(long double x);
  extern long double tanl (long double x);
+ 
+ #endif
diff -rC3 tmp/smalltalk-2.0d//lib-src/sincosl.c smalltalk-2.0d/lib-src/sincosl.c
*** tmp/smalltalk-2.0d//lib-src/sincosl.c       Mon Jul 22 15:23:01 2002
--- smalltalk-2.0d/lib-src/sincosl.c    Thu Oct 24 17:32:10 2002
***************
*** 21,26 ****
--- 21,28 ----
  #include <math.h>
  #include <float.h>
  
+ #include "mathl.h"
+ 
  static const long double sin_c[] = {
  #define ONE sin_c[0]
    1.00000000000000000000000000000000000E+00L, /* 
3fff0000000000000000000000000000 */
***************
*** 72,103 ****
  };
  
  static const long double cos_c[] = {
- #define ONE cos_c[0]
-   1.00000000000000000000000000000000000E+00L, /* 
3fff0000000000000000000000000000 */
- 
- /* cos x ~ ONE + x^2 ( SCOS1 + SCOS2 * x^2 + ... + SCOS4 * x^6 + SCOS5 * x^8 )
-    x in <0,1/256>  */
- #define SCOS1 cos_c[1]
- #define SCOS2 cos_c[2]
- #define SCOS3 cos_c[3]
- #define SCOS4 cos_c[4]
- #define SCOS5 cos_c[5]
-   -5.00000000000000000000000000000000000E-01L,        /* 
bffe0000000000000000000000000000 */
-   4.16666666666666666666666666556146073E-02L, /* 
3ffa5555555555555555555555395023 */
-   -1.38888888888888888888309442601939728E-03L,        /* 
bff56c16c16c16c16c16a566e42c0375 */
-   2.48015873015862382987049502531095061E-05L, /* 
3fefa01a01a019ee02dcf7da2d6d5444 */
-   -2.75573112601362126593516899592158083E-07L,        /* 
bfe927e4f5dce637cb0b54908754bde0 */
- 
  /* cos x ~ ONE + x^2 ( COS1 + COS2 * x^2 + ... + COS7 * x^12 + COS8 * x^14 )
     x in <0,0.1484375>  */
! #define COS1 cos_c[6]
! #define COS2 cos_c[7]
! #define COS3 cos_c[8]
! #define COS4 cos_c[9]
! #define COS5 cos_c[10]
! #define COS6 cos_c[11]
! #define COS7 cos_c[12]
! #define COS8 cos_c[13]
    -4.99999999999999999999999999999999759E-01L,        /* 
bffdfffffffffffffffffffffffffffb */
    4.16666666666666666666666666651287795E-02L, /* 
3ffa5555555555555555555555516f30 */
    -1.38888888888888888888888742314300284E-03L,        /* 
bff56c16c16c16c16c16c16a463dfd0d */
--- 74,89 ----
  };
  
  static const long double cos_c[] = {
  /* cos x ~ ONE + x^2 ( COS1 + COS2 * x^2 + ... + COS7 * x^12 + COS8 * x^14 )
     x in <0,0.1484375>  */
! #define COS1 cos_c[0]
! #define COS2 cos_c[1]
! #define COS3 cos_c[2]
! #define COS4 cos_c[3]
! #define COS5 cos_c[4]
! #define COS6 cos_c[5]
! #define COS7 cos_c[6]
! #define COS8 cos_c[7]
    -4.99999999999999999999999999999999759E-01L,        /* 
bffdfffffffffffffffffffffffffffb */
    4.16666666666666666666666666651287795E-02L, /* 
3ffa5555555555555555555555516f30 */
    -1.38888888888888888888888742314300284E-03L,        /* 
bff56c16c16c16c16c16c16a463dfd0d */
***************
*** 106,124 ****
    2.08767569877762248667431926878073669E-09L, /* 
3fe21eed8eff881d1e9262d7adff4373 */
    -1.14707451049343817400420280514614892E-11L,        /* 
bfda9397496922a9601ed3d4ca48944b */
    4.77810092804389587579843296923533297E-14L, /* 
3fd2ae5f8197cbcdcaf7c3fb4523414c */
- 
- /* sin x ~ ONE * x + x^3 ( SSIN1 + SSIN2 * x^2 + ... + SSIN4 * x^6 + SSIN5 * 
x^8 )
-    x in <0,1/256>  */
- #define SSIN1 cos_c[14]
- #define SSIN2 cos_c[15]
- #define SSIN3 cos_c[16]
- #define SSIN4 cos_c[17]
- #define SSIN5 cos_c[18]
-   -1.66666666666666666666666666666666659E-01L,        /* 
bffc5555555555555555555555555555 */
-   8.33333333333333333333333333146298442E-03L, /* 
3ff81111111111111111111110fe195d */
-   -1.98412698412698412697726277416810661E-04L,        /* 
bff2a01a01a01a01a019e7121e080d88 */
-   2.75573192239848624174178393552189149E-06L, /* 
3fec71de3a556c640c6aaa51aa02ab41 */
-   -2.50521016467996193495359189395805639E-08L,        /* 
bfe5ae644ee90c47dc71839de75b2787 */
  };
  
  #define SINCOSL_COS_HI 0
--- 92,97 ----
diff -rC3 tmp/smalltalk-2.0d//lib-src/sinl.c smalltalk-2.0d/lib-src/sinl.c
*** tmp/smalltalk-2.0d//lib-src/sinl.c  Mon Jul 22 15:27:24 2002
--- smalltalk-2.0d/lib-src/sinl.c       Thu Oct 24 17:29:34 2002
***************
*** 46,51 ****
--- 46,53 ----
  
  #include <math.h>
  
+ #include "mathl.h"
+ 
  #include "trigl.h"
  #include "trigl.c"
  #include "sincosl.c"
diff -rC3 tmp/smalltalk-2.0d//lib-src/sqrtl.c smalltalk-2.0d/lib-src/sqrtl.c
*** tmp/smalltalk-2.0d//lib-src/sqrtl.c Wed Aug  7 15:29:09 2002
--- smalltalk-2.0d/lib-src/sqrtl.c      Thu Oct 24 17:29:39 2002
***************
*** 31,36 ****
--- 31,38 ----
  #include <float.h>
  #include <math.h>
  
+ #include "mathl.h"
+ 
  /* A simple Newton-Raphson method. */
  long double
  sqrtl(long double x)
diff -rC3 tmp/smalltalk-2.0d//lib-src/tanl.c smalltalk-2.0d/lib-src/tanl.c
*** tmp/smalltalk-2.0d//lib-src/tanl.c  Mon Jul 22 15:27:24 2002
--- smalltalk-2.0d/lib-src/tanl.c       Thu Oct 24 17:29:46 2002
***************
*** 46,51 ****
--- 46,53 ----
  
  #include <math.h>
  
+ #include "mathl.h"
+ 
  #include "trigl.h"
  #ifdef HAVE_SINL
  #ifdef HAVE_COSL
diff -rC3 tmp/smalltalk-2.0d//lib-src/trigl.c smalltalk-2.0d/lib-src/trigl.c
*** tmp/smalltalk-2.0d//lib-src/trigl.c Tue Jul 23 08:12:10 2002
--- smalltalk-2.0d/lib-src/trigl.c      Thu Oct 24 17:29:49 2002
***************
*** 21,26 ****
--- 21,28 ----
  #include <math.h>
  #include <float.h>
  
+ #include "mathl.h"
+ 
  /* Table of constants for 2/pi, 5628 hexadecimal digits of 2/pi */
  static const int two_over_pi[] = {
    0xa2f983, 0x6e4e44, 0x1529fc, 0x2757d1, 0xf534dd, 0xc0db62,
diff -rC3 tmp/smalltalk-2.0d//libgst/mpz.c smalltalk-2.0d/libgst/mpz.c
*** tmp/smalltalk-2.0d//libgst/mpz.c    Sat Jul  6 12:50:38 2002
--- smalltalk-2.0d/libgst/mpz.c Thu Oct 24 17:28:01 2002
***************
*** 32,37 ****
--- 32,38 ----
  #include "gstpriv.h"
  #include <stdlib.h>
  #include <math.h>
+ #include "mathl.h"
  
  #if HAVE_GMP
  #include <gmp.h>
diff -rC3 tmp/smalltalk-2.0d//snprintfv/snprintfv/format.c 
smalltalk-2.0d/snprintfv/snprintfv/format.c
*** tmp/smalltalk-2.0d//snprintfv/snprintfv/format.c    Tue Sep 10 11:23:59 2002
--- smalltalk-2.0d/snprintfv/snprintfv/format.c Thu Oct 24 17:34:19 2002
***************
*** 44,51 ****
--- 44,55 ----
  
  #ifdef HAVE_LONG_DOUBLE
  typedef long double long_double;
+ extern long double frexpl (long double x, int *exp);
+ extern long double ldexpl (long double x, int exp);
  #else
  typedef double long_double;
+ #define frexpl frexp
+ #define ldexpl ldexp
  #endif
  
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]