summaryrefslogtreecommitdiff
path: root/flex.skl
diff options
context:
space:
mode:
authorWill Estes <wlestes@users.sourceforge.net>2001-06-08 12:42:57 +0000
committerWill Estes <wlestes@users.sourceforge.net>2001-06-08 12:42:57 +0000
commit9068f7fe2fe33ff8daa65357cdb59c51d34e7f38 (patch)
tree63184d010aecaad3e5aedbf8b1d2ec844f61f8ce /flex.skl
parentfe84af1738b78edeca58752c5a549a175236420a (diff)
save errno as per Theo de Raadt
Diffstat (limited to 'flex.skl')
-rw-r--r--flex.skl4
1 files changed, 4 insertions, 0 deletions
diff --git a/flex.skl b/flex.skl
index 1d9e6da..9b9a9ad 100644
--- a/flex.skl
+++ b/flex.skl
@@ -6,6 +6,7 @@
%-
#include <stdio.h>
+#include <errno.h>
%*
@@ -1437,6 +1438,8 @@ void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, istream* file )
%*
{
+ int oerrno = errno;
+
yy_flush_buffer( b YY_CALL_LAST_ARG);
b->yy_input_file = file;
@@ -1455,6 +1458,7 @@ void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, istream* file )
%+
b->yy_is_interactive = 0;
%*
+ errno = oerrno;
}