From 48d91662dffd0a7f2cc420c8b2746dc1b59e10bb Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Fri, 20 Nov 2009 17:38:00 +0000 Subject: [PATCH] Various compilation and unit test fixes. --- configure.ac | 2 +- msvc/config.h | 5 ++--- test/check-build | 46 +++++++++++++++++++++++----------------------- test/zznop.c | 1 + 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/configure.ac b/configure.ac index 66fdcc3..feaeade 100644 --- a/configure.ac +++ b/configure.ac @@ -21,7 +21,7 @@ case "$shrext_cmds" in *) SONAME="libzzuf$shrext_cmds" ;; esac AC_MSG_RESULT($SONAME) -AC_SUBST(SONAME) +AC_DEFINE_UNQUOTED(SONAME, "$SONAME", [Define to the libzzuf full name]) # Optimizations AC_TRY_CFLAGS(-g -O2, CFLAGS="${CFLAGS} -g -O2") diff --git a/msvc/config.h b/msvc/config.h index 2f8d973..5c834b4 100644 --- a/msvc/config.h +++ b/msvc/config.h @@ -21,11 +21,10 @@ #define ATTRIBUTE_PRINTF(x,y) -#define HAVE_WINDOWS_H 1 -#define HAVE_WINSOCK2_H 1 #define HAVE_IO_H 1 #define HAVE_PROCESS_H 1 - +#define HAVE_WINDOWS_H 1 +#define HAVE_WINSOCK2_H 1 #define HAVE__PIPE /* Win32-specific, of course. */ diff --git a/test/check-build b/test/check-build index d2bf69a..5c39351 100755 --- a/test/check-build +++ b/test/check-build @@ -1,23 +1,23 @@ -#!/bin/sh - -failure=0 - -config_h_in=$(dirname "$0")/../config.h.in -win32_config_h=$(dirname "$0")/../win32/config.h - -for key in $(sed -ne 's/.*#undef *\([A-Za-z0-9_]*\).*/\1/p' "$config_h_in"); -do - if ! grep '[ef] \<'"$key"'\>' "$win32_config_h" >/dev/null 2>&1; then - echo "error: $key missing from win32/config.h" - failure=1 - fi -done - -if test "$failure" != "0"; then - exit 1 -else - echo "0 errors in Win32 config.h" -fi - -exit 0 - +#!/bin/sh + +failure=0 + +config_h_in=$(dirname "$0")/../config.h.in +msvc_config_h=$(dirname "$0")/../msvc/config.h + +for key in $(sed -ne 's/.*#undef *\([A-Za-z0-9_]*\).*/\1/p' "$config_h_in"); +do + if ! grep '[ef] \<'"$key"'\>' "$msvc_config_h" >/dev/null 2>&1; then + echo "error: $key missing from msvc/config.h" + failure=1 + fi +done + +if test "$failure" != "0"; then + exit 1 +else + echo "0 errors in Win32 config.h" +fi + +exit 0 + diff --git a/test/zznop.c b/test/zznop.c index bc6bb25..8745e0b 100644 --- a/test/zznop.c +++ b/test/zznop.c @@ -15,6 +15,7 @@ #include "config.h" #include +#include #if defined HAVE_WINDOWS_H # include