mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Unbreak fwprintf autoconf check cpp symbols
darcs-hash:20060302112917-ac50b-29d524dc3df09ad9a6e88669e6c20f46677ec2ee.gz
This commit is contained in:
parent
3b6d8756ea
commit
82bff9f407
2 changed files with 26 additions and 18 deletions
35
configure.ac
35
configure.ac
|
@ -179,28 +179,29 @@ fi
|
|||
|
||||
if test "$ac_cv_func_fwprintf" = yes; then
|
||||
|
||||
# Check if fwprintf is broken
|
||||
AC_MSG_CHECKING([if fwprintf is broken])
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM([
|
||||
# Check if fwprintf is broken
|
||||
AC_MSG_CHECKING([if fwprintf is broken])
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM([
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <locale.h>
|
||||
#include <wchar.h>
|
||||
],[
|
||||
setlocale( LC_ALL, "" );
|
||||
fwprintf( stderr, L"%ls%ls", L"", L"fish:" );
|
||||
])],
|
||||
[fwprintf_broken=no],
|
||||
[fwprintf_broken=yes] )
|
||||
],
|
||||
[
|
||||
setlocale( LC_ALL, "" );
|
||||
fwprintf( stderr, L"%ls%ls", L"", L"fish:" );
|
||||
])],
|
||||
[fwprintf_broken=no],
|
||||
[fwprintf_broken=yes] )
|
||||
|
||||
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])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
if test "$fwprintf_broken" = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_BROKEN_FWPRINTF], [1],
|
||||
[Define to 1 one if the implemented fwprintf is broken])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue