[asterisk-dev] [Code Review] fix detection of gcc attributes in menuselect

Tilghman Lesher reviewboard at asterisk.org
Sun Aug 7 01:43:05 CDT 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1330/#review3998
-----------------------------------------------------------


The tests you've shown suggests that you've broken the test by modifying it.  Again, you must test this on Asterisk, first, as that is where the compilation will either fail or the Asterisk modules will fail to load.  The test in menuselect JUST simplifies the process of determining when to encode the workaround for a broken compiler.

- Tilghman


On Aug. 3, 2011, 2:14 p.m., Tzafrir Cohen wrote:
> 
> -----------------------------------------------------------
> 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.
> 
> 
> Summary
> -------
> 
> 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
> -----
> 
>   /trunk/acinclude.m4 926 
>   /trunk/configure.ac 926 
> 
> Diff: https://reviewboard.asterisk.org/r/1330/diff
> 
> 
> Testing
> -------
> 
> 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/20110807/34e9c682/attachment.htm>


More information about the asterisk-dev mailing list