Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On Tue, 2012-01-31 at 22:14 -0600, Norbert Thiebaud wrote:
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.

So, since you've already written it, my suggestion may be a little too
little too late.  But anyways...

Boost also has program options library which provides a cross-platform
command line option parser much like getopt on GNU platforms.  I tend to
use it instead of getopt whenever I need a cross-platform command line
options parser.  I don't use getopt because it's not cross-platform.

Perhaps not useful right this moment, but just something to be aware of
in the future when similar needs arise...

And I'm all for your plan, just to be clear.

Kohei

-- 
Kohei Yoshida, LibreOffice hacker, Calc


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.