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

Guillaume Lelarge guillaume at lelarge.info
Tue Aug 24 14:57:41 UTC 2010


Le 24/08/2010 15:50, Edmundo Robles L. a écrit :
> 
> 
> On 08/22/2010 03:43 AM, Tatsuo Ishii wrote:
>>> Le 22/08/2010 08:36, Tatsuo Ishii a �crit :
>>>      
>>>>> 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.
>>>>>          
>>>> Sorry I missed it. Ok let's commit and see if this solves Edmundo's
>>>> problem.
>>>>        
>>> Done.
>>>      
>> Thanks!
>>
>>    
> 
> Hi!
> Just to say that sources files including getopt_long.h  already 
> compiled,  only just need test them.
> in brief,  i have a lot of work ,i will upload   the changes made in the 
> Makefile, config.h as well as the source , please tell me where I  
> upload them.
> 

I don't understand. What changes?


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


More information about the Pgpool-general mailing list