]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
always enable ISC_xxx_NAMES
authorTatuya JINMEI 神明達哉 <jinmei@isc.org>
Thu, 27 Mar 2008 21:08:52 +0000 (21:08 +0000)
committerTatuya JINMEI 神明達哉 <jinmei@isc.org>
Thu, 27 Mar 2008 21:08:52 +0000 (21:08 +0000)
lib/isc/task.c
lib/isc/unix/socket.c
lib/isc/win32/socket.c

index e4b9b637ee27af01bd7c78c4a49031dd240a3782..72e1c7433bc31560ec38e82b64deb5067ba16a4c 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: task.c,v 1.105 2007/06/18 23:47:44 tbox Exp $ */
+/* $Id: task.c,v 1.106 2008/03/27 21:08:51 jinmei Exp $ */
 
 /*! \file
  * \author Principal Author: Bob Halley
@@ -44,8 +44,6 @@
 #include "task_p.h"
 #endif /* ISC_PLATFORM_USETHREADS */
 
-#define ISC_TASK_NAMES 1
-
 #ifdef ISC_TASK_TRACE
 #define XTRACE(m)              fprintf(stderr, "task %p thread %lu: %s\n", \
                                       task, isc_thread_self(), (m))
@@ -90,10 +88,8 @@ struct isc_task {
        unsigned int                    quantum;
        unsigned int                    flags;
        isc_stdtime_t                   now;
-#ifdef ISC_TASK_NAMES
        char                            name[16];
        void *                          tag;
-#endif
        /* Locked by task manager lock. */
        LINK(isc_task_t)                link;
        LINK(isc_task_t)                ready_link;
@@ -203,10 +199,8 @@ isc_task_create(isc_taskmgr_t *manager, unsigned int quantum,
        task->quantum = quantum;
        task->flags = 0;
        task->now = 0;
-#ifdef ISC_TASK_NAMES
        memset(task->name, 0, sizeof(task->name));
        task->tag = NULL;
-#endif
        INIT_LINK(task, link);
        INIT_LINK(task, ready_link);
 
@@ -701,17 +695,11 @@ isc_task_setname(isc_task_t *task, const char *name, void *tag) {
 
        REQUIRE(VALID_TASK(task));
 
-#ifdef ISC_TASK_NAMES
        LOCK(&task->lock);
        memset(task->name, 0, sizeof(task->name));
        strncpy(task->name, name, sizeof(task->name) - 1);
        task->tag = tag;
        UNLOCK(&task->lock);
-#else
-       UNUSED(name);
-       UNUSED(tag);
-#endif
-
 }
 
 const char *
index e66ce9a97f74b2be2534c5b063912828b7281eae..5192576b70c107e6c3d7f662c1596ef3c28063c2 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: socket.c,v 1.279 2008/01/27 01:58:19 marka Exp $ */
+/* $Id: socket.c,v 1.280 2008/03/27 21:08:51 jinmei Exp $ */
 
 /*! \file */
 
 #include "socket_p.h"
 #endif /* ISC_PLATFORM_USETHREADS */
 
-/*
- * Support names for sockets.
- */
-#define ISC_SOCKET_NAMES 1
-
-
 #if defined(SO_BSDCOMPAT) && defined(__linux__)
 #include <sys/utsname.h>
 #endif
@@ -166,11 +160,8 @@ struct isc_socket {
        unsigned int            references;
        int                     fd;
        int                     pf;
-
-#ifdef ISC_SOCKET_NAMES
        char                            name[16];
        void *                          tag;
-#endif
 
        ISC_LIST(isc_socketevent_t)             send_list;
        ISC_LIST(isc_socketevent_t)             recv_list;
@@ -1696,10 +1687,8 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
        }
 #endif /* defined(USE_CMSG) || defined(SO_RCVBUF) */
 
-#ifdef ISC_SOCKET_NAMES
        memset(sock->name, 0, sizeof(sock->name));
        sock->tag = NULL;
-#endif
 
        sock->references = 1;
        *socketp = sock;
@@ -4048,17 +4037,11 @@ isc_socket_setname(isc_socket_t *socket, const char *name, void *tag) {
 
        REQUIRE(VALID_SOCKET(socket));
 
-#ifdef ISC_SOCKET_NAMES
        LOCK(&socket->lock);
        memset(socket->name, 0, sizeof(socket->name));
        strncpy(socket->name, name, sizeof(socket->name) - 1);
        socket->tag = tag;
        UNLOCK(&socket->lock);
-#else
-       UNUSED(name);
-       UNUSED(tag);
-#endif
-
 }
 
 const char *
index 5a4d6743ec0b61cc579104f6d2bf836fedee169b..2d19dd109699c02a578a9bb7a9c2c99926bd2488 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: socket.c,v 1.52 2007/08/28 00:39:15 marka Exp $ */
+/* $Id: socket.c,v 1.53 2008/03/27 21:08:52 jinmei Exp $ */
 
 /* This code has been rewritten to take advantage of Windows Sockets
  * I/O Completion Ports and Events. I/O Completion Ports is ONLY
@@ -92,8 +92,6 @@
 
 #include "errno2result.h"
 
-#define ISC_SOCKET_NAMES 1
-
 /*
  * Define this macro to control the behavior of connection
  * resets on UDP sockets.  See Microsoft KnowledgeBase Article Q263823
@@ -226,11 +224,8 @@ struct isc_socket {
        unsigned int            references;
        SOCKET                  fd;
        int                     pf;
-
-#ifdef ISC_SOCKET_NAMES   
        char                    name[16];
        void *                  tag;
-#endif
 
        ISC_LIST(isc_socketevent_t)             send_list;
        ISC_LIST(isc_socketevent_t)             recv_list;
@@ -3865,17 +3860,11 @@ isc_socket_setname(isc_socket_t *socket, const char *name, void *tag) {
 
        REQUIRE(VALID_SOCKET(socket));
 
-#ifdef ISC_SOCKET_NAMES
        LOCK(&socket->lock);
        memset(socket->name, 0, sizeof(socket->name));
        strncpy(socket->name, name, sizeof(socket->name) - 1);
        socket->tag = tag;
        UNLOCK(&socket->lock);
-#else
-       UNUSED(name);
-       UNUSED(tag);
-#endif
-
 }
 
 const char *