Start untangling header inclusion in a way that does not affect
authorLuigi Rizzo <rizzo@icir.org>
Fri, 16 Nov 2007 20:04:58 +0000 (20:04 +0000)
committerLuigi Rizzo <rizzo@icir.org>
Fri, 16 Nov 2007 20:04:58 +0000 (20:04 +0000)
commitfdb7f7ba3da0b1bb02c782eba68aa1fa4ba96800
treec012d8f76915d410cf7446b1efc51e3c2e3f5e95
parentfd7b3e7261ab74af7e8a98f5090bef00c31de8a5
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: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
265 files changed:
Makefile.rules
apps/app_adsiprog.c
apps/app_alarmreceiver.c
apps/app_amd.c
apps/app_authenticate.c
apps/app_cdr.c
apps/app_chanisavail.c
apps/app_channelredirect.c
apps/app_chanspy.c
apps/app_controlplayback.c
apps/app_db.c
apps/app_dial.c
apps/app_dictate.c
apps/app_directed_pickup.c
apps/app_directory.c
apps/app_disa.c
apps/app_dumpchan.c
apps/app_echo.c
apps/app_exec.c
apps/app_externalivr.c
apps/app_festival.c
apps/app_flash.c
apps/app_followme.c
apps/app_forkcdr.c
apps/app_getcpeid.c
apps/app_ices.c
apps/app_image.c
apps/app_ivrdemo.c
apps/app_macro.c
apps/app_meetme.c
apps/app_milliwatt.c
apps/app_minivm.c
apps/app_mixmonitor.c
apps/app_morsecode.c
apps/app_mp3.c
apps/app_nbscat.c
apps/app_osplookup.c
apps/app_page.c
apps/app_parkandannounce.c
apps/app_playback.c
apps/app_privacy.c
apps/app_queue.c
apps/app_read.c
apps/app_readexten.c
apps/app_readfile.c
apps/app_record.c
apps/app_rpt.c
apps/app_sayunixtime.c
apps/app_senddtmf.c
apps/app_sendtext.c
apps/app_setcallerid.c
apps/app_skel.c
apps/app_sms.c
apps/app_softhangup.c
apps/app_speech_utils.c
apps/app_stack.c
apps/app_system.c
apps/app_talkdetect.c
apps/app_test.c
apps/app_transfer.c
apps/app_url.c
apps/app_userevent.c
apps/app_verbose.c
apps/app_voicemail.c
apps/app_waitforring.c
apps/app_waitforsilence.c
apps/app_while.c
apps/app_zapateller.c
apps/app_zapbarge.c
apps/app_zapras.c
apps/app_zapscan.c
cdr/cdr_adaptive_odbc.c
cdr/cdr_csv.c
cdr/cdr_custom.c
cdr/cdr_manager.c
cdr/cdr_odbc.c
cdr/cdr_pgsql.c
cdr/cdr_radius.c
cdr/cdr_sqlite.c
cdr/cdr_sqlite3_custom.c
cdr/cdr_tds.c
channels/chan_agent.c
channels/chan_alsa.c
channels/chan_features.c
channels/chan_gtalk.c
channels/chan_h323.c
channels/chan_iax2.c
channels/chan_jingle.c
channels/chan_local.c
channels/chan_mgcp.c
channels/chan_misdn.c
channels/chan_nbs.c
channels/chan_oss.c
channels/chan_phone.c
channels/chan_sip.c
channels/chan_skinny.c
channels/chan_unistim.c
channels/chan_usbradio.c
channels/chan_vpb.cc
channels/chan_zap.c
channels/iax2-parser.c
channels/iax2-provision.c
channels/misdn_config.c
codecs/codec_a_mu.c
codecs/codec_adpcm.c
codecs/codec_alaw.c
codecs/codec_g722.c
codecs/codec_g726.c
codecs/codec_gsm.c
codecs/codec_ilbc.c
codecs/codec_lpc10.c
codecs/codec_speex.c
codecs/codec_ulaw.c
codecs/codec_zap.c
formats/format_g723.c
formats/format_g726.c
formats/format_g729.c
formats/format_gsm.c
formats/format_h263.c
formats/format_h264.c
formats/format_ilbc.c
formats/format_jpeg.c
formats/format_ogg_vorbis.c
formats/format_pcm.c
formats/format_sln.c
formats/format_vox.c
formats/format_wav.c
formats/format_wav_gsm.c
funcs/func_base64.c
funcs/func_blacklist.c
funcs/func_callerid.c
funcs/func_cdr.c
funcs/func_channel.c
funcs/func_curl.c
funcs/func_cut.c
funcs/func_db.c
funcs/func_devstate.c
funcs/func_dialgroup.c
funcs/func_enum.c
funcs/func_env.c
funcs/func_extstate.c
funcs/func_global.c
funcs/func_groupcount.c
funcs/func_iconv.c
funcs/func_lock.c
funcs/func_logic.c
funcs/func_math.c
funcs/func_md5.c
funcs/func_module.c
funcs/func_odbc.c
funcs/func_rand.c
funcs/func_realtime.c
funcs/func_sha1.c
funcs/func_shell.c
funcs/func_strings.c
funcs/func_timeout.c
funcs/func_uri.c
funcs/func_version.c
funcs/func_vmcount.c
funcs/func_volume.c
include/asterisk/abstract_jb.h
include/asterisk/astmm.h
include/asterisk/astobj.h
include/asterisk/cli.h
include/asterisk/compat.h
include/asterisk/config.h
include/asterisk/file.h
include/asterisk/lock.h
include/asterisk/logger.h
include/asterisk/manager.h
include/asterisk/md5.h
include/asterisk/plc.h
include/asterisk/sha1.h
include/asterisk/slinfactory.h
include/asterisk/stringfields.h
include/asterisk/strings.h
include/asterisk/time.h
include/asterisk/utils.h
main/abstract_jb.c
main/acl.c
main/adsistub.c
main/app.c
main/asterisk.c
main/astmm.c
main/audiohook.c
main/autoservice.c
main/callerid.c
main/cdr.c
main/channel.c
main/chanvars.c
main/cli.c
main/config.c
main/cryptostub.c
main/db.c
main/devicestate.c
main/dial.c
main/dlfcn.c
main/dns.c
main/dnsmgr.c
main/dsp.c
main/enum.c
main/event.c
main/file.c
main/fixedjitterbuf.c
main/frame.c
main/fskmodem.c
main/hashtab.c
main/http.c
main/image.c
main/indications.c
main/io.c
main/jitterbuf.c
main/loader.c
main/logger.c
main/manager.c
main/md5.c
main/netsock.c
main/pbx.c
main/plc.c
main/privacy.c
main/rtp.c
main/say.c
main/sched.c
main/sha1.c
main/slinfactory.c
main/srv.c
main/stdtime/localtime.c
main/strcompat.c
main/tdd.c
main/term.c
main/threadstorage.c
main/translate.c
main/udptl.c
main/utils.c
pbx/dundi-parser.c
pbx/pbx_ael.c
pbx/pbx_config.c
pbx/pbx_dundi.c
pbx/pbx_gtkconsole.c
pbx/pbx_loopback.c
pbx/pbx_lua.c
pbx/pbx_realtime.c
pbx/pbx_spool.c
res/res_adsi.c
res/res_ael_share.c
res/res_agi.c
res/res_clioriginate.c
res/res_config_odbc.c
res/res_config_pgsql.c
res/res_config_sqlite.c
res/res_convert.c
res/res_crypto.c
res/res_features.c
res/res_indications.c
res/res_jabber.c
res/res_limit.c
res/res_monitor.c
res/res_musiconhold.c
res/res_odbc.c
res/res_realtime.c
res/res_smdi.c
res/res_speech.c
utils/ael_main.c
utils/hashtest.c
utils/hashtest2.c