INN commit: branches/2.5 (5 files)
INN Commit
rra at isc.org
Fri Aug 19 15:16:19 UTC 2011
Date: Friday, August 19, 2011 @ 08:16:19
Author: iulius
Revision: 9352
backport changes from rra-c-util 3.7
* tests/Makefile: add support for "make tests" in the tests directory.
* tests/Makefile: add support for $SOURCE and $BUILD in runtests.
* lib/messages.c: add a flush at the end of message_log_stdout.
* lib/mkstemp.c: add a check for (errno != EISDIR).
* lib/network.c: typo.
* lib/snprintf.c: remove the HAVE_LONG_DOUBLE check. All modern compilers
have "long double".
Modified:
branches/2.5/lib/messages.c
branches/2.5/lib/mkstemp.c
branches/2.5/lib/network.c
branches/2.5/lib/snprintf.c
branches/2.5/tests/Makefile
----------------+
lib/messages.c | 1 +
lib/mkstemp.c | 2 +-
lib/network.c | 2 +-
lib/snprintf.c | 5 +----
tests/Makefile | 7 ++++---
5 files changed, 8 insertions(+), 9 deletions(-)
Modified: lib/messages.c
===================================================================
--- lib/messages.c 2011-08-19 15:09:48 UTC (rev 9351)
+++ lib/messages.c 2011-08-19 15:16:19 UTC (rev 9352)
@@ -132,6 +132,7 @@
if (err)
fprintf(stdout, ": %s", strerror(err));
fprintf(stdout, "\n");
+ fflush(stdout);
}
Modified: lib/mkstemp.c
===================================================================
--- lib/mkstemp.c 2011-08-19 15:09:48 UTC (rev 9351)
+++ lib/mkstemp.c 2011-08-19 15:16:19 UTC (rev 9352)
@@ -67,7 +67,7 @@
working /= 62;
}
fd = open(template, O_RDWR | O_CREAT | O_EXCL, 0600);
- if (fd >= 0 || errno != EEXIST)
+ if (fd >= 0 || (errno != EEXIST && errno != EISDIR))
return fd;
/* This is a relatively random increment. Cut off the tail end of
Modified: lib/network.c
===================================================================
--- lib/network.c 2011-08-19 15:09:48 UTC (rev 9351)
+++ lib/network.c 2011-08-19 15:16:19 UTC (rev 9352)
@@ -252,7 +252,7 @@
syswarn("cannot set IPv6 socket to v6only");
#endif
- /* Accept "any" or "all" in the bind address to mean 0.0.0.0. */
+ /* Accept "any" or "all" in the bind address to mean ::. */
if (!strcmp(address, "any") || !strcmp(address, "all"))
address = "::";
Modified: lib/snprintf.c
===================================================================
--- lib/snprintf.c 2011-08-19 15:09:48 UTC (rev 9351)
+++ lib/snprintf.c 2011-08-19 15:16:19 UTC (rev 9352)
@@ -107,11 +107,8 @@
#define VA_SHIFT(v,t) ; /* no-op for ANSI */
#define VA_END va_end(ap)
-#ifdef HAVE_LONG_DOUBLE
+/* Assume all compilers support long double, per Autoconf documentation. */
#define LDOUBLE long double
-#else
-#define LDOUBLE double
-#endif
#ifdef HAVE_LONG_LONG_INT
# define LLONG long long
Modified: tests/Makefile
===================================================================
--- tests/Makefile 2011-08-19 15:09:48 UTC (rev 9351)
+++ tests/Makefile 2011-08-19 15:16:19 UTC (rev 9352)
@@ -2,8 +2,9 @@
include ../Makefile.global
-top = ..
-CFLAGS = $(GCFLAGS) -I.
+top = ..
+RUNTESTS_CFLAGS = -DSOURCE='"$(abs_builddir)/tests"' -DBUILD='"$(abs_builddir)/tests"'
+CFLAGS = $(GCFLAGS) $(RUNTESTS_CFLAGS) -I.
## The tests that need to be built. Tests in the form of shell scripts
## or some other form that doesn't require compiling shouldn't be in this
@@ -25,7 +26,7 @@
EXTRA = runtests clients/server-list lib/setenv.tr lib/xmalloc
-all check test: $(TESTS) $(EXTRA)
+all check test tests: $(TESTS) $(EXTRA)
./runtests TESTS
build: $(TESTS) $(EXTRA)
More information about the inn-committers
mailing list