[Pgpool-general] pgpool-II 3.0 and getopt.h missing on SCO 5.0.7

Tatsuo Ishii ishii at sraoss.co.jp
Sat Aug 21 07:25:16 UTC 2010


> Le 20/08/2010 15:04, Guillaume Lelarge a écrit :
> > Le 20/08/2010 01:49, Tatsuo Ishii a écrit :
> >>> hi!  i tried to compile pgpool-II 3.0 beta1 on SCO 5.0.7 , but    i 
> >>> can't find  getopt.h file ,  i just  have an getopt_.h from gnulib but  
> >>> is not enough to compile it.
> >>>
> >>> There is a  way to disable long options?
> >>> or
> >>> where can  i find a getopt.h file (and getopt.c to  compile. ;-) ) ??
> >>
> >> I have looked into PostgreSQL code, and found that it spends lots of
> >> efforts to make long options portable.
> >>
> >> Guillaume, should we do the same thing?
> > 
> > Seems a good idea. Working on it.
> > 
> 
> Well, it shouldn't be a hard work for someone who knows how to write the
> configure file, but it happens that I don't. I tried a few things, but
> it didn't work out well.
> 
> In the source file, there's only one thing to do. Instead of
> 
> #include <getopt.h>
> 
> we should have a
> 
> #include "getopt_long.h"
> 
> Of course, we also need to copy the getopt_long.c and getopt_lon.h
> source files.
> 
> And it's enough if the configure script is in good shape. Can you take
> care of the configure script? or at least tell me the files that need
> some updates.
> 
> The only place where I found pgpool's licence is on the pgfoundry
> website. We certainly need to mention it in the docs too.

We already have:

/* Define to 1 if you have the <getopt.h> header file. */
#define HAVE_GETOPT_H 1

So probably in main.c and etc. we should do:

#ifdef HAVE_GETOPT_H
#include <getopt.h>
#else
#include "getopt_long.h"
:
:

What else do you need?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


More information about the Pgpool-general mailing list