[asterisk-dev] [Code Review] fix detection of gcc attributes in menuselect
Tzafrir Cohen
reviewboard at asterisk.org
Wed Aug 3 14:14:10 CDT 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1330/
-----------------------------------------------------------
(Updated Aug. 3, 2011, 2:14 p.m.)
Review request for Asterisk Developers.
Changes
-------
Updated patch. It now changes less and removes a few lines.
Summary (updated)
-------
Simplify the macro AST_GCC_ATTRIBUTE, that has a special case for detecting weakref:
It seems that the separate case for '$2' is only used with detecting weakref (see configure.ac in asterisk). weakref seems to be meaningless for a function with a complete definition, and hence I change $2 to be a flag: if its value is 'no', the function has no body.
The exact same change could be applied as-is to asterisk (autoconf/ast_gcc_attribute.m4 instead of acinclude.m4 ). Also tested to work.
Diffs (updated)
-----
/trunk/acinclude.m4 926
/trunk/configure.ac 926
Diff: https://reviewboard.asterisk.org/r/1330/diff
Testing (updated)
-------
Only tested on Linux. Here is the result from testing the configure script (generated on Debian Squeeze) on several test systems:
centos4: #define HAVE_ATTRIBUTE_weakref 1
centos5: #define HAVE_ATTRIBUTE_weakref 1
centos6: #define HAVE_ATTRIBUTE_weakref 1
sarge: /* #undef HAVE_ATTRIBUTE_weakref */
etch: #define HAVE_ATTRIBUTE_weakref 1
lenny: #define HAVE_ATTRIBUTE_weakref 1
squeeze: #define HAVE_ATTRIBUTE_weakref 1
wheezy: #define HAVE_ATTRIBUTE_weakref 1
Testing for other macros has not changed, so it Should Work[tm].
Thanks,
Tzafrir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110803/18966fd5/attachment.htm>
More information about the asterisk-dev
mailing list