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

[Proposed PATCH] Let Perl define QUAD_MIN and _MAX itself

Thread Next
From:
Jeff Okamoto
Date:
July 31, 2000 11:11
Subject:
[Proposed PATCH] Let Perl define QUAD_MIN and _MAX itself
Message ID:
200007272051.NAA02178@xfiles.intercon.hp.com
This proposed patch allows Perl 5.6.0 to compile in 64-bit mode on an IA64
box running HP-UX.  I do not know whether the definition of QUAD_{MAX,MIN} in
float.h is something new for IA64 in general, or just for HP-UX.  Since they
conflict with FreeBSD's definition, I have removed it from the ifdef test
and let Perl define these constants itself.

Jeff
-----

*** perl.h.orig	Thu Jul 27 11:47:13 2000
--- perl.h	Thu Jul 27 11:54:21 2000
***************
*** 1362,1386 ****
  
  #ifdef UV_IS_QUAD
  
- #  ifdef UQUAD_MAX
- #    define PERL_UQUAD_MAX ((UV)UQUAD_MAX)
- #  else
  #    define PERL_UQUAD_MAX	(~(UV)0)
! #  endif
! 
! #  define PERL_UQUAD_MIN ((UV)0)
! 
! #  ifdef QUAD_MAX
! #    define PERL_QUAD_MAX ((IV)QUAD_MAX)
! #  else
  #    define PERL_QUAD_MAX 	((IV) (PERL_UQUAD_MAX >> 1))
- #  endif
- 
- #  ifdef QUAD_MIN
- #    define PERL_QUAD_MIN ((IV)QUAD_MIN)
- #  else
  #    define PERL_QUAD_MIN 	(-PERL_QUAD_MAX - ((3 & -1) == 3))
- #  endif
  
  #endif
  
--- 1362,1371 ----
  
  #ifdef UV_IS_QUAD
  
  #    define PERL_UQUAD_MAX	(~(UV)0)
! #    define PERL_UQUAD_MIN	((UV)0)
  #    define PERL_QUAD_MAX 	((IV) (PERL_UQUAD_MAX >> 1))
  #    define PERL_QUAD_MIN 	(-PERL_QUAD_MAX - ((3 & -1) == 3))
  
  #endif
  

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