From c1260b0e7ccda55b1ab20f59e9c271e8f4576d40 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 31 Jan 2011 17:36:49 -0500 Subject: [PATCH 1/2] Do not check for gethostbyname_r versions if we have getaddrinfo --- configure.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.in b/configure.in index b14a420c..bbed4b94 100644 --- a/configure.in +++ b/configure.in @@ -201,6 +201,8 @@ AC_HEADER_TIME dnl Checks for library functions. AC_CHECK_FUNCS(gettimeofday vasprintf fcntl clock_gettime strtok_r strsep getaddrinfo getnameinfo strlcpy inet_ntop inet_pton signal sigaction strtoll inet_aton pipe eventfd sendfile mmap splice arc4random arc4random_buf issetugid geteuid getegid getservbyname getprotobynumber setenv unsetenv putenv) +if test "$ac_cv_func_getaddrinfo" != "yes" ; then + # Check for gethostbyname_r in all its glorious incompatible versions. # (This is cut-and-pasted from Tor, which based its logic on # Python's configure.in.) @@ -257,6 +259,7 @@ AC_CHECK_FUNC(gethostbyname_r, [ CFLAGS=$OLD_CFLAGS ]) +fi AC_CHECK_SIZEOF(long) From b4f89b608acfdaafb3c14d753a5055ca9f291182 Mon Sep 17 00:00:00 2001 From: Dave Hart Date: Tue, 1 Feb 2011 01:15:48 -0500 Subject: [PATCH 2/2] Fix test.sh output on solaris Solaris echo -n doesn't omit newlines, but printf omits newlines in more places. --- test/test.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/test/test.sh b/test/test.sh index 48deb9b1..0054faee 100755 --- a/test/test.sh +++ b/test/test.sh @@ -7,12 +7,18 @@ then TEST_OUTPUT_FILE=/dev/null fi -# /bin/echo is a little more likely to support -n than sh's builtin echo. -if test -x /bin/echo +# /bin/echo is a little more likely to support -n than sh's builtin echo, +# printf is even more likely +if test "`printf hello 2>&1`" = "hello" then - ECHO=/bin/echo + ECHO_N="printf" else - ECHO=echo + if test -x /bin/echo + then + ECHO_N="/bin/echo -n" + else + ECHO_N="echo -n" + fi fi if test "$TEST_OUTPUT_FILE" != "/dev/null" @@ -45,7 +51,7 @@ announce () { } announce_n () { - $ECHO -n "$@" + $ECHO_N "$@" echo "$@" >>"$TEST_OUTPUT_FILE" }