Merged revisions 309808 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r309808 | tilghman | 2011-03-06 18:54:42 -0600 (Sun, 06 Mar 2011) | 14 lines
  
  Merged revisions 309251 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r309251 | tilghman | 2011-03-01 19:06:02 -0600 (Tue, 01 Mar 2011) | 7 lines
    
    Revert previous 2 commits, and instead conditionally redefine the same macro used in flex 2.5.35 that clashed with our workaround.
    
    Not surprisingly, the workaround was exactly the same code as was provided by
    the Flex maintainers, albeit in two different places, in different macros.
    
    This should fix the FreeBSD builds, which have an older version of Flex.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2011-03-07 01:01:08 +00:00
parent 0a96892b04
commit 6de1332214
6 changed files with 53 additions and 151 deletions

View File

@@ -65,11 +65,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/channel.h"
#endif
#ifdef NEED_FLEX_FWRITE_WORKAROUND
/*!\note Some versions of Flex use fwrite without checking its return value, which
* is a warning on some compilers. Therefore, we use this workaround, to trick
* the compiler into suppressing this warning. */
#define fwrite(a,b,c,d) do { int __res = fwrite(a,b,c,d); (__res); } while (0)
/* Conditionally redefine the macro from flex 2.5.35, in case someone uses flex <2.5.35 to regenerate this file. */
#ifndef ECHO
#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif
enum valtype {