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

Re: Header file errors.




I have fixed number 1 and 3 in our CVS so the next release
will have those fixed.
Don't know the best way to solve number 2 though.

You really should make these changes in prefix/libs/uC-libc
and not just in eroot/include since the eroot version is installed from
libs/uC-libc.

/Johan


----- Original Message -----
From: Mark Schapira <mschapira@xxxxxxx.com>
To: <dev-etrax@xxxxxxx.com>
Sent: Monday, May 07, 2001 4:41 PM
Subject: Header file errors.


> In the course of recompiling my application for the ETRAX100-LX board
> running under kernel 2.4.3 I found and "fixed" a few problems by making
> changes to some of the header files in; /prefix/eroot/include/uC-libc/  .
> My application is written in C++ rather than C, which might be the cause
> for these problems.
>
> 1. In the file stdlib.h,  the prototype for bsearch was missing which
> caused a compiler error.  I added the following prototype:
> extern void *bsearch __P  ((__const void *key,__const *void *base, size_t
> num. size_t size, int (*cmp) (__const void *,const void*)));
> and was able to compile and run my program.
>
> 2. In the file bits/in.h,
> struct ip_opts
> {
>     struct in_addr ip_dst;
>     char ip_opts[40];
> };
>
> causes a problem when compiling for c++
>
> I changed this to :
> struct ip_opts
> {
>     struct in_addr ip_dst;
>     char ipp_opts[40];
> };
>
> and I was able to compile and run my application.
> I realize that if there is a software module that uses struct ip_opts,
this
> will cause the application to break.
>
> 3. There is a C, C++ linkage conflict that arises because herror is
> prototyped in 2 places in netdb.h
> The first place is at about line 146 and the second is at about line 173.
> I commented out the prototype and line 146 and I was able to compile and
> run my application.
>
> Should these changes also be made to /prefix/libs/uC-libc/   ?
>
> Mark Schapira
>
>
>