From: Corey Farrell Date: Wed, 18 Apr 2018 20:40:56 +0000 (-0400) Subject: Build System: Add missing ASTMM_LIBC to flex output. X-Git-Tag: 15.5.0-rc1~93^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a1cb8cfc7d3bdbbf2536dbc91235d59045e422b;p=thirdparty%2Fasterisk.git Build System: Add missing ASTMM_LIBC to flex output. Redirect libc allocation functions to use Asterisk functions for main/ast_expr2f.c and res/ael/ael_lex.c. This will resolve errors produced by astmm.h when these files are regenerated, though other issues still remain. ASTERISK~27813 Change-Id: I7263e9e4217a17bde4ffaa2087a8f8aeb2a8588c --- diff --git a/main/Makefile b/main/Makefile index 741ea39b97..fad5ee6f5d 100644 --- a/main/Makefile +++ b/main/Makefile @@ -134,7 +134,8 @@ endif $(ECHO_PREFIX) echo " [FLEX] $< -> $@" $(CMD_PREFIX) $(FLEX) -o $@ ast_expr2.fl $(CMD_PREFIX) sed 's@#if __STDC_VERSION__ >= 199901L@#if !defined __STDC_VERSION__ || __STDC_VERSION__ >= 199901L@' $@ > $@.fix - $(CMD_PREFIX) echo "#include \"asterisk.h\"" > $@ + $(CMD_PREFIX) echo "#define ASTMM_LIBC ASTMM_REDIRECT" > $@ + $(CMD_PREFIX) echo "#include \"asterisk.h\"" >> $@ $(CMD_PREFIX) echo >> $@ $(CMD_PREFIX) cat $@.fix >> $@ $(CMD_PREFIX) rm $@.fix diff --git a/res/Makefile b/res/Makefile index ecaa03d3c8..ec3417b35b 100644 --- a/res/Makefile +++ b/res/Makefile @@ -45,7 +45,8 @@ endif $(ECHO_PREFIX) echo " [FLEX] $< -> $@" $(CMD_PREFIX) (cd ael; $(FLEX) ael.flex) $(CMD_PREFIX) sed 's@#if __STDC_VERSION__ >= 199901L@#if !defined __STDC_VERSION__ || __STDC_VERSION__ >= 199901L@' $@ > $@.fix - $(CMD_PREFIX) echo "#include \"asterisk.h\"" > $@ + $(CMD_PREFIX) echo "#define ASTMM_LIBC ASTMM_REDIRECT" > $@ + $(CMD_PREFIX) echo "#include \"asterisk.h\"" >> $@ $(CMD_PREFIX) echo >> $@ $(CMD_PREFIX) cat $@.fix >> $@ $(CMD_PREFIX) rm $@.fix