This is a fix for 2 things: a problem Terry was having in OSX with null pointers, which was my fault, as I probably forgot to run the sed script last time I made mods. So, I moved the fix into the flex input itself. Then, I found when I used flex 2.5.33, that it was using __STDC_VERSION__, and that's not real good; so I added back in a DIFFERENT sed script to fix that little mess. Tested everything, a couple different ways. Hope I did no harm, at the least.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Steve Murphy
2008-01-10 20:21:27 +00:00
parent 00b8f86349
commit 9eeca94298
3 changed files with 214 additions and 1024 deletions

View File

@@ -105,8 +105,8 @@ ast_expr2.c ast_expr2.h:
bison -o $@ -d --name-prefix=ast_yy ast_expr2.y
ast_expr2f.c:
flex -o $@ --full ast_expr2.fl
sed 's@free( (char \*) ptr );@if(ptr) free( (char *) ptr );@' ast_expr2f.c > zz
flex -o $@ --full ast_expr2.fl # moved the correction of yyfree into the flex input file itself.
sed 's@#if __STDC_VERSION__ >= 199901L@#if !defined __STDC_VERSION__ || __STDC_VERSION__ >= 199901L@' ast_expr2f.c > zz
mv zz ast_expr2f.c
testexpr2: ast_expr2f.c ast_expr2.c ast_expr2.h