Various compilation and unit test fixes.

This commit is contained in:
Sam Hocevar 2009-11-20 17:38:00 +00:00 committed by sam
parent 5887dac5b1
commit 48d91662df
4 changed files with 27 additions and 27 deletions

View File

@ -21,7 +21,7 @@ case "$shrext_cmds" in
*) SONAME="libzzuf$shrext_cmds" ;; *) SONAME="libzzuf$shrext_cmds" ;;
esac esac
AC_MSG_RESULT($SONAME) AC_MSG_RESULT($SONAME)
AC_SUBST(SONAME) AC_DEFINE_UNQUOTED(SONAME, "$SONAME", [Define to the libzzuf full name])
# Optimizations # Optimizations
AC_TRY_CFLAGS(-g -O2, CFLAGS="${CFLAGS} -g -O2") AC_TRY_CFLAGS(-g -O2, CFLAGS="${CFLAGS} -g -O2")

View File

@ -21,11 +21,10 @@
#define ATTRIBUTE_PRINTF(x,y) #define ATTRIBUTE_PRINTF(x,y)
#define HAVE_WINDOWS_H 1
#define HAVE_WINSOCK2_H 1
#define HAVE_IO_H 1 #define HAVE_IO_H 1
#define HAVE_PROCESS_H 1 #define HAVE_PROCESS_H 1
#define HAVE_WINDOWS_H 1
#define HAVE_WINSOCK2_H 1
#define HAVE__PIPE #define HAVE__PIPE
/* Win32-specific, of course. */ /* Win32-specific, of course. */

View File

@ -1,23 +1,23 @@
#!/bin/sh #!/bin/sh
failure=0 failure=0
config_h_in=$(dirname "$0")/../config.h.in config_h_in=$(dirname "$0")/../config.h.in
win32_config_h=$(dirname "$0")/../win32/config.h msvc_config_h=$(dirname "$0")/../msvc/config.h
for key in $(sed -ne 's/.*#undef *\([A-Za-z0-9_]*\).*/\1/p' "$config_h_in"); for key in $(sed -ne 's/.*#undef *\([A-Za-z0-9_]*\).*/\1/p' "$config_h_in");
do do
if ! grep '[ef] \<'"$key"'\>' "$win32_config_h" >/dev/null 2>&1; then if ! grep '[ef] \<'"$key"'\>' "$msvc_config_h" >/dev/null 2>&1; then
echo "error: $key missing from win32/config.h" echo "error: $key missing from msvc/config.h"
failure=1 failure=1
fi fi
done done
if test "$failure" != "0"; then if test "$failure" != "0"; then
exit 1 exit 1
else else
echo "0 errors in Win32 config.h" echo "0 errors in Win32 config.h"
fi fi
exit 0 exit 0

View File

@ -15,6 +15,7 @@
#include "config.h" #include "config.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#if defined HAVE_WINDOWS_H #if defined HAVE_WINDOWS_H
# include <windows.h> # include <windows.h>