Skip to content

Commit bff2721

Browse files
committed
Work around <wchar.h> bug on OSF/1 5.1.
1 parent bf56aea commit bff2721

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2011-06-04 Bruno Haible <bruno@clisp.org>
2+
3+
Work around <wchar.h> bug on OSF/1 5.1.
4+
* lib/loop_wchar.h: Before including <wchar.h>, include <stdio.h> and
5+
some other includes.
6+
17
2011-03-27 KO Myung-Hun <komh@chollian.net>
28

39
Fix installation on OS/2.

lib/loop_wchar.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2000-2002, 2005-2006, 2008-2009 Free Software Foundation, Inc.
2+
* Copyright (C) 2000-2002, 2005-2006, 2008-2009, 2011 Free Software Foundation, Inc.
33
* This file is part of the GNU LIBICONV Library.
44
*
55
* The GNU LIBICONV Library is free software; you can redistribute it
@@ -25,6 +25,15 @@
2525
*/
2626

2727
#if HAVE_WCRTOMB || HAVE_MBRTOWC
28+
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29+
<wchar.h>.
30+
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31+
included before <wchar.h>.
32+
In some builds of uClibc, <wchar.h> is nonexistent and wchar_t is defined
33+
by <stddef.h>. */
34+
# include <stddef.h>
35+
# include <stdio.h>
36+
# include <time.h>
2837
# include <wchar.h>
2938
# define BUF_SIZE 64 /* assume MB_LEN_MAX <= 64 */
3039
/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */

0 commit comments

Comments
 (0)