Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/include



> This is wrong... Other systems don't have sys/featureset.h and _NETBSD_SOURCE
> should not be tested. This is not a standard header.

What's the proper way to fix this, then? Without this reversion, I get
build errors due to conflicting types for getopt_long on my lignux box:

#   compile  compat/getopt_long.lo                                              
cc -O  -I. -I./include -I/home/dogcow/work/nbsrc/tools/compat 
-I/home/dogcow/work/nbsrc/tools/compat/sys  -DHAVE_NBTOOL_CONFIG_H=1 
-D_FILE_OFFSET_BITS=64 -D__DBINTERFACE_PRIVATE -c -o getopt_long.lo.o    
/home/dogcow/work/nbsrc/tools/compat/../../lib/libc/stdlib/getopt_long.c        
                                    
In file included from /home/dogcow/work/nbsrc/tools/compat/compat_getopt.h:13,  
                 from 
/home/dogcow/work/nbsrc/tools/compat/../../lib/libc/stdlib/getopt_long.c:47:    
                                                          
/home/dogcow/work/nbsrc/tools/compat/../../include/getopt.h:68: error: 
conflicting types for 'getopt_long'                                             
         
/usr/include/getopt.h:162: error: previous declaration of 'getopt_long' was here
                                                                                
*** Failed target:  getopt_long.lo                                              
*** Failed command: cc -O -I. -I./include 
-I/home/dogcow/work/nbsrc/tools/compat 
-I/home/dogcow/work/nbsrc/tools/compat/sys -DHAVE_NBTOOL_CONFIG_H=1 
-D_FILE_OFFSET_BITS=64 -D__DBINTERFACE_PRIVATE -c -o getopt_long.lo.o 
/home/dogcow/work/nbsrc/tools/compat/../../lib/libc/stdlib/getopt_long.c        
                     
*** Error code 1                                                                

...although I must admit the logic in src/tools/compat/compat_getopt.h
confuses me; why do '#if HAVE_GETOPT_H \n #include <getopt.h> \n #endif'
if we're going to just #include "../../include/getopt.h" a few lines down?




Home | Main Index | Thread Index | Old Index