bug-gnulib
[Top][All Lists]
Advanced

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

Re: HAVE_RELIABLE_FIONREAD & ioctl


From: Sam Steingold
Subject: Re: HAVE_RELIABLE_FIONREAD & ioctl
Date: Thu, 21 Jul 2011 10:01:12 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> * Bruno Haible <address@hidden> [2011-07-21 02:19:07 +0200]:
>
>> I pulled ioctl module from gnulib because of a compilation error about
>> "ioctl_used_without_requesting_gnulib_ioctl" and I am wondering whether
>> the HAVE_RELIABLE_FIONREAD et al are still relevant.
>
> The problem that clisp/src/m4/ioctl.m4 tests against is fixed in Solaris 7
> and newer, but is present in Solaris 2.6, FreeBSD 6.4, IRIX 6.5.

are they still "porting targets"?
could you please move this to gnulib from clisp?

>> Also, I get this error on linux:
>> 
>> /home/sds/src/clisp/sf/clisp/build-g-gxx/gllib/sys/ioctl.h:361: error:
>> declaration of C function 'int ioctl(int, int, ...)' conflicts with
>> /usr/include/sys/ioctl.h:42: error: previous declaration 'int
>> ioctl(int, long unsigned int, ...)' here
>> make: *** [spvw.o] Error 1
>> 
>> (after I removed the ioctl declaration from unix.h)
>> what's wrong?
>
> In this situation (on Linux, which has the non-POSIX declaration for ioctl())
> REPLACE_IOCTL should be set to 1 by config.status, so that gllib/sys/ioctl.h
> provides a declaration for rpl_ioctl, not ioctl. Somehow this is not 
> happening.
> Can you look in config.status what is the value of REPLACE_IOCTL? And if it is
> 0, look up in config.log the details of "checking for ioctl with POSIX 
> signature ..."

g++ -I/home/sds/src/top/include  
-I/home/sds/src/clisp/sf/clisp/build-g-gxx/gllib -W -Wswitch -Wcomment 
-Wpointer-arith -Wimplicit -Wreturn-type -Wno-sign-compare 
-Wno-format-nonliteral -Wno-invalid-offsetof -falign-functions=4 -g -O0 
-DDEBUG_OS_ERROR -DDEBUG_SPVW -DDEBUG_BYTECODE -DSAFETY=3 -DDEBUG_GCSAFETY 
-DENABLE_UNICODE -DDYNAMIC_FFI -I. -c spvw.c
/home/sds/src/clisp/sf/clisp/build-g-gxx/gllib/sys/ioctl.h:361: error: 
declaration of C function 'int ioctl(int, int, ...)' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here

$ grep REPLACE_IOCTL config.status
S["REPLACE_IOCTL"]="0"

configure:13347: checking for sys/ioctl.h
configure:13347: g++ -c   conftest.c >&5
configure:13347: $? = 0
configure:13347: result: yes
configure:22829: checking for ioctl
configure:22829: g++ -o conftest    conftest.c  >&5
configure:22829: $? = 0
configure:22829: result: yes
configure:22838: checking for ioctl with POSIX signature
configure:22855: g++ -c   conftest.c >&5
configure:22855: $? = 0
configure:22863: result: yes
configure:27876: checking whether <sys/ioctl.h> declares ioctl
configure:27893: g++ -c   conftest.c >&5
configure:27893: $? = 0
configure:27901: result: yes
configure:27971: checking whether ioctl is declared without a macro
configure:27993: g++ -c   conftest.c >&5
configure:27993: $? = 0
configure:28001: result: yes
configure:36146: checking for ioctl
configure:36146: result: yes
configure:36182: checking for ioctl declaration
configure:36204: g++ -c  -I/home/sds/src/top/include conftest.c >&5
configure:36204: $? = 0
configure:36235: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:466: error: declaration of C function 'char* ioctl()' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36235: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, unsigned int, 
char*)' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, int, char*)' 
conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, long unsigned 
int, char*)' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, long int, 
char*)' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, size_t, 
char*)' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, socklen_t, 
char*)' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, unsigned int, 
void*)' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, int, void*)' 
conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, long unsigned 
int, void*)' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, long int, 
void*)' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, size_t, 
void*)' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, socklen_t, 
void*)' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, unsigned int, .
..)' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, int, ...)' 
conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
configure:36267: $? = 0
configure:36296: result: extern int ioctl (int, unsigned long, ...);

$ grep IOCTL config.h
#define GNULIB_TEST_IOCTL 1
#define HAVE_IOCTL 1
#define HAVE_RAW_DECL_IOCTL 1
#define HAVE_SYS_IOCTL_H 1
/* #undef IOCTL_ARGUMENT_T */
#define IOCTL_DOTS /**/
#define IOCTL_REQUEST_T unsigned long
#define NEED_SYS_IOCTL_H /**/
#define WINSIZE_NEED_SYS_IOCTL_H /**/


-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://truepeace.org http://dhimmi.com http://www.memritv.org
http://jihadwatch.org http://memri.org http://camera.org
Press any key to continue or any other key to quit.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]