2001-11-29 14:49:35

by jarmo

[permalink] [raw]
Subject: My previous question about iwlib

I'm sorry,if my previous message was incorrect about iwlib maintaining...
Suppose this example lights more than my words what I want to ask.

gcc -O2 -Wall -DGLIBC_HEADERS -c iwlib.c
In file included from iwlib.c:11:
iwlib.h:91:8: warning: extra tokens at end of #endif directive
iwlib.h:96:8: warning: extra tokens at end of #endif directive
In file included from iwlib.h:42,
from iwlib.c:11:
/usr/include/linux/in.h:25: conflicting types for `IPPROTO_IP'
/usr/include/netinet/in.h:32: previous declaration of `IPPROTO_IP'
/usr/include/linux/in.h:26: conflicting types for `IPPROTO_ICMP'
/usr/include/netinet/in.h:36: previous declaration of `IPPROTO_ICMP'
/usr/include/linux/in.h:27: conflicting types for `IPPROTO_IGMP'
/usr/include/netinet/in.h:38: previous declaration of `IPPROTO_IGMP'
/usr/include/linux/in.h:28: conflicting types for `IPPROTO_IPIP'
/usr/include/netinet/in.h:40: previous declaration of `IPPROTO_IPIP'
/usr/include/linux/in.h:29: conflicting types for `IPPROTO_TCP'
/usr/include/netinet/in.h:42: previous declaration of `IPPROTO_TCP'
/usr/include/linux/in.h:30: conflicting types for `IPPROTO_EGP'
/usr/include/netinet/in.h:44: previous declaration of `IPPROTO_EGP'
/usr/include/linux/in.h:31: conflicting types for `IPPROTO_PUP'
/usr/include/netinet/in.h:46: previous declaration of `IPPROTO_PUP'
/usr/include/linux/in.h:32: conflicting types for `IPPROTO_UDP'
/usr/include/netinet/in.h:48: previous declaration of `IPPROTO_UDP'
/usr/include/linux/in.h:33: conflicting types for `IPPROTO_IDP'
/usr/include/netinet/in.h:50: previous declaration of `IPPROTO_IDP'
/usr/include/linux/in.h:34: conflicting types for `IPPROTO_RSVP'
/usr/include/netinet/in.h:60: previous declaration of `IPPROTO_RSVP'
/usr/include/linux/in.h:35: conflicting types for `IPPROTO_GRE'
/usr/include/netinet/in.h:62: previous declaration of `IPPROTO_GRE'
/usr/include/linux/in.h:37: conflicting types for `IPPROTO_IPV6'
/usr/include/netinet/in.h:54: previous declaration of `IPPROTO_IPV6'
/usr/include/linux/in.h:39: conflicting types for `IPPROTO_PIM'
/usr/include/netinet/in.h:78: previous declaration of `IPPROTO_PIM'
/usr/include/linux/in.h:41: conflicting types for `IPPROTO_ESP'
/usr/include/netinet/in.h:64: previous declaration of `IPPROTO_ESP'
/usr/include/linux/in.h:42: conflicting types for `IPPROTO_AH'
/usr/include/netinet/in.h:66: previous declaration of `IPPROTO_AH'
/usr/include/linux/in.h:43: conflicting types for `IPPROTO_COMP'
/usr/include/netinet/in.h:80: previous declaration of `IPPROTO_COMP'
/usr/include/linux/in.h:45: conflicting types for `IPPROTO_RAW'
/usr/include/netinet/in.h:82: previous declaration of `IPPROTO_RAW'
/usr/include/linux/in.h:47: conflicting types for `IPPROTO_MAX'
/usr/include/netinet/in.h:85: previous declaration of `IPPROTO_MAX'
/usr/include/linux/in.h:51: redefinition of `struct in_addr'
/usr/include/linux/in.h:92: redefinition of `struct ip_mreq'
/usr/include/linux/in.h:98: redefinition of `struct ip_mreqn'
/usr/include/linux/in.h:105: redefinition of `struct in_pktinfo'
/usr/include/linux/in.h:113: redefinition of `struct sockaddr_in'
iwlib.c: In function `iw_sockets_open':
iwlib.c:46: warning: implicit declaration of function `socket'
make: [iwlib.o] Error 1 (ignored)
rm -f libiw.a
ar cru libiw.a iwlib.o
ar: iwlib.o: No such file or directory
make: [libiw.a] Error 1 (ignored)
ranlib libiw.a
ranlib: libiw.a: No such file or directory
make: [libiw.a] Error 9 (ignored)
gcc -O2 -shared -o libiw.so.22 -Wl,-soname,libiw.so.22 -lm -lc iwlib.o
gcc: iwlib.o: No such file or directory

As I have no knowledge of code,asked wireless-tools maintainer what's wrong
got answer,what I wrote in my previous message.....

So coul someone enlight me what to do....

jarmo
[email protected]




2001-11-29 18:04:05

by Petr Vandrovec

[permalink] [raw]
Subject: Re: My previous question about iwlib

On 29 Nov 01 at 16:49, jarmo kettunen wrote:
>
> gcc -O2 -Wall -DGLIBC_HEADERS -c iwlib.c
> In file included from iwlib.c:11:
> iwlib.h:91:8: warning: extra tokens at end of #endif directive
> iwlib.h:96:8: warning: extra tokens at end of #endif directive
> In file included from iwlib.h:42,
> from iwlib.c:11:
> /usr/include/linux/in.h:25: conflicting types for `IPPROTO_IP'
> /usr/include/netinet/in.h:32: previous declaration of `IPPROTO_IP'

iwlib.h (or any other userspace app) must not include <linux/*> and
<asm/*> files. If it needs access to them for accessing ioctl API
(or anything else), maintainer must create stripped-down copy of
these headers, and distribute them with app - which is btw only
correct way, as otherwise you cannot create userspace app which
will support more than one API version (and iw used couple
of incompatible APIs in the past...).
Best regards,
Petr Vandrovec
[email protected]

2001-11-30 05:36:22

by jarmo

[permalink] [raw]
Subject: Vs: Re: My previous question about iwlib


----- Original Message -----
From: Petr Vandrovec <[email protected]>
To: jarmo kettunen <[email protected]>
Cc: <[email protected]>
Sent: Thursday, November 29, 2001 9:02 PM
Subject: Re: My previous question about iwlib


> > gcc -O2 -Wall -DGLIBC_HEADERS -c iwlib.c
> > In file included from iwlib.c:11:

these headers, and distribute them with app - which is btw only
> correct way, as otherwise you cannot create userspace app which
> will support more than one API version (and iw used couple
> of incompatible APIs in the past...).
> Best regards,
> Petr Vandrovec
> [email protected]
Thank for reply

Problem found and corrected...Suppose to get rid of old eyeglases..Buy
new with gain 7..-)
Or cosider to syop by some reading cource....

I was too heated to get new stuff on production and read too hastly
documents.
In makefile was possibility to choose right version of glibc...When found
that..voila'.
Thanks for partisipating....

Jarmo