generalize the windows.h as well as the IN/OUT checks via normal configure tests rather than hardcoding to specific OS checks (should fix building with some cygwin versions)

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1793 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 15 years ago
parent 8fa9714bbc
commit 40952aa7ff

@ -6,6 +6,11 @@
* configure.ac (AC_CHECK_FUNCS): Check for geteuid and getuid functions.
* sysdep.h: Key off of HAVE_xxx defines for geteuid/getuid stubs.
* configure.ac (AC_CHECK_HEADERS): Move windows.h check here, as well as
IN/OUT namespace pollution checks.
* sysdep.h: Key off of HAVE_WINDOWS_H for windows.h include. Drop the
NO_W32_PSEUDO_MODIFIERS defines since they're in configure.ac now.
2010-06-15 Mike Frysinger <vapier@gentoo.org>
* src/bus/s3c4510x.c: Punt dead/useless cvs log info.

@ -140,9 +140,26 @@ AC_CHECK_HEADERS([linux/ppdev.h], [HAVE_LINUX_PPDEV_H="yes"])
AC_CHECK_HEADERS([dev/ppbus/ppi.h], [HAVE_DEV_PPBUS_PPI_H="yes"])
AC_CHECK_HEADERS(m4_flatten([
wchar.h
windows.h
sys/wait.h
]))
dnl See if the windows target is polluting the namespace on us which
dnl will break some of the lex/yacc (e.g. bsdl) builds. We need both
dnl defines as some versions of mingw have changed names over time.
AS_IF([test "x$ac_cv_header_windows_h" = "xyes"],[
AC_MSG_CHECKING([for IN/OUT defines in windows.h])
AC_TRY_COMPILE([#include <windows.h>], [
#if defined(IN) || defined(OUT)
# error "IN/OUT defined"
#endif
],
[AC_MSG_RESULT([no])],[
AS_VAR_APPEND([CPPFLAGS], " -DNO_W32_PSEUDO_MODIFIERS -D_NO_W32_PSEUDO_MODIFIERS")
AC_MSG_RESULT([yes])
])
])
VL_LIB_READLINE

@ -43,15 +43,11 @@
#define ngettext(s,p,n) s
#endif
#if __CYGWIN__
#ifdef HAVE_WINDOWS_H
#include <windows.h>
#endif
#ifdef __MINGW32__
/* Diff versions of mingw used slightly different names */
#define NO_W32_PSEUDO_MODIFIERS
#define _NO_W32_PSEUDO_MODIFIERS
#include <windows.h>
/* Microsoft uses a different swprintf() than ISO C requires */
#include <stdio.h>
#define swprintf _snwprintf

Loading…
Cancel
Save