]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2339. [port] tru64: support for libbind. [RT #17589]
authorMark Andrews <marka@isc.org>
Thu, 28 Feb 2008 05:36:11 +0000 (05:36 +0000)
committerMark Andrews <marka@isc.org>
Thu, 28 Feb 2008 05:36:11 +0000 (05:36 +0000)
lib/bind/isc/logging.c
lib/bind/port_before.h.in

index b2daff40a41b8c97e643224368e01ee9d66e3862..420411454d435c31451f27bec7b18cd218b59791 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: logging.c,v 1.7 2005/04/27 04:56:38 sra Exp $";
+static const char rcsid[] = "$Id: logging.c,v 1.8 2008/02/28 05:36:10 marka Exp $";
 #endif /* not lint */
 
 #include "port_before.h"
@@ -43,12 +43,6 @@ static const char rcsid[] = "$Id: logging.c,v 1.7 2005/04/27 04:56:38 sra Exp $"
 
 #include "port_after.h"
 
-#ifdef VSPRINTF_CHAR
-# define VSPRINTF(x) strlen(vsprintf/**/x)
-#else
-# define VSPRINTF(x) ((size_t)vsprintf x)
-#endif
-
 #include "logging_p.h"
 
 static const int syslog_priority[] = { LOG_DEBUG, LOG_INFO, LOG_NOTICE,
@@ -363,8 +357,8 @@ log_vwrite(log_context lc, int category, int level, const char *format,
                        continue;
 
                if (!did_vsprintf) {
-                       if (VSPRINTF((lc->buffer, format, args)) >
-                           (size_t)LOG_BUFFER_SIZE) {
+                       (void)vsprintf(lc->buffer, format, args);
+                       if (strlen(lc->buffer) > (size_t)LOG_BUFFER_SIZE) {
                                syslog(LOG_CRIT,
                                       "memory overrun in log_vwrite()");
                                exit(1);
index 5dc982b342b8b00e403aa16c92f35e20a4aabc9d..44b6e1e81e501ba3cc4c41738f5d60bd5e212ad8 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: port_before.h.in,v 1.30 2008/02/28 05:34:17 marka Exp $ */
+/* $Id: port_before.h.in,v 1.31 2008/02/28 05:36:10 marka Exp $ */
 
 #ifndef port_before_h
 #define port_before_h
 #include <config.h>
 
+#ifdef NEED_SUN4PROTOS
+#define _PARAMS(x) x
+#endif
+
 struct group;           /* silence warning */
 struct passwd;          /* silence warning */
 struct timeval;         /* silence warning */