Review Board 1.7.16


Make weak reference support linux and MacOSX only.

Review Request #1617 - Created Dec. 9, 2011 and submitted

rmudgett
1.8
ASTERISK-18728, ASTERISK-18950
Reviewers
asterisk-dev
kpfleming, oej, tilghman
Asterisk
Weak references is not portable and either does not work or does not work as expected on other platforms.

Primarily support weak references on linux platforms because the feature just works.

Allow weak symbol support on MacOS/X platforms only because there is active community support for it.  However, MacOS/X seems to break weak symbols for each new version.
My linux box now configures for HAVE_ATTRIBUTE_weakref instead of HAVE_ATTRIBUTE_weak which is Darwin specific. 

Changes between revision 1 and 2

1 2 3
1 2 3

  1. /branches/1.8/configure.ac: Loading...
/branches/1.8/configure.ac
Diff Revision 1 Diff Revision 2
[20] 888 lines
[+20]
889

    
   
889

   
890
# Support weak symbols on a platform specific basis.  The feature is not
890
# Support weak symbols on a platform specific basis.  The feature is not
891
# portable and either does not work or does not work as expected on other
891
# portable and either does not work or does not work as expected on other
892
# platforms.
892
# platforms.
893
#
893
#
894
# Primarily support weak symbols on linux platforms because the feature
894
# Primarily support weak symbols on Linux platforms because the feature
895
# just works.
895
# just works.
896
#
896
#
897
# Allow weak symbol support on MacOSX platforms only because there is
897
# Allow weak symbol support on Mac OS/X (Darwin) platforms only because
898
# active community support for it.
898
# there is active community support for it.
899
# However, MacOS/X seems to break weak symbols for each new version.
899
# However, Darwin seems to break weak symbols for each new version.
900
#
900
#
901
case "${OSARCH}" in
901
case "${OSARCH}" in
902
	darwin*)
902
	darwin*)
903
	AST_GCC_ATTRIBUTE(weak_import, [], [], PBX_WEAKREF)
903
	AST_GCC_ATTRIBUTE(weak_import, [], [], PBX_WEAKREF)
904

    
   
904

   
905
	# Sevaral other platforms including linux have GCC versions that
905
	# Several other platforms including Linux have GCC versions that
906
	# define the weak attribute.  However, this attribute is only
906
	# define the weak attribute.  However, this attribute is only
907
	# setup for use in the code by MacOS/X.
907
	# setup for use in the code by Darwin.
908
	AST_GCC_ATTRIBUTE(weak, [], [], PBX_WEAKREF)
908
	AST_GCC_ATTRIBUTE(weak, [], [], PBX_WEAKREF)
909
	;;
909
	;;
910
	linux-gnu)
910
	linux-gnu)
911
	AST_GCC_ATTRIBUTE(weakref, [weakref("foo")], static, PBX_WEAKREF)
911
	AST_GCC_ATTRIBUTE(weakref, [weakref("foo")], static, PBX_WEAKREF)
912
	;;
912
	;;
[+20] [20] 1379 lines
  1. /branches/1.8/configure.ac: Loading...

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.