[Libreoffice] [PUSHED] Some OSL cleanup

Michael Meeks michael.meeks at suse.com
Mon Nov 21 09:19:42 PST 2011


Hi there,

On Fri, 2011-11-18 at 20:15 +0100, Arnaud Versini wrote:
> The first patch replace the usage of gethostbyname by the reentrant
> version.

	Looks nice, and functional for all unix's that I can see :-)

> The second and third patch removes internal gethostbyname_r, backtrace
> and  backtrace_symbols_fd. I'm not sure about these two patches, those
> functions are in the libc on all current OS and symbols are not
> exported.

	The second looks fine; after all we have this osl_ variant that we are
actually using - lets hope that _osl_gethostbyname_r wasn't using this
impl. on some obscure platform.

	I reverted the getpid() section from it - sadly, getpid does (or did)
do odd things on Linux around threads (as the comment says) and it's
hard to see what that might break.

	The backtrace patch at worst seems to undo a fix for a non-functiuoning
Linux/sparc backtrace method:

	https://issues.apache.org/ooo/show_bug.cgi?id=18052

	that we can expect is fixed now, and since we don't submit backtraces
via the crash-reporter anyway ... ;-)

	So some nice cleanups; thanks ...

	One thing I noticed there was the under-usage of osl_sempahore and
related bits. It might be worth checking the rest of the code to see if
in fact we need this at all - the Condition stuff is much more widely
used.

	If we find it is not / hardly ever used, we could use the generic:

#ifdef NO_PTHREAD_SEMAPHORES

	implementation directly in-lined in the semaphore impl. and schedule
Semaphore for ultimate removal in LibreOffice 4:

	http://wiki.documentfoundation.org/Development/LibreOffice4

	But perhaps I'm missing something there.

	Anyhow - thanks for that ! :-)

	ATB,

		Michael.

-- 
michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot



More information about the LibreOffice mailing list