Unbreak fwprintf autoconf check cpp symbols

darcs-hash:20060302112917-ac50b-29d524dc3df09ad9a6e88669e6c20f46677ec2ee.gz
This commit is contained in:
axel 2006-03-02 21:29:17 +10:00
parent 3b6d8756ea
commit 82bff9f407
2 changed files with 26 additions and 18 deletions

View file

@ -187,7 +187,8 @@ AC_RUN_IFELSE(
#include <stdio.h>
#include <locale.h>
#include <wchar.h>
],[
],
[
setlocale( LC_ALL, "" );
fwprintf( stderr, L"%ls%ls", L"", L"fish:" );
])],
@ -196,8 +197,8 @@ AC_RUN_IFELSE(
if test "$fwprintf_broken" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE([HAVE_FWPRINTF], [0],
[Undefined if no fwprintf implementation exists, defined to 0 if fwprintf exist but is broken, 1 if it exists and works])
AC_DEFINE([HAVE_BROKEN_FWPRINTF], [1],
[Define to 1 one if the implemented fwprintf is broken])
else
AC_MSG_RESULT(no)
fi

View file

@ -51,8 +51,15 @@ int tputs(const char *str, int affcnt, int (*putc)(tputs_arg_t))
#endif
#ifndef HAVE_FWPRINTF
#define INTERNAL_FWPRINTF 1
#endif
#if !HAVE_FWPRINTF
#ifdef HAVE_BROKEN_FWPRINTF
#define INTERNAL_FWPRINTF 1
#endif
#ifdef INTERNAL_FWPRINTF
void pad( void (*writer)(wchar_t), int count)
{