[Openais] [Corosync] Patches to fix BSD support

Jérôme Flesch jerome.flesch at netasq.com
Wed Jun 10 06:36:40 PDT 2009


> On Wed, 2009-06-10 at 09:40 +0200, Jérôme Flesch wrote:
>>> Jerome,
>>>
>>> Thanks for the work. Few comments:
>>>
>>> First, NAME_MAX was changed to FILENAME_MAX to match posix.  Also these
>>> are defined in /usr/include/limits.h.  Doesn't bsd have this file? (I
>>> recently fixed this problem for the Solaris port I did)  If it does,
>>> then you shouldn't have to do any defining since this is now fixed in
>>> current trunk.
>>>
>> I confirm, FILENAME_MAX is defined on FreeBSD (in stdio.h), so this part 
>> of my patch is actually not required. Do you want me to prepare a new one ?
>>
> Yes please.  Also the PATH_MAX variable should be defined somewhere in
> your header files and doesn't need a definition in configure.ac.
>
I've attached a new version of the patch to this mail. You were right, 
PATH_MAX and NAME_MAX defines are not needed anymore. I've also tried to 
make the -ldl part a little bit less ugly.


>>> I think the LDL part needs to be in some user defined flag in the
>>> configure.ac.  The #if BSD with defining LDL is a bit hacky.  I'm not
>>> sure where it should go however, so perhaps Jim or Fabio could comment.
>>> If Jim or Fabio give that part the thumbs up, then this patch should be
>>> good to go in.
>>>
>>> the if defined semun wont work because unions are not defines.  That
>>> entire code segment is wrong.  Can you try the attached patch on bsd for
>>> me?
>>>
>> I think you misunderstood my problem: semun *is* already defined on 
>> FreeBSD, but the #if !defined(semun) doesn't work on my system (probably 
>> due to a GCC version difference ?) and the compiler ends up with a 
>> redefinition of semun.
>>
>> Is there actually any system where semun is not already defined ?
>>
>>
> 
> Linux doesn't define it and Solaris doesn't even have a description of
> the definition.  Do you have _SEM_SEMUN_UNDEFINED in your header files?
> Or SEM_SEMUN_DEFINED?  That can be used to do an if defined test.
> 
I haven't found any of them in the FreeBSD headers :/


> Regards
> -steve
> 
> 
> 
> 
> 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch-fix-bsd-compilation
Url: http://lists.linux-foundation.org/pipermail/openais/attachments/20090610/44bf4aa6/attachment.txt 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4393 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.linux-foundation.org/pipermail/openais/attachments/20090610/44bf4aa6/attachment.bin 


More information about the Openais mailing list