undo using internal *printf() clones for test #530
This commit is contained in:
Родитель
a4eddf0d0d
Коммит
3caeb0a91f
|
@ -30,7 +30,6 @@ AUTOMAKE_OPTIONS = foreign nostdinc
|
|||
# setup.h file
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include/curl \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_builddir)/lib \
|
||||
-I$(top_srcdir)/lib
|
||||
|
||||
|
@ -40,7 +39,6 @@ EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl
|
|||
|
||||
# files used only in some libcurl test programs
|
||||
TESTUTIL = testutil.c testutil.h
|
||||
MPRINTF = $(top_srcdir)/lib/mprintf.c $(top_srcdir)/lib/mprintf.h
|
||||
|
||||
# these files are used in every single test program below
|
||||
SUPPORTFILES = first.c test.h
|
||||
|
@ -116,7 +114,7 @@ lib527_CFLAGS = -DLIB527
|
|||
lib529_SOURCES = lib525.c $(SUPPORTFILES) $(TESTUTIL)
|
||||
lib529_CFLAGS = -DLIB529
|
||||
|
||||
lib530_SOURCES = lib530.c $(SUPPORTFILES) $(TESTUTIL) $(MPRINTF)
|
||||
lib530_SOURCES = lib530.c $(SUPPORTFILES) $(TESTUTIL)
|
||||
lib530_CFLAGS = -DLIB530
|
||||
|
||||
lib532_SOURCES = lib526.c $(SUPPORTFILES) $(TESTUTIL)
|
||||
|
|
|
@ -10,11 +10,15 @@
|
|||
|
||||
#include "test.h"
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define ENABLE_CURLX_PRINTF
|
||||
#include "curlx.h"
|
||||
#endif
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "testutil.h"
|
||||
|
||||
|
@ -35,7 +39,7 @@ int test(char *URL)
|
|||
struct timeval mp_start;
|
||||
char ml_timedout = FALSE;
|
||||
char mp_timedout = FALSE;
|
||||
char target_url[80];
|
||||
char target_url[256];
|
||||
|
||||
if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
|
||||
fprintf(stderr, "curl_global_init() failed\n");
|
||||
|
@ -62,7 +66,7 @@ int test(char *URL)
|
|||
curl_global_cleanup();
|
||||
return TEST_ERR_MAJOR_BAD + i;
|
||||
}
|
||||
snprintf(target_url, sizeof(target_url), "%s%04i", URL, i + 1);
|
||||
sprintf(target_url, "%s%04i", URL, i + 1);
|
||||
target_url[sizeof(target_url) - 1] = '\0';
|
||||
curl_easy_setopt(curl[i], CURLOPT_URL, target_url);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче