summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-05-27 11:54:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:06 -0500
commit30a5e1c1dc405f4cc69fd375bc1bbdfa18fc389f (patch)
tree5146c97e4984cd6adf354a642f6a61ceee5bbe3f /source4
parent9b8c012392b6810786267a2a744540fba3878f05 (diff)
downloadsamba-30a5e1c1dc405f4cc69fd375bc1bbdfa18fc389f.tar.gz
samba-30a5e1c1dc405f4cc69fd375bc1bbdfa18fc389f.tar.bz2
samba-30a5e1c1dc405f4cc69fd375bc1bbdfa18fc389f.zip
r7011: when using macros, the parameters should be specified unless its a
varargs function you are replacing. Otherwise if you have any structure element called "socket" and you have a macro for "socket" then the code will fail. (This used to be commit 9b33d0ca583b0cc1602662220cade96b70c98306)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/socket_wrapper/socket_wrapper.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/source4/lib/socket_wrapper/socket_wrapper.h b/source4/lib/socket_wrapper/socket_wrapper.h
index 6da5a2980c..d8815a2575 100644
--- a/source4/lib/socket_wrapper/socket_wrapper.h
+++ b/source4/lib/socket_wrapper/socket_wrapper.h
@@ -32,17 +32,17 @@ ssize_t swrap_sendto(int s, const void *buf, size_t len, int flags, const str
int swrap_close(int);
#ifdef SOCKET_WRAPPER_REPLACE
-#define accept swrap_accept
-#define connect swrap_connect
-#define bind swrap_bind
-#define getpeername swrap_getpeername
-#define getsockname swrap_getsockname
-#define getsockopt swrap_getsockopt
-#define setsockopt swrap_setsockopt
-#define recvfrom swrap_recvfrom
-#define sendto swrap_sendto
-#define socket swrap_socket
-#define close swrap_close
+#define accept(s,addr,addrlen) swrap_accept(s,addr,addrlen)
+#define connect(s,serv_addr,addrlen) swrap_connect(s,serv_addr,addrlen)
+#define bind(s,myaddr,addrlen) swrap_bind(s,myaddr,addrlen)
+#define getpeername(s,name,addrlen) swrap_getpeername(s,name,addrlen)
+#define getsockname(s,name,addrlen) swrap_getsockname(s,name,addrlen)
+#define getsockopt(s,level,optname,optval,optlen) swrap_getsockopt(s,level,optname,optval,optlen)
+#define setsockopt(s,level,optname,optval,optlen) swrap_setsockopt(s,level,optname,optval,optlen)
+#define recvfrom(s,buf,len,flags,from,fromlen) swrap_recvfrom(s,buf,len,flags,from,fromlen)
+#define sendto(s,buf,len,flags,to,tolen) swrap_sendto(s,buf,len,flags,to,tolen)
+#define socket(domain,type,protocol) swrap_socket(domain,type,protocol)
+#define close(s) swrap_close(s)
#endif
#endif /* __SOCKET_WRAPPER_H__ */