}
#endif
-#ifdef HAVE_VARIADIC_MACROS_C99
-#define c99_vmacro3(first, ...) fun3(first, __VA_ARGS__)
-#define c99_vmacro2(first, ...) fun2(first, __VA_ARGS__)
-
-int fun3(int arg1, int arg2, int arg3);
-int fun2(int arg1, int arg2);
-
-int fun3(int arg1, int arg2, int arg3)
-{
- return arg1 + arg2 + arg3;
-}
-int fun2(int arg1, int arg2)
-{
- return arg1 + arg2;
-}
-
-int main(void)
-{
- int res3 = c99_vmacro3(1, 2, 3);
- int res2 = c99_vmacro2(1, 2);
- (void)res3;
- (void)res2;
- return 0;
-}
-#endif
-
-#ifdef HAVE_VARIADIC_MACROS_GCC
-#define gcc_vmacro3(first, args...) fun3(first, args)
-#define gcc_vmacro2(first, args...) fun2(first, args)
-
-int fun3(int arg1, int arg2, int arg3);
-int fun2(int arg1, int arg2);
-
-int fun3(int arg1, int arg2, int arg3)
-{
- return arg1 + arg2 + arg3;
-}
-int fun2(int arg1, int arg2)
-{
- return arg1 + arg2;
-}
-
-int main(void)
-{
- int res3 = gcc_vmacro3(1, 2, 3);
- int res2 = gcc_vmacro2(1, 2);
- (void)res3;
- (void)res2;
- return 0;
-}
-#endif
-
#ifdef HAVE_ATOMIC
/* includes start */
#ifdef HAVE_SYS_TYPES_H
set(HAVE_LOCALE_H 1)
set(HAVE_STDDEF_H 1) # detected by CMake internally in check_type_size()
set(HAVE_STDATOMIC_H 0)
- if(NOT MSVC_VERSION LESS 1400)
- set(HAVE_VARIADIC_MACROS_C99 1)
- else()
- set(HAVE_VARIADIC_MACROS_C99 0)
- endif()
if(NOT MSVC_VERSION LESS 1600)
set(HAVE_STDINT_H 1)
else()
HAVE_BOOL_T
STDC_HEADERS
HAVE_FILE_OFFSET_BITS
- HAVE_VARIADIC_MACROS_C99
- HAVE_VARIADIC_MACROS_GCC
HAVE_ATOMIC
)
curl_internal_test(${CURL_TEST})
])
-dnl CURL_CHECK_VARIADIC_MACROS
-dnl -------------------------------------------------
-dnl Check compiler support of variadic macros
-
-AC_DEFUN([CURL_CHECK_VARIADIC_MACROS], [
- AC_CACHE_CHECK([for compiler support of C99 variadic macro style],
- [curl_cv_variadic_macros_c99], [
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#define c99_vmacro3(first, ...) fun3(first, __VA_ARGS__)
-#define c99_vmacro2(first, ...) fun2(first, __VA_ARGS__)
- int fun3(int arg1, int arg2, int arg3);
- int fun2(int arg1, int arg2);
- int fun3(int arg1, int arg2, int arg3)
- { return arg1 + arg2 + arg3; }
- int fun2(int arg1, int arg2)
- { return arg1 + arg2; }
- ]],[[
- int res3 = c99_vmacro3(1, 2, 3);
- int res2 = c99_vmacro2(1, 2);
- ]])
- ],[
- curl_cv_variadic_macros_c99="yes"
- ],[
- curl_cv_variadic_macros_c99="no"
- ])
- ])
- case "$curl_cv_variadic_macros_c99" in
- yes)
- AC_DEFINE_UNQUOTED(HAVE_VARIADIC_MACROS_C99, 1,
- [Define to 1 if compiler supports C99 variadic macro style.])
- ;;
- esac
- AC_CACHE_CHECK([for compiler support of old gcc variadic macro style],
- [curl_cv_variadic_macros_gcc], [
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
-#define gcc_vmacro3(first, args...) fun3(first, args)
-#define gcc_vmacro2(first, args...) fun2(first, args)
- int fun3(int arg1, int arg2, int arg3);
- int fun2(int arg1, int arg2);
- int fun3(int arg1, int arg2, int arg3)
- { return arg1 + arg2 + arg3; }
- int fun2(int arg1, int arg2)
- { return arg1 + arg2; }
- ]],[[
- int res3 = gcc_vmacro3(1, 2, 3);
- int res2 = gcc_vmacro2(1, 2);
- ]])
- ],[
- curl_cv_variadic_macros_gcc="yes"
- ],[
- curl_cv_variadic_macros_gcc="no"
- ])
- ])
- case "$curl_cv_variadic_macros_gcc" in
- yes)
- AC_DEFINE_UNQUOTED(HAVE_VARIADIC_MACROS_GCC, 1,
- [Define to 1 if compiler supports old gcc variadic macro style.])
- ;;
- esac
-])
-
-
dnl CURL_CHECK_CA_BUNDLE
dnl -------------------------------------------------
dnl Check if a default ca-bundle should be used
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
-CURL_CHECK_VARIADIC_MACROS
AC_TYPE_SIZE_T
CURL_CHECK_STRUCT_TIMEVAL
curl_socket_t sockfd)
{
int onoff = 1;
+ (void)data;
if(setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&onoff,
sizeof(onoff)) < 0) {
#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
#define HAVE_SIGSETJMP 1
#define HAVE_SYS_TIME_H 1
#define HAVE_TERMIOS_H 1
- #define HAVE_VARIADIC_MACROS_GCC 1
#elif defined(__HIGHC__)
#define HAVE_SYS_TIME_H 1
/* Windows should not have HAVE_GMTIME_R defined */
/* #undef HAVE_GMTIME_R */
-/* Define if the compiler supports C99 variadic macro style. */
-#if defined(_MSC_VER) && (_MSC_VER >= 1400)
-#define HAVE_VARIADIC_MACROS_C99 1
-#endif
-
/* Define if the compiler supports the 'long long' data type. */
#if defined(__MINGW32__) || \
(defined(_MSC_VER) && (_MSC_VER >= 1310)) || \
/* Define to 1 if you have the <utime.h> header file. */
#cmakedefine HAVE_UTIME_H 1
-/* Define to 1 if compiler supports C99 variadic macro style. */
-#cmakedefine HAVE_VARIADIC_MACROS_C99 1
-
-/* Define to 1 if compiler supports old gcc variadic macro style. */
-#cmakedefine HAVE_VARIADIC_MACROS_GCC 1
-
/* Define to 1 if you have the windows.h header file. */
#cmakedefine HAVE_WINDOWS_H 1
const char *fmt, ...)
{
DEBUGASSERT(cf);
- if(data && Curl_trc_cf_is_verbose(cf, data)) {
+ if(Curl_trc_cf_is_verbose(cf, data)) {
va_list ap;
int len;
char buffer[MAXINFO + 2];
if(config) {
return Curl_trc_opt(config);
}
-#endif
+#endif /* DEBUGBUILD */
return CURLE_OK;
}
-#else /* !CURL_DISABLE_VERBOSE_STRINGS) */
+#else /* defined(CURL_DISABLE_VERBOSE_STRINGS) */
CURLcode Curl_trc_init(void)
{
return CURLE_OK;
}
-#endif /* !DEBUGBUILD */
+#endif /* !defined(CURL_DISABLE_VERBOSE_STRINGS) */
const char *fmt, ...);
#endif
-#else /* !CURL_DISABLE_VERBOSE_STRINGS */
+#else /* defined(CURL_DISABLE_VERBOSE_STRINGS) */
/* All informational messages are not compiled in for size savings */
#define Curl_trc_is_verbose(d) ((void)(d), FALSE)
(void)data; (void)cf; (void)fmt;
}
-#endif /* CURL_DISABLE_VERBOSE_STRINGS */
+#endif /* !defined(CURL_DISABLE_VERBOSE_STRINGS) */
#endif /* HEADER_CURL_TRC_H */
*done = TRUE; /* unconditionally */
infof(data, "LDAP local: LDAP Vendor = %s ; LDAP Version = %d",
- LDAP_VENDOR_NAME, LDAP_VENDOR_VERSION);
+ LDAP_VENDOR_NAME, LDAP_VENDOR_VERSION);
infof(data, "LDAP local: %s", data->state.url);
#ifdef HAVE_LDAP_URL_PARSE
if(conn->given->flags & PROTOPT_SSL)
ldap_ssl = 1;
infof(data, "LDAP local: trying to establish %s connection",
- ldap_ssl ? "encrypted" : "cleartext");
+ ldap_ssl ? "encrypted" : "cleartext");
#if defined(USE_WIN32_LDAP)
host = curlx_convert_UTF8_to_tchar(conn->host.name);
dec->payload_offset += (curl_off_t)nwritten;
remain = dec->payload_len - dec->payload_offset;
/* infof(data, "WS-DEC: passed %zd bytes payload, %"
- CURL_FORMAT_CURL_OFF_T " remain",
- nwritten, remain); */
+ CURL_FORMAT_CURL_OFF_T " remain",
+ nwritten, remain); */
}
return remain? CURLE_AGAIN : CURLE_OK;
*metap = &ws->frame;
*nread = ws->frame.len;
/* infof(data, "curl_ws_recv(len=%zu) -> %zu bytes (frame at %"
- CURL_FORMAT_CURL_OFF_T ", %" CURL_FORMAT_CURL_OFF_T " left)",
- buflen, *nread, ws->frame.offset, ws->frame.bytesleft); */
+ CURL_FORMAT_CURL_OFF_T ", %" CURL_FORMAT_CURL_OFF_T " left)",
+ buflen, *nread, ws->frame.offset, ws->frame.bytesleft); */
return CURLE_OK;
}
struct cf_test_ctx *ctx = cf->ctx;
#ifndef CURL_DISABLE_VERBOSE_STRINGS
infof(data, "%04dms: cf[%s] destroyed",
- (int)Curl_timediff(Curl_now(), current_tr->started), ctx->id);
+ (int)Curl_timediff(Curl_now(), current_tr->started), ctx->id);
#else
(void)data;
#endif
duration_ms = Curl_timediff(Curl_now(), ctx->started);
if(duration_ms >= ctx->fail_delay_ms) {
infof(data, "%04dms: cf[%s] fail delay reached",
- (int)duration_ms, ctx->id);
+ (int)duration_ms, ctx->id);
return CURLE_COULDNT_CONNECT;
}
if(duration_ms)