Okay, maybe FreeBSD will like this better.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher 2008-05-02 02:56:39 +00:00
parent b11854445b
commit 0113bd4bcf
5 changed files with 69 additions and 7 deletions

54
configure vendored
View File

@ -1,5 +1,5 @@
#! /bin/sh
# From configure.ac Revision: 114713 .
# From configure.ac Revision: 115078 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for asterisk 1.6.
#
@ -16863,6 +16863,58 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: checking for compiler 'attribute sentinel' support" >&5
echo $ECHO_N "checking for compiler 'attribute sentinel' support... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
static int __attribute__((sentinel)) test(void) {}
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
cat >>confdefs.h <<_ACEOF
#define HAVE_ATTRIBUTE_sentinel 1
_ACEOF
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: checking for -ffunction-sections support" >&5
echo $ECHO_N "checking for -ffunction-sections support... $ECHO_C" >&6; }
saved_CFLAGS="${CFLAGS}"

View File

@ -437,6 +437,7 @@ AST_GCC_ATTRIBUTE(const)
AST_GCC_ATTRIBUTE(unused)
AST_GCC_ATTRIBUTE(always_inline)
AST_GCC_ATTRIBUTE(deprecated)
AST_GCC_ATTRIBUTE(sentinel)
AC_MSG_CHECKING(for -ffunction-sections support)
saved_CFLAGS="${CFLAGS}"

View File

@ -104,6 +104,9 @@
/* Define to 1 if your GCC C compiler supports the 'pure' attribute. */
#undef HAVE_ATTRIBUTE_pure
/* Define to 1 if your GCC C compiler supports the 'sentinel' attribute. */
#undef HAVE_ATTRIBUTE_sentinel
/* Define to 1 if your GCC C compiler supports the 'unused' attribute. */
#undef HAVE_ATTRIBUTE_unused

View File

@ -53,4 +53,10 @@
#define attribute_malloc
#endif
#if HAVE_ATTRIBUTE_sentinel
#define attribute_sentinel __attribute__((sentinel))
#else
#define attribute_sentinel
#endif
#endif /* _ASTERISK_COMPILER_H */

View File

@ -182,8 +182,8 @@ int ast_category_exist(const struct ast_config *config, const char *category_nam
* that unlike the variables in ast_config, the resulting list of variables
* MUST be freed with ast_variables_destroy() as there is no container.
*/
struct ast_variable *ast_load_realtime(const char *family, ...) __attribute__((sentinel));
struct ast_variable *ast_load_realtime_all(const char *family, ...) __attribute__((sentinel));
struct ast_variable *ast_load_realtime(const char *family, ...) attribute_sentinel;
struct ast_variable *ast_load_realtime_all(const char *family, ...) attribute_sentinel;
/*!
* \brief Retrieve realtime configuration
@ -194,7 +194,7 @@ struct ast_variable *ast_load_realtime_all(const char *family, ...) __attribute_
* is thus stored inside a taditional ast_config structure rather than
* just returning a linked list of variables.
*/
struct ast_config *ast_load_realtime_multientry(const char *family, ...) __attribute__((sentinel));
struct ast_config *ast_load_realtime_multientry(const char *family, ...) attribute_sentinel;
/*!
* \brief Update realtime configuration
@ -204,7 +204,7 @@ struct ast_config *ast_load_realtime_multientry(const char *family, ...) __attri
* This function is used to update a parameter in realtime configuration space.
*
*/
int ast_update_realtime(const char *family, const char *keyfield, const char *lookup, ...) __attribute__((sentinel));
int ast_update_realtime(const char *family, const char *keyfield, const char *lookup, ...) attribute_sentinel;
/*!
* \brief Create realtime configuration
@ -212,7 +212,7 @@ int ast_update_realtime(const char *family, const char *keyfield, const char *lo
* This function is used to create a parameter in realtime configuration space.
*
*/
int ast_store_realtime(const char *family, ...) __attribute__((sentinel));
int ast_store_realtime(const char *family, ...) attribute_sentinel;
/*!
* \brief Destroy realtime configuration
@ -223,7 +223,7 @@ int ast_store_realtime(const char *family, ...) __attribute__((sentinel));
* Additional params are used as keys.
*
*/
int ast_destroy_realtime(const char *family, const char *keyfield, const char *lookup, ...) __attribute__((sentinel));
int ast_destroy_realtime(const char *family, const char *keyfield, const char *lookup, ...) attribute_sentinel;
/*!
* \brief Check if realtime engine is configured for family