[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [patch #9350] Sockets API: use OS's sys/socket.h instead of
From: |
Joan Lledó |
Subject: |
[lwip-devel] [patch #9350] Sockets API: use OS's sys/socket.h instead of lwip/sock |
Date: |
Tue, 23 May 2017 03:12:38 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 |
Follow-up Comment #5, patch #9350 (project lwip):
> Do you really think? I thought we could just move all defines and
> typedefs to one region (which is left out in your case) and have
> the function definitions always included and it should work?
Yeah, it should work, what I meant is it doesn't allow the user to provide its
own sys/socket.h w/o changes in LwIP.
> And if you don't make it without changes, we should at least try to
> only require changing API files, not core files like ip.h
Well, that's an easier target. I wrote a new patch that creates a new header
and doesn't include it if LWIP_SYS_SOCKET is defined. The new header only
includes the items in the POSIX standard, so it works and pass the tests if
the user doesn't define LWIP_SYS_SOCKET, but the user has to remove manually
the other conflicting macros and structs if s/he defines it.
> We'd have to fix the odd implicit dependency from ip.h to sockets.h of
course.
I don't know how to do this. In the patch, the solution is a bit tricky: if
the user doesn't define LWIP_SYS_SOCKET, then the new header takes the values
from ip.h, otherwise, the dependency is inverted and ip.h is getting the
values from the OS's sys/socket.h. Any better idea?
(file #40766)
_______________________________________________________
Additional Item Attachment:
File name: 0001-Sockets-API-use-OS-s-sys-socket.h-instead-of-lwip-so.patch
Size:15 KB
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?9350>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/