|
|
|
@ -35,6 +35,34 @@
|
|
|
|
|
#define setpriority __PLEASE_USE_ast_set_priority_INSTEAD_OF_setpriority__
|
|
|
|
|
#define sched_setscheduler __PLEASE_USE_ast_set_priority_INSTEAD_OF_sched_setscheduler__
|
|
|
|
|
|
|
|
|
|
#if defined(DEBUG_FD_LEAKS) && !defined(STANDALONE) && !defined(STANDALONE_AEL)
|
|
|
|
|
/* These includes are all about ordering */
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
#include <sys/stat.h>
|
|
|
|
|
#include <sys/socket.h>
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
#include <fcntl.h>
|
|
|
|
|
|
|
|
|
|
#define open(a,...) __ast_fdleak_open(__FILE__,__LINE__,__PRETTY_FUNCTION__, a, __VA_ARGS__)
|
|
|
|
|
#define pipe(a) __ast_fdleak_pipe(a, __FILE__,__LINE__,__PRETTY_FUNCTION__)
|
|
|
|
|
#define socket(a,b,c) __ast_fdleak_socket(a, b, c, __FILE__,__LINE__,__PRETTY_FUNCTION__)
|
|
|
|
|
#define close(a) __ast_fdleak_close(a)
|
|
|
|
|
#define fopen(a,b) __ast_fdleak_fopen(a, b, __FILE__,__LINE__,__PRETTY_FUNCTION__)
|
|
|
|
|
#define fclose(a) __ast_fdleak_fclose(a)
|
|
|
|
|
#define dup2(a,b) __ast_fdleak_dup2(a, b, __FILE__,__LINE__,__PRETTY_FUNCTION__)
|
|
|
|
|
#define dup(a) __ast_fdleak_dup(a, __FILE__,__LINE__,__PRETTY_FUNCTION__)
|
|
|
|
|
|
|
|
|
|
int __ast_fdleak_open(const char *file, int line, const char *func, const char *path, int flags, ...);
|
|
|
|
|
int __ast_fdleak_pipe(int *fds, const char *file, int line, const char *func);
|
|
|
|
|
int __ast_fdleak_socket(int domain, int type, int protocol, const char *file, int line, const char *func);
|
|
|
|
|
int __ast_fdleak_close(int fd);
|
|
|
|
|
FILE *__ast_fdleak_fopen(const char *path, const char *mode, const char *file, int line, const char *func);
|
|
|
|
|
int __ast_fdleak_fclose(FILE *ptr);
|
|
|
|
|
int __ast_fdleak_dup2(int oldfd, int newfd, const char *file, int line, const char *func);
|
|
|
|
|
int __ast_fdleak_dup(int oldfd, const char *file, int line, const char *func);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* provided in asterisk.c */
|
|
|
|
|
extern char ast_config_AST_CONFIG_DIR[PATH_MAX];
|
|
|
|
|
extern char ast_config_AST_CONFIG_FILE[PATH_MAX];
|
|
|
|
@ -73,6 +101,7 @@ int dnsmgr_reload(void); /*!< Provided by dnsmgr.c */
|
|
|
|
|
void threadstorage_init(void); /*!< Provided by threadstorage.c */
|
|
|
|
|
int astobj2_init(void); /*! Provided by astobj2.c */
|
|
|
|
|
void ast_autoservice_init(void); /*!< Provided by autoservice.c */
|
|
|
|
|
int ast_fd_init(void); /*!< Provided by astfd.c */
|
|
|
|
|
|
|
|
|
|
/* Many headers need 'ast_channel' to be defined */
|
|
|
|
|
struct ast_channel;
|
|
|
|
|