[asterisk-commits] tilghman: trunk r173130 - in /trunk: ./ apps/ include/asterisk/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Feb 2 18:29:50 CST 2009


Author: tilghman
Date: Mon Feb  2 18:29:49 2009
New Revision: 173130

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=173130
Log:
Make OS X compile cleanly with app_stack

Modified:
    trunk/apps/app_stack.c
    trunk/configure
    trunk/configure.ac
    trunk/include/asterisk/autoconfig.h.in
    trunk/include/asterisk/compiler.h
    trunk/include/asterisk/optional_api.h
    trunk/main/xml.c

Modified: trunk/apps/app_stack.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/apps/app_stack.c?view=diff&rev=173130&r1=173129&r2=173130
==============================================================================
--- trunk/apps/app_stack.c (original)
+++ trunk/apps/app_stack.c Mon Feb  2 18:29:49 2009
@@ -640,7 +640,7 @@
 {
 	struct ast_context *con;
 
-	if (ast_agi_unregister(ast_module_info->self, &gosub_agi_command) == 1) {
+	if (ast_agi_unregister && ast_agi_unregister(ast_module_info->self, &gosub_agi_command) == 1) {
 		if ((con = ast_context_find("app_stack_gosub_virtual_context"))) {
 			ast_context_remove_extension2(con, "s", 1, NULL, 0);
 			ast_context_destroy(con, "app_stack"); /* leave nothing behind */
@@ -661,7 +661,7 @@
 {
 	struct ast_context *con;
 
-	if (ast_agi_register(ast_module_info->self, &gosub_agi_command) == 1) {
+	if (ast_agi_register && ast_agi_register(ast_module_info->self, &gosub_agi_command) == 1) {
 		if (!(con = ast_context_find_or_create(NULL, NULL, "app_stack_gosub_virtual_context", "app_stack"))) {
 			ast_log(LOG_ERROR, "Virtual context 'app_stack_gosub_virtual_context' does not exist and unable to create\n");
 			return AST_MODULE_LOAD_DECLINE;

Modified: trunk/configure.ac
URL: http://svn.digium.com/svn-view/asterisk/trunk/configure.ac?view=diff&rev=173130&r1=173129&r2=173130
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Mon Feb  2 18:29:49 2009
@@ -174,14 +174,18 @@
 AC_PATH_PROG([LN], [ln], :)
 AC_PATH_PROG([DOT], [dot], :)
 AC_PATH_PROG([WGET], [wget], :)
+AC_PATH_PROG([CURL], [curl], :)
 AC_PATH_PROG([RUBBER], [rubber], :)
 AC_PATH_PROG([KPATHSEA], [kpsewhich], :)
 AC_PATH_PROG([XMLSTARLET], [xmlstarlet], :)
 if test "${WGET}" != ":" ; then
   DOWNLOAD=${WGET}
+else if test "${CURL}" != ":" ; then
+  DOWNLOAD="${CURL} -O --progress-bar -w \"%{url_effective}\n\""
 else
   AC_PATH_PROG([FETCH], [fetch], [:])
   DOWNLOAD=${FETCH}
+fi
 fi
 AC_SUBST(DOWNLOAD)
 
@@ -481,6 +485,7 @@
 AST_GCC_ATTRIBUTE(sentinel)
 AST_GCC_ATTRIBUTE(warn_unused_result)
 AST_GCC_ATTRIBUTE(weak)
+AST_GCC_ATTRIBUTE(weak_import)
 AST_GCC_ATTRIBUTE(alias, [alias("foo")])
 
 AC_MSG_CHECKING(for -ffunction-sections support)

Modified: trunk/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/svn-view/asterisk/trunk/include/asterisk/autoconfig.h.in?view=diff&rev=173130&r1=173129&r2=173130
==============================================================================
--- trunk/include/asterisk/autoconfig.h.in (original)
+++ trunk/include/asterisk/autoconfig.h.in Mon Feb  2 18:29:49 2009
@@ -122,6 +122,9 @@
 
 /* Define to 1 if your GCC C compiler supports the 'weak' attribute. */
 #undef HAVE_ATTRIBUTE_weak
+
+/* Define to 1 if your GCC C compiler supports the 'weak_import' attribute. */
+#undef HAVE_ATTRIBUTE_weak_import
 
 /* Define this to indicate the ${BKTR_DESCRIP} library */
 #undef HAVE_BKTR

Modified: trunk/include/asterisk/compiler.h
URL: http://svn.digium.com/svn-view/asterisk/trunk/include/asterisk/compiler.h?view=diff&rev=173130&r1=173129&r2=173130
==============================================================================
--- trunk/include/asterisk/compiler.h (original)
+++ trunk/include/asterisk/compiler.h Mon Feb  2 18:29:49 2009
@@ -74,4 +74,10 @@
 #define attribute_weak
 #endif
 
+#ifdef HAVE_ATTRIBUTE_weak_import
+#define attribute_weak_import __attribute__((weak_import))
+#else
+#define attribute_weak_import
+#endif
+
 #endif /* _ASTERISK_COMPILER_H */

Modified: trunk/include/asterisk/optional_api.h
URL: http://svn.digium.com/svn-view/asterisk/trunk/include/asterisk/optional_api.h?view=diff&rev=173130&r1=173129&r2=173130
==============================================================================
--- trunk/include/asterisk/optional_api.h (original)
+++ trunk/include/asterisk/optional_api.h Mon Feb  2 18:29:49 2009
@@ -83,7 +83,10 @@
  */
 #define AST_OPTIONAL_API_UNAVAILABLE	INT_MIN
 
-#if defined(HAVE_ATTRIBUTE_weak) && defined(HAVE_ATTRIBUTE_alias) && !defined(AST_API_MODULE)
+#if defined(HAVE_ATTRIBUTE_weak_import) && !defined(AST_API_MODULE)
+#define AST_OPTIONAL_API(result, name, proto, stub)	result name proto __attribute__((weak_import));
+#define AST_OPTIONAL_API_ATTR(result, attr, name, proto, stub)	result name proto __attribute__((weak_import,attr));
+#elif defined(HAVE_ATTRIBUTE_weak) && defined(HAVE_ATTRIBUTE_alias) && !defined(AST_API_MODULE) && !defined(HAVE_ATTRIBUTE_weak_import)
 #define AST_OPTIONAL_API(result, name, proto, stub)	\
 	static result __##name proto stub;		\
 	result __attribute__((weak, alias("__" __stringify(name)))) name proto;

Modified: trunk/main/xml.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/main/xml.c?view=diff&rev=173130&r1=173129&r2=173130
==============================================================================
--- trunk/main/xml.c (original)
+++ trunk/main/xml.c Mon Feb  2 18:29:49 2009
@@ -27,6 +27,7 @@
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
 #if defined(HAVE_LIBXML2)
+#define _POSIX_C_SOURCE	200112L
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 /* libxml2 ast_xml implementation. */




More information about the asterisk-commits mailing list