summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--t/lex-clean-cxx.sh4
-rw-r--r--t/lex-depend-cxx.sh2
-rw-r--r--t/silent-many-languages.sh6
3 files changed, 9 insertions, 3 deletions
diff --git a/t/lex-clean-cxx.sh b/t/lex-clean-cxx.sh
index 838e80380..9b27319ad 100644
--- a/t/lex-clean-cxx.sh
+++ b/t/lex-clean-cxx.sh
@@ -53,6 +53,8 @@ END
cat > parsefoo.lxx << 'END'
%{
+#define YY_DECL int yylex (void)
+extern "C" YY_DECL;
#define YY_NO_UNISTD_H 1
int isatty (int fd) { return 0; }
%}
@@ -69,10 +71,10 @@ cp parsefoo.lxx parsebar.ll
cat > mainfoo.cc << 'END'
// This file should contain valid C++ but invalid C.
+extern "C" int yylex (void);
using namespace std;
int main (int argc, char **argv)
{
- extern int yylex (void);
return yylex ();
}
END
diff --git a/t/lex-depend-cxx.sh b/t/lex-depend-cxx.sh
index d8b7887be..b6efeb02f 100644
--- a/t/lex-depend-cxx.sh
+++ b/t/lex-depend-cxx.sh
@@ -46,6 +46,8 @@ END
cat > joe.ll << 'END'
%{
+#define YY_DECL int yylex (void)
+extern "C" YY_DECL;
#define YY_NO_UNISTD_H 1
int isatty (int fd) { return 0; }
%}
diff --git a/t/silent-many-languages.sh b/t/silent-many-languages.sh
index 3fd863819..487ce9285 100644
--- a/t/silent-many-languages.sh
+++ b/t/silent-many-languages.sh
@@ -131,9 +131,9 @@ fo2_FFLAGS = $(AM_FFLAGS)
fo2_FCFLAGS = $(AM_FCFLAGS)
fo2_YFLAGS = -v
fo2_LFLAGS = -n
+fo2_LDADD = $(LEXLIB)
SUBDIRS = sub
AM_YFLAGS = -d
-LDADD = $(LEXLIB)
BUILT_SOURCES = foo6.h
EOF
@@ -149,8 +149,8 @@ ba2_FFLAGS = $(AM_FFLAGS)
ba2_FCFLAGS = $(AM_FCFLAGS)
ba2_YFLAGS = -v
ba2_LFLAGS = -n
+ba2_LDADD = $(LEXLIB)
AM_YFLAGS = -d
-LDADD = $(LEXLIB)
BUILT_SOURCES = baz6.h
EOF
@@ -173,6 +173,7 @@ EOF
cat > foo5.l <<'EOF'
%{
#define YY_NO_UNISTD_H 1
+int isatty (int fd) { return 0; }
%}
%%
"END" return EOF;
@@ -186,6 +187,7 @@ int yywrap (void)
EOF
cat > foo6.y <<'EOF'
%{
+extern int yylex (void);
void yyerror (char *s) {}
%}
%token EOF