svn commit: samba r23108 - in branches: SAMBA_3_0/source/lib/replace SAMBA_3_0_26/source/lib/replace SAMBA_4_0/source/lib/replace

David Collier-Brown davec-b at rogers.com
Thu May 24 16:33:03 GMT 2007



Michael Adam wrote:
>>Is there any expectation that this is actually going to work? If we  
>>cabn't figure out the header that these definition live in, then  
>>making them up isn't necessarily going to help, eg. on AIX RTLD_GLOBAL  
>>appears to be 0x100. I don't know any system that defines them *all*  
>>to zero.
>>
>>If ldb requires these definitions, Id suggest simply disabling shared  
>>library support in lds unless they are present. That seems safer that  
>>passing an arbitrary (random?) value into dlopen.
> 
> 
> You are probably right. My primary goal was to get the build
> working on a system at all. I have taken the defines from
> heimdal/lib/hdb/hdb.c more or less blindly...
> 
> I have to reconsider this.

There's really two issues here: do you have the RTLD_XXX functionality
in dlopen, and do you have the #defines for it.

If you lack the functionality **and** if you depend on it rather than on
the defined default behavior, then you should refuse to use dlopen with
the wrong settings.  If you have the capability and merely lack the
#defines, you should create your own #defines.

If, on the third hand, the default behavior is what you wish (and
I don't know if it is), then you can safely refrain from using the
#defines and not have to think about the problem at all.  The latter
was something of a well-known "best practice" in the Unix of old (;-))

--dave
-- 
David Collier-Brown,         | Always do right. This will gratify
System Programmer and Author | some people and astonish the rest
davecb at spamcop.net           |                      -- Mark Twain
(416) 223-5943


More information about the samba-technical mailing list