lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] pylwIP - problems compiling on ubuntu 10.04


From: Simon Goldschmidt
Subject: Re: [lwip-users] pylwIP - problems compiling on ubuntu 10.04
Date: Tue, 18 Oct 2011 13:09:54 +0200

Amir Shalem <address@hidden> wrote:
> on linux / Ubuntu 10.04 I still have some problems, which I'm not sure
> what
> is the solution:
> 
> 1. struct timeval
> [..]
> But maybe this should go in unix/arch/sys_arch.h instead?

Yes, I think that would be better than adding it in every lwipopts.h (like it 
is now).

> 2. h_errno in api/netdb.c
> 
> If I don't change anything, and have LWIP_DNS_API_DECLARE_H_ERRNO defined
> the gcc compiler crashes!
> [..]
> I'm not sure what is the solution here...
> I'm guessing I will have the problem if I will enable sockets.h
> set_errno()
> as-well.

Doesn't it work if you just define LWIP_DNS_API_DECLARE_H_ERRNO to 0? If so, 
maybe that should go into the unix port as well?

> 3. missing ENSRNOTFOUND
> [..]
> lwip/src/api/netdb.c:203: error: ‘ENSRNOTFOUND’ undeclared (first use
> in
> [..]
> I'm not sure what is the correct solution here...
> Do note that this define is declared on Visual Studio2008 (and missing on
> ubuntu 10.04)

I think I remember this being reported on one of the lists. I guess there's an 
include missing on linux to the file that provides this error code. If not, you 
can just define the error codes yourself. However, in this case, the correct 
solution would probably be to split the definition of error codes in arch.h so 
that lwIP can provide the 'h_errno' error codes (for DNS) while not providing 
the 'errno' error codes.

> 4. (This is windows problem), I got re-definitions of errno macros
> [..]
> Because lwip.c code includes both <Python.h> & <lwip/sockets.h> they both
> attempt to define errno values.
> Please note that I can't #undef LWIP_PROVIDE_ERRNO, because Windows
> doesn't
> provide all macro values.

Hmm, I didn't have that problem with the win32 port, but I only included 
"windows.h", no winsock header files...

Maybe you can separate the python-related code from the lwip-related code and 
split them into separate C files? Another option would be to undef 
LWIP_PROVIDE_ERRNO and define the missing values in your cc.h file?

Simon
-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!               
Jetzt informieren: http://www.gmx.net/de/go/freephone



reply via email to

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