[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [patch #5777] Avoid OS functions'names conflit with some so
From: |
Frédéric Bernon |
Subject: |
[lwip-devel] [patch #5777] Avoid OS functions'names conflit with some sockets.h names... |
Date: |
Sun, 04 Mar 2007 13:32:41 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2 |
URL:
<http://savannah.nongnu.org/patch/?5777>
Summary: Avoid OS functions'names conflit with some
sockets.h names...
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: fbernon
Submitted on: dimanche 04.03.2007 à 14:32
Category: None
Priority: 5 - Normal
Status: In Progress
Privacy: Public
Assigned to: fbernon
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
In the forum's thread "LWIP_COMPAT_SOCKETS in sockets.h" (September 2006). I
suggest to add a new define to avoid to have function names's conflits with
some sockets.h functions, and some operating system's IO function (read,
write and close).
So, I would like to include a define LWIP_POSIX_SOCKETS_IO_NAMES (default
value will be 1) to avoid this problem when using Lwip with a posix operating
system. The code will be something like :
#if LWIP_COMPAT_SOCKETS
#define accept(a,b,c) lwip_accept(a,b,c)
#define bind(a,b,c) lwip_bind(a,b,c)
#define shutdown(a,b) lwip_shutdown(a,b)
#define closesocket(s) lwip_close(s)
#define connect(a,b,c) lwip_connect(a,b,c)
#define getsockname(a,b,c) lwip_getsockname(a,b,c)
#define getpeername(a,b,c) lwip_getpeername(a,b,c)
#define setsockopt(a,b,c,d,e) lwip_setsockopt(a,b,c,d,e)
#define getsockopt(a,b,c,d,e) lwip_getsockopt(a,b,c,d,e)
#define listen(a,b) lwip_listen(a,b)
#define recv(a,b,c,d) lwip_recv(a,b,c,d)
#define recvfrom(a,b,c,d,e,f) lwip_recvfrom(a,b,c,d,e,f)
#define send(a,b,c,d) lwip_send(a,b,c,d)
#define sendto(a,b,c,d,e,f) lwip_sendto(a,b,c,d,e,f)
#define socket(a,b,c) lwip_socket(a,b,c)
#define select(a,b,c,d,e) lwip_select(a,b,c,d,e)
#define ioctlsocket(a,b,c) lwip_ioctl(a,b,c)
#if defined(LWIP_POSIX_SOCKETS_IO_NAMES) && (LWIP_POSIX_SOCKETS_IO_NAMES >
0)
#define read(a,b,c) lwip_read(a,b,c)
#define write(a,b,c) lwip_write(a,b,c)
#define close(s) lwip_close(s)
#endif /* LWIP_POSIX_SOCKETS_IO_NAMES */
#endif /* LWIP_COMPAT_SOCKETS */
Is it good for you ?
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?5777>
_______________________________________________
Message posté via/par Savannah
http://savannah.nongnu.org/
- [lwip-devel] [patch #5777] Avoid OS functions'names conflit with some sockets.h names...,
Frédéric Bernon <=