On Nov 10, 2007, at 11:04 PM, Olivier Thauvin wrote:
> Le samedi 10 novembre 2007, Jeff Johnson a écrit :
>> RPM Package Manager, CVS Repository
>> http://rpm5.org/cvs/
>>
>> _____________________________________________________________________
>> ______
>> _
>>
>> Server: rpm5.org Name: Jeff Johnson
>> Root: /v/rpm/cvs Email: jbj@rpm5.org
>> Module: rpm Date: 10-Nov-2007
>> 16:41:26
>> Branch: HEAD Handle: 2007111015412600
>>
>> Modified files:
>> rpm CHANGES
>> rpm/perl RPM_Header.xs
>>
>> Log:
>> - hmmm, rpm-perl seems to have issues on BIGENDIAN non-int32
>> retrieves.
>> - use HE_t instead of individual args. dunno HGE_t et al
>> desired ...
>>
>> Summary:
>> Revision Changes Path
>> 1.1796 +2 -0 rpm/CHANGES
>> 1.10 +50 -44 rpm/perl/RPM_Header.xs
>
>> - tag = SvIV(sv_tag);
>> + he->tag = SvIV(sv_tag);
>
> Maybe the a better thing is
>
> tag = SvUV(sv_tag);
>
> IV for integer value, UV for unsigned int.
>
OK. IV or UV likely works for tags no matter what, although
there will be a signedness warning from gcc.
The real problem (afaict from reading, not tested) is the
pointer passed to headerAddEntry for non-int_32 data types.
It looks like a 32 bit int is used always, which likely means
that, say, RPM_UINT16_TYPE on a BIGENDIAN machine will
see the leading zeroes, not the 16 bits of content.
73 de Jeff
Received on Sun Nov 11 14:01:55 2007