lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] Sockets API: use OS's sys/socket.h instead of lwip/sock


From: Joan Lledó
Subject: [lwip-devel] Sockets API: use OS's sys/socket.h instead of lwip/sock
Date: Sat, 20 May 2017 09:44:30 +0200

Hello,

this is a response to [1], I think this is the right place for this discussion.

> The problem I see is how would we know which things to override and which
> not? What about structs? What about function prototypes?

Yeah, you're right. I didn't think on that, and probably my solution
only works for my implementation.

The Posix standard has a list[2] of what should be declared in
sys/socket.h. If the system is providing its own sys/socket.h,
everything on that list must not be declared in lwip/sockets.h.

I think macros and structure declarations aren't a problem, but
functions... I don't know, since they have different names there
shouldn't be a problem neither. Of course, if LWIP_COMPAT_SOCKETS is
declared, then sys/sockets.h cannot be used because those function
names will be defined in libc. In my opinion, functions shouldn't be
covered by the patch.

----
[1] http://lists.nongnu.org/archive/html/lwip-users/2017-05/msg00095.html
[2] http://pubs.opengroup.org/onlinepubs/9699919799/



reply via email to

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