build: fix circular header inclusion with other packages
authorYang Tse <yangsita@gmail.com>
Sun, 6 Jan 2013 18:06:49 +0000 (19:06 +0100)
committerYang Tse <yangsita@gmail.com>
Tue, 8 Jan 2013 23:49:50 +0000 (00:49 +0100)
commit5a053ffe80289b8472f88d7f11f29fbc98d4d9fd
tree56a9a2ecdf9f5920a7d211f63c71baaf09b3a162
parente2bcd2ab9e5ad894a57756fa660d2a07b69171f4
build: fix circular header inclusion with other packages

This commit renames lib/setup.h to lib/curl_setup.h and
renames lib/setup_once.h to lib/curl_setup_once.h.

Removes the need and usage of a header inclusion guard foreign
to libcurl. [1]

Removes the need and presence of an alarming notice we carried
in old setup_once.h [2]

----------------------------------------

1 - lib/setup_once.h used __SETUP_ONCE_H macro as header inclusion guard
    up to commit ec691ca3 which changed this to HEADER_CURL_SETUP_ONCE_H,
    this single inclusion guard is enough to ensure that inclusion of
    lib/setup_once.h done from lib/setup.h is only done once.

    Additionally lib/setup.h has always used __SETUP_ONCE_H macro to
    protect inclusion of setup_once.h even after commit ec691ca3, this
    was to avoid a circular header inclusion triggered when building a
    c-ares enabled version with c-ares sources available which also has
    a setup_once.h header. Commit ec691ca3 exposes the real nature of
    __SETUP_ONCE_H usage in lib/setup.h, it is a header inclusion guard
    foreign to libcurl belonging to c-ares's setup_once.h

    The renaming this commit does, fixes the circular header inclusion,
    and as such removes the need and usage of a header inclusion guard
    foreign to libcurl. Macro __SETUP_ONCE_H no longer used in libcurl.

2 - Due to the circular interdependency of old lib/setup_once.h and the
    c-ares setup_once.h header, old file lib/setup_once.h has carried
    back from 2006 up to now days an alarming and prominent notice about
    the need of keeping libcurl's and c-ares's setup_once.h in sync.

    Given that this commit fixes the circular interdependency, the need
    and presence of mentioned notice is removed.

    All mentioned interdependencies come back from now old days when
    the c-ares project lived inside a curl subdirectory. This commit
    removes last traces of such fact.
183 files changed:
docs/INSTALL
docs/examples/Makefile.am
include/curl/curlrules.h
lib/Makefile.am
lib/Makefile.inc
lib/README.hostip
lib/amigaos.c
lib/amigaos.h
lib/asyn-ares.c
lib/asyn-thread.c
lib/asyn.h
lib/axtls.c
lib/base64.c
lib/bundles.c
lib/conncache.c
lib/connect.c
lib/connect.h
lib/content_encoding.c
lib/content_encoding.h
lib/cookie.c
lib/cookie.h
lib/curl_addrinfo.c
lib/curl_addrinfo.h
lib/curl_darwinssl.c
lib/curl_darwinssl.h
lib/curl_fnmatch.c
lib/curl_gethostname.c
lib/curl_gssapi.c
lib/curl_gssapi.h
lib/curl_md4.h
lib/curl_memrchr.c
lib/curl_memrchr.h
lib/curl_multibyte.c
lib/curl_multibyte.h
lib/curl_ntlm.c
lib/curl_ntlm.h
lib/curl_ntlm_core.c
lib/curl_ntlm_core.h
lib/curl_ntlm_msgs.c
lib/curl_ntlm_msgs.h
lib/curl_ntlm_wb.c
lib/curl_ntlm_wb.h
lib/curl_rand.c
lib/curl_rtmp.c
lib/curl_sasl.c
lib/curl_schannel.c
lib/curl_schannel.h
lib/curl_setup.h [moved from lib/setup.h with 99% similarity]
lib/curl_setup_once.h [moved from lib/setup_once.h with 96% similarity]
lib/curl_sspi.c
lib/curl_sspi.h
lib/curl_threads.c
lib/curl_threads.h
lib/cyassl.c
lib/cyassl.h
lib/dict.c
lib/easy.c
lib/escape.c
lib/file.c
lib/fileinfo.c
lib/formdata.c
lib/ftp.c
lib/ftplistparser.c
lib/ftplistparser.h
lib/getenv.c
lib/getinfo.c
lib/gopher.c
lib/gtls.c
lib/gtls.h
lib/hash.c
lib/hash.h
lib/hmac.c
lib/hostasyn.c
lib/hostcheck.c
lib/hostip.c
lib/hostip.h
lib/hostip4.c
lib/hostip6.c
lib/hostsyn.c
lib/http.c
lib/http_chunks.c
lib/http_digest.c
lib/http_digest.h
lib/http_negotiate.c
lib/http_negotiate_sspi.c
lib/http_proxy.c
lib/idn_win32.c
lib/if2ip.c
lib/if2ip.h
lib/imap.c
lib/inet_ntop.c
lib/inet_ntop.h
lib/inet_pton.c
lib/inet_pton.h
lib/krb4.c
lib/krb5.c
lib/ldap.c
lib/llist.c
lib/llist.h
lib/md4.c
lib/md5.c
lib/memdebug.c
lib/memdebug.h
lib/mprintf.c
lib/multi.c
lib/netrc.c
lib/non-ascii.c
lib/non-ascii.h
lib/nonblock.c
lib/nss.c
lib/nssg.h
lib/nwlib.c
lib/nwos.c
lib/openldap.c
lib/parsedate.c
lib/pingpong.c
lib/pingpong.h
lib/polarssl.c
lib/polarssl.h
lib/pop3.c
lib/progress.c
lib/qssl.c
lib/qssl.h
lib/rawstr.c
lib/rtsp.c
lib/security.c
lib/select.c
lib/select.h
lib/sendf.c
lib/sendf.h
lib/share.c
lib/share.h
lib/slist.c
lib/smtp.c
lib/sockaddr.h
lib/socks.c
lib/socks.h
lib/socks_gssapi.c
lib/socks_sspi.c
lib/speedcheck.c
lib/speedcheck.h
lib/splay.c
lib/splay.h
lib/ssh.c
lib/ssh.h
lib/sslgen.c
lib/sslgen.h
lib/ssluse.c
lib/ssluse.h
lib/strdup.c
lib/strdup.h
lib/strequal.c
lib/strerror.c
lib/strtok.c
lib/strtok.h
lib/strtoofft.c
lib/strtoofft.h
lib/telnet.c
lib/tftp.c
lib/timeval.h
lib/transfer.c
lib/url.c
lib/url.h
lib/urldata.h
lib/version.c
lib/warnless.c
lib/wildcard.c
m4/curl-reentrant.m4
packages/OS400/os400sys.c
src/CMakeLists.txt
src/Makefile.am
src/tool_setup.h
tests/libtest/CMakeLists.txt
tests/libtest/Makefile.am
tests/libtest/chkhostname.c
tests/libtest/sethostname.c
tests/libtest/test.h
tests/libtest/testutil.c
tests/libtest/testutil.h
tests/server/CMakeLists.txt
tests/server/Makefile.am
tests/server/server_setup.h
tests/unit/Makefile.am