summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2017-04-07 14:48:36 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-04-07 14:48:36 -0500
commit0e7d29501d3b627765fbca892a6d3596bda36ae6 (patch)
treec0a1cf7f54c4bf925f428e240612b99edc22893f /include/asterisk
parent33f29240daebe8aec158451f593d418d20159af1 (diff)
parent8e36064109b6fabc6cd8caa59e48f9b523c7485b (diff)
Merge "core: Improve/simplify handling of required headers."
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/astmm.h15
-rw-r--r--include/asterisk/autoconfig.h.in51
-rw-r--r--include/asterisk/compat.h20
3 files changed, 49 insertions, 37 deletions
diff --git a/include/asterisk/astmm.h b/include/asterisk/astmm.h
index e129dc034..06300c861 100644
--- a/include/asterisk/astmm.h
+++ b/include/asterisk/astmm.h
@@ -30,21 +30,10 @@ extern "C" {
#ifndef _ASTERISK_ASTMM_H
#define _ASTERISK_ASTMM_H
-/* IWYU pragma: private, include "asterisk/utils.h" */
-
-#ifndef STANDALONE
+/* IWYU pragma: private, include "asterisk.h" */
#define __AST_DEBUG_MALLOC
-#include "asterisk.h"
-
-/* Include these now to prevent them from being needed later */
-#include <sys/types.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdarg.h>
-
void *ast_std_malloc(size_t size);
void *ast_std_calloc(size_t nmemb, size_t size);
void *ast_std_realloc(void *ptr, size_t size);
@@ -179,8 +168,6 @@ void __ast_mm_init_phase_2(void);
#define ast_free(a) \
__ast_free(a,__FILE__, __LINE__, __PRETTY_FUNCTION__)
-#endif /* !STANDALONE */
-
#else
#error "NEVER INCLUDE astmm.h DIRECTLY!!"
#endif /* _ASTERISK_ASTMM_H */
diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in
index 5446b010c..5f8a9d37c 100644
--- a/include/asterisk/autoconfig.h.in
+++ b/include/asterisk/autoconfig.h.in
@@ -62,6 +62,9 @@
/* Define to 1 if you have the `asprintf' function. */
#undef HAVE_ASPRINTF
+/* Define to 1 if you have the <assert.h> header file. */
+#undef HAVE_ASSERT_H
+
/* Define to 1 if you have the `atan' function. */
#undef HAVE_ATAN
@@ -170,6 +173,9 @@
/* Define to 1 if you have the 'crypt_r' function. */
#undef HAVE_CRYPT_R
+/* Define to 1 if you have the <ctype.h> header file. */
+#undef HAVE_CTYPE_H
+
/* Define to 1 if you have a functional curl library. */
#undef HAVE_CURL
@@ -198,6 +204,9 @@
/* Define to 1 if your system has the dladdr() GNU extension */
#undef HAVE_DLADDR
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
#undef HAVE_DOPRNT
@@ -210,6 +219,9 @@
/* Define to 1 if you have the `endpwent' function. */
#undef HAVE_ENDPWENT
+/* Define to 1 if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
/* Define to 1 if you have the `euidaccess' function. */
#undef HAVE_EUIDACCESS
@@ -243,6 +255,9 @@
/* Define to 1 if you have the LIBFFTW3 library. */
#undef HAVE_FFTW3
+/* Define to 1 if you have the <float.h> header file. */
+#undef HAVE_FLOAT_H
+
/* Define to 1 if you have the `floor' function. */
#undef HAVE_FLOOR
@@ -312,6 +327,9 @@
/* Define if your system has the GMIME libraries. */
#undef HAVE_GMIME
+/* Define to 1 if you have the <grp.h> header file. */
+#undef HAVE_GRP_H
+
/* Define to indicate the GSM library */
#undef HAVE_GSM
@@ -461,6 +479,9 @@
/* Define to 1 if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
+/* Define to 1 if you have the <math.h> header file. */
+#undef HAVE_MATH_H
+
/* Define to 1 if you have the `memchr' function. */
#undef HAVE_MEMCHR
@@ -756,6 +777,9 @@
/* Define to 1 if you have the `putenv' function. */
#undef HAVE_PUTENV
+/* Define to 1 if you have the <pwd.h> header file. */
+#undef HAVE_PWD_H
+
/* Define if your system has the PWLib libraries. */
#undef HAVE_PWLIB
@@ -768,6 +792,9 @@
/* Define to 1 if you have the `regcomp' function. */
#undef HAVE_REGCOMP
+/* Define to 1 if you have the <regex.h> header file. */
+#undef HAVE_REGEX_H
+
/* Define to 1 if you have the `remainder' function. */
#undef HAVE_REMAINDER
@@ -777,6 +804,9 @@
/* Define to 1 if you have the LIBRESAMPLE library. */
#undef HAVE_RESAMPLE
+/* Define to 1 if you have the <resolv.h> header file. */
+#undef HAVE_RESOLV_H
+
/* Define to 1 if your system has the close resolver function. */
#undef HAVE_RES_CLOSE
@@ -813,6 +843,9 @@
/* Define to 1 if your system has /sbin/launchd. */
#undef HAVE_SBIN_LAUNCHD
+/* Define to 1 if you have the <sched.h> header file. */
+#undef HAVE_SCHED_H
+
/* Define if your system has the SDL libraries. */
#undef HAVE_SDL
@@ -893,6 +926,9 @@
zero-length file name argument. */
#undef HAVE_STAT_EMPTY_STRING_BUG
+/* Define to 1 if you have the <stdarg.h> header file. */
+#undef HAVE_STDARG_H
+
/* Define to 1 if stdbool.h conforms to C99. */
#undef HAVE_STDBOOL_H
@@ -902,6 +938,9 @@
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
@@ -1070,9 +1109,6 @@
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
-/* Define to 1 if you have the <sys/io.h> header file. */
-#undef HAVE_SYS_IO_H
-
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_NDIR_H
@@ -1083,6 +1119,9 @@
/* Define to 1 if your system has working sys/poll.h */
#undef HAVE_SYS_POLL_H
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
/* Define to 1 if you have the <sys/select.h> header file. */
#undef HAVE_SYS_SELECT_H
@@ -1101,6 +1140,9 @@
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
+/* Define to 1 if you have the <sys/un.h> header file. */
+#undef HAVE_SYS_UN_H
+
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
@@ -1122,6 +1164,9 @@
/* Define to 1 if your system defines timersub. */
#undef HAVE_TIMERSUB
+/* Define to 1 if you have the <time.h> header file. */
+#undef HAVE_TIME_H
+
/* Define to 1 if you have the Term Info library. */
#undef HAVE_TINFO
diff --git a/include/asterisk/compat.h b/include/asterisk/compat.h
index 252ce914a..88f88cf8b 100644
--- a/include/asterisk/compat.h
+++ b/include/asterisk/compat.h
@@ -27,35 +27,18 @@
#define __STDC_VERSION__ 0
#endif
-#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
-#endif
-
-#ifdef HAVE_LIMITS_H
#include <limits.h>
-#endif
-
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif
-#ifdef HAVE_STDINT_H
#include <stdint.h>
-#endif
-
-#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
-#endif
-
#include <stdarg.h>
-
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
#ifdef HAVE_ALLOCA_H
#include <alloca.h> /* not necessarily present - could be in stdlib */
@@ -65,9 +48,7 @@
#include <stdio.h> /* this is always present */
-#ifdef HAVE_STRING_H
#include <string.h>
-#endif
#ifndef AST_POLL_COMPAT
#include <poll.h>
@@ -158,7 +139,6 @@ void timersub(struct timeval *tvend, struct timeval *tvstart, struct timeval *tv
#include <alloca.h>
#include <strings.h>
-#include <string.h>
#include <pthread.h>
#include <sys/stat.h>
#include <signal.h>