summaryrefslogtreecommitdiff
path: root/tests/libtest/testutil.c
AgeCommit message (Collapse)Author
2017-08-20Patchset for gnURL microfork:gnurl-7.55.1gnurl-7_55_1Christian Grothoff
* Patches to rename libcurl to libgnurl by Christian * Updated for latest curl using git cherry-pick by Jeff, Florian, ng0 * Patches to fix the testsuite (deleted tests/data/test1139, renamed reference from libcurl.* to libgnurl.*) by ng0 * Added guix-gnurl.scm which can be used to build this with guix prior to installing it. (author: ng0) * Further adjustments by ng0 * 7.55.0: Manual addition of a7bbbb7c368c6096802007f61f19a02e9d75285b and f864bd8c880d5a916379aa4f26f1c45fe370b282 from upstream master. * 7.55.1: Renamed include/curl to include/gnurl, a partial fix of https://gnunet.org/bugs/view.php?id=5122 Signed-off-by: ng0 <ng0@infotropique.org>
2017-05-24time: fix type conversions and compiler warningsMichael Kaufmann
Fix bugs and compiler warnings on systems with 32-bit long and 64-bit time_t. Reviewed-by: Daniel Stenberg Closes #1499
2016-04-29lib: include curl_printf.h as one of the last headersDaniel Stenberg
curl_printf.h defines printf to curl_mprintf, etc. This can cause problems with external headers which may use __attribute__((format(printf, ...))) markers etc. To avoid that they cause problems with system includes, we include curl_printf.h after any system headers. That makes the three last headers to always be, and we keep them in this order: curl_printf.h curl_memory.h memdebug.h None of them include system headers, they all do funny #defines. Reported-by: David Benjamin Fixes #743
2016-02-03URLs: change all http:// URLs to https://Daniel Stenberg
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: make use of 76 lib/*.h renamed filesYang Tse
76 private header files renamed to use our standard naming scheme. This change affects 322 files in libcurl's source tree.
2012-04-11build adjustments: functionally revert commits 4d3fb91f and bbfe1182Yang Tse
Undefining CURL_HIDDEN_SYMBOLS in source files isn't the proper fix.
2012-04-10libtests: build adjustmentYang Tse
Undefine CURL_HIDDEN_SYMBOLS libcurl private preprocessor macro that might leak from lib/setup.h into source files where this should not be defined.
2011-11-25tvdiff_secs(): sub-zero time difference adjustmentYang Tse
Skip a floating point addition operation when integral part of time difference is zero. This avoids potential floating point addition rounding problems while preserving decimal part value.
2010-03-24remove the CVSish $Id$ linesDaniel Stenberg
2008-09-20include "memdebug.h"Yang Tse
2008-07-10fallback to gettimeofday when monotonic clock is unavailable at run-timeYang Tse
2008-05-12configure script will now define HAVE_CLOCK_GETTIME_MONOTONIC symbol onlyYang Tse
when function clock_gettime() is available and the monotonic timer is also available. Otherwise, in some cases, librt or libposix4 could be used for linking even when finally not using the clock_gettime() function due to lack of the monotonic clock.
2008-05-10fix syntax error: missing semicolonYang Tse
2008-05-09Internal time differences now use monotonic time source if available.Yang Tse
This also implies the removal of the winmm.lib dependency for WIN32.
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-20add tutil_tvdiff_secs() for completenessYang Tse
2007-02-09Some tests were using functions curlx_tvnow and curlx_tvdiff which are notYang Tse
part of the official libcurl API http://curl.haxx.se/lxr/source/lib/README.curlx The documented way of using them would be to use timeval.c as a source code file. The above described method works very well when statically linking libcurl and apps, test programs, but has several drawbacks when you build a true shared libcurl (i.e. Name space clash at linkage stage as functions are defined more than once. Windows makefiles are not capable of handling this system of source-level sharing) So... Now testutil.h and testutil.c define and implement tutil_tvnow and tutil_tvdiff which replace curlx_tvnow and curlx_tvdiff for the libtest programs. Doing this we avoid the above described problems, and the code in the testsuite does not impose the need to keep those functions public in libcurl even when not part of the API.