/* 4.4BSD utility functions for error messages.
- Copyright (C) 1995,96,98,2001,02 Free Software Foundation, Inc.
+ Copyright (C) 1995,1996,1998,2001,2002,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#include <string.h>
#include <stdio.h>
-#ifdef USE_IN_LIBIO
-# include <wchar.h>
-# define flockfile(s) _IO_flockfile (s)
-# define funlockfile(s) _IO_funlockfile (s)
-#endif
+#include <wchar.h>
+#define flockfile(s) _IO_flockfile (s)
+#define funlockfile(s) _IO_funlockfile (s)
extern char *__progname;
va_end (ap); \
}
-#ifdef USE_IN_LIBIO
static void
convert_and_print (const char *format, __gnuc_va_list ap)
{
-# define ALLOCA_LIMIT 2000
+#define ALLOCA_LIMIT 2000
size_t len;
wchar_t *wformat = NULL;
mbstate_t st;
__vfwprintf (stderr, wformat, ap);
}
-#endif
void
vwarnx (const char *format, __gnuc_va_list ap)
{
flockfile (stderr);
-#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
{
__fwprintf (stderr, L"%s: ", __progname);
putwc_unlocked (L'\n', stderr);
}
else
-#endif
{
fprintf (stderr, "%s: ", __progname);
if (format)
int error = errno;
flockfile (stderr);
-#ifdef USE_IN_LIBIO
if (_IO_fwide (stderr, 0) > 0)
{
__fwprintf (stderr, L"%s: ", __progname);
__fwprintf (stderr, L"%m\n");
}
else
-#endif
{
fprintf (stderr, "%s: ", __progname);
if (format)