aboutsummaryrefslogtreecommitdiff
path: root/lib/setup_once.h
AgeCommit message (Collapse)Author
2013-01-09build: fix circular header inclusion with other packagesYang Tse
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.
2013-01-06Revert changes relative to lib/*.[ch] recent renamingYang Tse
This reverts renaming and usage of lib/*.h header files done 28-12-2012, reverting 2 commits: f871de0... build: make use of 76 lib/*.h renamed files ffd8e12... build: rename 76 lib/*.h files This also reverts removal of redundant include guard (redundant thanks to changes in above commits) done 2-12-2013, reverting 1 commit: c087374... curl_setup.h: remove redundant include guard This also reverts renaming and usage of lib/*.c source files done 3-12-2013, reverting 3 commits: 13606bb... build: make use of 93 lib/*.c renamed files 5b6e792... build: rename 93 lib/*.c files 7d83dff... build: commit 13606bbfde follow-up 1 Start of related discussion thread: http://curl.haxx.se/mail/lib-2013-01/0012.html Asking for confirmation on pushing this revertion commit: http://curl.haxx.se/mail/lib-2013-01/0048.html Confirmation summary: http://curl.haxx.se/mail/lib-2013-01/0079.html NOTICE: The list of 2 files that have been modified by other intermixed commits, while renamed, and also by at least one of the 6 commits this one reverts follows below. These 2 files will exhibit a hole in history unless git's '--follow' option is used when viewing logs. lib/curl_imap.h lib/curl_smtp.h
2012-12-28build: rename 76 lib/*.h filesYang Tse
76 private header files renamed to use our standard naming scheme. This commit only does the file renaming. ---------------------------------------- renamed: amigaos.h -> curl_amigaos.h renamed: arpa_telnet.h -> curl_arpa_telnet.h renamed: asyn.h -> curl_asyn.h renamed: axtls.h -> curl_axtls.h renamed: bundles.h -> curl_bundles.h renamed: conncache.h -> curl_conncache.h renamed: connect.h -> curl_connect.h renamed: content_encoding.h -> curl_content_encoding.h renamed: cookie.h -> curl_cookie.h renamed: cyassl.h -> curl_cyassl.h renamed: dict.h -> curl_dict.h renamed: easyif.h -> curl_easyif.h renamed: escape.h -> curl_escape.h renamed: file.h -> curl_file.h renamed: fileinfo.h -> curl_fileinfo.h renamed: formdata.h -> curl_formdata.h renamed: ftp.h -> curl_ftp.h renamed: ftplistparser.h -> curl_ftplistparser.h renamed: getinfo.h -> curl_getinfo.h renamed: gopher.h -> curl_gopher.h renamed: gtls.h -> curl_gtls.h renamed: hash.h -> curl_hash.h renamed: hostcheck.h -> curl_hostcheck.h renamed: hostip.h -> curl_hostip.h renamed: http.h -> curl_http.h renamed: http_chunks.h -> curl_http_chunks.h renamed: http_digest.h -> curl_http_digest.h renamed: http_negotiate.h -> curl_http_negotiate.h renamed: http_proxy.h -> curl_http_proxy.h renamed: if2ip.h -> curl_if2ip.h renamed: imap.h -> curl_imap.h renamed: inet_ntop.h -> curl_inet_ntop.h renamed: inet_pton.h -> curl_inet_pton.h renamed: krb4.h -> curl_krb4.h renamed: llist.h -> curl_llist.h renamed: memdebug.h -> curl_memdebug.h renamed: multiif.h -> curl_multiif.h renamed: netrc.h -> curl_netrc.h renamed: non-ascii.h -> curl_non-ascii.h renamed: nonblock.h -> curl_nonblock.h renamed: nssg.h -> curl_nssg.h renamed: parsedate.h -> curl_parsedate.h renamed: pingpong.h -> curl_pingpong.h renamed: polarssl.h -> curl_polarssl.h renamed: pop3.h -> curl_pop3.h renamed: progress.h -> curl_progress.h renamed: qssl.h -> curl_qssl.h renamed: rawstr.h -> curl_rawstr.h renamed: rtsp.h -> curl_rtsp.h renamed: select.h -> curl_select.h renamed: sendf.h -> curl_sendf.h renamed: setup.h -> curl_setup.h renamed: setup_once.h -> curl_setup_once.h renamed: share.h -> curl_share.h renamed: slist.h -> curl_slist.h renamed: smtp.h -> curl_smtp.h renamed: sockaddr.h -> curl_sockaddr.h renamed: socks.h -> curl_socks.h renamed: speedcheck.h -> curl_speedcheck.h renamed: splay.h -> curl_splay.h renamed: ssh.h -> curl_ssh.h renamed: sslgen.h -> curl_sslgen.h renamed: ssluse.h -> curl_ssluse.h renamed: strdup.h -> curl_strdup.h renamed: strequal.h -> curl_strequal.h renamed: strerror.h -> curl_strerror.h renamed: strtok.h -> curl_strtok.h renamed: strtoofft.h -> curl_strtoofft.h renamed: telnet.h -> curl_telnet.h renamed: tftp.h -> curl_tftp.h renamed: timeval.h -> curl_timeval.h renamed: transfer.h -> curl_transfer.h renamed: url.h -> curl_url.h renamed: urldata.h -> curl_urldata.h renamed: warnless.h -> curl_warnless.h renamed: wildcard.h -> curl_wildcard.h ----------------------------------------
2012-12-28lib/*.h: use our standard naming scheme for header inclusion guardsYang Tse
2012-12-17setup_once.h: HP-UX specific 'bool', 'false' and 'true' definitions.Yang Tse
Also reverts commit f254c59dc7
2012-12-14setup_once.h: HP-UX <sys/socket.h> issue workaroundYang Tse
Issue: When building a 32bit target with large file support HP-UX <sys/socket.h> header file may simultaneously provide two different sets of declarations for sendfile and sendpath functions, one with static and another with external linkage. Given that we do not use mentioned functions we really don't care which linkage is the appropriate one, but on the other hand, the double declaration emmits warnings when using the HP-UX compiler and errors when using modern gcc versions resulting in fatal compilation errors. Mentioned issue is now fixed as long as we don't use sendfile nor sendpath functions.
2012-12-14setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>Yang Tse
Inclusion of top two most included header files now done in setup_once.h
2012-12-12setup_once.h: HP-UX specific TRUE and FALSE definitionsYang Tse
Some HP-UX system headers require TRUE defined to 1 and FALSE to 0.
2012-04-14setup_once.h: tighten requirements for stdbool.h header inclusionYang Tse
Include stdbool.h only when it is available and configure is capable of detecting a proper 'bool' data type when the header is included. Compilation fix for old or unpatched versions of XL C compiler. Report: http://curl.haxx.se/mail/archive-2012-04/0022.html
2012-03-17lwip: basic checks and macros for compatiblityDaniel Stenberg
2011-09-04setup_once.h cleanup and syncYang Tse
2011-09-03revert changes not intended to be pushed with commit 6b75d2c2Yang Tse
2011-09-03fix a bunch of MSVC compiler warningsYang Tse
2011-09-02MemoryTracking: fix logging of free() calls done where Curl_safefree is calledYang Tse
Just internal stuff... Curl_safefree is now a macro defined in memdebug.h instead of a function prototyped in url.h and implemented in url.c, so inclusion of url.h is no longer required in order to simply use Curl_safefree. Provide definition of macro WHILE_FALSE in setup_once.h in order to allow other macros such as DEBUGF and DEBUGASSERT, and code using it, to compile without 'conditional expression is constant' warnings. The WHILE_FALSE stuff fixes 150+ MSVC compiler warnings.
2011-08-05BSD-style lwIP TCP/IP stack support - followupYang Tse
2011-07-24errno.h inclusion conditionally done in setup_once.hYang Tse
2011-05-18CLOSESOCKETFUNCTION: addedDaniel Stenberg
Introduced the initial setup to allow closesocket callbacks by making sure sclose() is only ever called from one place in the libcurl source and still run all test cases fine.
2011-02-14gmtime: remove defineDaniel Stenberg
It turns out some systems rely on the gmtime or gmtime_r to be defined already in the system headers and thus my "precaution" redefining of them only caused trouble. They are now removed.
2011-02-07Curl_gmtime: avoid future mistakesDaniel Stenberg
Document Curl_gmtime() and define away the old functions so that they won't be used internally again by mistake.
2010-05-31update year in copyright noticeYang Tse
2010-05-27setup_once: use enum type for 'bool' on non-C99 platformsTor Arntsen
An enum will catch non-bool assignments to bool on platforms with a strict compiler, e.g MIPSPro. Signed-off-by: Kamil Dudka <kdudka@redhat.com>
2010-05-20build: allow curl to build with Microsoft VC10Tanguy Fautre
By undefing a bunch of E* defines that VC10 has started to define but that we redefine internally to their WSA* alternatives when building for Windows.
2010-03-24remove the CVSish $Id$ linesDaniel Stenberg
2009-12-30VMS specific preprocessor symbol checking adjustmentsYang Tse
2009-06-19sclose() function-like macro definition used to close a socket,Yang Tse
now solely based on HAVE_CLOSESOCKET and HAVE_CLOSESOCKET_CAMEL config file preprocessor definitions.
2009-06-10Adjusted to take in account that...Yang Tse
With the curl memory tracking feature decoupled from the debug build feature, CURLDEBUG and DEBUGBUILD preprocessor symbol definitions are used as follows: CURLDEBUG used for curl debug memory tracking specific code (--enable-curldebug) DEBUGBUILD used for debug enabled specific code (--enable-debug)
2009-05-02Use build-time configured curl_socklen_t instead of socklen_tYang Tse
2009-04-21Moved potential inclusion of system's malloc.h and memory.h header files toYang Tse
setup_once.h. Inclusion of each header file is based on the definition of NEED_MALLOC_H and NEED_MEMORY_H respectively.
2008-08-27Don't abort configuration if recvfrom() is not available.Yang Tse
2008-07-21Change recvfrom's sixth argument data type to the 'historically standard' 'int'Yang Tse
data type for systems where this sixth argument is prototyped as a void pointer. Start of thread: http://curl.haxx.se/mail/lib-2008-07/0153.html
2008-07-21Use the sreadfrom() wrapper to replace recvfrom() in our code.Yang Tse
2008-07-17RECVFROM_TYPE_ARG2, RECVFROM_TYPE_ARG5 and RECVFROM_TYPE_ARG6 are now definedYang Tse
to the data type pointed by its respective argument and not the pointer type.
2008-07-16Configure process now checks availability of recvfrom() socket function andYang Tse
finds out its return type and the types of its arguments. Added definitions for non-configure systems config files, and introduced macro sreadfrom which will be used on udp sockets as a recvfrom() wrapper.
2008-05-21fix: remove need and definition of HAVE_SOCKLEN_T symbolYang Tse
2007-10-24Windows build targets have socklen_t definition in ws2tcpip.h but someYang Tse
versions of ws2tcpip.h do not have the definition. It seems that when the socklen_t definition is missing from ws2tcpip.h the definition for INET_ADDRSTRLEN is also missing, and that when one definition is present the other one also is available.
2007-10-17We use this ZERO_NULL to avoid picky compiler warnings,Yang Tse
when assigning a NULL pointer to a function pointer var.
2007-09-05Minix doesn't support getsockopt on UDP sockets or send/recv on TCPDan Fandrich
sockets.
2007-06-12With lots of help from Rich Rauenza(?) in bug #1733119, we introduce a fairlyDaniel Stenberg
complicated work-around for 64bit HPUX compiles. We do the fix using inline static functions to make them follow the header file properly and thus get used fine in the test suite too etc.
2007-04-25Steve Little's fixes to allow compilation on VMS 64-bit modeYang Tse
2007-04-11convenience SIG_ATOMIC_T macro definitionYang Tse
2007-04-04move WinSock definitions of EBADF, EINTR, EINVAL and EAFNOSUPPORT to ↵Yang Tse
setup_once.h
2007-02-22Check for stdbool.h at configuration stage, and include it if available.Yang Tse
Check for lowercase 'bool' type at configuration stage. If not available provide a suitable replacement with a type definition of 'unsigned char' in setup_once.h Move definitions of TRUE and FALSE to setup_once.h
2007-02-21curlassert macro replaced with DEBUGASSERT macro defined in setup_once.hYang Tse
2007-02-20Move header file inclusion logic and definition of timevalYang Tse
struct for platforms that don't have it to setup_once.h
2007-02-18fix ENAMETOOLONG and ENOTEMPTY may already be defined in errno.hYang Tse
2007-02-17Move portable error number symbolic name definitions to setup_once.hYang Tse
2007-02-15introduce uppercase macros SOCKERRNO, SET_SOCKERRNO(), ERRNO and SET_ERRNO()Yang Tse
making them available to any source code file which includes "setup.h". Macro SOCKERRNO / SET_SOCKERRNO() returns / sets the *socket-related* errno (or equivalent) on this platform to hide platform details to code using it. Macro ERRNO / SET_ERRNO() returns / sets the NOT *socket-related* errno (or equivalent) on this platform to hide platform details to code using it.
2007-02-14avoid using funtion isblank() and just use our ISBLANKYang Tse
macro to provide this functionality on all platforms
2007-02-13check for isblank() at configuration stage. If not availableYang Tse
provide a suitable replacement for use in our ISBLANK macro
2007-02-13use our own ISUPPER and ISLOWER macrosYang Tse