diff options
41 files changed, 45 insertions, 6 deletions
diff --git a/apps/app_adsiprog.c b/apps/app_adsiprog.c index d2e288d47..9997ae931 100644 --- a/apps/app_adsiprog.c +++ b/apps/app_adsiprog.c @@ -36,6 +36,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <netinet/in.h> #include <ctype.h> +#include "asterisk/paths.h" /* use ast_config_AST_CONFIG_DIR */ #include "asterisk/file.h" #include "asterisk/channel.h" #include "asterisk/pbx.h" diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 37cb3e5fd..e41614343 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -33,6 +33,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <ctype.h> +#include "asterisk/paths.h" /* use ast_config_AST_MONITOR_DIR */ #include "asterisk/file.h" #include "asterisk/channel.h" #include "asterisk/audiohook.h" diff --git a/apps/app_dial.c b/apps/app_dial.c index dfaa6822d..57756e5b0 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -34,6 +34,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <sys/stat.h> #include <netinet/in.h> +#include "asterisk/paths.h" /* use ast_config_AST_DATA_DIR */ #include "asterisk/lock.h" #include "asterisk/file.h" #include "asterisk/channel.h" diff --git a/apps/app_dictate.c b/apps/app_dictate.c index a5e27c7eb..65625b87f 100644 --- a/apps/app_dictate.c +++ b/apps/app_dictate.c @@ -33,6 +33,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <sys/stat.h> +#include "asterisk/paths.h" /* use ast_config_AST_SPOOL_DIR */ #include "asterisk/file.h" #include "asterisk/channel.h" #include "asterisk/pbx.h" diff --git a/apps/app_directory.c b/apps/app_directory.c index 41252692c..233b40495 100644 --- a/apps/app_directory.c +++ b/apps/app_directory.c @@ -31,6 +31,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <ctype.h> +#include "asterisk/paths.h" /* use ast_config_AST_SPOOL_DIR */ #include "asterisk/lock.h" #include "asterisk/file.h" #include "asterisk/channel.h" diff --git a/apps/app_followme.c b/apps/app_followme.c index 57f440b31..48677d6bd 100644 --- a/apps/app_followme.c +++ b/apps/app_followme.c @@ -34,6 +34,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <signal.h> +#include "asterisk/paths.h" /* use ast_config_AST_SPOOL_DIR */ #include "asterisk/lock.h" #include "asterisk/file.h" #include "asterisk/channel.h" diff --git a/apps/app_ices.c b/apps/app_ices.c index 6f6c54b39..0c00178e0 100644 --- a/apps/app_ices.c +++ b/apps/app_ices.c @@ -35,6 +35,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <fcntl.h> #include <sys/time.h> +#include "asterisk/paths.h" /* use ast_config_AST_CONFIG_DIR */ #include "asterisk/lock.h" #include "asterisk/file.h" #include "asterisk/channel.h" diff --git a/apps/app_minivm.c b/apps/app_minivm.c index a33415fe8..94fb1f62d 100644 --- a/apps/app_minivm.c +++ b/apps/app_minivm.c @@ -154,6 +154,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <locale.h> +#include "asterisk/paths.h" /* use various paths */ #include "asterisk/astobj.h" #include "asterisk/lock.h" #include "asterisk/file.h" diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c index 775c4fc68..1ce333bf9 100644 --- a/apps/app_mixmonitor.c +++ b/apps/app_mixmonitor.c @@ -37,6 +37,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") +#include "asterisk/paths.h" /* use ast_config_AST_MONITOR_DIR */ #include "asterisk/file.h" #include "asterisk/channel.h" #include "asterisk/audiohook.h" diff --git a/apps/app_sms.c b/apps/app_sms.c index 8a986a2e9..80fdf9f81 100644 --- a/apps/app_sms.c +++ b/apps/app_sms.c @@ -42,6 +42,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <ctype.h> #include <sys/stat.h> +#include "asterisk/paths.h" /* use ast_config_AST_SPOOL_DIR and LOG_DIR */ #include "asterisk/lock.h" #include "asterisk/file.h" #include "asterisk/options.h" diff --git a/apps/app_test.c b/apps/app_test.c index 3853bc322..89853cb6b 100644 --- a/apps/app_test.c +++ b/apps/app_test.c @@ -34,6 +34,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <fcntl.h> #include <sys/stat.h> +#include "asterisk/paths.h" /* use ast_config_AST_LOG_DIR */ #include "asterisk/channel.h" #include "asterisk/options.h" #include "asterisk/module.h" diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 0287b6657..297fd25d2 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -65,6 +65,7 @@ c-client (http://www.washington.edu/imap/ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") +#include "asterisk/paths.h" /* use ast_config_AST_SPOOL_DIR */ #include <sys/time.h> #include <sys/stat.h> #include <sys/mman.h> diff --git a/cdr/cdr_csv.c b/cdr/cdr_csv.c index 06e03c972..2feda2fd2 100644 --- a/cdr/cdr_csv.c +++ b/cdr/cdr_csv.c @@ -34,6 +34,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <time.h> +#include "asterisk/paths.h" /* use ast_config_AST_LOG_DIR */ #include "asterisk/config.h" #include "asterisk/channel.h" #include "asterisk/cdr.h" diff --git a/cdr/cdr_custom.c b/cdr/cdr_custom.c index dab0a1b9f..fbfb8d527 100644 --- a/cdr/cdr_custom.c +++ b/cdr/cdr_custom.c @@ -36,6 +36,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <time.h> +#include "asterisk/paths.h" /* use ast_config_AST_LOG_DIR */ #include "asterisk/channel.h" #include "asterisk/cdr.h" #include "asterisk/module.h" diff --git a/cdr/cdr_sqlite3_custom.c b/cdr/cdr_sqlite3_custom.c index 780b252ff..11316c59f 100644 --- a/cdr/cdr_sqlite3_custom.c +++ b/cdr/cdr_sqlite3_custom.c @@ -43,6 +43,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <time.h> #include <sqlite3.h> +#include "asterisk/paths.h" /* use ast_config_AST_LOG_DIR */ #include "asterisk/channel.h" #include "asterisk/cdr.h" #include "asterisk/module.h" diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 42b899714..0bd4cd09b 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -54,6 +54,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <regex.h> #include "asterisk/zapata.h" +#include "asterisk/paths.h" /* need ast_config_AST_DATA_DIR for firmware */ #include "asterisk/lock.h" #include "asterisk/frame.h" diff --git a/channels/chan_sip.c b/channels/chan_sip.c index b2b8c4b7c..93fc84e05 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -95,6 +95,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <regex.h> #include "asterisk/network.h" +#include "asterisk/paths.h" /* need ast_config_AST_SYSTEM_NAME */ #include "asterisk/lock.h" #include "asterisk/channel.h" diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c index 7cd9aab46..898026e48 100644 --- a/channels/chan_unistim.c +++ b/channels/chan_unistim.c @@ -50,6 +50,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <arpa/inet.h> #include <ctype.h> +#include "asterisk/paths.h" /* ast_config_AST_LOG_DIR used in (too ?) many places */ #include "asterisk/lock.h" #include "asterisk/channel.h" #include "asterisk/config.h" diff --git a/include/asterisk.h b/include/asterisk.h index 5605d2f3b..cb8499c3c 100644 --- a/include/asterisk.h +++ b/include/asterisk.h @@ -29,7 +29,6 @@ #include "asterisk/compat.h" -#include "asterisk/paths.h" #include "asterisk/logger.h" /* Default to allowing the umask or filesystem ACLs to determine actual file diff --git a/include/asterisk/ael_structs.h b/include/asterisk/ael_structs.h index 133c4266a..fa551bf91 100644 --- a/include/asterisk/ael_structs.h +++ b/include/asterisk/ael_structs.h @@ -25,6 +25,12 @@ #ifndef _ASTERISK_AEL_STRUCTS_H #define _ASTERISK_AEL_STRUCTS_H +/* + * We include asterisk/paths.h here because it is a convenient place + * that doesn't require us to rebuild ael files from .fl/.y + */ +#include "asterisk/paths.h" + #include "pval.h" #if !defined(SOLARIS) && !defined(__CYGWIN__) diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index f16c6f0b9..b79c0c29c 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -150,7 +150,6 @@ extern "C" { #include "asterisk/utils.h" #include "asterisk/linkedlists.h" #include "asterisk/stringfields.h" -#include <limits.h> #define DATASTORE_INHERIT_FOREVER INT_MAX diff --git a/include/asterisk/compat.h b/include/asterisk/compat.h index 19ae6e9b1..8a3225a16 100644 --- a/include/asterisk/compat.h +++ b/include/asterisk/compat.h @@ -29,6 +29,10 @@ #include <inttypes.h> #endif +#ifdef HAVE_LIMITS_H +#include <limits.h> +#endif + #ifdef HAVE_UNISTD_H #include <unistd.h> #endif diff --git a/include/asterisk/paths.h b/include/asterisk/paths.h index 4c80c3199..f539c078e 100644 --- a/include/asterisk/paths.h +++ b/include/asterisk/paths.h @@ -18,8 +18,6 @@ #ifndef _ASTERISK_PATHS_H #define _ASTERISK_PATHS_H -#include <limits.h> - extern char ast_config_AST_CONFIG_DIR[PATH_MAX]; extern char ast_config_AST_CONFIG_FILE[PATH_MAX]; extern char ast_config_AST_MODULE_DIR[PATH_MAX]; diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h index 6b55a4272..a9c8d5f0c 100644 --- a/include/asterisk/utils.h +++ b/include/asterisk/utils.h @@ -25,7 +25,6 @@ #include "asterisk/network.h" -#include <limits.h> #include <time.h> /* we want to override localtime_r */ #include "asterisk/lock.h" diff --git a/main/app.c b/main/app.c index 2326cba07..4441932ca 100644 --- a/main/app.c +++ b/main/app.c @@ -35,6 +35,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <regex.h> #include <fcntl.h> +#include "asterisk/paths.h" /* use ast_config_AST_DATA_DIR */ #include "asterisk/channel.h" #include "asterisk/pbx.h" #include "asterisk/file.h" diff --git a/main/channel.c b/main/channel.c index 1fcc096bb..d8524f5e9 100644 --- a/main/channel.c +++ b/main/channel.c @@ -33,6 +33,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <signal.h> #include <math.h> +#include "asterisk/paths.h" /* use ast_config_AST_SYSTEM_NAME */ #include "asterisk/zapata.h" #include "asterisk/pbx.h" diff --git a/main/cli.c b/main/cli.c index b4c4b5fd2..c53fcbe18 100644 --- a/main/cli.c +++ b/main/cli.c @@ -28,6 +28,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/_private.h" +#include "asterisk/paths.h" /* use ast_config_AST_MODULE_DIR */ #include <sys/signal.h> #include <signal.h> #include <ctype.h> diff --git a/main/config.c b/main/config.c index a0c15dce2..b07c809d5 100644 --- a/main/config.c +++ b/main/config.c @@ -30,6 +30,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") +#include "asterisk/paths.h" /* use ast_config_AST_CONFIG_DIR */ #include "asterisk/network.h" /* we do some sockaddr manipulation here */ #include <time.h> #include <sys/stat.h> @@ -32,6 +32,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/_private.h" +#include "asterisk/paths.h" /* use ast_config_AST_DB */ #include <sys/time.h> #include <signal.h> #include <dirent.h> diff --git a/main/file.c b/main/file.c index ddedf8aee..42879819c 100644 --- a/main/file.c +++ b/main/file.c @@ -31,6 +31,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <dirent.h> #include <sys/stat.h> +#include "asterisk/paths.h" /* use ast_config_AST_DATA_DIR */ #include "asterisk/frame.h" #include "asterisk/file.h" #include "asterisk/cli.h" diff --git a/main/http.c b/main/http.c index d9d670e7a..c552bce35 100644 --- a/main/http.c +++ b/main/http.c @@ -32,6 +32,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") +#include "asterisk/paths.h" /* use ast_config_AST_DATA_DIR */ #include "asterisk/network.h" #include <time.h> #include <sys/time.h> diff --git a/main/image.c b/main/image.c index 539f1f8ec..1e763ed5e 100644 --- a/main/image.c +++ b/main/image.c @@ -31,6 +31,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <sys/stat.h> #include <signal.h> +#include "asterisk/paths.h" /* use ast_config_AST_DATA_DIR */ #include "asterisk/sched.h" #include "asterisk/options.h" #include "asterisk/channel.h" diff --git a/main/loader.c b/main/loader.c index 3ffa68758..dcf8854f2 100644 --- a/main/loader.c +++ b/main/loader.c @@ -32,6 +32,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/_private.h" +#include "asterisk/paths.h" /* use ast_config_AST_MODULE_DIR */ #include <dirent.h> #include "asterisk/linkedlists.h" diff --git a/main/logger.c b/main/logger.c index c94cf4b44..3f7634b2a 100644 --- a/main/logger.c +++ b/main/logger.c @@ -36,6 +36,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/_private.h" +#include "asterisk/paths.h" /* use ast_config_AST_LOG_DIR */ #include <signal.h> #include <time.h> #include <sys/stat.h> diff --git a/main/manager.c b/main/manager.c index 14a9d9881..26cb9e7de 100644 --- a/main/manager.c +++ b/main/manager.c @@ -46,6 +46,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/_private.h" +#include "asterisk/paths.h" /* use various ast_config_AST_* */ #include <ctype.h> #include <sys/time.h> #include <signal.h> diff --git a/main/pbx.c b/main/pbx.c index d1a0570c7..62994c7f8 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -28,10 +28,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/_private.h" +#include "asterisk/paths.h" /* use ast_config_AST_SYSTEM_NAME */ #include <ctype.h> #include <time.h> #include <sys/time.h> -#include <limits.h> #if defined(HAVE_SYSINFO) #include <sys/sysinfo.h> #endif diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c index 42e60af77..442d3e1d5 100644 --- a/pbx/pbx_config.c +++ b/pbx/pbx_config.c @@ -29,6 +29,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <ctype.h> +#include "asterisk/paths.h" /* ast_config_AST_CONFIG_DIR */ #include "asterisk/pbx.h" #include "asterisk/config.h" #include "asterisk/options.h" diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c index 31726526a..9b64df721 100644 --- a/pbx/pbx_spool.c +++ b/pbx/pbx_spool.c @@ -31,6 +31,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <utime.h> #include <dirent.h> +#include "asterisk/paths.h" /* use ast_config_AST_SPOOL_DIR */ #include "asterisk/lock.h" #include "asterisk/file.h" #include "asterisk/logger.h" diff --git a/res/res_agi.c b/res/res_agi.c index d8df0791b..cbb8d9823 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -34,6 +34,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <sys/wait.h> #include <sys/stat.h> +#include "asterisk/paths.h" /* use many ast_config_AST_*_DIR */ #include "asterisk/network.h" #include "asterisk/file.h" #include "asterisk/channel.h" diff --git a/res/res_crypto.c b/res/res_crypto.c index a5782f9f0..6903c388c 100644 --- a/res/res_crypto.c +++ b/res/res_crypto.c @@ -34,6 +34,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") +#include "asterisk/paths.h" /* use ast_config_AST_KEY_DIR */ #include <openssl/ssl.h> #include <openssl/err.h> #include <dirent.h> diff --git a/res/res_monitor.c b/res/res_monitor.c index 4a401a411..33906ef01 100644 --- a/res/res_monitor.c +++ b/res/res_monitor.c @@ -30,6 +30,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <sys/stat.h> #include <libgen.h> +#include "asterisk/paths.h" /* use ast_config_AST_MONITOR_DIR */ #include "asterisk/lock.h" #include "asterisk/channel.h" #include "asterisk/file.h" |