Patches

Alvaro Lopez Ortega alvaro at sun.com
Mon Jun 27 05:18:41 PDT 2005


David Zeuthen wrote:

>>>>> From my point of view, it is not a problem of compiling HAL
>>>>> on Solaris but a mistake with the types.  I mean, the private
>>>>> kernel types shouldn't be used in user space programs.
>>>> 
>>>> Seconded, /usr/include/stdint.h exists for this purpose and
>>>> should be used for portability.
>>> 
>>> Sounds good and reasonable to me and if klibc doesn't have this 
>>> volume_id should probably just work around that. Kay, is this OK
>>> with you?
>> 
>> I hate C99 types! I don't buy words like "wrong types" and
>> "mistake" in this context. I like it to have the same structs as
>> the kernel, where I copied it from. I don't see a problem adding
>> the few typedef's to make it compile on a different platform cause
>> these types are private to volume_id itself and not in the public
>> header (volume_id.h).
>> 
>> But sure, I don't really care and if it makes you guys more happy
>> then just go ahead and switch it. :)
> 
> So, it sounds to me that the best solution is to put typedef's in
> some (private) volume_id header so the code can stay close to the
> source it comes from (the Linux kernel). This should be easy and I'd
> do this myself but I don't currently have access a non-Linux system;
> Alvaro, any chance you might cook up a patch to do this?

   The patch is attached.

   Anyway, I would like to insist that those types are private Linux
kernel types.  This tricky patch makes volume_id library to compile on
Solaris (I guess on other non-Linux OSes as well).  The best way seems
to be to use the standard types to avoid this kind of problems.

-- 
Greetings, alo.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-33-support_linux_types.diff
Type: text/x-patch
Size: 12315 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20050627/8e5fca75/hal-33-support_linux_types.bin
-------------- next part --------------
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal


More information about the Hal mailing list