core: Create main/options.c.

This creates a separate source to 'own' symbols related to options.h and
paths.h.  This significantly reduces the number of exports created by
main/asterisk.o.  This change is required to eventually be able to
link unmodified Asterisk sources to utilities and/or stand-alone tests.

ASTERISK~26245

Change-Id: I5cf184f4757f9363b80c9e678bdc35c477122380
This commit is contained in:
Corey Farrell
2018-03-21 23:00:56 -04:00
parent fa892d8dfd
commit a6d58c518a
4 changed files with 487 additions and 415 deletions

View File

@@ -15,6 +15,11 @@
#ifndef _ASTERISK__PRIVATE_H
#define _ASTERISK__PRIVATE_H
/* Load settings from asterisk.conf, provided by options.c */
void load_asterisk_conf(void);
void set_asterisk_conf_path(const char *path);
void set_socket_path(const char *path);
int load_modules(unsigned int); /*!< Provided by loader.c */
int modules_shutdown(void); /*!< Provided by loader.c */
int load_pbx(void); /*!< Provided by pbx.c */

View File

@@ -37,5 +37,9 @@ extern const char *ast_config_AST_RUN_GROUP;
extern const char *ast_config_AST_RUN_USER;
extern const char *ast_config_AST_SYSTEM_NAME;
extern const char *ast_config_AST_SBIN_DIR;
extern const char *ast_config_AST_CTL_PERMISSIONS;
extern const char *ast_config_AST_CTL_OWNER;
extern const char *ast_config_AST_CTL_GROUP;
extern const char *ast_config_AST_CTL;
#endif /* _ASTERISK_PATHS_H */