]> granicus.if.org Git - flex/commitdiff
save errno as per Theo de Raadt
authorWill Estes <wlestes@users.sourceforge.net>
Fri, 8 Jun 2001 12:42:57 +0000 (12:42 +0000)
committerWill Estes <wlestes@users.sourceforge.net>
Fri, 8 Jun 2001 12:42:57 +0000 (12:42 +0000)
flex.skl

index 1d9e6da856efe75e28ac1d65f68228ea195943b8..9b9a9adac2504b760a134c1cd02227033d605aac 100644 (file)
--- 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;
        }