diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-16 20:04:58 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-16 20:04:58 +0000 |
commit | 883346d64a852193fb4119d4399aa0f5a54d8ae8 (patch) | |
tree | c012d8f76915d410cf7446b1efc51e3c2e3f5e95 /pbx | |
parent | 4948a0f37cad4e682bdd7860e0c2f01c6cb38ef7 (diff) |
Start untangling header inclusion in a way that does not affect
build times - tested, there is no measureable difference before and
after this commit.
In this change:
use asterisk/compat.h to include a small set of system headers:
inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h,
stdlib.h, alloca.h, stdio.h
Where available, the inclusion is conditional on HAVE_FOO_H as determined
by autoconf.
Normally, source files should not include any of the above system headers,
and instead use either "asterisk.h" or "asterisk/compat.h" which does it
better.
For the time being I have left alone second-level directories
(main/db1-ast, etc.).
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r-- | pbx/dundi-parser.c | 6 | ||||
-rw-r--r-- | pbx/pbx_ael.c | 5 | ||||
-rw-r--r-- | pbx/pbx_config.c | 4 | ||||
-rw-r--r-- | pbx/pbx_dundi.c | 4 | ||||
-rw-r--r-- | pbx/pbx_gtkconsole.c | 6 | ||||
-rw-r--r-- | pbx/pbx_loopback.c | 4 | ||||
-rw-r--r-- | pbx/pbx_lua.c | 3 | ||||
-rw-r--r-- | pbx/pbx_realtime.c | 4 | ||||
-rw-r--r-- | pbx/pbx_spool.c | 6 |
9 files changed, 0 insertions, 42 deletions
diff --git a/pbx/dundi-parser.c b/pbx/dundi-parser.c index e618264a0..0d57cf7db 100644 --- a/pbx/dundi-parser.c +++ b/pbx/dundi-parser.c @@ -26,15 +26,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") -#include <sys/types.h> #include <sys/socket.h> -#include <string.h> #include <netinet/in.h> #include <arpa/inet.h> -#include <unistd.h> -#include <stdlib.h> -#include <stdio.h> -#include <stddef.h> #include "asterisk/frame.h" #include "asterisk/utils.h" diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c index e6d1fdc87..95e6a1693 100644 --- a/pbx/pbx_ael.c +++ b/pbx/pbx_ael.c @@ -30,11 +30,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") -#include <sys/types.h> -#include <stdlib.h> -#include <unistd.h> -#include <stdio.h> -#include <string.h> #include <ctype.h> #include <errno.h> #include <regex.h> diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c index 0a62da744..24fa13ee4 100644 --- a/pbx/pbx_config.c +++ b/pbx/pbx_config.c @@ -27,10 +27,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") -#include <sys/types.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> #include <ctype.h> #include <errno.h> diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c index 611483a37..6f469214d 100644 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -30,13 +30,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") -#include <stdlib.h> -#include <stdio.h> -#include <unistd.h> #include <netinet/in.h> #include <arpa/inet.h> #include <sys/socket.h> -#include <string.h> #include <errno.h> #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(SOLARIS) || defined(__Darwin__) #include <sys/types.h> diff --git a/pbx/pbx_gtkconsole.c b/pbx/pbx_gtkconsole.c index e1cb6dc5a..45a951d85 100644 --- a/pbx/pbx_gtkconsole.c +++ b/pbx/pbx_gtkconsole.c @@ -31,13 +31,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") -#include <sys/types.h> -#include <stdlib.h> #include <fcntl.h> -#include <unistd.h> -#include <stdio.h> -#include <string.h> -#include <stdarg.h> #include <signal.h> #include <sys/time.h> diff --git a/pbx/pbx_loopback.c b/pbx/pbx_loopback.c index 3221fb65d..47ac2f856 100644 --- a/pbx/pbx_loopback.c +++ b/pbx/pbx_loopback.c @@ -26,10 +26,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") -#include <stdlib.h> -#include <stdio.h> -#include <unistd.h> -#include <string.h> #include <errno.h> #include "asterisk/file.h" diff --git a/pbx/pbx_lua.c b/pbx/pbx_lua.c index c4701b3d0..d6f24514c 100644 --- a/pbx/pbx_lua.c +++ b/pbx/pbx_lua.c @@ -32,9 +32,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") -#include <stdlib.h> -#include <stdio.h> -#include <string.h> #include <errno.h> #include "asterisk/logger.h" diff --git a/pbx/pbx_realtime.c b/pbx/pbx_realtime.c index 0d92fa720..4ef9ea225 100644 --- a/pbx/pbx_realtime.c +++ b/pbx/pbx_realtime.c @@ -27,10 +27,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") -#include <stdlib.h> -#include <stdio.h> -#include <unistd.h> -#include <string.h> #include <errno.h> #include "asterisk/file.h" diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c index cac64737a..46cc44c9b 100644 --- a/pbx/pbx_spool.c +++ b/pbx/pbx_spool.c @@ -30,13 +30,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <errno.h> #include <time.h> #include <utime.h> -#include <stdlib.h> -#include <unistd.h> #include <dirent.h> -#include <string.h> -#include <string.h> -#include <stdio.h> -#include <unistd.h> #include "asterisk/lock.h" #include "asterisk/file.h" |