Thanks,<br><br>For getpid, this is my mistake, sorry, I must check
before if NPTL getpid is conform to the posix requirements (one PID for
all threads in one process). It seems to be Posix compliant :<br><br><a href="http://linux.die.net/man/7/pthreads" target="_blank">http://linux.die.net/man/7/pthreads</a><br><br>I will check and send you a patch for this.<br>
<br>I
want to add some annotations like format_arg and noreturn (or an
equivalent for MSVC, CLang...) specially for trace, assert, abort and
info. Is it useful ?<br><br>Best regards<br><br><div class="gmail_quote">2011/11/21 Michael Meeks <span dir="ltr"><<a href="mailto:michael.meeks@suse.com">michael.meeks@suse.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi there,<br>
<div class="im"><br>
On Fri, 2011-11-18 at 20:15 +0100, Arnaud Versini wrote:<br>
> The first patch replace the usage of gethostbyname by the reentrant<br>
> version.<br>
<br>
</div> Looks nice, and functional for all unix's that I can see :-)<br>
<div class="im"><br>
> The second and third patch removes internal gethostbyname_r, backtrace<br>
> and backtrace_symbols_fd. I'm not sure about these two patches, those<br>
> functions are in the libc on all current OS and symbols are not<br>
> exported.<br>
<br>
</div> The second looks fine; after all we have this osl_ variant that we are<br>
actually using - lets hope that _osl_gethostbyname_r wasn't using this<br>
impl. on some obscure platform.<br>
<br>
I reverted the getpid() section from it - sadly, getpid does (or did)<br>
do odd things on Linux around threads (as the comment says) and it's<br>
hard to see what that might break.<br>
<br>
The backtrace patch at worst seems to undo a fix for a non-functiuoning<br>
Linux/sparc backtrace method:<br>
<br>
<a href="https://issues.apache.org/ooo/show_bug.cgi?id=18052" target="_blank">https://issues.apache.org/ooo/show_bug.cgi?id=18052</a><br>
<br>
that we can expect is fixed now, and since we don't submit backtraces<br>
via the crash-reporter anyway ... ;-)<br>
<br>
So some nice cleanups; thanks ...<br>
<br>
One thing I noticed there was the under-usage of osl_sempahore and<br>
related bits. It might be worth checking the rest of the code to see if<br>
in fact we need this at all - the Condition stuff is much more widely<br>
used.<br>
<br>
If we find it is not / hardly ever used, we could use the generic:<br>
<br>
#ifdef NO_PTHREAD_SEMAPHORES<br>
<br>
implementation directly in-lined in the semaphore impl. and schedule<br>
Semaphore for ultimate removal in LibreOffice 4:<br>
<br>
<a href="http://wiki.documentfoundation.org/Development/LibreOffice4" target="_blank">http://wiki.documentfoundation.org/Development/LibreOffice4</a><br>
<br>
But perhaps I'm missing something there.<br>
<br>
Anyhow - thanks for that ! :-)<br>
<br>
ATB,<br>
<br>
Michael.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
<a href="mailto:michael.meeks@suse.com">michael.meeks@suse.com</a> <><, Pseudo Engineer, itinerant idiot<br>
<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>Arnaud Versini<br>