From f0eecd4d62a8f51eca4cf6d20e8a78d3c2f61d81 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Wed, 2 Sep 2009 18:32:25 +0000 Subject: [PATCH] changes needed for win32 build --- lib/isc/include/isc/socket.h | 12 ++++++++++-- lib/isc/win32/socket.c | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/isc/include/isc/socket.h b/lib/isc/include/isc/socket.h index 8f3f398168..11ee408935 100644 --- a/lib/isc/include/isc/socket.h +++ b/lib/isc/include/isc/socket.h @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.h,v 1.91 2009/09/01 23:47:44 tbox Exp $ */ +/* $Id: socket.h,v 1.92 2009/09/02 18:32:25 each Exp $ */ #ifndef ISC_SOCKET_H #define ISC_SOCKET_H 1 @@ -296,16 +296,22 @@ typedef struct isc_socketmethods { * This structure is actually just the common prefix of a socket manager * object implementation's version of an isc_socketmgr_t. * \brief - * Direct use of this structure by clients is forbidden. mctx implementations + * Direct use of this structure by clients is forbidden. socket implementations * may change the structure. 'magic' must be ISCAPI_SOCKETMGR_MAGIC for any * of the isc_socket_ routines to work. socket implementations must maintain * all socket invariants. + * In effect, this definition is used only for non-BIND9 version ("export") + * of the library, and the export version does not work for win32. So, to avoid + * the definition conflict with win32/socket.c, we enable this definition only + * for non-Win32 (i.e. Unix) platforms. */ +#ifndef WIN32 struct isc_socketmgr { unsigned int impmagic; unsigned int magic; isc_socketmgrmethods_t *methods; }; +#endif #define ISCAPI_SOCKETMGR_MAGIC ISC_MAGIC('A','s','m','g') #define ISCAPI_SOCKETMGR_VALID(m) ((m) != NULL && \ @@ -315,11 +321,13 @@ struct isc_socketmgr { * This is the common prefix of a socket object. The same note as * that for the socketmgr structure applies. */ +#ifndef WIN32 struct isc_socket { unsigned int impmagic; unsigned int magic; isc_socketmethods_t *methods; }; +#endif #define ISCAPI_SOCKET_MAGIC ISC_MAGIC('A','s','c','t') #define ISCAPI_SOCKET_VALID(s) ((s) != NULL && \ diff --git a/lib/isc/win32/socket.c b/lib/isc/win32/socket.c index b63eebe508..459e286f00 100644 --- a/lib/isc/win32/socket.c +++ b/lib/isc/win32/socket.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.c,v 1.77 2009/09/01 00:22:28 jinmei Exp $ */ +/* $Id: socket.c,v 1.78 2009/09/02 18:32:25 each Exp $ */ /* This code uses functions which are only available on Server 2003 and * higher, and Windows XP and higher. @@ -3675,7 +3675,7 @@ isc__socketmgr_setreserved(isc_socketmgr_t *manager, isc_uint32_t reserved) { } void -isc__socketmgr_maxudp(isc_socketmgr_t *manager, int maxudp) { +isc___socketmgr_maxudp(isc_socketmgr_t *manager, int maxudp) { UNUSED(manager); UNUSED(maxudp);