develooper Front page | perl.perl5.porters | Postings from October 2000

[ID 20001027.002] Patch 7380 followup - Perl_modfl *must* be defined

Thread Next
From:
Jens Hamisch
Date:
October 27, 2000 05:38
Subject:
[ID 20001027.002] Patch 7380 followup - Perl_modfl *must* be defined
Message ID:
20001027143821.B3366@Strawberry.COM
Hi,

this is a followup to patch 7380, which removed the definition
of Perl_modfl from perl.h in case the system doesn't provide a
modfl function (same for frexpl).

This leads to linker failures in this case.

Patch 7380 addresses the (long double *) vs. (double *) problem
correctly, but takes this fix out of the focus, by removing the
appropriate #defines from perl.h.

After changing perl.h as follows:

*** perl.h.FCS  Fri Oct 27 11:17:26 2000
--- perl.h      Fri Oct 27 11:21:12 2000
***************
*** 1187,1195 ****
--- 1187,1199 ----
  /* e.g. libsunmath doesn't have modfl and frexpl as of mid-March 2000 */
  #   ifdef HAS_MODFL
  #       define Perl_modf(x,y) modfl(x,y)
+ #   else
+ #       define Perl_modf(x,y) ((long double)modf((double)(x),(double*)(y)))
  #   endif
  #   ifdef HAS_FREXPL
  #       define Perl_frexp(x,y) frexpl(x,y)
+ #   else
+ #       define Perl_frexp(x,y) ((long double)frexp((double)(x),y))
  #   endif
  #   ifdef HAS_ISNANL
  #       define Perl_isnan(x) isnanl(x)


everything worked out fine again.

Cheers
-- Jens

--------------------------------------------------------------------------------
     /
 +##+|##+   STRAWBERRY                     Jens Hamisch
+v#+v v##+  EDV-Systeme GmbH               Managing director
/ v    v\v
| . .  . |  Brauneckweg 2                  Car (Voice):  (+49 172) 81 04 162
|     .  |  D-82549 Koenigsdorf            Voice:        (+49 8179) 9305-50
 | .     |                                 Fax:          (+49 8179) 9305-38
 \   .  /   Tel./Fax: (+49 8179) 9305-50   Email:        jens@Strawberry.COM
  \____/    Strawberry@Strawberry.COM      



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About