Browse Source

fix build by avoing nested macro with ifdef

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@690 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 11 years ago
parent
commit
c65bcccb7a
  1. 6
      processor/head.m4
  2. 5
      processor/main.m4
  3. 4
      processor/string.m4

6
processor/head.m4

@ -134,6 +134,12 @@ static inline int xc_zstrlen(int type, zstr s)
#endif
/* {{{ xc_calc_string_n */
REDEF(`KIND', `calc')
#undef C_RELAYLINE
#define C_RELAYLINE
IFASSERT(`
#undef C_RELAYLINE
#define C_RELAYLINE , __LINE__
')
static inline void xc_calc_string_n(xc_processor_t *processor, zend_uchar type, const zstr str, long size IFASSERT(`, int relayline')) {
pushdef(`__LINE__', `relayline')
int realsize = UNISW(size, (type == IS_UNICODE) ? UBYTES(size) : size);

5
processor/main.m4

@ -121,8 +121,11 @@ define(`PROC_CLASS_ENTRY_P_EX', `
}
')
dnl }}}
dnl {{{ IFASSERTEX
define(`IFASSERTEX', `ifdef(`XCACHE_ENABLE_TEST', `$1', `$2')')
dnl }}}
dnl {{{ IFASSERT
define(`IFASSERT', `ifdef(`XCACHE_ENABLE_TEST', `
define(`IFASSERT', `IFASSERTEX(`
#ifndef NDEBUG
$1
#endif

4
processor/string.m4

@ -58,8 +58,8 @@ define(`PROC_STRING_N_EX', `
fprintf(stderr, "\" len=%d\n", $3 - 1);
')
')
IFCALC(`xc_calc_string_n(processor, ISTYPE, SRCSTR, $3 IFASSERT(`, __LINE__'));')
IFSTORE(`DSTPTR = ifelse(PTRTYPE,`char',`ZSTR_S',`ZSTR_U')(xc_store_string_n(processor, ISTYPE, SRCSTR, $3 IFASSERT(`, __LINE__')));')
IFCALC(`xc_calc_string_n(processor, ISTYPE, SRCSTR, $3 C_RELAYLINE);')
IFSTORE(`DSTPTR = ifelse(PTRTYPE,`char',`ZSTR_S',`ZSTR_U')(xc_store_string_n(processor, ISTYPE, SRCSTR, $3 C_RELAYLINE));')
IFRESTORE(`
DSTPTR = e`'U`'strndup(SRCPTR, ($3) - 1);
')

Loading…
Cancel
Save