]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
changes needed for win32 build
authorEvan Hunt <each@isc.org>
Wed, 2 Sep 2009 18:32:25 +0000 (18:32 +0000)
committerEvan Hunt <each@isc.org>
Wed, 2 Sep 2009 18:32:25 +0000 (18:32 +0000)
lib/isc/include/isc/socket.h
lib/isc/win32/socket.c

index 8f3f398168aa185dd815103bc1425e765f8a0781..11ee408935c16d4955f71c210a931776860f5473 100644 (file)
@@ -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 && \
index b63eebe508e2e44ad734f811b4a072fa8354cf7b..459e286f000a2a2d2995233beaf6879d0f4773a3 100644 (file)
@@ -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);