FILTER="${GREP} -v -e ^ast_ -e ^_ast_ -e ^__ast_ -e ^astman_ -e ^pbx_"
case "${OSARCH}" in
- linux-gnu)
+ linux-gnu|FreeBSD)
nm ${1} | ${GREP} -e " T " | cut -d" " -f3 | ${FILTER} > striplist
sed -e "s/^/-N /" striplist | xargs ${STRIP} ${1}
rm -f striplist
#define sched_setscheduler __PLEASE_USE_ast_set_priority_INSTEAD_OF_sched_setscheduler__
int ast_set_priority(int); /*!< Provided by asterisk.c */
-int load_modules(unsigned int); /*!< Provided by loader.c */
-int load_pbx(void); /*!< Provided by pbx.c */
-int init_logger(void); /*!< Provided by logger.c */
-void close_logger(void); /*!< Provided by logger.c */
-int reload_logger(int); /*!< Provided by logger.c */
-int init_framer(void); /*!< Provided by frame.c */
-int ast_term_init(void); /*!< Provided by term.c */
-int astdb_init(void); /*!< Provided by db.c */
-void ast_channels_init(void); /*!< Provided by channel.c */
-void ast_builtins_init(void); /*!< Provided by cli.c */
-int dnsmgr_init(void); /*!< Provided by dnsmgr.c */
-void dnsmgr_start_refresh(void); /*!< Provided by dnsmgr.c */
-int dnsmgr_reload(void); /*!< Provided by dnsmgr.c */
-void threadstorage_init(void); /*!< Provided by threadstorage.c */
-void ast_event_init(void); /*!< Provided by event.c */
-int ast_device_state_engine_init(void); /*!< Provided by devicestate.c */
-int astobj2_init(void); /*! Provided by astobj2.c */
-
-/*!
- * \brief Reload asterisk modules.
- * \param name the name of the module to reload
- *
- * This function reloads the specified module, or if no modules are specified,
- * it will reload all loaded modules.
- *
- * \note Modules are reloaded using their reload() functions, not unloading
- * them and loading them again.
- *
- * \return 0 if the specified module was not found.
- * \retval 1 if the module was found but cannot be reloaded.
- * \retval -1 if a reload operation is already in progress.
- * \retval 2 if the specfied module was found and reloaded.
- */
-int ast_module_reload(const char *name);
/*!
* \brief Register a function to be executed before Asterisk exits.
--- /dev/null
+/*
+ * Prototypes for public functions only of internal interest,
+ * normally not used by modules.
+ * What goes here are typically *_init() routines.
+ */
+
+#ifndef _ASTERISK__PRIVATE_H
+#define _ASTERISK__PRIVATE_H
+
+int load_modules(unsigned int); /*!< Provided by loader.c */
+int load_pbx(void); /*!< Provided by pbx.c */
+int init_logger(void); /*!< Provided by logger.c */
+void close_logger(void); /*!< Provided by logger.c */
+int init_framer(void); /*!< Provided by frame.c */
+int ast_term_init(void); /*!< Provided by term.c */
+int astdb_init(void); /*!< Provided by db.c */
+void ast_channels_init(void); /*!< Provided by channel.c */
+void ast_builtins_init(void); /*!< Provided by cli.c */
+int dnsmgr_init(void); /*!< Provided by dnsmgr.c */
+void dnsmgr_start_refresh(void); /*!< Provided by dnsmgr.c */
+int dnsmgr_reload(void); /*!< Provided by dnsmgr.c */
+void threadstorage_init(void); /*!< Provided by threadstorage.c */
+void ast_event_init(void); /*!< Provided by event.c */
+int ast_device_state_engine_init(void); /*!< Provided by devicestate.c */
+int astobj2_init(void); /*! Provided by astobj2.c */
+
+/*!
+ * \brief Reload asterisk modules.
+ * \param name the name of the module to reload
+ *
+ * This function reloads the specified module, or if no modules are specified,
+ * it will reload all loaded modules.
+ *
+ * \note Modules are reloaded using their reload() functions, not unloading
+ * them and loading them again.
+ *
+ * \return 0 if the specified module was not found.
+ * \retval 1 if the module was found but cannot be reloaded.
+ * \retval -1 if a reload operation is already in progress.
+ * \retval 2 if the specfied module was found and reloaded.
+ */
+int ast_module_reload(const char *name);
+
+#endif /* _ASTERISK__PRIVATE_H */
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
+
#undef sched_setscheduler
#undef setpriority
#include <sys/time.h>
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include "asterisk/astobj2.h"
#include "asterisk/utils.h"
#include "asterisk/cli.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
+
#include <sys/time.h>
#include <signal.h>
#include <math.h>
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include <sys/signal.h>
#include <signal.h>
#include <ctype.h>
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include <sys/time.h>
#include <signal.h>
#include <dirent.h>
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include "asterisk/channel.h"
#include "asterisk/utils.h"
#include "asterisk/lock.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include <regex.h>
#include <signal.h>
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include "asterisk/event.h"
#include "asterisk/linkedlists.h"
#include "asterisk/lock.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include "asterisk/lock.h"
#include "asterisk/frame.h"
#include "asterisk/options.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include <dirent.h>
#include "asterisk/linkedlists.h"
* \author Mark Spencer <markster@digium.com>
*/
-/* Prevent inclusion of logger.h - it redefines LOG_* which we need
- * to define syslog_level_map. Later, we force its inclusion again.
+/*
+ * define _ASTERISK_LOGGER_H to prevent the inclusion of logger.h;
+ * it redefines LOG_* which we need to define syslog_level_map.
+ * Later, we force the inclusion of logger.h again.
*/
#define _ASTERISK_LOGGER_H
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include <signal.h>
#include <time.h>
#include <sys/stat.h>
return res;
}
-int reload_logger(int rotate)
+static int reload_logger(int rotate)
{
char old[PATH_MAX] = "";
int event_rotate = rotate, queue_rotate = rotate;
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include <ctype.h>
#include <sys/time.h>
#include <signal.h>
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include <ctype.h>
#include <time.h>
#include <sys/time.h>
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+#include "asterisk/_private.h"
#include <sys/time.h>
#include <signal.h>
#include <sys/stat.h>
*/
#include "asterisk.h"
+#include "asterisk/_private.h"
-#if defined(DEBUG_THREADLOCALS)
+#if !defined(DEBUG_THREADLOCALS)
+
+void threadstorage_init(void)
+{
+}
+
+#else /* !defined(DEBUG_THREADLOCALS) */
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
ast_cli_register_multiple(cli, sizeof(cli) / sizeof(cli[0]));
}
-#else /* !defined(DEBUG_THREADLOCALS) */
-
-void threadstorage_init(void)
-{
-}
-
#endif /* !defined(DEBUG_THREADLOCALS) */