Permalink
Browse files

fix cross-compilation with mingw64

git-svn-id: https://plibc.svn.sourceforge.net/svnroot/plibc/trunk/plibc@85 1596915d-9e13-0410-ab7f-96e59408e0f0
  • Loading branch information...
1 parent 9978eb8 commit cb84e4608a6bd32a6674690047b0e9bb5f5db59a ndurner committed Jan 14, 2012
Showing with 5 additions and 10 deletions.
  1. +4 −9 configure.in
  2. +1 −1 src/resolv_ms.c
View
@@ -15,28 +15,22 @@ ISODATE=`date +%Y-%m-%d`
AC_SUBST(ISODATE)
AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
# Check system type
-case "$host_os" in
+case "$target_os" in
*cygwin*)
AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
AC_DEFINE_UNQUOTED(_WIN32,1,[This is a Windows system])
- build_target="windows"
;;
*mingw*)
AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
AC_DEFINE_UNQUOTED(_WIN32,1,[This is a Windows system])
- build_target="windows"
;;
*)
- build_target="unix"
;;
esac
-AC_MSG_CHECKING([for build target])
-AM_CONDITIONAL(WINDOWS, test "$build_target" = "windows")
-AC_MSG_RESULT([$build_target])
-
# We define the paths here, because MinGW/GCC expands paths
# passed through the command line ("-DLOCALEDIR=..."). This would
# lead to hard-coded paths ("C:\mingw\mingw\bin...") that do
@@ -64,7 +58,8 @@ dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h sys/param.h sys/time.h time.h sys/mkdev.h sys/sysmacros.h string.h memory.h fcntl.h dirent.h sys/ndir.h ndir.h alloca.h locale.h )
-AC_CHECK_FUNCS(ftruncate getnameinfo gettimeofday)
+AC_CHECK_FUNCS(ftruncate gettimeofday)
+AC_CHECK_DECLS(getnameinfo, [], [], [[#include <tcpip.h>]])
AC_HEADER_MAJOR
AC_FUNC_ALLOCA
View
@@ -950,7 +950,7 @@ getaddrinfo(
}
-#ifndef HAVE_GETNAMEINFO
+#ifndef HAVE_DECL_GETNAMEINFO
__inline
int
getnameinfo (

0 comments on commit cb84e46

Please sign in to comment.