Tue Feb 03 07:43:08 2009: Request 41866 was acted upon.
Transaction: Correspondence added by RSCHUPP
       Queue: PAR
     Subject: Warning message for file sha1.c when doing a 'make' 
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: [email protected]
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=41866 >


If I read the code in myldr/sha1.c correctly the line should be

        W[i] = T32(T >> 32);

which is inside a #if BYTEORDER == 0x87654321

This warning implies that ULONG is a 32-bit quantity whereas 
the code assumes is 64-bit. 
"/usr/perl5/5.6.1/lib/sun4-solaris-64int/CORE/config.h" in the
other warning implies is that this is a 64-bit Perl and 
the one shipped with Solaris. Is it a 64-bit Solaris then?
What compiler was used, the Sun compiler or gcc?

Sorry, I don't have access to a 64-bit Solaris, but the 
following lines at the start of sha1.c look highly suspicious:

#if defined(U64TYPE) && (defined(USE_64_BIT_INT) || ((BYTEORDER !=
0x1234) && (BYTEORDER != 0x4321)))
typedef U64TYPE ULONG;
# if BYTEORDER == 0x1234
#   undef BYTEORDER
#   define BYTEORDER 0x12345678
# elif BYTEORDER == 0x4321
#   undef BYTEORDER
#   define BYTEORDER 0x87654321   
# endif
#else
# if (!defined(__GNUC__) || !defined(_WINNT_H))
typedef unsigned long ULONG;     /* 32-or-more-bit quantity */
# endif
#endif

Looks like the author is trying to work around some flaw
in Perl's configuration - he overrides BYTEORDER obtained from
$Config{byteorder}. Note that macros USE_64_BIT_INT and
U64TYPE are #define'd in the above config.h, but it isn't
#include'd anywhere. So assuming a non-gcc compiler 
(since gcc will #define __GNUC__) this would imply

typedef unsigned long ULONG;     /* 32-or-more-bit quantity */

takes hold which might explain the mismatch (probably should
be "unsigned long long"). 

Reply via email to