source:
patches/flex-2.5.35-gcc44-1.patch@
4648865
Last change on this file since 4648865 was ab51b1c, checked in by , 15 years ago | |
---|---|
|
|
File size: 12.2 KB |
-
flex-2.5.35
Submitted By: Jim Gifford (jim at cross-lfs dot org) Date: 2009-08-12 Initial Package Version: 2.5.35 Origin: Debian Upstream Status: Unknown Description: Corrects code generation for GCC 4.4.x diff -Naur flex-2.5.35.orig/flexint.h flex-2.5.35/flexint.h
old new 28 28 typedef unsigned char flex_uint8_t; 29 29 typedef unsigned short int flex_uint16_t; 30 30 typedef unsigned int flex_uint32_t; 31 #endif /* ! C99 */32 31 33 32 /* Limits of integral types. */ 34 33 #ifndef INT8_MIN … … 59 58 #define UINT32_MAX (4294967295U) 60 59 #endif 61 60 61 #endif /* ! C99 */ 62 62 63 63 #endif /* ! FLEXINT_H */ -
flex-2.5.35
diff -Naur flex-2.5.35.orig/flex.skl flex-2.5.35/flex.skl
old new 218 218 #include <iostream> 219 219 #include <errno.h> 220 220 #include <cstdlib> 221 #include <cstdio> 221 222 #include <cstring> 222 223 /* end standard C++ headers. */ 223 224 %endif … … 443 444 444 445 /* Size of default input buffer. */ 445 446 #ifndef YY_BUF_SIZE 447 #ifdef __ia64__ 448 /* On IA-64, the buffer size is 16k, not 8k. 449 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. 450 * Ditto for the __ia64__ case accordingly. 451 */ 452 #define YY_BUF_SIZE 32768 453 #else 446 454 #define YY_BUF_SIZE 16384 455 #endif /* __ia64__ */ 447 456 #endif 448 457 449 458 m4_ifdef( [[M4_YY_NOT_IN_HEADER]], … … 1063 1072 1064 1073 /* Amount of stuff to slurp up with each read. */ 1065 1074 #ifndef YY_READ_BUF_SIZE 1075 #ifdef __ia64__ 1076 /* On IA-64, the buffer size is 16k, not 8k */ 1077 #define YY_READ_BUF_SIZE 16384 1078 #else 1066 1079 #define YY_READ_BUF_SIZE 8192 1080 #endif /* __ia64__ */ 1067 1081 #endif 1068 1082 1069 1083 m4_ifdef( [[M4_YY_NOT_IN_HEADER]], … … 1074 1088 /* This used to be an fputs(), but since the string might contain NUL's, 1075 1089 * we now use fwrite(). 1076 1090 */ 1077 #define ECHO fwrite( yytext, yyleng, 1, yyout)1091 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) 1078 1092 %endif 1079 1093 %if-c++-only C++ definition 1080 1094 #define ECHO LexerOutput( yytext, yyleng ) … … 2348 2362 %if-c-only 2349 2363 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will 2350 2364 * scan from a @e copy of @a bytes. 2351 * @param bytes the byte buffer to scan2352 * @param len the number of bytes in the buffer pointed to by @a bytes.2365 * @param yybytes the byte buffer to scan 2366 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. 2353 2367 * M4_YY_DOC_PARAM 2354 2368 * @return the newly allocated buffer state object. 2355 2369 */ -
flex-2.5.35
diff -Naur flex-2.5.35.orig/gen.c flex-2.5.35/gen.c
old new 1890 1890 outn ("\tif ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \\"); 1891 1891 outn ("\t\t{ \\"); 1892 1892 outn ("\t\tint c = '*'; \\"); 1893 outn ("\t\t int n; \\");1893 outn ("\t\tsize_t n; \\"); 1894 1894 outn ("\t\tfor ( n = 0; n < max_size && \\"); 1895 1895 outn ("\t\t\t (c = getc( yyin )) != EOF && c != '\\n'; ++n ) \\"); 1896 1896 outn ("\t\t\tbuf[n] = (char) c; \\"); -
flex-2.5.35
diff -Naur flex-2.5.35.orig/scan.c flex-2.5.35/scan.c
old new 1 #line 2 "scan.c" 1 2 2 #line 3"scan.c"3 #line 4 "scan.c" 3 4 4 5 #define YY_INT_ALIGNED short int 5 6 … … 53 54 typedef unsigned char flex_uint8_t; 54 55 typedef unsigned short int flex_uint16_t; 55 56 typedef unsigned int flex_uint32_t; 56 #endif /* ! C99 */57 57 58 58 /* Limits of integral types. */ 59 59 #ifndef INT8_MIN … … 84 84 #define UINT32_MAX (4294967295U) 85 85 #endif 86 86 87 #endif /* ! C99 */ 88 87 89 #endif /* ! FLEXINT_H */ 88 90 89 91 #ifdef __cplusplus … … 140 142 141 143 /* Size of default input buffer. */ 142 144 #ifndef YY_BUF_SIZE 145 #ifdef __ia64__ 146 /* On IA-64, the buffer size is 16k, not 8k. 147 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. 148 * Ditto for the __ia64__ case accordingly. 149 */ 150 #define YY_BUF_SIZE 32768 151 #else 143 152 #define YY_BUF_SIZE 16384 153 #endif /* __ia64__ */ 144 154 #endif 145 155 146 156 /* The state buf must be large enough to hold one state per character in the main buffer. … … 2085 2095 2086 2096 /* Amount of stuff to slurp up with each read. */ 2087 2097 #ifndef YY_READ_BUF_SIZE 2098 #ifdef __ia64__ 2099 /* On IA-64, the buffer size is 16k, not 8k */ 2100 #define YY_READ_BUF_SIZE 16384 2101 #else 2088 2102 #define YY_READ_BUF_SIZE 8192 2103 #endif /* __ia64__ */ 2089 2104 #endif 2090 2105 2091 2106 /* Copy whatever the last rule matched to the standard output. */ … … 2093 2108 /* This used to be an fputs(), but since the string might contain NUL's, 2094 2109 * we now use fwrite(). 2095 2110 */ 2096 #define ECHO fwrite( yytext, yyleng, 1, yyout)2111 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) 2097 2112 #endif 2098 2113 2099 2114 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, … … 2104 2119 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 2105 2120 { \ 2106 2121 int c = '*'; \ 2107 int n; \2122 size_t n; \ 2108 2123 for ( n = 0; n < max_size && \ 2109 2124 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 2110 2125 buf[n] = (char) c; \ … … 4639 4654 yyfree((void *) b ); 4640 4655 } 4641 4656 4642 #ifndef __cplusplus 4657 #ifndef _UNISTD_H /* assume unistd.h has isatty() for us */ 4658 #ifdef __cplusplus 4659 extern "C" { 4660 #endif 4661 #ifdef __THROW /* this is a gnuism */ 4662 extern int isatty (int ) __THROW; 4663 #else 4643 4664 extern int isatty (int ); 4644 #endif /* __cplusplus */ 4665 #endif 4666 #ifdef __cplusplus 4667 } 4668 #endif 4669 #endif 4645 4670 4646 4671 /* Initializes or reinitializes a buffer. 4647 4672 * This function is sometimes called more than once on the same buffer, … … 4847 4872 4848 4873 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will 4849 4874 * scan from a @e copy of @a bytes. 4850 * @param bytes the byte buffer to scan4851 * @param len the number of bytes in the buffer pointed to by @a bytes.4875 * @param yybytes the byte buffer to scan 4876 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. 4852 4877 * 4853 4878 * @return the newly allocated buffer state object. 4854 4879 */ -
flex-2.5.35
diff -Naur flex-2.5.35.orig/skel.c flex-2.5.35/skel.c
old new 244 244 "typedef unsigned char flex_uint8_t; ", 245 245 "typedef unsigned short int flex_uint16_t;", 246 246 "typedef unsigned int flex_uint32_t;", 247 "#endif /* ! C99 */",248 247 "", 249 248 "/* Limits of integral types. */", 250 249 "#ifndef INT8_MIN", … … 275 274 "#define UINT32_MAX (4294967295U)", 276 275 "#endif", 277 276 "", 277 "#endif /* ! C99 */", 278 278 "", 279 279 "#endif /* ! FLEXINT_H */", 280 280 "", … … 285 285 "#include <iostream> ", 286 286 "#include <errno.h>", 287 287 "#include <cstdlib>", 288 "#include <cstdio>", 288 289 "#include <cstring>", 289 290 "/* end standard C++ headers. */", 290 291 "%endif", … … 510 511 "", 511 512 "/* Size of default input buffer. */", 512 513 "#ifndef YY_BUF_SIZE", 514 "#ifdef __ia64__", 515 "/* On IA-64, the buffer size is 16k, not 8k.", 516 " * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.", 517 " * Ditto for the __ia64__ case accordingly.", 518 " */", 519 "#define YY_BUF_SIZE 32768", 520 "#else", 513 521 "#define YY_BUF_SIZE 16384", 522 "#endif /* __ia64__ */", 514 523 "#endif", 515 524 "", 516 525 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", … … 1130 1139 "", 1131 1140 "/* Amount of stuff to slurp up with each read. */", 1132 1141 "#ifndef YY_READ_BUF_SIZE", 1142 "#ifdef __ia64__", 1143 "/* On IA-64, the buffer size is 16k, not 8k */", 1144 "#define YY_READ_BUF_SIZE 16384", 1145 "#else", 1133 1146 "#define YY_READ_BUF_SIZE 8192", 1147 "#endif /* __ia64__ */", 1134 1148 "#endif", 1135 1149 "", 1136 1150 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", … … 1141 1155 "/* This used to be an fputs(), but since the string might contain NUL's,", 1142 1156 " * we now use fwrite().", 1143 1157 " */", 1144 "#define ECHO fwrite( yytext, yyleng, 1, yyout)",1158 "#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)", 1145 1159 "%endif", 1146 1160 "%if-c++-only C++ definition", 1147 1161 "#define ECHO LexerOutput( yytext, yyleng )", … … 2266 2280 "[[", 2267 2281 " m4_ifdef( [[M4_YY_NEVER_INTERACTIVE]],,", 2268 2282 " [[", 2269 "#ifndef __cplusplus", 2283 "#ifndef _UNISTD_H /* assume unistd.h has isatty() for us */", 2284 "#ifdef __cplusplus", 2285 "extern \"C\" {", 2286 "#endif", 2287 "#ifdef __THROW /* this is a gnuism */", 2288 "extern int isatty M4_YY_PARAMS( int ) __THROW;", 2289 "#else", 2270 2290 "extern int isatty M4_YY_PARAMS( int );", 2271 "#endif /* __cplusplus */", 2291 "#endif", 2292 "#ifdef __cplusplus", 2293 "}", 2294 "#endif", 2295 "#endif", 2272 2296 " ]])", 2273 2297 "]])", 2274 2298 "%endif", … … 2559 2583 "%if-c-only", 2560 2584 "/** Setup the input buffer state to scan the given bytes. The next call to yylex() will", 2561 2585 " * scan from a @e copy of @a bytes.", 2562 " * @param bytes the byte buffer to scan",2563 " * @param len the number of bytes in the buffer pointed to by @a bytes.",2586 " * @param yybytes the byte buffer to scan", 2587 " * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.", 2564 2588 " * M4_YY_DOC_PARAM", 2565 2589 " * @return the newly allocated buffer state object.", 2566 2590 " */", -
tests/test-bison-nr/Makefile.am
diff -Naur flex-2.5.35.orig/tests/test-bison-nr/Makefile.am flex-2.5.35/tests/test-bison-nr/Makefile.am
old new 34 34 35 35 testname = test-bison-nr 36 36 37 scanner.c : $(srcdir)/scanner.l37 scanner.c scanner.h: $(srcdir)/scanner.l 38 38 $(FLEX) $< 39 39 40 40 parser.c: $(srcdir)/parser.y … … 50 50 $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< 51 51 52 52 parser.h: parser.c 53 scanner.c main.o: parser.h 53 scanner.o: parser.h 54 main.o: parser.h scanner.h -
tests/test-bison-nr/Makefile.in
diff -Naur flex-2.5.35.orig/tests/test-bison-nr/Makefile.in flex-2.5.35/tests/test-bison-nr/Makefile.in
old new 343 343 uninstall-info-am 344 344 345 345 346 scanner.c : $(srcdir)/scanner.l346 scanner.c scanner.h: $(srcdir)/scanner.l 347 347 $(FLEX) $< 348 348 349 349 parser.c: $(srcdir)/parser.y … … 359 359 $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< 360 360 361 361 parser.h: parser.c 362 scanner.c main.o: parser.h 362 scanner.o: parser.h 363 main.o: parser.h scanner.h 363 364 # Tell versions [3.59,3.63) of GNU make to not export all variables. 364 365 # Otherwise a system limit (for SysV at least) may be exceeded. 365 366 .NOEXPORT: -
tests/test-bison-yylloc/Makefile.am
diff -Naur flex-2.5.35.orig/tests/test-bison-yylloc/Makefile.am flex-2.5.35/tests/test-bison-yylloc/Makefile.am
old new 34 34 35 35 testname = test-bison-yylloc 36 36 37 scanner.c : $(srcdir)/scanner.l37 scanner.c scanner.h: $(srcdir)/scanner.l 38 38 $(FLEX) $< 39 39 40 40 parser.c: $(srcdir)/parser.y … … 50 50 $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< 51 51 52 52 parser.h: parser.c 53 scanner.c main.o: parser.h 53 scanner.o: parser.h 54 main.o: parser.h scanner.h -
tests/test-bison-yylloc/Makefile.in
diff -Naur flex-2.5.35.orig/tests/test-bison-yylloc/Makefile.in flex-2.5.35/tests/test-bison-yylloc/Makefile.in
old new 343 343 uninstall-info-am 344 344 345 345 346 scanner.c : $(srcdir)/scanner.l346 scanner.c scanner.h: $(srcdir)/scanner.l 347 347 $(FLEX) $< 348 348 349 349 parser.c: $(srcdir)/parser.y … … 359 359 $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< 360 360 361 361 parser.h: parser.c 362 scanner.c main.o: parser.h 362 scanner.o: parser.h 363 main.o: parser.h scanner.h 363 364 # Tell versions [3.59,3.63) of GNU make to not export all variables. 364 365 # Otherwise a system limit (for SysV at least) may be exceeded. 365 366 .NOEXPORT: -
tests/test-bison-yylval/Makefile.am
diff -Naur flex-2.5.35.orig/tests/test-bison-yylval/Makefile.am flex-2.5.35/tests/test-bison-yylval/Makefile.am
old new 34 34 35 35 testname = test-bison-yylval 36 36 37 scanner.c : $(srcdir)/scanner.l37 scanner.c scanner.h: $(srcdir)/scanner.l 38 38 $(FLEX) $< 39 39 40 40 parser.c: $(srcdir)/parser.y … … 50 50 $(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $< 51 51 52 52 parser.h: parser.c 53 main.o: parser.h 53 main.o: parser.h scanner.h
Note:
See TracBrowser
for help on using the repository browser.