core: Improve/simplify handling of required headers.

* Report failures if configure finds a required header is missing.
* Deduplicate includes between asterisk.h, astmm.h and compat.h.
* Unconditionally include headers in compat.h if required elsewhere.

Change-Id: Ie67d0185ca71fbfb81c9bdfaebe46a49e3c56dc5
This commit is contained in:
Corey Farrell
2017-03-31 13:09:38 -04:00
parent cf4dd32bef
commit 8e36064109
6 changed files with 116 additions and 43 deletions

View File

@@ -19,13 +19,12 @@
#define _ASTERISK_H
#include "asterisk/autoconfig.h"
#include "asterisk/compat.h"
#if !defined(NO_MALLOC_DEBUG) && !defined(STANDALONE) && !defined(STANDALONE2) && defined(MALLOC_DEBUG)
#include "asterisk/astmm.h"
#endif
#include "asterisk/compat.h"
/* Default to allowing the umask or filesystem ACLs to determine actual file
* creation permissions
*/
@@ -54,8 +53,6 @@
#if defined(DEBUG_FD_LEAKS) && !defined(STANDALONE) && !defined(STANDALONE2) && !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 <fcntl.h>