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

Guillaume Lelarge guillaume at lelarge.info
Sun Aug 22 05:53:19 UTC 2010


Le 22/08/2010 00:35, Tatsuo Ishii a écrit :
>> Le 21/08/2010 09:25, Tatsuo Ishii a écrit :
>>>> 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?
>>
>> Nothing. It's great :)
>>
>> See patch attached.
> 
> Thanks. But I cannot find getopt_long.c etc. in the patch?

Yeah, The first email
(http://lists.pgfoundry.org/pipermail/pgpool-general/2010-August/002901.html)
only has the diff, the second mail
(http://lists.pgfoundry.org/pipermail/pgpool-general/2010-August/002902.html)
has the getopt_long.h and getopt_long.c files.


-- 
Guillaume
 http://www.postgresql.fr
 http://dalibo.com


More information about the Pgpool-general mailing list