summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/flex/files/flex-2.5.31-isatty.patch')
-rw-r--r--sys-devel/flex/files/flex-2.5.31-isatty.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/sys-devel/flex/files/flex-2.5.31-isatty.patch b/sys-devel/flex/files/flex-2.5.31-isatty.patch
new file mode 100644
index 000000000000..402d47b9a31e
--- /dev/null
+++ b/sys-devel/flex/files/flex-2.5.31-isatty.patch
@@ -0,0 +1,40 @@
+Declare the isatty prototype all the time
+
+http://bugs.gentoo.org/119598
+
+--- flex/scan.c
++++ flex/scan.c
+@@ -3935,9 +3935,13 @@
+ yyfree((void *) b );
+ }
+
+-#ifndef __cplusplus
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern int isatty (int );
+-#endif /* __cplusplus */
++#ifdef __cplusplus
++}
++#endif
+
+ /* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+--- flex/skel.c
++++ flex/skel.c
+@@ -2183,9 +2183,13 @@
+ "[[",
+ " m4_ifdef( [[M4_YY_NEVER_INTERACTIVE]],,",
+ " [[",
+- "#ifndef __cplusplus",
++ "#ifdef __cplusplus",
++ "extern \"C\" {",
++ "#endif",
+ "extern int isatty M4_YY_PARAMS( int );",
+- "#endif /* __cplusplus */",
++ "#ifdef __cplusplus",
++ "}",
++ "#endif",
+ " ]])",
+ "]])",
+ "%endif",