patches/gdb/7.4.1/05_all_readline-headers.patch
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Fri Nov 09 19:42:32 2012 +0100 (2012-11-09)
changeset 3104 7da91f9ba328
permissions -rw-r--r--
cc/gcc: fix patches for 4.6.{0,1}

Remove the sparc part, as it touches code that does not exist in
those versions of gcc (it was added at 4.6.2).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
CC: Florian Fainelli <f.fainelli@gmail.com>
graycells@3059
     1
--- a/readline/complete.c
graycells@3059
     2
+++ b/readline/complete.c
graycells@3059
     3
@@ -25,6 +25,11 @@
graycells@3059
     4
 #  include <config.h>
graycells@3059
     5
 #endif
graycells@3059
     6
 
graycells@3059
     7
+#ifdef HAVE_WCHAR_H /* wcwidth() */
graycells@3059
     8
+# define _GNU_SOURCE
graycells@3059
     9
+# include <wchar.h>
graycells@3059
    10
+#endif
graycells@3059
    11
+
graycells@3059
    12
 #include <sys/types.h>
graycells@3059
    13
 #include <fcntl.h>
graycells@3059
    14
 #if defined (HAVE_SYS_FILE_H)
graycells@3059
    15
--- a/readline/display.c
graycells@3059
    16
+++ b/readline/display.c
graycells@3059
    17
@@ -25,6 +25,11 @@
graycells@3059
    18
 #  include <config.h>
graycells@3059
    19
 #endif
graycells@3059
    20
 
graycells@3059
    21
+#ifdef HAVE_WCHAR_H /* wcwidth() */
graycells@3059
    22
+# define _GNU_SOURCE
graycells@3059
    23
+# include <wchar.h>
graycells@3059
    24
+#endif
graycells@3059
    25
+
graycells@3059
    26
 #include <sys/types.h>
graycells@3059
    27
 
graycells@3059
    28
 #if defined (HAVE_UNISTD_H)
graycells@3059
    29
--- a/readline/mbutil.c
graycells@3059
    30
+++ b/readline/mbutil.c
graycells@3059
    31
@@ -25,6 +25,11 @@
graycells@3059
    32
 #  include <config.h>
graycells@3059
    33
 #endif
graycells@3059
    34
 
graycells@3059
    35
+#ifdef HAVE_WCHAR_H /* wcwidth() */
graycells@3059
    36
+# define _GNU_SOURCE
graycells@3059
    37
+# include <wchar.h>
graycells@3059
    38
+#endif
graycells@3059
    39
+
graycells@3059
    40
 #include <sys/types.h>
graycells@3059
    41
 #include <fcntl.h>
graycells@3059
    42
 #include "posixjmp.h"