[Libreoffice] getopt in sal/osl

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


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

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>
#include <osl/getopt.h>

all the rest should remain untouched.

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


More information about the LibreOffice mailing list