[Libreoffice] getopt in sal/osl

Norbert Thiebaud nthiebaud at gmail.com
Tue Jan 31 20:14:04 PST 2012


Heads-up:

Looking at gbuildifying idlc, I noticed the glibc hack to get a getopt
implementation on platform that don't have a native one.

so, I wrote a gnu-compatile implementation based on
http://www.kernel.org/doc/man-pages/online/pages/man3/getopt.3.html

and I intend to add it to osl for platform that do not define
HAVE_GETOPT="YES" in configure.in

I still have to write some unittest to make sure I did not screw-up too much...

Usage wise, the main change to migrate from the non osl version to the
osl-based version will be to replace
#include <getopt.h>
with
#include <osl/getopt.h>

all the rest should remain untouched.


If you feel strongly against that, please let me know.

Norbert


More information about the LibreOffice mailing list