diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2008-05-02 02:56:39 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2008-05-02 02:56:39 +0000 |
commit | 0113bd4bcfa8b4d9d7bb9ffed17c262c61c4bdc2 (patch) | |
tree | 06fc2ee6596a9a6f04afd1a9aa1bcc96434f5d43 /include | |
parent | b11854445b07bfd38fd497ecdb1df94bf1ab7355 (diff) |
Okay, maybe FreeBSD will like this better.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/autoconfig.h.in | 3 | ||||
-rw-r--r-- | include/asterisk/compiler.h | 6 | ||||
-rw-r--r-- | include/asterisk/config.h | 12 |
3 files changed, 15 insertions, 6 deletions
diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in index 087a6a0b2..d4806a5e2 100644 --- a/include/asterisk/autoconfig.h.in +++ b/include/asterisk/autoconfig.h.in @@ -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 diff --git a/include/asterisk/compiler.h b/include/asterisk/compiler.h index 8ac441463..0eb3c0afd 100644 --- a/include/asterisk/compiler.h +++ b/include/asterisk/compiler.h @@ -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 */ diff --git a/include/asterisk/config.h b/include/asterisk/config.h index 0129af456..80f651d44 100644 --- a/include/asterisk/config.h +++ b/include/asterisk/config.h @@ -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 |