summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/cmListFileLexer.c10
-rw-r--r--Source/cmListFileLexer.in.l6
-rw-r--r--Source/cmStandardLexer.h36
3 files changed, 23 insertions, 29 deletions
diff --git a/Source/cmListFileLexer.c b/Source/cmListFileLexer.c
index d0159a53f7..01e099e316 100644
--- a/Source/cmListFileLexer.c
+++ b/Source/cmListFileLexer.c
@@ -503,16 +503,12 @@ Modify cmListFileLexer.c:
- add a statement "(void)yyscanner;" to the top of these methods:
yy_fatal_error, cmListFileLexer_yyalloc, cmListFileLexer_yyrealloc, cmListFileLexer_yyfree
- remove all YY_BREAK lines occurring right after return statements
+ - remove the isatty forward declaration
*/
#include "cmStandardLexer.h"
-/* Disable features we do not need. */
-#define YY_NO_INPUT 1
-#define YY_NO_UNPUT 1
-#define YY_NO_UNISTD_H 1
-
/* Setup the proper cmListFileLexer_yylex declaration. */
#define YY_EXTRA_TYPE cmListFileLexer*
#define YY_DECL int cmListFileLexer_yylex (yyscan_t yyscanner, cmListFileLexer* lexer)
@@ -1513,10 +1509,6 @@ static void cmListFileLexer_yy_load_buffer_state (yyscan_t yyscanner)
cmListFileLexer_yyfree((void *) b ,yyscanner );
}
-#ifndef __cplusplus
-extern int isatty (int );
-#endif /* __cplusplus */
-
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a cmListFileLexer_yyrestart() or at EOF.
diff --git a/Source/cmListFileLexer.in.l b/Source/cmListFileLexer.in.l
index e98fb3e71b..64a8fe0051 100644
--- a/Source/cmListFileLexer.in.l
+++ b/Source/cmListFileLexer.in.l
@@ -29,16 +29,12 @@ Modify cmListFileLexer.c:
- add a statement "(void)yyscanner;" to the top of these methods:
yy_fatal_error, cmListFileLexer_yyalloc, cmListFileLexer_yyrealloc, cmListFileLexer_yyfree
- remove all YY_BREAK lines occurring right after return statements
+ - remove the isatty forward declaration
*/
#include "cmStandardLexer.h"
-/* Disable features we do not need. */
-#define YY_NO_INPUT 1
-#define YY_NO_UNPUT 1
-#define YY_NO_UNISTD_H 1
-
/* Setup the proper cmListFileLexer_yylex declaration. */
#define YY_EXTRA_TYPE cmListFileLexer*
#define YY_DECL int cmListFileLexer_yylex (yyscan_t yyscanner, cmListFileLexer* lexer)
diff --git a/Source/cmStandardLexer.h b/Source/cmStandardLexer.h
index 7ee448eb5d..24274f6ccd 100644
--- a/Source/cmStandardLexer.h
+++ b/Source/cmStandardLexer.h
@@ -33,19 +33,26 @@
#if defined(__BORLANDC__)
# pragma warn -8008 /* condition always returns true */
# pragma warn -8066 /* unreachable code */
+#endif
+
/* Borland system header defines these macros without first undef-ing them. */
-# if __BORLANDC__ >= 0x580
-# undef INT8_MIN
-# undef INT16_MIN
-# undef INT32_MIN
-# undef INT8_MAX
-# undef INT16_MAX
-# undef INT32_MAX
-# undef UINT8_MAX
-# undef UINT16_MAX
-# undef UINT32_MAX
-# include <stdint.h>
-# endif
+#if defined(__BORLANDC__) && __BORLANDC__ >= 0x580
+# undef INT8_MIN
+# undef INT16_MIN
+# undef INT32_MIN
+# undef INT8_MAX
+# undef INT16_MAX
+# undef INT32_MAX
+# undef UINT8_MAX
+# undef UINT16_MAX
+# undef UINT32_MAX
+# include <stdint.h>
+#endif
+
+/* Make sure SGI termios does not define ECHO differently. */
+#if defined(__sgi) && !defined(__GNUC__)
+# include <sys/termios.h>
+# undef ECHO
#endif
/* Define isatty on windows. */
@@ -59,9 +66,8 @@
/* Disable features we do not need. */
#define YY_NEVER_INTERACTIVE 1
-
-/* Avoid display of input matches to standard output. */
-#undef ECHO /* SGI termios defines this differently. */
+#define YY_NO_INPUT 1
+#define YY_NO_UNPUT 1
#define ECHO
#endif