From 91e4971f2f78cab1da8649d00ced425bac6fe61a Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 8 Mar 2011 03:22:39 +0000 Subject: [PATCH] add an explicit test for wchar_t to work with systems which provide that type but not wchar.h git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1899 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- urjtag/configure.ac | 4 ++++ urjtag/src/cmd/cmd_print.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/urjtag/configure.ac b/urjtag/configure.ac index e8cdf8e7..d38831b5 100644 --- a/urjtag/configure.ac +++ b/urjtag/configure.ac @@ -148,6 +148,10 @@ AC_CHECK_HEADERS(m4_flatten([ sys/wait.h ])) +AC_CHECK_TYPE([wchar_t], [], + [AC_DEFINE([wchar_t], [char], [Make sure we have wchar_t])], + [#include ]) + 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. diff --git a/urjtag/src/cmd/cmd_print.c b/urjtag/src/cmd/cmd_print.c index 9dff05b0..61bef768 100644 --- a/urjtag/src/cmd/cmd_print.c +++ b/urjtag/src/cmd/cmd_print.c @@ -31,7 +31,6 @@ #ifdef HAVE_WCHAR_H #include #else -typedef char wchar_t; # define mbstowcs(dst,src,n) 0 # define wcslen(str) strlen(str) #endif