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

Guillaume Lelarge guillaume at lelarge.info
Sat Aug 21 16:10:50 UTC 2010


Le 21/08/2010 18:08, Guillaume Lelarge 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.

Sorry, clicked on the wrong button. You also need these two files.

There are some warnings. I'll work on them. But I'll like to know if
Edmundo can try the patch to see if it's working for him. I don't have a
platform that doesn't have getopt_long. If yes, he can try right now.

Thanks.


-- 
Guillaume
 http://www.postgresql.fr
 http://dalibo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: getopt_long.c
Type: text/x-csrc
Size: 4721 bytes
Desc: not available
URL: <http://pgfoundry.org/pipermail/pgpool-general/attachments/20100821/97c41ec8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: getopt_long.h
Type: text/x-chdr
Size: 908 bytes
Desc: not available
URL: <http://pgfoundry.org/pipermail/pgpool-general/attachments/20100821/97c41ec8/attachment-0001.bin>


More information about the Pgpool-general mailing list