Armin K. wrote:
> On 07/14/2012 11:35 PM, Bruce Dubbs wrote:
>> Armin K. wrote:
>>> On 07/14/2012 10:49 PM, Bruce Dubbs wrote:
>>>>
>>>> I'll take a look.  Thanks for the suggestions.
>>
>>> Here are some corrections to your work. I've defined path to usb.ids and
>>> pci.ids, added common library to shared libudev because there are
>>> undefined references later when linking against that one. Also, I've
>>> modified installation to install gtk-doc htmldocs that are present there.
>>
>>
>> +OPTIONS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
>>
>>
>> I haven't had time to look at everything yet, but I did find out that a
>> sed works too:
>>
>> $ sed -i 's/off_t factor;/int64_t factor;/' src/shared/util.c
>>
>> I think that's a smaller fix as far a code generation goes.  It's just a
>> build issue though. The functions that use this code are not used in
>> udev.  The compile options -ffunction-sections -fdata-sections and the
>> link options -Wl,--as-needed -Wl,--gc-sections mean that this code never
>> gets built into the executables and they are not in libudev either.

>
> I dislike that sed. Maintainers know what are they doing. Even udev 182
> has those CFLAGS set by default (AC_SYS_LARGEFILE macro handles that)
> ... Just let them be there.

Most of the time I would agree with you, but not in this case.  I don't 
think the maintainers thought about the type when they created the table 
with an off_t index.  It's a kludge to make off_t to used 64 bits in a 
32 bit system when specifying it directly in the code is more direct. 
There are a couple of other types that could be used too:  offset_t or 
off64_t are always 64 bits as well as int64_t.

   -- Bruce




-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to