diff options
author | millaway <millaway> | 2003-03-14 06:30:50 +0000 |
---|---|---|
committer | millaway <millaway> | 2003-03-14 06:30:50 +0000 |
commit | 0b0f812753dcd930077f6a3413eda3ab965420a8 (patch) | |
tree | 8b3d88795316ae1dd38caeca04c74c674fe7475d | |
parent | 52fc3929d3c81461480f3485b3d3242d323adb9a (diff) | |
download | flex-0b0f812753dcd930077f6a3413eda3ab965420a8.tar.gz |
Keeping tests up to date with m4 changes.
Proper wait for all children.
-rw-r--r-- | main.c | 5 | ||||
-rw-r--r-- | tests/test-table-opts/scanner.l | 10 |
2 files changed, 9 insertions, 6 deletions
@@ -160,7 +160,8 @@ int flex_main (argc, argv) if (exit_status){ fflush(stdout); fclose(stdout); - wait(0); + while (wait(0) > 0){ + } return exit_status - 1; } @@ -367,7 +368,7 @@ void check_options () char *pname = 0; int nbytes = 0; - action_define ("YY_TABLES_EXTERNAL", 1); + buf_m4_define (&m4defs_buf, "M4_YY_TABLES_EXTERNAL", NULL); if (!tablesfilename) { nbytes = strlen (prefix) + diff --git a/tests/test-table-opts/scanner.l b/tests/test-table-opts/scanner.l index 18e776b..5b3255f 100644 --- a/tests/test-table-opts/scanner.l +++ b/tests/test-table-opts/scanner.l @@ -53,7 +53,8 @@ m4_ifdef( [[M4_YY_REENTRANT]], yylex_init(&yyscanner); ]]) -#ifdef YY_TABLES_EXTERNAL +m4_ifdef( [[M4_YY_TABLES_EXTERNAL]], +[[ if((fp = fopen(argv[1],"r"))== NULL) yy_fatal_error("could not open tables file for reading" M4_YY_CALL_LAST_ARG); @@ -61,7 +62,7 @@ m4_ifdef( [[M4_YY_REENTRANT]], yy_fatal_error("yytables_fload returned < 0" M4_YY_CALL_LAST_ARG); if(M4_YY_TABLES_VERIFY) exit(0); -#endif +]]) if(argc > 2){ if((fp = fopen(argv[2],"r"))== NULL) @@ -71,9 +72,10 @@ m4_ifdef( [[M4_YY_REENTRANT]], while(yylex(M4_YY_CALL_ONLY_ARG) != 0) ; -#ifdef YY_TABLES_EXTERNAL +m4_ifdef( [[YY_TABLES_EXTERNAL]], +[[ yytables_destroy(M4_YY_CALL_ONLY_ARG); -#endif +]]) yylex_destroy(M4_YY_CALL_ONLY_ARG); if(argc < 0) /* silence the compiler */ |