tidy-up: miscellaneous

- drop stray duplicate empty lines in docs, scripts, test data, include,
  examples, tests.
- drop duplicate PP parenthesis.
- curl-functions.m4: move literals to the right side in if expressions,
  to match rest of the source code.
- FAQ.md: delete language designator from an URL.
- packages: apply clang-format (OS400, VMS).
- scripts/schemetable.c: apply clang-format.
- data320: delete duplicate empty line that doesn't change the outcome.
- spacecheck: extend to check for duplicate empty lines
  (with exceptions.)
- fix whitespace nits

Closes #19936
This commit is contained in:
Viktor Szakats
2025-12-07 16:49:55 +01:00
parent 141ce4be64
commit fe8393d7db
116 changed files with 674 additions and 1039 deletions

View File

@@ -136,6 +136,5 @@ foreach my $v (keys %remove) {
}
}
# return the exit code from diff
exit system("diff -u /tmp/autotools /tmp/cmake") >> 8;

View File

@@ -116,7 +116,6 @@ my %commonrc = (
'26' => 1,
);
sub runone {
my $a;
my $nargs = getnum(60) + 1;

View File

@@ -39,6 +39,13 @@ my @need_crlf = (
"\\.(bat|sln)\$",
);
my @double_empty_lines = (
"^lib/.+\\.(c|h)\$",
"^packages/",
"^tests/data/test",
"\\.(m4|py)\$",
);
my @non_ascii_allowed = (
'\xC3\xB6', # UTF-8 for https://codepoints.net/U+00F6 LATIN SMALL LETTER O WITH DIAERESIS
);
@@ -100,7 +107,7 @@ while(my $filename = <$git_ls_files>) {
my @err = ();
if(!fn_match($filename, @tabs) &&
$content =~ /\t/) {
$content =~ /\t/) {
push @err, "content: has tab";
}
@@ -111,12 +118,12 @@ while(my $filename = <$git_ls_files>) {
}
if($eol ne "crlf" &&
fn_match($filename, @need_crlf)) {
fn_match($filename, @need_crlf)) {
push @err, "content: must use CRLF EOL for this file type";
}
if($eol ne "lf" && $content ne "" &&
!fn_match($filename, @need_crlf)) {
!fn_match($filename, @need_crlf)) {
push @err, "content: must use LF EOL for this file type";
}
@@ -131,20 +138,27 @@ while(my $filename = <$git_ls_files>) {
}
if($content ne "" &&
$content !~ /\n\z/) {
$content !~ /\n\z/) {
push @err, "content: has no EOL at EOF";
}
if($content =~ /\n\n\z/ ||
$content =~ /\r\n\r\n\z/) {
$content =~ /\r\n\r\n\z/) {
push @err, "content: has multiple EOL at EOF";
}
if($content =~ /\n\n\n\n/ ||
$content =~ /\r\n\r\n\r\n\r\n/) {
$content =~ /\r\n\r\n\r\n\r\n/) {
push @err, "content: has 3 or more consecutive empty lines";
}
if(!fn_match($filename, @double_empty_lines)) {
if($content =~ /\n\n\n/ ||
$content =~ /\r\n\r\n\r\n/) {
push @err, "content: has 2 consecutive empty lines";
}
}
if($content =~ /([\x00-\x08\x0b\x0c\x0e-\x1f\x7f])/) {
push @err, "content: has binary contents";
}

View File

@@ -39,7 +39,6 @@ sub testcompile {
return $rc;
}
sub extract {
my($f) = @_;
my $syn = 0;

View File

@@ -618,7 +618,7 @@ jobs:
- name: 'configure / ${{ matrix.build }}'
run: |
if [ "${MATRIX_COMPILER}" = 'gcc-13' ] && [ "${MATRIX_IMAGE}" = 'macos-15' ] ; then
if [ "${MATRIX_COMPILER}" = 'gcc-13' ] && [ "${MATRIX_IMAGE}" = 'macos-15' ]; then
# Ref: https://github.com/Homebrew/homebrew-core/issues/194778#issuecomment-2793243409
/opt/homebrew/opt/gcc@13/libexec/gcc/aarch64-apple-darwin24/13/install-tools/mkheaders
fi

View File

@@ -29,7 +29,7 @@
#include <fcntl.h>
/* */
#if defined(sun) || defined(__sun__) || \
defined(__SUNPRO_C) || defined(__SUNPRO_CC)
defined(__SUNPRO_C) || defined(__SUNPRO_CC)
# if defined(__SVR4) || defined(__srv4__)
# define PLATFORM_SOLARIS
# else
@@ -119,7 +119,10 @@ int main(void)
#include <stdarg.h>
#include <string.h>
#include <float.h>
int main(void) { return 0; }
int main(void)
{
return 0;
}
#endif
#ifdef HAVE_FILE_OFFSET_BITS
@@ -128,7 +131,7 @@ int main(void) { return 0; }
We cannot simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
#define LARGE_OFF_T (((off_t)1 << 62) - 1 + ((off_t)1 << 62))
static int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 &&
LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -272,7 +275,10 @@ int main(void)
#include <string.h>
#include <errno.h>
static void check(char c) { (void)c; }
static void check(char c)
{
(void)c;
}
int main(void)
{
@@ -289,7 +295,10 @@ int main(void)
#include <errno.h>
/* Float, because a pointer cannot be implicitly cast to float */
static void check(float f) { (void)f; }
static void check(float f)
{
(void)f;
}
int main(void)
{

View File

@@ -1833,7 +1833,6 @@ if(CURL_LTO)
endif()
endif()
# Ugly (but functional) way to include "Makefile.inc" by transforming it
# (= regenerate it).
function(curl_transform_makefile_inc _input_file _output_file)

View File

@@ -769,7 +769,7 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [
#include <time.h>
]],[[
struct timeval ts;
ts.tv_sec = 0;
ts.tv_sec = 0;
ts.tv_usec = 0;
(void)ts;
]])

View File

@@ -520,7 +520,6 @@ if test "$xc_lt_build_static_only" = "yes"; then
fi
AC_SUBST([LIBCURL_PC_CFLAGS])
dnl **********************************************************************
dnl platform/compiler/architecture specific checks/flags
dnl **********************************************************************
@@ -2152,7 +2151,6 @@ if test "x$OPT_LIBPSL" != "xno"; then
fi
AM_CONDITIONAL([USE_LIBPSL], [test "$curl_psl_msg" = "enabled"])
dnl **********************************************************************
dnl Check for libgsasl
dnl **********************************************************************
@@ -2236,7 +2234,6 @@ AS_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points to
AS_HELP_STRING([--with-libssh2], [enable libssh2]),
OPT_LIBSSH2=$withval, OPT_LIBSSH2=no)
OPT_LIBSSH=off
AC_ARG_WITH(libssh,dnl
AS_HELP_STRING([--with-libssh=PATH],[Where to look for libssh, PATH points to the libssh installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
@@ -2619,7 +2616,6 @@ if test "x$OPT_LIBRTMP" != "xno"; then
dnl a pkgconfig file
AC_MSG_ERROR([--librtmp was specified but could not find librtmp pkgconfig file.])
fi
;;
off)
dnl no --with-librtmp option given, just check default places
@@ -3685,7 +3681,6 @@ if test "$want_nghttp3" != "no"; then
CPPFLAGS=$CLEANCPPFLAGS
LIBS=$CLEANLIBS
)
else
dnl no nghttp3 pkg-config found, deal with it
if test "$want_nghttp3" != "default"; then
@@ -3898,7 +3893,6 @@ if test "$want_libuv" != "no"; then
CPPFLAGS=$CLEANCPPFLAGS
LIBS=$CLEANLIBS
)
else
dnl no libuv pkg-config found, deal with it
if test "$want_libuv" != "default"; then
@@ -4042,7 +4036,6 @@ dnl default includes
]
)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
@@ -4977,7 +4970,6 @@ if test "$hsts" != "yes"; then
AC_DEFINE(CURL_DISABLE_HSTS, 1, [disable alt-svc])
fi
dnl *************************************************************
dnl check whether ECH support, if desired, is actually available
dnl
@@ -5042,7 +5034,6 @@ else
fi
fi
dnl *************************************************************
dnl check whether OpenSSL (lookalikes) have SSL_set0_wbio
dnl

View File

@@ -827,7 +827,6 @@ chain.
Details are also in [the SSL certificates
document](https://curl.se/docs/sslcerts.html).
## Why is curl -R on Windows one hour off?
Since curl 7.53.0 this issue should be fixed as long as curl was built with
@@ -891,7 +890,7 @@ the second. No more than three packets are sent, no matter how long the
timeout is set.
See option `TcpMaxConnectRetransmissions` on [this
page](https://support.microsoft.com/bg-bg/topic/hotfix-enables-the-configuration-of-the-tcp-maximum-syn-retransmission-amount-in-windows-7-or-windows-server-2008-r2-1b6f8352-2c5f-58bb-ead7-2cf021407c8e).
page](https://support.microsoft.com/topic/hotfix-enables-the-configuration-of-the-tcp-maximum-syn-retransmission-amount-in-windows-7-or-windows-server-2008-r2-1b6f8352-2c5f-58bb-ead7-2cf021407c8e).
Also, even on non-Windows systems there may run a firewall or anti-virus
software or similar that accepts the connection but does not actually do

View File

@@ -276,7 +276,6 @@ this:
curl --trace my-trace.txt www.haxx.se
## Detailed Information
Different protocols provide different ways of getting detailed information

View File

@@ -133,7 +133,6 @@ Apple SecTrust and your own file to be considered, use:
curl --ca-native --cacert mycerts.pem https://example.com
#### Other Combinations
How well the use of native CA stores work in all other combinations depends

View File

@@ -398,7 +398,6 @@ honest a bit of a hack.
Please see the following thread for more information:
https://curl.se/mail/lib-2012-05/0178.html
# POP3
## Enhanced capability support

View File

@@ -198,7 +198,6 @@ SPDX-License-Identifier: curl
curl --data name=curl https://url1.example.com https://url2.example.com
## Multiple HTTP methods in a single command line
Sometimes you need to operate on several URLs in a single command line and do

View File

@@ -41,7 +41,6 @@ Whenever there is input into the fifo, the program reads the input as a list
of URL's and creates some new easy handles to fetch each URL via the
curl_multi "hiper" API.
Thus, you can try a single URL:
% echo http://www.yahoo.com > hiper.fifo

View File

@@ -44,7 +44,6 @@ Whenever there is input into the fifo, the program reads the input as a list
of URL's and creates some new easy handles to fetch each URL via the
curl_multi "hiper" API.
Thus, you can try a single URL:
% echo http://www.yahoo.com > hiper.fifo

View File

@@ -41,7 +41,6 @@
of URL's and creates some new easy handles to fetch each URL via the
curl_multi "hiper" API.
Thus, you can try a single URL:
% echo http://www.yahoo.com > hiper.fifo

View File

@@ -41,7 +41,6 @@ Whenever there is input into the fifo, the program reads the input as a list
of URL's and creates some new easy handles to fetch each URL via the
curl_multi "hiper" API.
Thus, you can try a single URL:
% echo http://www.yahoo.com > hiper.fifo

View File

@@ -46,9 +46,9 @@
//
#ifdef _WIN32
#define COMPARE(a, b) (!_stricmp((a), (b)))
#define COMPARE(a, b) (!_stricmp(a, b))
#else
#define COMPARE(a, b) (!strcasecmp((a), (b)))
#define COMPARE(a, b) (!strcasecmp(a, b))
#endif
//

View File

@@ -67,7 +67,7 @@
#endif
#ifdef _MSC_VER
#define gettimeofday(a, b) my_gettimeofday((a), (b))
#define gettimeofday(a, b) my_gettimeofday(a, b)
static int my_gettimeofday(struct timeval *tp, void *tzp)
{
(void)tzp;

View File

@@ -74,7 +74,6 @@ int main(int argc, char *argv[])
CURLFORM_COPYCONTENTS, "postit2-formadd.c",
CURLFORM_END);
/* Fill in the submit field too, even if this is rarely needed */
curl_formadd(&formpost,
&lastptr,

View File

@@ -398,7 +398,6 @@ An overview of the time values available from curl_easy_getinfo(3)
|--|--|--|--|--|--|--|--TOTAL
|--|--|--|--|--|--|--|--REDIRECT
CURLINFO_QUEUE_TIME_T(3), CURLINFO_NAMELOOKUP_TIME_T(3),
CURLINFO_CONNECT_TIME_T(3), CURLINFO_APPCONNECT_TIME_T(3),
CURLINFO_PRETRANSFER_TIME_T(3), CURLINFO_POSTTRANSFER_TIME_T(3),

View File

@@ -229,7 +229,6 @@ struct curl_httppost {
set. Added in 7.46.0 */
};
/* This is a return code for the progress callback that, when returned, will
signal libcurl to continue executing the default progress function */
#define CURL_PROGRESSFUNC_CONTINUE 0x10000001
@@ -844,7 +843,7 @@ typedef enum {
#define CURLAUTH_AWS_SIGV4 (((unsigned long)1)<<7)
#define CURLAUTH_ONLY (((unsigned long)1)<<31)
#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE)
#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE))
#define CURLSSH_AUTH_ANY ~0L /* all types supported by the server */
#define CURLSSH_AUTH_NONE 0L /* none allowed, silly but complete */
@@ -916,7 +915,6 @@ typedef int
/* return CURLE_OK to accept */
/* or something else to refuse */
/* parameter for the CURLOPT_USE_SSL option */
#define CURLUSESSL_NONE 0L /* do not attempt to use SSL */
#define CURLUSESSL_TRY 1L /* try using SSL, proceed anyway otherwise */
@@ -1115,7 +1113,6 @@ typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy,
/* *STRINGPOINT is an alias for OBJECTPOINT to allow tools to extract the
string options from the header file */
#define CURLOPT(na,t,nu) na = t + nu
#define CURLOPTDEPRECATED(na,t,nu,v,m) na CURL_DEPRECATED(v,m) = t + nu
@@ -1874,9 +1871,7 @@ typedef enum {
libcurl will ask for the compressed methods it knows of, and if that
is not any, it will not ask for transfer-encoding at all even if this
option is set to 1.
*/
option is set to 1. */
CURLOPT(CURLOPT_TRANSFER_ENCODING, CURLOPTTYPE_LONG, 207),
/* Callback function for closing socket (instead of close(2)). The callback
@@ -2294,10 +2289,9 @@ typedef enum {
#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */
#endif
/* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host
name resolves addresses using more than one IP protocol version, this
option might be handy to force libcurl to use a specific IP version. */
/* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host
name resolves addresses using more than one IP protocol version, this
option might be handy to force libcurl to use a specific IP version. */
#define CURL_IPRESOLVE_WHATEVER 0L /* default, uses addresses to all IP
versions that your system allows */
#define CURL_IPRESOLVE_V4 1L /* uses only IPv4 addresses/connections */
@@ -2381,7 +2375,7 @@ enum CURL_NETRC_OPTION {
#define CURL_SSLVERSION_MAX_TLSv1_2 (CURL_SSLVERSION_TLSv1_2 << 16)
#define CURL_SSLVERSION_MAX_TLSv1_3 (CURL_SSLVERSION_TLSv1_3 << 16)
/* never use, keep last */
/* never use, keep last */
#define CURL_SSLVERSION_MAX_LAST (CURL_SSLVERSION_LAST << 16)
#define CURL_TLSAUTH_NONE 0L
@@ -2403,7 +2397,7 @@ enum CURL_TLSAUTH {
#define CURL_REDIR_POST_302 2L
#define CURL_REDIR_POST_303 4L
#define CURL_REDIR_POST_ALL \
(CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303)
(CURL_REDIR_POST_301 | CURL_REDIR_POST_302 | CURL_REDIR_POST_303)
#define CURL_TIMECOND_NONE 0L
#define CURL_TIMECOND_IFMODSINCE 1L
@@ -2418,7 +2412,7 @@ typedef enum {
} curl_TimeCond;
/* Special size_t value signaling a null-terminated string. */
#define CURL_ZERO_TERMINATED ((size_t) -1)
#define CURL_ZERO_TERMINATED ((size_t)-1)
/* curl_strequal() and curl_strnequal() are subject for removal in a future
release */
@@ -2705,7 +2699,6 @@ CURL_EXTERN char *curl_easy_escape(CURL *handle,
CURL_EXTERN char *curl_escape(const char *string,
int length);
/*
* NAME curl_easy_unescape()
*
@@ -2743,10 +2736,9 @@ CURL_EXTERN void curl_free(void *p);
*
* curl_global_init() should be invoked exactly once for each application that
* uses libcurl and before any call of other libcurl functions.
*
* This function is thread-safe if CURL_VERSION_THREADSAFE is set in the
* curl_version_info_data.features flag (fetch by curl_version_info()).
*/
CURL_EXTERN CURLcode curl_global_init(long flags);
@@ -2787,10 +2779,9 @@ CURL_EXTERN void curl_global_cleanup(void);
*
* curl_global_trace() can be invoked at application start to
* configure which components in curl should participate in tracing.
*
* This function is thread-safe if CURL_VERSION_THREADSAFE is set in the
* curl_version_info_data.features flag (fetch by curl_version_info()).
*/
CURL_EXTERN CURLcode curl_global_trace(const char *config);
@@ -3017,12 +3008,11 @@ typedef enum {
#define CURL_GLOBAL_SSL (1<<0) /* no purpose since 7.57.0 */
#define CURL_GLOBAL_WIN32 (1<<1)
#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32)
#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32)
#define CURL_GLOBAL_NOTHING 0
#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
#define CURL_GLOBAL_ACK_EINTR (1<<2)
/*****************************************************************************
* Setup defines, protos etc for the sharing stuff.
*/
@@ -3060,7 +3050,6 @@ typedef void (*curl_unlock_function)(CURL *handle,
curl_lock_data data,
void *userptr);
typedef enum {
CURLSHE_OK, /* all is fine */
CURLSHE_BAD_OPTION, /* 1 */
@@ -3264,8 +3253,8 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
#define CURLPAUSE_SEND (1<<2)
#define CURLPAUSE_SEND_CONT (0)
#define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND)
#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT)
#define CURLPAUSE_ALL (CURLPAUSE_RECV | CURLPAUSE_SEND)
#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT)
/*
* NAME curl_easy_ssls_import()
@@ -3310,7 +3299,6 @@ CURL_EXTERN CURLcode curl_easy_ssls_export(CURL *handle,
curl_ssls_export_cb *export_fn,
void *userptr);
#ifdef __cplusplus
} /* end of extern "C" */
#endif

View File

@@ -58,7 +58,6 @@ CURL_EXTERN void curl_easy_cleanup(CURL *curl);
*/
CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);
/*
* NAME curl_easy_duphandle()
*
@@ -108,7 +107,6 @@ CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen,
CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer,
size_t buflen, size_t *n);
/*
* NAME curl_easy_upkeep()
*

View File

@@ -136,25 +136,25 @@ CURL_EXTERN CURLM *curl_multi_init(void);
CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle,
CURL *curl_handle);
/*
* Name: curl_multi_remove_handle()
*
* Desc: removes a curl handle from the multi stack again
*
* Returns: CURLMcode type, general multi error code.
*/
/*
* Name: curl_multi_remove_handle()
*
* Desc: removes a curl handle from the multi stack again
*
* Returns: CURLMcode type, general multi error code.
*/
CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
CURL *curl_handle);
/*
* Name: curl_multi_fdset()
*
* Desc: Ask curl for its fd_set sets. The app can use these to select() or
* poll() on. We want curl_multi_perform() called as soon as one of
* them are ready.
*
* Returns: CURLMcode type, general multi error code.
*/
/*
* Name: curl_multi_fdset()
*
* Desc: Ask curl for its fd_set sets. The app can use these to select() or
* poll() on. We want curl_multi_perform() called as soon as one of
* them are ready.
*
* Returns: CURLMcode type, general multi error code.
*/
CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle,
fd_set *read_fd_set,
fd_set *write_fd_set,
@@ -198,35 +198,35 @@ CURL_EXTERN CURLMcode curl_multi_poll(CURLM *multi_handle,
*/
CURL_EXTERN CURLMcode curl_multi_wakeup(CURLM *multi_handle);
/*
* Name: curl_multi_perform()
*
* Desc: When the app thinks there is data available for curl it calls this
* function to read/write whatever there is right now. This returns
* as soon as the reads and writes are done. This function does not
* require that there actually is data available for reading or that
* data can be written, it can be called just in case. It returns
* the number of handles that still transfer data in the second
* argument's integer-pointer.
*
* Returns: CURLMcode type, general multi error code. *NOTE* that this only
* returns errors etc regarding the whole multi stack. There might
* still have occurred problems on individual transfers even when
* this returns OK.
*/
/*
* Name: curl_multi_perform()
*
* Desc: When the app thinks there is data available for curl it calls this
* function to read/write whatever there is right now. This returns
* as soon as the reads and writes are done. This function does not
* require that there actually is data available for reading or that
* data can be written, it can be called just in case. It returns
* the number of handles that still transfer data in the second
* argument's integer-pointer.
*
* Returns: CURLMcode type, general multi error code. *NOTE* that this only
* returns errors etc regarding the whole multi stack. There might
* still have occurred problems on individual transfers even when
* this returns OK.
*/
CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle,
int *running_handles);
/*
* Name: curl_multi_cleanup()
*
* Desc: Cleans up and removes a whole multi stack. It does not free or
* touch any individual easy handles in any way. We need to define
* in what state those handles will be if this function is called
* in the middle of a transfer.
*
* Returns: CURLMcode type, general multi error code.
*/
/*
* Name: curl_multi_cleanup()
*
* Desc: Cleans up and removes a whole multi stack. It does not free or
* touch any individual easy handles in any way. We need to define
* in what state those handles will be if this function is called
* in the middle of a transfer.
*
* Returns: CURLMcode type, general multi error code.
*/
CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle);
/*
@@ -327,8 +327,8 @@ curl_multi_socket_all(CURLM *multi_handle, int *running_handles);
#ifndef CURL_ALLOW_OLD_MULTI_SOCKET
/* This macro below was added in 7.16.3 to push users who recompile to use
the new curl_multi_socket_action() instead of the old curl_multi_socket()
*/
* the new curl_multi_socket_action() instead of the old curl_multi_socket()
*/
#define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z)
#endif
@@ -351,10 +351,10 @@ typedef enum {
/* This is the argument passed to the socket callback */
CURLOPT(CURLMOPT_SOCKETDATA, CURLOPTTYPE_OBJECTPOINT, 2),
/* set to 1 to enable pipelining for this multi handle */
/* set to 1 to enable pipelining for this multi handle */
CURLOPT(CURLMOPT_PIPELINING, CURLOPTTYPE_LONG, 3),
/* This is the timer callback function pointer */
/* This is the timer callback function pointer */
CURLOPT(CURLMOPT_TIMERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 4),
/* This is the argument passed to the timer callback */
@@ -429,7 +429,6 @@ typedef enum {
CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle,
CURLMoption option, ...);
/*
* Name: curl_multi_assign()
*
@@ -454,7 +453,6 @@ CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle,
*/
CURL_EXTERN CURL **curl_multi_get_handles(CURLM *multi_handle);
typedef enum {
CURLMINFO_NONE, /* first, never use this */
/* The number of easy handles currently managed by the multi handle,

View File

@@ -264,7 +264,6 @@
*/
#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)
/* the actual warnings, triggered by calling the Wcurl_easy_setopt_err*
* functions */
@@ -590,8 +589,9 @@ CURLWARNING(Wcurl_easy_getinfo_err_curl_off_t,
#define curlcheck_off_t_info(info) \
(CURLINFO_OFF_T < (info))
/* typecheck helpers -- check whether given expression has requested type */
/*
* typecheck helpers -- check whether given expression has requested type
*/
/* For pointers, you can use the curlcheck_ptr/curlcheck_arr macros,
* otherwise define a new macro. Search for __builtin_types_compatible_p
@@ -641,7 +641,6 @@ CURLWARNING(Wcurl_easy_getinfo_err_curl_off_t,
(curlcheck_NULL(expr) || \
__builtin_types_compatible_p(__typeof__(expr), CURL *))
/* evaluates to true if expr is a long (no matter the signedness)
* XXX: for now, int is also accepted (and therefore short and char, which
* are promoted to int when passed to a variadic function) */

View File

@@ -44,6 +44,5 @@ CURLcode Curl_cf_https_setup(struct Curl_easy *data,
struct connectdata *conn,
int sockindex);
#endif /* !CURL_DISABLE_HTTP */
#endif /* HEADER_CURL_CF_HTTP_H */

View File

@@ -316,7 +316,6 @@ void Curl_conn_cf_discard_all(struct Curl_easy *data,
struct connectdata *conn,
int sockindex);
CURLcode Curl_conn_cf_connect(struct Curl_cfilter *cf,
struct Curl_easy *data,
bool *done);

View File

@@ -132,7 +132,6 @@
/* Define if you have the `socket' function. */
#define HAVE_SOCKET
/* The following define is needed on OS400 to enable strcmpi(), stricmp() and
strdup(). */
#define __cplusplus__strings__

View File

@@ -48,7 +48,6 @@ struct HMAC_params {
unsigned int resultlen; /* Result length (bytes). */
};
/* HMAC computation context. */
struct HMAC_context {
const struct HMAC_params *hash; /* Hash function definition. */

View File

@@ -35,7 +35,7 @@
#else /* HAVE_MEMRCHR */
void *Curl_memrchr(const void *s, int c, size_t n);
#define memrchr(x, y, z) Curl_memrchr((x), (y), (z))
#define memrchr(x, y, z) Curl_memrchr(x, y, z)
#endif /* HAVE_MEMRCHR */

View File

@@ -160,7 +160,6 @@ struct timeval {
#endif
#endif /* HAVE_RECV */
#ifdef __minix
/* Minix does not support send on TCP sockets */
#define swrite(x, y, z) (ssize_t)write((SEND_TYPE_ARG1)(x), \

View File

@@ -65,7 +65,6 @@ void Curl_failf(struct Curl_easy *data,
#define CURL_LOG_LVL_NONE 0
#define CURL_LOG_LVL_INFO 1
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define CURL_HAVE_C99
#endif

View File

@@ -36,5 +36,4 @@ extern const struct Curl_cwtype Curl_cwt_pause;
CURLcode Curl_cw_pause_flush(struct Curl_easy *data);
#endif /* HEADER_CURL_CW_PAUSE_H */

View File

@@ -126,7 +126,6 @@ size_t Curl_dynhds_remove(struct dynhds *dynhds,
const char *name, size_t namelen);
size_t Curl_dynhds_cremove(struct dynhds *dynhds, const char *name);
/**
* Set the give header name and value, replacing any entries with
* the same name. The header is added at the end of all (remaining)

View File

@@ -68,7 +68,6 @@
#define SEND_TYPE_RETV int
#endif
#ifndef RECV_TYPE_ARG1
#define RECV_TYPE_ARG1 int
#endif

View File

@@ -116,7 +116,6 @@ bool Curl_ipv6works(struct Curl_easy *data);
#define Curl_ipv6works(x) FALSE
#endif
/* unlink a dns entry, potentially shared with a cache */
void Curl_resolv_unlink(struct Curl_easy *data,
struct Curl_dns_entry **pdns);

View File

@@ -213,7 +213,6 @@ Curl_http_output_auth(struct Curl_easy *data,
/* Decode HTTP status code string. */
CURLcode Curl_http_decode_status(int *pstatus, const char *s, size_t len);
/**
* All about a core HTTP request, excluding body and trailers
*/

View File

@@ -95,7 +95,7 @@
#define curl_ldap_num_t ULONG
#else
#define FREE_ON_WINLDAP(x)
#define curl_ldap_num_t int
#define curl_ldap_num_t int
#endif
#ifndef HAVE_LDAP_URL_PARSE

View File

@@ -77,7 +77,6 @@ sub add {
}
}
my $fl;
while(<STDIN>) {
my $l = $_;
@@ -122,7 +121,6 @@ while(<STDIN>) {
}
}
for my $name (sort @names) {
my $oname = $name;
my $a = $alias{$name};

View File

@@ -76,7 +76,6 @@ extern OM_uint32 Curl_gss_import_name_a(OM_uint32 * minor_status,
gss_name_t * out_name);
#define gss_import_name Curl_gss_import_name_a
extern OM_uint32 Curl_gss_display_status_a(OM_uint32 * minor_status,
OM_uint32 status_value,
int status_type, gss_OID mech_type,
@@ -84,7 +83,6 @@ extern OM_uint32 Curl_gss_display_status_a(OM_uint32 * minor_status,
gss_buffer_t status_string);
#define gss_display_status Curl_gss_display_status_a
extern OM_uint32 Curl_gss_init_sec_context_a(OM_uint32 * minor_status,
gss_cred_id_t cred_handle,
gss_ctx_id_t * context_handle,
@@ -101,13 +99,11 @@ extern OM_uint32 Curl_gss_init_sec_context_a(OM_uint32 * minor_status,
OM_uint32 * time_rec);
#define gss_init_sec_context Curl_gss_init_sec_context_a
extern OM_uint32 Curl_gss_delete_sec_context_a(OM_uint32 *minor_status,
gss_ctx_id_t *context_handle,
gss_buffer_t output_token);
#define gss_delete_sec_context Curl_gss_delete_sec_context_a
/* LDAP wrappers. */
#define BerValue struct berval

View File

@@ -133,7 +133,6 @@ typedef unsigned int curl_prot_t;
input easier and better. */
#define CURL_MAX_INPUT_LENGTH 8000000
#include "cookie.h"
#include "psl.h"
#include "formdata.h"

View File

@@ -40,7 +40,6 @@ CURLcode Curl_qlogdir(struct Curl_easy *data,
size_t scidlen,
int *qlogfdp);
CURLcode Curl_cf_quic_create(struct Curl_cfilter **pcf,
struct Curl_easy *data,
struct connectdata *conn,

View File

@@ -306,7 +306,7 @@ static gnutls_x509_crt_fmt_t gnutls_do_file_type(const char *type)
return GNUTLS_X509_FMT_PEM; /* default to PEM */
}
#define GNUTLS_CIPHERS "NORMAL:%PROFILE_MEDIUM:-ARCFOUR-128:"\
#define GNUTLS_CIPHERS "NORMAL:%PROFILE_MEDIUM:-ARCFOUR-128:" \
"-CTYPE-ALL:+CTYPE-X509"
/* If GnuTLS was compiled without support for SRP it will error out if SRP is
requested in the priority string, so treat it specially

View File

@@ -54,7 +54,7 @@
*/
/* Largest supported ASN.1 structure. */
#define CURL_ASN1_MAX ((size_t) 0x40000) /* 256K */
#define CURL_ASN1_MAX ((size_t)0x40000) /* 256K */
/* ASN.1 classes. */
/* #define CURL_ASN1_UNIVERSAL 0 */

View File

@@ -33,8 +33,7 @@ if test "$HAVE_PROTO_BSDSOCKET_H" = "1"; then
#include <openssl/opensslv.h>
]],[[
#if defined(AMISSL_CURRENT_VERSION) && defined(AMISSL_V3xx) && \
(OPENSSL_VERSION_NUMBER >= 0x30000000L) && \
defined(PROTO_AMISSL_H)
(OPENSSL_VERSION_NUMBER >= 0x30000000L) && defined(PROTO_AMISSL_H)
return 0;
#else
#error not AmiSSL v5 / OpenSSL 3

View File

@@ -508,7 +508,7 @@ AC_DEFUN([CURL_CHECK_FUNC_ALARM], [
AC_LANG_PROGRAM([[
$curl_includes_unistd
]],[[
if(0 != alarm(0))
if(alarm(0) != 0)
return 1;
]])
],[
@@ -599,7 +599,7 @@ AC_DEFUN([CURL_CHECK_FUNC_BASENAME], [
$curl_includes_libgen
$curl_includes_unistd
]],[[
if(0 != basename(0))
if(basename(0) != 0)
return 1;
]])
],[
@@ -659,7 +659,7 @@ AC_DEFUN([CURL_CHECK_FUNC_CLOSESOCKET], [
AC_LANG_PROGRAM([[
$curl_includes_winsock2
]],[[
if(0 != closesocket(0))
if(closesocket(0) != 0)
return 1;
]])
],[
@@ -689,7 +689,7 @@ AC_DEFUN([CURL_CHECK_FUNC_CLOSESOCKET], [
AC_LANG_PROGRAM([[
$curl_includes_winsock2
]],[[
if(0 != closesocket(0))
if(closesocket(0) != 0)
return 1;
]])
],[
@@ -750,7 +750,7 @@ AC_DEFUN([CURL_CHECK_FUNC_CLOSESOCKET_CAMEL], [
$curl_includes_bsdsocket
$curl_includes_sys_socket
]],[[
if(0 != CloseSocket(0))
if(CloseSocket(0) != 0)
return 1;
]])
],[
@@ -768,7 +768,7 @@ AC_DEFUN([CURL_CHECK_FUNC_CLOSESOCKET_CAMEL], [
$curl_includes_bsdsocket
$curl_includes_sys_socket
]],[[
if(0 != CloseSocket(0))
if(CloseSocket(0) != 0)
return 1;
]])
],[
@@ -851,7 +851,7 @@ AC_DEFUN([CURL_CHECK_FUNC_FCNTL], [
AC_LANG_PROGRAM([[
$curl_includes_fcntl
]],[[
if(0 != fcntl(0, 0, 0))
if(fcntl(0, 0, 0) != 0)
return 1;
]])
],[
@@ -917,7 +917,7 @@ AC_DEFUN([CURL_CHECK_FUNC_FCNTL_O_NONBLOCK], [
$curl_includes_fcntl
]],[[
int flags = 0;
if(0 != fcntl(0, F_SETFL, flags | O_NONBLOCK))
if(fcntl(0, F_SETFL, flags | O_NONBLOCK) != 0)
return 1;
]])
],[
@@ -1098,7 +1098,7 @@ AC_DEFUN([CURL_CHECK_FUNC_FSETXATTR], [
AC_LANG_PROGRAM([[
$curl_includes_sys_xattr
]],[[
if(0 != fsetxattr(0, "", 0, 0, 0))
if(fsetxattr(0, "", 0, 0, 0) != 0)
return 1;
]])
],[
@@ -1116,7 +1116,7 @@ AC_DEFUN([CURL_CHECK_FUNC_FSETXATTR], [
AC_LANG_PROGRAM([[
$curl_includes_sys_xattr
]],[[
if(0 != fsetxattr(0, 0, 0, 0, 0, 0))
if(fsetxattr(0, 0, 0, 0, 0, 0) != 0)
return 1;
]])
],[
@@ -1218,7 +1218,7 @@ AC_DEFUN([CURL_CHECK_FUNC_FTRUNCATE], [
AC_LANG_PROGRAM([[
$curl_includes_unistd
]],[[
if(0 != ftruncate(0, 0))
if(ftruncate(0, 0) != 0)
return 1;
]])
],[
@@ -1291,7 +1291,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
$curl_includes_netdb
]],[[
struct addrinfo *ai = 0;
if(0 != getaddrinfo(0, 0, 0, &ai))
if(getaddrinfo(0, 0, 0, &ai) != 0)
return 1;
]])
],[
@@ -1326,7 +1326,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
$curl_includes_netdb
]],[[
struct addrinfo *ai = 0;
if(0 != getaddrinfo(0, 0, 0, &ai))
if(getaddrinfo(0, 0, 0, &ai) != 0)
return 1;
]])
],[
@@ -1537,7 +1537,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETHOSTBYNAME_R], [
$curl_includes_netdb
$curl_includes_bsdsocket
]],[[
if(0 != gethostbyname_r(0, 0, 0))
if(gethostbyname_r(0, 0, 0) != 0)
return 1;
]])
],[
@@ -1556,7 +1556,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETHOSTBYNAME_R], [
$curl_includes_netdb
$curl_includes_bsdsocket
]],[[
if(0 != gethostbyname_r(0, 0, 0, 0, 0))
if(gethostbyname_r(0, 0, 0, 0, 0) != 0)
return 1;
]])
],[
@@ -1575,7 +1575,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETHOSTBYNAME_R], [
$curl_includes_netdb
$curl_includes_bsdsocket
]],[[
if(0 != gethostbyname_r(0, 0, 0, 0, 0, 0))
if(gethostbyname_r(0, 0, 0, 0, 0, 0) != 0)
return 1;
]])
],[
@@ -1660,7 +1660,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETHOSTNAME], [
$curl_includes_bsdsocket
]],[[
char s[1];
if(0 != gethostname((void *)s, 0))
if(gethostname((void *)s, 0) != 0)
return 1;
]])
],[
@@ -1695,7 +1695,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETHOSTNAME], [
$curl_includes_bsdsocket
]],[[
char s[1];
if(0 != gethostname((void *)s, 0))
if(gethostname((void *)s, 0) != 0)
return 1;
]])
],[
@@ -1727,7 +1727,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETHOSTNAME], [
int FUNCALLCONV gethostname($tst_arg1, $tst_arg2);
]],[[
char s[1];
if(0 != gethostname(($tst_arg1)s, 0))
if(gethostname(($tst_arg1)s, 0) != 0)
return 1;
]])
],[
@@ -1795,7 +1795,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETPEERNAME], [
$curl_includes_bsdsocket
$curl_includes_sys_socket
]],[[
if(0 != getpeername(0, (void *)0, (void *)0))
if(getpeername(0, (void *)0, (void *)0) != 0)
return 1;
]])
],[
@@ -1829,7 +1829,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETPEERNAME], [
$curl_includes_bsdsocket
$curl_includes_sys_socket
]],[[
if(0 != getpeername(0, (void *)0, (void *)0))
if(getpeername(0, (void *)0, (void *)0) != 0)
return 1;
]])
],[
@@ -1893,7 +1893,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETSOCKNAME], [
$curl_includes_bsdsocket
$curl_includes_sys_socket
]],[[
if(0 != getsockname(0, (void *)0, (void *)0))
if(getsockname(0, (void *)0, (void *)0) != 0)
return 1;
]])
],[
@@ -1927,7 +1927,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETSOCKNAME], [
$curl_includes_bsdsocket
$curl_includes_sys_socket
]],[[
if(0 != getsockname(0, (void *)0, (void *)0))
if(getsockname(0, (void *)0, (void *)0) != 0)
return 1;
]])
],[
@@ -2014,7 +2014,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETIFADDRS], [
AC_LANG_PROGRAM([[
$curl_includes_ifaddrs
]],[[
if(0 != getifaddrs(0))
if(getifaddrs(0) != 0)
return 1;
]])
],[
@@ -2134,7 +2134,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GMTIME_R], [
]],[[
time_t tm = 1170352587;
struct tm result;
if(0 != gmtime_r(&tm, &result))
if(gmtime_r(&tm, &result) != 0)
return 1;
(void)result;
]])
@@ -2255,7 +2255,7 @@ AC_DEFUN([CURL_CHECK_FUNC_INET_NTOP], [
]],[[
char ipv4res[sizeof("255.255.255.255")];
unsigned char ipv4a[5] = "";
if(0 != inet_ntop(0, ipv4a, ipv4res, 0))
if(inet_ntop(0, ipv4a, ipv4res, 0) != 0)
return 1;
]])
],[
@@ -2414,9 +2414,9 @@ AC_DEFUN([CURL_CHECK_FUNC_INET_PTON], [
AC_LANG_PROGRAM([[
$curl_includes_arpa_inet
]],[[
unsigned char ipv4a[4+1] = "";
unsigned char ipv4a[4 + 1] = "";
const char *ipv4src = "192.168.100.1";
if(0 != inet_pton(0, ipv4src, ipv4a))
if(inet_pton(0, ipv4src, ipv4a) != 0)
return 1;
]])
],[
@@ -2438,45 +2438,45 @@ AC_DEFUN([CURL_CHECK_FUNC_INET_PTON], [
$curl_includes_arpa_inet
$curl_includes_string
]],[[
unsigned char ipv6a[16+1];
unsigned char ipv4a[4+1];
unsigned char ipv6a[16 + 1];
unsigned char ipv4a[4 + 1];
const char *ipv6src = "fe80::214:4fff:fe0b:76c8";
const char *ipv4src = "192.168.100.1";
/* - */
memset(ipv4a, 1, sizeof(ipv4a));
if(1 != inet_pton(AF_INET, ipv4src, ipv4a))
if(inet_pton(AF_INET, ipv4src, ipv4a) != 1)
return 1; /* fail */
/* - */
if( (ipv4a[0] != 0xc0) ||
(ipv4a[1] != 0xa8) ||
(ipv4a[2] != 0x64) ||
(ipv4a[3] != 0x01) ||
(ipv4a[4] != 0x01) )
if((ipv4a[0] != 0xc0) ||
(ipv4a[1] != 0xa8) ||
(ipv4a[2] != 0x64) ||
(ipv4a[3] != 0x01) ||
(ipv4a[4] != 0x01))
return 1; /* fail */
/* - */
memset(ipv6a, 1, sizeof(ipv6a));
if(1 != inet_pton(AF_INET6, ipv6src, ipv6a))
if(inet_pton(AF_INET6, ipv6src, ipv6a) != 1)
return 1; /* fail */
/* - */
if( (ipv6a[0] != 0xfe) ||
(ipv6a[1] != 0x80) ||
(ipv6a[8] != 0x02) ||
(ipv6a[9] != 0x14) ||
(ipv6a[10] != 0x4f) ||
(ipv6a[11] != 0xff) ||
(ipv6a[12] != 0xfe) ||
(ipv6a[13] != 0x0b) ||
(ipv6a[14] != 0x76) ||
(ipv6a[15] != 0xc8) ||
(ipv6a[16] != 0x01) )
if((ipv6a[0] != 0xfe) ||
(ipv6a[1] != 0x80) ||
(ipv6a[8] != 0x02) ||
(ipv6a[9] != 0x14) ||
(ipv6a[10] != 0x4f) ||
(ipv6a[11] != 0xff) ||
(ipv6a[12] != 0xfe) ||
(ipv6a[13] != 0x0b) ||
(ipv6a[14] != 0x76) ||
(ipv6a[15] != 0xc8) ||
(ipv6a[16] != 0x01))
return 1; /* fail */
/* - */
if( (ipv6a[2] != 0x0) ||
(ipv6a[3] != 0x0) ||
(ipv6a[4] != 0x0) ||
(ipv6a[5] != 0x0) ||
(ipv6a[6] != 0x0) ||
(ipv6a[7] != 0x0) )
if((ipv6a[2] != 0x0) ||
(ipv6a[3] != 0x0) ||
(ipv6a[4] != 0x0) ||
(ipv6a[5] != 0x0) ||
(ipv6a[6] != 0x0) ||
(ipv6a[7] != 0x0))
return 1; /* fail */
/* - */
return 0;
@@ -2565,7 +2565,7 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTL], [
AC_LANG_PROGRAM([[
$curl_includes_stropts
]],[[
if(0 != ioctl(0, 0, 0))
if(ioctl(0, 0, 0) != 0)
return 1;
]])
],[
@@ -2623,7 +2623,7 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTL_FIONBIO], [
$curl_includes_stropts
]],[[
int flags = 0;
if(0 != ioctl(0, FIONBIO, &flags))
if(ioctl(0, FIONBIO, &flags) != 0)
return 1;
]])
],[
@@ -2680,7 +2680,7 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTL_SIOCGIFADDR], [
#include <net/if.h>
]],[[
struct ifreq ifr;
if(0 != ioctl(0, SIOCGIFADDR, &ifr))
if(ioctl(0, SIOCGIFADDR, &ifr) != 0)
return 1;
]])
],[
@@ -2738,7 +2738,7 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET], [
AC_LANG_PROGRAM([[
$curl_includes_winsock2
]],[[
if(0 != ioctlsocket(0, 0, 0))
if(ioctlsocket(0, 0, 0) != 0)
return 1;
]])
],[
@@ -2768,7 +2768,7 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET], [
AC_LANG_PROGRAM([[
$curl_includes_winsock2
]],[[
if(0 != ioctlsocket(0, 0, 0))
if(ioctlsocket(0, 0, 0) != 0)
return 1;
]])
],[
@@ -2827,7 +2827,7 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET_FIONBIO], [
$curl_includes_winsock2
]],[[
unsigned long flags = 0;
if(0 != ioctlsocket(0, FIONBIO, &flags))
if(ioctlsocket(0, FIONBIO, &flags) != 0)
return 1;
]])
],[
@@ -2884,7 +2884,7 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL], [
AC_LANG_PROGRAM([[
$curl_includes_bsdsocket
]],[[
if(0 != IoctlSocket(0, 0, 0))
if(IoctlSocket(0, 0, 0) != 0)
return 1;
]])
],[
@@ -2901,7 +2901,7 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL], [
AC_LANG_PROGRAM([[
$curl_includes_bsdsocket
]],[[
if(0 != IoctlSocket(0, 0, 0))
if(IoctlSocket(0, 0, 0) != 0)
return 1;
]])
],[
@@ -2959,7 +2959,7 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL_FIONBIO], [
$curl_includes_bsdsocket
]],[[
long flags = 0;
if(0 != IoctlSocket(0, FIONBIO, &flags))
if(IoctlSocket(0, FIONBIO, &flags) != 0)
return 1;
]])
],[
@@ -3030,7 +3030,7 @@ AC_DEFUN([CURL_CHECK_FUNC_MEMRCHR], [
AC_LANG_PROGRAM([[
$curl_includes_string
]],[[
if(0 != memrchr("", 0, 0))
if(memrchr("", 0, 0) != 0)
return 1;
]])
],[
@@ -3062,7 +3062,7 @@ AC_DEFUN([CURL_CHECK_FUNC_MEMRCHR], [
AC_LANG_PROGRAM([[
$curl_includes_string
]],[[
if(0 != memrchr("", 0, 0))
if(memrchr("", 0, 0) != 0)
return 1;
]])
],[
@@ -3147,7 +3147,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SIGACTION], [
AC_LANG_PROGRAM([[
$curl_includes_signal
]],[[
if(0 != sigaction(0, 0, 0))
if(sigaction(0, 0, 0) != 0)
return 1;
]])
],[
@@ -3232,7 +3232,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SIGINTERRUPT], [
AC_LANG_PROGRAM([[
$curl_includes_signal
]],[[
if(0 != siginterrupt(0, 0))
if(siginterrupt(0, 0) != 0)
return 1;
]])
],[
@@ -3317,7 +3317,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SIGNAL], [
AC_LANG_PROGRAM([[
$curl_includes_signal
]],[[
if(0 != signal(0, 0))
if(signal(0, 0) != 0)
return 1;
]])
],[
@@ -3391,7 +3391,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SIGSETJMP], [
$curl_includes_setjmp
]],[[
sigjmp_buf env;
if(0 != sigsetjmp(env, 0))
if(sigsetjmp(env, 0) != 0)
return 1;
]])
],[
@@ -3424,7 +3424,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SIGSETJMP], [
$curl_includes_setjmp
]],[[
sigjmp_buf env;
if(0 != sigsetjmp(env, 0))
if(sigsetjmp(env, 0) != 0)
return 1;
]])
],[
@@ -3487,7 +3487,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SOCKET], [
$curl_includes_bsdsocket
$curl_includes_sys_socket
]],[[
if(0 != socket(0, 0, 0))
if(socket(0, 0, 0) != 0)
return 1;
]])
],[
@@ -3521,7 +3521,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SOCKET], [
$curl_includes_bsdsocket
$curl_includes_sys_socket
]],[[
if(0 != socket(0, 0, 0))
if(socket(0, 0, 0) != 0)
return 1;
]])
],[
@@ -3607,7 +3607,7 @@ AC_DEFUN([CURL_CHECK_FUNC_SOCKETPAIR], [
$curl_includes_sys_socket
]],[[
int sv[2];
if(0 != socketpair(0, 0, 0, sv))
if(socketpair(0, 0, 0, sv) != 0)
return 1;
]])
],[
@@ -3692,7 +3692,7 @@ AC_DEFUN([CURL_CHECK_FUNC_STRCASECMP], [
AC_LANG_PROGRAM([[
$curl_includes_string
]],[[
if(0 != strcasecmp("", ""))
if(strcasecmp("", "") != 0)
return 1;
]])
],[
@@ -3776,7 +3776,7 @@ AC_DEFUN([CURL_CHECK_FUNC_STRCMPI], [
AC_LANG_PROGRAM([[
$curl_includes_string
]],[[
if(0 != strcmpi(0, 0))
if(strcmpi(0, 0) != 0)
return 1;
]])
],[
@@ -3971,7 +3971,7 @@ AC_DEFUN([CURL_CHECK_FUNC_STRERROR_R], [
$curl_includes_string
]],[[
char s[1];
if(0 != strerror_r(0, s, 0))
if(strerror_r(0, s, 0) != 0)
return 1;
]])
],[
@@ -3994,7 +3994,7 @@ AC_DEFUN([CURL_CHECK_FUNC_STRERROR_R], [
char *strerror_r(int errnum, char *workbuf, $arg3 bufsize);
]],[[
char s[1];
if(0 != strerror_r(0, s, 0))
if(strerror_r(0, s, 0) != 0)
return 1;
(void)s;
]])
@@ -4057,7 +4057,7 @@ AC_DEFUN([CURL_CHECK_FUNC_STRERROR_R], [
int strerror_r(int errnum, char *resultbuf, $arg3 bufsize);
]],[[
char s[1];
if(0 != strerror_r(0, s, 0))
if(strerror_r(0, s, 0) != 0)
return 1;
(void)s;
]])
@@ -4213,7 +4213,7 @@ AC_DEFUN([CURL_CHECK_FUNC_STRICMP], [
AC_LANG_PROGRAM([[
$curl_includes_string
]],[[
if(0 != stricmp(0, 0))
if(stricmp(0, 0) != 0)
return 1;
]])
],[
@@ -4380,8 +4380,8 @@ AC_DEFUN([CURL_SIZEOF], [
$2
]],[
switch(0) {
case 0:
case (sizeof($1) == $typesize):;
case 0:
case (sizeof($1) == $typesize):;
}
])
],[

File diff suppressed because it is too large Load Diff

View File

@@ -28,7 +28,6 @@
#include "easy.h"
#include "multi.h"
CURL_EXTERN char *curl_version_ccsid(unsigned int ccsid);
CURL_EXTERN char *curl_easy_escape_ccsid(CURL *handle,
const char *string, int length,

View File

@@ -48,16 +48,13 @@ struct arguments {
struct vary2 *cmdargs; /* Command line arguments. */
};
static int
is_ifs(char c)
static int is_ifs(char c)
{
return c == ' ' || c == '\t' || c == '\r' || c == '\n';
}
static int
parse_command_line(const char *cmdargs, size_t len,
size_t *argc, char **argv,
size_t *argsize, char *argbuf)
static int parse_command_line(const char *cmdargs, size_t len, size_t *argc,
char **argv, size_t *argsize, char *argbuf)
{
const char *endline = cmdargs + len;
char quote = '\0';
@@ -126,9 +123,7 @@ parse_command_line(const char *cmdargs, size_t len,
return 0;
}
int
main(int argsc, struct arguments *args)
int main(int argsc, struct arguments *args)
{
size_t argc;
char **argv;
@@ -154,20 +149,20 @@ main(int argsc, struct arguments *args)
if(!exitcode) {
/* Allocate space for parsed arguments. */
argv = (char **) malloc((argc + 1) * sizeof(*argv) + argsize);
argv = (char **)malloc((argc + 1) * sizeof(*argv) + argsize);
if(!argv) {
fputs("Memory allocation error\n", stderr);
exitcode = -2;
}
else {
_SYSPTR pgmptr = rslvsp(WLI_PGM, (char *) CURLPGM, library, _AUTH_NONE);
_LU_Work_Area_T *luwrka = (_LU_Work_Area_T *) _LUWRKA();
_SYSPTR pgmptr = rslvsp(WLI_PGM, (char *)CURLPGM, library, _AUTH_NONE);
_LU_Work_Area_T *luwrka = (_LU_Work_Area_T *)_LUWRKA();
parse_command_line(args->cmdargs->string, args->cmdargs->len,
&argc, argv, &argsize, (char *) (argv + argc + 1));
parse_command_line(args->cmdargs->string, args->cmdargs->len, &argc,
argv, &argsize, (char *)(argv + argc + 1));
/* Call program. */
_CALLPGMV((void *) &pgmptr, argv, argc);
_CALLPGMV((void *)&pgmptr, argv, argc);
exitcode = luwrka->LU_RC;
free(argv);

View File

@@ -41,15 +41,13 @@ extern int QadrtFreeConversionTable(void);
extern int QadrtFreeEnviron(void);
extern char * setlocale_a(int, const char *);
/* The ASCII main program. */
extern int main_a(int argc, char * * argv);
extern int main_a(int argc, char **argv);
/* Global values of original EBCDIC arguments. */
int ebcdic_argc;
char ** ebcdic_argv;
int main(int argc, char **argv)
{
int i;
@@ -63,8 +61,8 @@ int main(int argc, char **argv)
char dummybuf[128];
/* To/From codes are 32 byte long strings with
reserved fields initialized to ZEROs */
const char tocode[32] = {"IBMCCSID01208"}; /* Use UTF-8. */
const char fromcode[32] = {"IBMCCSID000000000010"};
const char tocode[32] = { "IBMCCSID01208" }; /* Use UTF-8. */
const char fromcode[32] = { "IBMCCSID000000000010" };
ebcdic_argc = argc;
ebcdic_argv = argv;
@@ -88,10 +86,10 @@ int main(int argc, char **argv)
}
/* Allocate memory for the ASCII arguments and vector. */
argv = (char **) malloc((argc + 1) * sizeof(*argv) + bytecount);
argv = (char **)malloc((argc + 1) * sizeof(*argv) + bytecount);
/* Build the vector and convert argument encoding. */
outbuf = (char *) (argv + argc + 1);
outbuf = (char *)(argv + argc + 1);
outbytesleft = bytecount;
for(i = 0; i < argc; i++) {
@@ -112,7 +110,7 @@ int main(int argc, char **argv)
i = main_a(argc, argv);
/* Clean-up allocated items. */
free((char *) argv);
free((char *)argv);
QadrtFreeConversionTable();
QadrtFreeEnviron();

View File

@@ -65,14 +65,13 @@
#pragma convert(0) /* Restore EBCDIC. */
#define MIN_BYTE_GAIN 1024 /* Minimum gain when shortening a buffer. */
#define MIN_BYTE_GAIN 1024 /* Minimum gain when shortening a buffer. */
struct buffer_t {
unsigned long size; /* Buffer size. */
char *buf; /* Buffer address. */
};
static char *buffer_undef(localkey_t key, long size);
static char *buffer_threaded(localkey_t key, long size);
static char *buffer_unthreaded(localkey_t key, long size);
@@ -86,10 +85,10 @@ char *(*Curl_thread_buffer)(localkey_t key, long size) = buffer_undef;
static void thdbufdestroy(void *private)
{
if(private) {
struct buffer_t *p = (struct buffer_t *) private;
struct buffer_t *p = (struct buffer_t *)private;
localkey_t i;
for(i = (localkey_t) 0; i < LK_LAST; i++) {
for(i = (localkey_t)0; i < LK_LAST; i++) {
free(p->buf);
p++;
}
@@ -98,27 +97,23 @@ static void thdbufdestroy(void *private)
}
}
static void
terminate(void)
static void terminate(void)
{
if(Curl_thread_buffer == buffer_threaded) {
locbufs = pthread_getspecific(thdkey);
pthread_setspecific(thdkey, (void *) NULL);
pthread_setspecific(thdkey, (void *)NULL);
pthread_key_delete(thdkey);
}
if(Curl_thread_buffer != buffer_undef) {
thdbufdestroy((void *) locbufs);
locbufs = (struct buffer_t *) NULL;
thdbufdestroy((void *)locbufs);
locbufs = (struct buffer_t *)NULL;
}
Curl_thread_buffer = buffer_undef;
}
static char *
get_buffer(struct buffer_t *buf, long size)
static char *get_buffer(struct buffer_t *buf, long size)
{
char *cp;
@@ -136,7 +131,7 @@ get_buffer(struct buffer_t *buf, long size)
return buf->buf;
}
if((unsigned long) size <= buf->size) {
if((unsigned long)size <= buf->size) {
/* Shorten the buffer only if it frees a significant byte count. This
avoids some realloc() overhead. */
@@ -157,27 +152,23 @@ get_buffer(struct buffer_t *buf, long size)
return cp;
}
/*
* Get buffer address for the given local key.
* This is always called though `Curl_thread_buffer' and when threads are
* NOT made available by the os, so no mutex lock/unlock occurs.
*/
static char *
buffer_unthreaded(localkey_t key, long size)
static char *buffer_unthreaded(localkey_t key, long size)
{
return get_buffer(locbufs + key, size);
}
/*
* Get buffer address for the given local key, taking care of
* concurrent threads.
* This is always called though `Curl_thread_buffer' and when threads are
* made available by the os.
*/
static char *
buffer_threaded(localkey_t key, long size)
static char *buffer_threaded(localkey_t key, long size)
{
struct buffer_t *bufs;
@@ -185,30 +176,28 @@ buffer_threaded(localkey_t key, long size)
make sure it is at least `size'-byte long. Set `size' to < 0 to get
its address only. */
bufs = (struct buffer_t *) pthread_getspecific(thdkey);
bufs = (struct buffer_t *)pthread_getspecific(thdkey);
if(!bufs) {
if(size < 0)
return (char *) NULL; /* No buffer yet. */
return (char *)NULL; /* No buffer yet. */
/* Allocate buffer descriptors for the current thread. */
bufs = calloc((size_t) LK_LAST, sizeof(*bufs));
bufs = calloc((size_t)LK_LAST, sizeof(*bufs));
if(!bufs)
return (char *) NULL;
return (char *)NULL;
if(pthread_setspecific(thdkey, (void *) bufs)) {
if(pthread_setspecific(thdkey, (void *)bufs)) {
free(bufs);
return (char *) NULL;
return (char *)NULL;
}
}
return get_buffer(bufs + key, size);
}
static char *
buffer_undef(localkey_t key, long size)
static char *buffer_undef(localkey_t key, long size)
{
/* Define the buffer system, get the buffer for the given local key in
the current thread, and make sure it is at least `size'-byte long.
@@ -218,7 +207,7 @@ buffer_undef(localkey_t key, long size)
/* Determine if we can use pthread-specific data. */
if(Curl_thread_buffer == buffer_undef) { /* If unchanged during lock. */
if(Curl_thread_buffer == buffer_undef) { /* If unchanged during lock. */
/* OS400 interactive jobs do not support threads: check here. */
if(!pthread_key_create(&thdkey, thdbufdestroy)) {
/* Threads are supported: use the thread-aware buffer procedure. */
@@ -227,10 +216,10 @@ buffer_undef(localkey_t key, long size)
else {
/* No multi-threading available: allocate storage for single-thread
* buffer headers. */
locbufs = calloc((size_t) LK_LAST, sizeof(*locbufs));
locbufs = calloc((size_t)LK_LAST, sizeof(*locbufs));
if(!locbufs) {
pthread_mutex_unlock(&mutex); /* For symetry: will probably fail. */
return (char *) NULL;
pthread_mutex_unlock(&mutex); /* For symetry: will probably fail. */
return (char *)NULL;
}
else
Curl_thread_buffer = buffer_unthreaded; /* Use unthreaded version. */
@@ -243,15 +232,13 @@ buffer_undef(localkey_t key, long size)
return Curl_thread_buffer(key, size);
}
static char *
set_thread_string(localkey_t key, const char *s)
static char *set_thread_string(localkey_t key, const char *s)
{
int i;
char *cp;
if(!s)
return (char *) NULL;
return (char *)NULL;
i = strlen(s) + 1;
cp = Curl_thread_buffer(key, MAX_CONV_EXPANSION * i + 1);
@@ -264,12 +251,10 @@ set_thread_string(localkey_t key, const char *s)
return cp;
}
int
Curl_getnameinfo_a(const struct sockaddr *sa, socklen_t salen,
char *nodename, socklen_t nodenamelen,
char *servname, socklen_t servnamelen,
int flags)
int Curl_getnameinfo_a(const struct sockaddr *sa, socklen_t salen,
char *nodename, socklen_t nodenamelen,
char *servname, socklen_t servnamelen,
int flags)
{
char *enodename = NULL;
char *eservname = NULL;
@@ -289,20 +274,20 @@ Curl_getnameinfo_a(const struct sockaddr *sa, socklen_t salen,
}
}
status = getnameinfo(sa, salen, enodename, nodenamelen,
eservname, servnamelen, flags);
status = getnameinfo(sa, salen, enodename, nodenamelen, eservname,
servnamelen, flags);
if(!status) {
int i;
if(enodename) {
i = QadrtConvertE2A(nodename, enodename,
nodenamelen - 1, strlen(enodename));
i = QadrtConvertE2A(nodename, enodename, nodenamelen - 1,
strlen(enodename));
nodename[i] = '\0';
}
if(eservname) {
i = QadrtConvertE2A(servname, eservname,
servnamelen - 1, strlen(eservname));
i = QadrtConvertE2A(servname, eservname, servnamelen - 1,
strlen(eservname));
servname[i] = '\0';
}
}
@@ -312,18 +297,16 @@ Curl_getnameinfo_a(const struct sockaddr *sa, socklen_t salen,
return status;
}
int
Curl_getaddrinfo_a(const char *nodename, const char *servname,
const struct addrinfo *hints,
struct addrinfo **res)
int Curl_getaddrinfo_a(const char *nodename, const char *servname,
const struct addrinfo *hints, struct addrinfo **res)
{
char *enodename;
char *eservname;
int status;
int i;
enodename = (char *) NULL;
eservname = (char *) NULL;
enodename = (char *)NULL;
eservname = (char *)NULL;
if(nodename) {
i = strlen(nodename);
@@ -360,8 +343,7 @@ Curl_getaddrinfo_a(const char *nodename, const char *servname,
/* ASCII wrappers for the GSSAPI procedures. */
static int
Curl_gss_convert_in_place(OM_uint32 *minor_status, gss_buffer_t buf)
static int Curl_gss_convert_in_place(OM_uint32 *minor_status, gss_buffer_t buf)
{
unsigned int i = buf->length;
@@ -388,10 +370,8 @@ Curl_gss_convert_in_place(OM_uint32 *minor_status, gss_buffer_t buf)
return 0;
}
OM_uint32
Curl_gss_import_name_a(OM_uint32 *minor_status, gss_buffer_t in_name,
gss_OID in_name_type, gss_name_t *out_name)
OM_uint32 Curl_gss_import_name_a(OM_uint32 *minor_status, gss_buffer_t in_name,
gss_OID in_name_type, gss_name_t *out_name)
{
OM_uint32 rc;
unsigned int i;
@@ -400,7 +380,7 @@ Curl_gss_import_name_a(OM_uint32 *minor_status, gss_buffer_t in_name,
if(!in_name || !in_name->value || !in_name->length)
return gss_import_name(minor_status, in_name, in_name_type, out_name);
memcpy((char *) &in, (char *) in_name, sizeof(in));
memcpy((char *)&in, (char *)in_name, sizeof(in));
i = in.length;
in.value = malloc(i + 1);
@@ -413,17 +393,17 @@ Curl_gss_import_name_a(OM_uint32 *minor_status, gss_buffer_t in_name,
}
QadrtConvertA2E(in.value, in_name->value, i, i);
((char *) in.value)[i] = '\0';
((char *)in.value)[i] = '\0';
rc = gss_import_name(minor_status, &in, in_name_type, out_name);
free(in.value);
return rc;
}
OM_uint32
Curl_gss_display_status_a(OM_uint32 *minor_status, OM_uint32 status_value,
int status_type, gss_OID mech_type,
gss_msg_ctx_t *message_context,
gss_buffer_t status_string)
OM_uint32 Curl_gss_display_status_a(OM_uint32 *minor_status,
OM_uint32 status_value, int status_type,
gss_OID mech_type,
gss_msg_ctx_t *message_context,
gss_buffer_t status_string)
{
int rc;
@@ -477,7 +457,7 @@ Curl_gss_init_sec_context_a(OM_uint32 *minor_status,
}
QadrtConvertA2E(in.value, input_token->value, i, i);
((char *) in.value)[i] = '\0';
((char *)in.value)[i] = '\0';
in.length = i;
inp = &in;
}
@@ -503,11 +483,9 @@ Curl_gss_init_sec_context_a(OM_uint32 *minor_status,
return rc;
}
OM_uint32
Curl_gss_delete_sec_context_a(OM_uint32 *minor_status,
gss_ctx_id_t *context_handle,
gss_buffer_t output_token)
OM_uint32 Curl_gss_delete_sec_context_a(OM_uint32 *minor_status,
gss_ctx_id_t *context_handle,
gss_buffer_t output_token)
{
OM_uint32 rc;
@@ -533,38 +511,36 @@ Curl_gss_delete_sec_context_a(OM_uint32 *minor_status,
/* ASCII wrappers for the LDAP procedures. */
void *
Curl_ldap_init_a(char *host, int port)
void *Curl_ldap_init_a(char *host, int port)
{
size_t i;
char *ehost;
void *result;
if(!host)
return (void *) ldap_init(host, port);
return (void *)ldap_init(host, port);
i = strlen(host);
ehost = malloc(i + 1);
if(!ehost)
return (void *) NULL;
return (void *)NULL;
QadrtConvertA2E(ehost, host, i, i);
ehost[i] = '\0';
result = (void *) ldap_init(ehost, port);
result = (void *)ldap_init(ehost, port);
free(ehost);
return result;
}
int
Curl_ldap_simple_bind_s_a(void *ld, char *dn, char *passwd)
int Curl_ldap_simple_bind_s_a(void *ld, char *dn, char *passwd)
{
int i;
char *edn;
char *epasswd;
edn = (char *) NULL;
epasswd = (char *) NULL;
edn = (char *)NULL;
epasswd = (char *)NULL;
if(dn) {
i = strlen(dn);
@@ -596,9 +572,8 @@ Curl_ldap_simple_bind_s_a(void *ld, char *dn, char *passwd)
return i;
}
int
Curl_ldap_search_s_a(void *ld, char *base, int scope, char *filter,
char **attrs, int attrsonly, LDAPMessage **res)
int Curl_ldap_search_s_a(void *ld, char *base, int scope, char *filter,
char **attrs, int attrsonly, LDAPMessage **res)
{
int i;
int j;
@@ -607,9 +582,9 @@ Curl_ldap_search_s_a(void *ld, char *base, int scope, char *filter,
char **eattrs;
int status;
ebase = (char *) NULL;
efilter = (char *) NULL;
eattrs = (char **) NULL;
ebase = (char *)NULL;
efilter = (char *)NULL;
eattrs = (char **)NULL;
status = LDAP_SUCCESS;
if(base) {
@@ -676,14 +651,13 @@ Curl_ldap_search_s_a(void *ld, char *base, int scope, char *filter,
return status;
}
struct berval **
Curl_ldap_get_values_len_a(void *ld, LDAPMessage *entry, const char *attr)
struct berval **Curl_ldap_get_values_len_a(void *ld, LDAPMessage *entry,
const char *attr)
{
char *cp;
struct berval **result;
cp = (char *) NULL;
cp = (char *)NULL;
if(attr) {
int i = strlen(attr);
@@ -692,7 +666,7 @@ Curl_ldap_get_values_len_a(void *ld, LDAPMessage *entry, const char *attr)
if(!cp) {
ldap_set_lderrno(ld, LDAP_NO_MEMORY, NULL,
ldap_err2string(LDAP_NO_MEMORY));
return (struct berval **) NULL;
return (struct berval **)NULL;
}
QadrtConvertA2E(cp, attr, i, i);
@@ -708,14 +682,12 @@ Curl_ldap_get_values_len_a(void *ld, LDAPMessage *entry, const char *attr)
return result;
}
char *
Curl_ldap_err2string_a(int error)
char *Curl_ldap_err2string_a(int error)
{
return set_thread_string(LK_LDAP_ERROR, ldap_err2string(error));
}
char *
Curl_ldap_get_dn_a(void *ld, LDAPMessage *entry)
char *Curl_ldap_get_dn_a(void *ld, LDAPMessage *entry)
{
int i;
char *cp;
@@ -744,9 +716,8 @@ Curl_ldap_get_dn_a(void *ld, LDAPMessage *entry)
return cp;
}
char *
Curl_ldap_first_attribute_a(void *ld,
LDAPMessage *entry, BerElement **berptr)
char *Curl_ldap_first_attribute_a(void *ld, LDAPMessage *entry,
BerElement **berptr)
{
int i;
char *cp;
@@ -775,9 +746,8 @@ Curl_ldap_first_attribute_a(void *ld,
return cp;
}
char *
Curl_ldap_next_attribute_a(void *ld,
LDAPMessage *entry, BerElement *berptr)
char *Curl_ldap_next_attribute_a(void *ld, LDAPMessage *entry,
BerElement *berptr)
{
int i;
char *cp;
@@ -808,9 +778,8 @@ Curl_ldap_next_attribute_a(void *ld,
#endif /* CURL_DISABLE_LDAP */
static int
sockaddr2ebcdic(struct sockaddr_storage *dstaddr,
const struct sockaddr *srcaddr, int srclen)
static int sockaddr2ebcdic(struct sockaddr_storage *dstaddr,
const struct sockaddr *srcaddr, int srclen)
{
const struct sockaddr_un *srcu;
struct sockaddr_un *dstu;
@@ -826,13 +795,13 @@ sockaddr2ebcdic(struct sockaddr_storage *dstaddr,
return -1;
}
memcpy((char *) dstaddr, (char *) srcaddr, srclen);
memcpy((char *)dstaddr, (char *)srcaddr, srclen);
switch(srcaddr->sa_family) {
case AF_UNIX:
srcu = (const struct sockaddr_un *) srcaddr;
dstu = (struct sockaddr_un *) dstaddr;
srcu = (const struct sockaddr_un *)srcaddr;
dstu = (struct sockaddr_un *)dstaddr;
dstsize = sizeof(*dstaddr) - offsetof(struct sockaddr_un, sun_path);
srclen -= offsetof(struct sockaddr_un, sun_path);
i = QadrtConvertA2E(dstu->sun_path, srcu->sun_path, dstsize - 1, srclen);
@@ -843,10 +812,8 @@ sockaddr2ebcdic(struct sockaddr_storage *dstaddr,
return srclen;
}
static int
sockaddr2ascii(struct sockaddr *dstaddr, int dstlen,
const struct sockaddr_storage *srcaddr, int srclen)
static int sockaddr2ascii(struct sockaddr *dstaddr, int dstlen,
const struct sockaddr_storage *srcaddr, int srclen)
{
const struct sockaddr_un *srcu;
struct sockaddr_un *dstu;
@@ -864,15 +831,15 @@ sockaddr2ascii(struct sockaddr *dstaddr, int dstlen,
return -1;
}
memcpy((char *) dstaddr, (char *) srcaddr, srclen);
memcpy((char *)dstaddr, (char *)srcaddr, srclen);
if(srclen >= offsetof(struct sockaddr_storage, ss_family) +
sizeof(srcaddr->ss_family)) {
switch(srcaddr->ss_family) {
case AF_UNIX:
srcu = (const struct sockaddr_un *) srcaddr;
dstu = (struct sockaddr_un *) dstaddr;
srcu = (const struct sockaddr_un *)srcaddr;
dstu = (struct sockaddr_un *)dstaddr;
dstsize = dstlen - offsetof(struct sockaddr_un, sun_path);
srclen -= offsetof(struct sockaddr_un, sun_path);
if(dstsize > 0 && srclen > 0) {
@@ -887,8 +854,7 @@ sockaddr2ascii(struct sockaddr *dstaddr, int dstlen,
return srclen;
}
int
Curl_os400_connect(int sd, struct sockaddr *destaddr, int addrlen)
int Curl_os400_connect(int sd, struct sockaddr *destaddr, int addrlen)
{
int i;
struct sockaddr_storage laddr;
@@ -898,11 +864,10 @@ Curl_os400_connect(int sd, struct sockaddr *destaddr, int addrlen)
if(i < 0)
return -1;
return connect(sd, (struct sockaddr *) &laddr, i);
return connect(sd, (struct sockaddr *)&laddr, i);
}
int
Curl_os400_bind(int sd, struct sockaddr *localaddr, int addrlen)
int Curl_os400_bind(int sd, struct sockaddr *localaddr, int addrlen)
{
int i;
struct sockaddr_storage laddr;
@@ -912,12 +877,11 @@ Curl_os400_bind(int sd, struct sockaddr *localaddr, int addrlen)
if(i < 0)
return -1;
return bind(sd, (struct sockaddr *) &laddr, i);
return bind(sd, (struct sockaddr *)&laddr, i);
}
int
Curl_os400_sendto(int sd, char *buffer, int buflen, int flags,
const struct sockaddr *dstaddr, int addrlen)
int Curl_os400_sendto(int sd, char *buffer, int buflen, int flags,
const struct sockaddr *dstaddr, int addrlen)
{
int i;
struct sockaddr_storage laddr;
@@ -927,12 +891,11 @@ Curl_os400_sendto(int sd, char *buffer, int buflen, int flags,
if(i < 0)
return -1;
return sendto(sd, buffer, buflen, flags, (struct sockaddr *) &laddr, i);
return sendto(sd, buffer, buflen, flags, (struct sockaddr *)&laddr, i);
}
int
Curl_os400_recvfrom(int sd, char *buffer, int buflen, int flags,
struct sockaddr *fromaddr, int *addrlen)
int Curl_os400_recvfrom(int sd, char *buffer, int buflen, int flags,
struct sockaddr *fromaddr, int *addrlen)
{
int rcvlen;
struct sockaddr_storage laddr;
@@ -943,7 +906,7 @@ Curl_os400_recvfrom(int sd, char *buffer, int buflen, int flags,
laddr.ss_family = AF_UNSPEC; /* To detect if unused. */
rcvlen = recvfrom(sd, buffer, buflen, flags,
(struct sockaddr *) &laddr, &laddrlen);
(struct sockaddr *)&laddr, &laddrlen);
if(rcvlen < 0)
return rcvlen;
@@ -959,12 +922,11 @@ Curl_os400_recvfrom(int sd, char *buffer, int buflen, int flags,
return rcvlen;
}
int
Curl_os400_getpeername(int sd, struct sockaddr *addr, int *addrlen)
int Curl_os400_getpeername(int sd, struct sockaddr *addr, int *addrlen)
{
struct sockaddr_storage laddr;
int laddrlen = sizeof(laddr);
int retcode = getpeername(sd, (struct sockaddr *) &laddr, &laddrlen);
int retcode = getpeername(sd, (struct sockaddr *)&laddr, &laddrlen);
if(!retcode) {
laddrlen = sockaddr2ascii(addr, *addrlen, &laddr, laddrlen);
@@ -976,12 +938,11 @@ Curl_os400_getpeername(int sd, struct sockaddr *addr, int *addrlen)
return retcode;
}
int
Curl_os400_getsockname(int sd, struct sockaddr *addr, int *addrlen)
int Curl_os400_getsockname(int sd, struct sockaddr *addr, int *addrlen)
{
struct sockaddr_storage laddr;
int laddrlen = sizeof(laddr);
int retcode = getsockname(sd, (struct sockaddr *) &laddr, &laddrlen);
int retcode = getsockname(sd, (struct sockaddr *)&laddr, &laddrlen);
if(!retcode) {
laddrlen = sockaddr2ascii(addr, *addrlen, &laddr, laddrlen);
@@ -993,17 +954,14 @@ Curl_os400_getsockname(int sd, struct sockaddr *addr, int *addrlen)
return retcode;
}
#ifdef HAVE_LIBZ
const char *
Curl_os400_zlibVersion(void)
const char *Curl_os400_zlibVersion(void)
{
return set_thread_string(LK_ZLIB_VERSION, zlibVersion());
}
int
Curl_os400_inflateInit_(z_streamp strm, const char *version, int stream_size)
int Curl_os400_inflateInit_(z_streamp strm, const char *version,
int stream_size)
{
z_const char *msgb4 = strm->msg;
int ret;
@@ -1016,9 +974,8 @@ Curl_os400_inflateInit_(z_streamp strm, const char *version, int stream_size)
return ret;
}
int
Curl_os400_inflateInit2_(z_streamp strm, int windowBits,
const char *version, int stream_size)
int Curl_os400_inflateInit2_(z_streamp strm, int windowBits,
const char *version, int stream_size)
{
z_const char *msgb4 = strm->msg;
int ret;
@@ -1031,8 +988,7 @@ Curl_os400_inflateInit2_(z_streamp strm, int windowBits,
return ret;
}
int
Curl_os400_inflate(z_streamp strm, int flush)
int Curl_os400_inflate(z_streamp strm, int flush)
{
z_const char *msgb4 = strm->msg;
int ret;
@@ -1045,8 +1001,7 @@ Curl_os400_inflate(z_streamp strm, int flush)
return ret;
}
int
Curl_os400_inflateEnd(z_streamp strm)
int Curl_os400_inflateEnd(z_streamp strm)
{
z_const char *msgb4 = strm->msg;
int ret;

View File

@@ -28,30 +28,27 @@
#ifndef __OS400_SYS_
#define __OS400_SYS_
/* Per-thread item identifiers. */
typedef enum {
LK_GSK_ERROR,
LK_LDAP_ERROR,
LK_CURL_VERSION,
LK_VERSION_INFO,
LK_VERSION_INFO_DATA,
LK_EASY_STRERROR,
LK_SHARE_STRERROR,
LK_MULTI_STRERROR,
LK_URL_STRERROR,
LK_ZLIB_VERSION,
LK_ZLIB_MSG,
LK_LAST
} localkey_t;
extern char * (* Curl_thread_buffer)(localkey_t key, long size);
LK_GSK_ERROR,
LK_LDAP_ERROR,
LK_CURL_VERSION,
LK_VERSION_INFO,
LK_VERSION_INFO_DATA,
LK_EASY_STRERROR,
LK_SHARE_STRERROR,
LK_MULTI_STRERROR,
LK_URL_STRERROR,
LK_ZLIB_VERSION,
LK_ZLIB_MSG,
LK_LAST
} localkey_t;
extern char *(*Curl_thread_buffer)(localkey_t key, long size);
/* Maximum string expansion factor due to character code conversion. */
#define MAX_CONV_EXPANSION 4 /* Can deal with UTF-8. */
#define MAX_CONV_EXPANSION 4 /* Can deal with UTF-8. */
#endif

View File

@@ -78,34 +78,29 @@ struct itmlst_3 {
#pragma member_alignment restore
#ifdef __VAX
#define ENABLE "ENABLE"
#define ENABLE "ENABLE"
#define DISABLE "DISABLE"
#else
#define ENABLE TRUE
#define ENABLE TRUE
#define DISABLE 0
int decc$feature_get_index (const char *name);
int decc$feature_set_value (int index, int mode, int value);
int decc$feature_get_index(const char *name);
int decc$feature_set_value(int index, int mode, int value);
#endif
int SYS$TRNLNM(
const unsigned long *attr,
const struct dsc$descriptor_s *table_dsc,
struct dsc$descriptor_s *name_dsc,
const unsigned char *acmode,
const struct itmlst_3 *item_list);
int SYS$CRELNM(
const unsigned long *attr,
const struct dsc$descriptor_s *table_dsc,
const struct dsc$descriptor_s *name_dsc,
const unsigned char *acmode,
const struct itmlst_3 *item_list);
int SYS$TRNLNM(const unsigned long *attr,
const struct dsc$descriptor_s *table_dsc,
struct dsc$descriptor_s *name_dsc,
const unsigned char *acmode,
const struct itmlst_3 *item_list);
int SYS$CRELNM(const unsigned long *attr,
const struct dsc$descriptor_s *table_dsc,
const struct dsc$descriptor_s *name_dsc,
const unsigned char *acmode,
const struct itmlst_3 *item_list);
/* Take all the fun out of simply looking up a logical name */
static int sys_trnlnm(const char *logname,
char *value,
int value_len)
static int sys_trnlnm(const char *logname, char *value, int value_len)
{
const $DESCRIPTOR(table_dsc, "LNM$FILE_DEV");
const unsigned long attr = LNM$M_CASE_BLIND;
@@ -140,8 +135,7 @@ static int sys_trnlnm(const char *logname,
}
/* How to simply create a logical name */
static int sys_crelnm(const char *logname,
const char *value)
static int sys_crelnm(const char *logname, const char *value)
{
int ret_val;
const char *proc_table = "LNM$PROCESS_TABLE";
@@ -149,12 +143,12 @@ static int sys_crelnm(const char *logname,
struct dsc$descriptor_s logname_dsc;
struct itmlst_3 item_list[2];
proc_table_dsc.dsc$a_pointer = (char *) proc_table;
proc_table_dsc.dsc$a_pointer = (char *)proc_table;
proc_table_dsc.dsc$w_length = strlen(proc_table);
proc_table_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
proc_table_dsc.dsc$b_class = DSC$K_CLASS_S;
logname_dsc.dsc$a_pointer = (char *) logname;
logname_dsc.dsc$a_pointer = (char *)logname;
logname_dsc.dsc$w_length = strlen(logname);
logname_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
logname_dsc.dsc$b_class = DSC$K_CLASS_S;
@@ -172,7 +166,6 @@ static int sys_crelnm(const char *logname,
return ret_val;
}
/* Start of DECC RTL Feature handling */
/*
@@ -191,7 +184,7 @@ static void set_feature_default(const char *name, int value)
index = decc$feature_get_index(name);
if(index > 0)
decc$feature_set_value (index, 0, value);
decc$feature_set_value(index, 0, value);
}
#endif
@@ -202,7 +195,7 @@ static void set_features(void)
int use_unix_settings = 1;
status = sys_trnlnm("GNV$UNIX_SHELL",
unix_shell_name, sizeof(unix_shell_name) -1);
unix_shell_name, sizeof(unix_shell_name) - 1);
if(!$VMS_STATUS_SUCCESS(status)) {
use_unix_settings = 0;
}
@@ -262,7 +255,6 @@ static void set_features(void)
set_feature_default("DECC$FILE_OWNER_UNIX", ENABLE);
set_feature_default("DECC$POSIX_SEEK_STREAM_FILE", ENABLE);
}
else {
set_feature_default("DECC$FILENAME_UNIX_REPORT", ENABLE);
@@ -285,10 +277,9 @@ static void set_features(void)
/* Commented here to prevent future bugs: A program or user should */
/* never ever enable DECC$POSIX_STYLE_UID. */
/* It will probably break all code that accesses UIDs */
/* do_not_set_default ("DECC$POSIX_STYLE_UID", TRUE); */
/* do_not_set_default("DECC$POSIX_STYLE_UID", TRUE); */
}
/* Some boilerplate to force this to be a proper LIB$INITIALIZE section */
#pragma nostandard
@@ -306,7 +297,7 @@ static void set_features(void)
# endif
#endif
/* Set our contribution to the LIB$INITIALIZE array */
void (* const iniarray[])(void) = {set_features };
void (* const iniarray[])(void) = { set_features };
#ifndef __VAX
# if __INITIAL_POINTER_SIZE
# pragma __pointer_size __restore
@@ -315,7 +306,6 @@ void (* const iniarray[])(void) = {set_features };
# endif
#endif
/*
** Force a reference to LIB$INITIALIZE to ensure it
** exists in the image.
@@ -324,7 +314,7 @@ int LIB$INITIALIZE(void);
#ifdef __DECC
#pragma extern_model strict_refdef
#endif
int lib_init_ref = (int) LIB$INITIALIZE;
int lib_init_ref = (int)LIB$INITIALIZE;
#ifdef __DECC
#pragma extern_model restore
#pragma standard

View File

@@ -50,93 +50,93 @@
/* IF YOU UPDATE THIS FILE, UPDATE CURLMSG_VMS.H SO THAT THEY ARE IN SYNC */
/* */
#define CURL_FACILITY 3841
#define CURL_OK 251756553
#define CURL_UNSUPPORTED_PROTOCOL 251756562
#define CURL_FAILED_INIT 251756570
#define CURL_URL_MALFORMAT 251756578
#define CURL_OBSOLETE4 251756586
#define CURL_COULDNT_RESOLVE_PROXY 251756594
#define CURL_COULDNT_RESOLVE_HOST 251756602
#define CURL_COULDNT_CONNECT 251756610
#define CURL_WEIRD_SERVER_REPLY 251756618
#define CURL_FACILITY 3841
#define CURL_OK 251756553
#define CURL_UNSUPPORTED_PROTOCOL 251756562
#define CURL_FAILED_INIT 251756570
#define CURL_URL_MALFORMAT 251756578
#define CURL_OBSOLETE4 251756586
#define CURL_COULDNT_RESOLVE_PROXY 251756594
#define CURL_COULDNT_RESOLVE_HOST 251756602
#define CURL_COULDNT_CONNECT 251756610
#define CURL_WEIRD_SERVER_REPLY 251756618
#define CURL_FTP_WEIRD_SERVER_REPLY CURL_WEIRD_SERVER_REPLY
#define CURL_FTP_ACCESS_DENIED 251756626
#define CURL_OBSOLETE10 251756634
#define CURL_FTP_WEIRD_PASS_REPLY 251756642
#define CURL_OBSOLETE12 251756650
#define CURL_FTP_WEIRD_PASV_REPLY 251756658
#define CURL_FTP_WEIRD_227_FORMAT 251756666
#define CURL_FTP_CANT_GET_HOST 251756674
#define CURL_OBSOLETE16 251756682
#define CURL_FTP_COULDNT_SET_TYPE 251756690
#define CURL_PARTIAL_FILE 251756698
#define CURL_FTP_COULDNT_RETR_FILE 251756706
#define CURL_OBSOLETE20 251756714
#define CURL_QUOTE_ERROR 251756722
#define CURL_HTTP_RETURNED_ERROR 251756730
#define CURL_WRITE_ERROR 251756738
#define CURL_OBSOLETE24 251756746
#define CURL_UPLOAD_FAILED 251756754
#define CURL_READ_ERROR 251756762
#define CURL_OUT_OF_MEMORY 251756770
#define CURL_OPERATION_TIMEOUTED 251756778
#define CURL_OBSOLETE29 251756786
#define CURL_FTP_PORT_FAILED 251756794
#define CURL_FTP_COULDNT_USE_REST 251756802
#define CURL_OBSOLETE32 251756810
#define CURL_RANGE_ERROR 251756818
#define CURL_HTTP_POST_ERROR 251756826
#define CURL_SSL_CONNECT_ERROR 251756834
#define CURL_BAD_DOWNLOAD_RESUME 251756842
#define CURL_FTP_ACCESS_DENIED 251756626
#define CURL_OBSOLETE10 251756634
#define CURL_FTP_WEIRD_PASS_REPLY 251756642
#define CURL_OBSOLETE12 251756650
#define CURL_FTP_WEIRD_PASV_REPLY 251756658
#define CURL_FTP_WEIRD_227_FORMAT 251756666
#define CURL_FTP_CANT_GET_HOST 251756674
#define CURL_OBSOLETE16 251756682
#define CURL_FTP_COULDNT_SET_TYPE 251756690
#define CURL_PARTIAL_FILE 251756698
#define CURL_FTP_COULDNT_RETR_FILE 251756706
#define CURL_OBSOLETE20 251756714
#define CURL_QUOTE_ERROR 251756722
#define CURL_HTTP_RETURNED_ERROR 251756730
#define CURL_WRITE_ERROR 251756738
#define CURL_OBSOLETE24 251756746
#define CURL_UPLOAD_FAILED 251756754
#define CURL_READ_ERROR 251756762
#define CURL_OUT_OF_MEMORY 251756770
#define CURL_OPERATION_TIMEOUTED 251756778
#define CURL_OBSOLETE29 251756786
#define CURL_FTP_PORT_FAILED 251756794
#define CURL_FTP_COULDNT_USE_REST 251756802
#define CURL_OBSOLETE32 251756810
#define CURL_RANGE_ERROR 251756818
#define CURL_HTTP_POST_ERROR 251756826
#define CURL_SSL_CONNECT_ERROR 251756834
#define CURL_BAD_DOWNLOAD_RESUME 251756842
#define CURL_FILE_COULDNT_READ_FILE 251756850
#define CURL_LDAP_CANNOT_BIND 251756858
#define CURL_LDAP_SEARCH_FAILED 251756866
#define CURL_OBSOLETE40 251756874
#define CURL_FUNCTION_NOT_FOUND 251756882
#define CURL_ABORTED_BY_CALLBACK 251756890
#define CURL_BAD_FUNCTION_ARGUMENT 251756898
#define CURL_OBSOLETE44 251756906
#define CURL_INTERFACE_FAILED 251756914
#define CURL_OBSOLETE46 251756922
#define CURL_TOO_MANY_REDIRECTS 251756930
#define CURL_UNKNOWN_TELNET_OPTION 251756938
#define CURL_TELNET_OPTION_SYNTAX 251756946
#define CURL_OBSOLETE50 251756954
#define CURL_PEER_FAILED_VERIF 251756962
#define CURL_GOT_NOTHING 251756970
#define CURL_SSL_ENGINE_NOTFOUND 251756978
#define CURL_SSL_ENGINE_SETFAILED 251756986
#define CURL_SEND_ERROR 251756994
#define CURL_RECV_ERROR 251757002
#define CURL_OBSOLETE57 251757010
#define CURL_SSL_CERTPROBLEM 251757018
#define CURL_SSL_CIPHER 251757026
#define CURL_SSL_CACERT 251757034
#define CURL_BAD_CONTENT_ENCODING 251757042
#define CURL_LDAP_INVALID_URL 251757050
#define CURL_FILESIZE_EXCEEDED 251757058
#define CURL_USE_SSL_FAILED 251757066
#define CURL_SEND_FAIL_REWIND 251757074
#define CURL_SSL_ENGINE_INITFAILED 251757082
#define CURL_LOGIN_DENIED 251757090
#define CURL_TFTP_NOTFOUND 251757098
#define CURL_TFTP_PERM 251757106
#define CURL_REMOTE_DISK_FULL 251757114
#define CURL_TFTP_ILLEGAL 251757122
#define CURL_TFTP_UNKNOWNID 251757130
#define CURL_REMOTE_FILE_EXISTS 251757138
#define CURL_TFTP_NOSUCHUSER 251757146
#define CURL_CONV_FAILED 251757154
#define CURL_CONV_REQD 251757162
#define CURL_SSL_CACERT_BADFILE 251757170
#define CURL_REMOTE_FILE_NOT_FOUND 251757178
#define CURL_SSH 251757186
#define CURL_SSL_SHUTDOWN_FAILED 251757194
#define CURL_AGAIN 251757202
#define CURL_SSL_CRL_BADFILE 251757210
#define CURL_SSL_ISSUER_ERROR 251757218
#define CURL_CURL_LAST 251757226
#define CURL_LDAP_CANNOT_BIND 251756858
#define CURL_LDAP_SEARCH_FAILED 251756866
#define CURL_OBSOLETE40 251756874
#define CURL_FUNCTION_NOT_FOUND 251756882
#define CURL_ABORTED_BY_CALLBACK 251756890
#define CURL_BAD_FUNCTION_ARGUMENT 251756898
#define CURL_OBSOLETE44 251756906
#define CURL_INTERFACE_FAILED 251756914
#define CURL_OBSOLETE46 251756922
#define CURL_TOO_MANY_REDIRECTS 251756930
#define CURL_UNKNOWN_TELNET_OPTION 251756938
#define CURL_TELNET_OPTION_SYNTAX 251756946
#define CURL_OBSOLETE50 251756954
#define CURL_PEER_FAILED_VERIF 251756962
#define CURL_GOT_NOTHING 251756970
#define CURL_SSL_ENGINE_NOTFOUND 251756978
#define CURL_SSL_ENGINE_SETFAILED 251756986
#define CURL_SEND_ERROR 251756994
#define CURL_RECV_ERROR 251757002
#define CURL_OBSOLETE57 251757010
#define CURL_SSL_CERTPROBLEM 251757018
#define CURL_SSL_CIPHER 251757026
#define CURL_SSL_CACERT 251757034
#define CURL_BAD_CONTENT_ENCODING 251757042
#define CURL_LDAP_INVALID_URL 251757050
#define CURL_FILESIZE_EXCEEDED 251757058
#define CURL_USE_SSL_FAILED 251757066
#define CURL_SEND_FAIL_REWIND 251757074
#define CURL_SSL_ENGINE_INITFAILED 251757082
#define CURL_LOGIN_DENIED 251757090
#define CURL_TFTP_NOTFOUND 251757098
#define CURL_TFTP_PERM 251757106
#define CURL_REMOTE_DISK_FULL 251757114
#define CURL_TFTP_ILLEGAL 251757122
#define CURL_TFTP_UNKNOWNID 251757130
#define CURL_REMOTE_FILE_EXISTS 251757138
#define CURL_TFTP_NOSUCHUSER 251757146
#define CURL_CONV_FAILED 251757154
#define CURL_CONV_REQD 251757162
#define CURL_SSL_CACERT_BADFILE 251757170
#define CURL_REMOTE_FILE_NOT_FOUND 251757178
#define CURL_SSH 251757186
#define CURL_SSL_SHUTDOWN_FAILED 251757194
#define CURL_AGAIN 251757202
#define CURL_SSL_CRL_BADFILE 251757210
#define CURL_SSL_ISSUER_ERROR 251757218
#define CURL_CURL_LAST 251757226
#pragma __member_alignment __restore

View File

@@ -35,15 +35,14 @@
#include <stsdef.h>
#include <errno.h>
unsigned long LIB$SET_SYMBOL(
const struct dsc$descriptor_s * symbol,
const struct dsc$descriptor_s * value,
const unsigned long *table_type);
unsigned long LIB$SET_SYMBOL(const struct dsc$descriptor_s *symbol,
const struct dsc$descriptor_s *value,
const unsigned long *table_type);
int main(int argc, char **argv)
{
void *libptr;
const char * (*ssl_version)(int t);
const char *(*ssl_version)(int t);
const char *version;
if(argc < 1) {
@@ -53,11 +52,11 @@ int main(int argc, char **argv)
libptr = dlopen(argv[1], 0);
ssl_version = (const char * (*)(int))dlsym(libptr, "SSLeay_version");
ssl_version = (const char *(*)(int))dlsym(libptr, "SSLeay_version");
if(!ssl_version) {
ssl_version = (const char * (*)(int))dlsym(libptr, "ssleay_version");
ssl_version = (const char *(*)(int))dlsym(libptr, "ssleay_version");
if(!ssl_version) {
ssl_version = (const char * (*)(int))dlsym(libptr, "SSLEAY_VERSION");
ssl_version = (const char *(*)(int))dlsym(libptr, "SSLEAY_VERSION");
}
}

View File

@@ -54,7 +54,6 @@ while(1) {
}
}
use POSIX qw(strftime);
my @ts;
if(defined($ENV{SOURCE_DATE_EPOCH})) {

View File

@@ -1205,7 +1205,6 @@ sub scanfile {
}
if($errors || $warnings || $verbose) {
printf "checksrc: %d errors and %d warnings\n", $errors, $warnings;
if($suppressed) {

View File

@@ -108,7 +108,6 @@ my %defaulton = (
);
sub configureopts {
my ($opts)=@_;
my %thisin;
@@ -189,7 +188,6 @@ for my $w (sort keys %avail) {
}
}
print "ENABLED configure options that are not available\n";
for my $w (sort keys %with) {
if(!$avail{$w}) {

View File

@@ -95,7 +95,7 @@ my $deletes=`git diff-tree --diff-filter=A -r --summary origin/$branch $start 2>
my $creates=`git diff-tree --diff-filter=D -r --summary origin/$branch $start 2>/dev/null | wc -l`;
# Time since that tag
my $tagged=`git for-each-ref --format="%(refname:short) | %(taggerdate:unix)" refs/tags/* | grep ^$start | cut "-d|" -f2`; # Unix timestamp
my $tagged=`git for-each-ref --format="%(refname:short) | %(taggerdate:unix)" refs/tags/* | grep ^$start | cut '-d|' -f2`; # Unix timestamp
my $taggednice=`git for-each-ref --format="%(refname:short) | %(creatordate)" refs/tags/* | grep ^$start | cut '-d|' -f2`; # human readable time
chomp $taggednice;
my $now=POSIX::strftime("%s", localtime());

View File

@@ -54,7 +54,6 @@ cat > "$out" <<EOF
##
EOF
certutil -L -h 'Builtin Object Token' -d "$db" | \
grep ' *[CcGTPpu]*,[CcGTPpu]*,[CcGTPpu]* *$' | \
sed -e 's/ *[CcGTPpu]*,[CcGTPpu]*,[CcGTPpu]* *$//' -e 's/\(.*\)/"\1"/' | \

View File

@@ -85,7 +85,6 @@ sub manpageify {
return "--$k$trail";
}
my $colwidth=79; # max number of columns
sub prefixline {
@@ -500,7 +499,6 @@ sub render {
# convert single backslash to double-backslash
$d =~ s/\\/\\\\/g if($manpage);
if($manpage) {
if(!$quote && $d =~ /--/) {
$d =~ s/--([a-z0-9.-]+)/manpageify($1, 1)/ge;
@@ -1047,7 +1045,6 @@ sub header {
printdesc($manpage, 0, @d);
}
sub sourcecategories {
my ($dir) = @_;
my %cats;

View File

@@ -255,7 +255,6 @@ sub sha256 {
return $result;
}
sub oldhash {
my $hash = "";
open(C, "<$_[0]") || return 0;

View File

@@ -35,45 +35,45 @@ struct detail {
};
static const struct detail scheme[] = {
{"dict", "#ifndef CURL_DISABLE_DICT" },
{"file", "#ifndef CURL_DISABLE_FILE" },
{"ftp", "#ifndef CURL_DISABLE_FTP" },
{"ftps", "#if defined(USE_SSL) && !defined(CURL_DISABLE_FTP)" },
{"gopher", "#ifndef CURL_DISABLE_GOPHER" },
{"gophers", "#if defined(USE_SSL) && !defined(CURL_DISABLE_GOPHER)" },
{"http", "#ifndef CURL_DISABLE_HTTP" },
{"https", "#if defined(USE_SSL) && !defined(CURL_DISABLE_HTTP)" },
{"imap", "#ifndef CURL_DISABLE_IMAP" },
{"imaps", "#if defined(USE_SSL) && !defined(CURL_DISABLE_IMAP)" },
{"ldap", "#ifndef CURL_DISABLE_LDAP" },
{"ldaps", "#if !defined(CURL_DISABLE_LDAP) && \\\n"
" !defined(CURL_DISABLE_LDAPS) && \\\n"
" ((defined(USE_OPENLDAP) && defined(USE_SSL)) || \\\n"
" (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL)))" },
{"mqtt", "#ifndef CURL_DISABLE_MQTT" },
{"pop3", "#ifndef CURL_DISABLE_POP3" },
{"pop3s", "#if defined(USE_SSL) && !defined(CURL_DISABLE_POP3)" },
{"rtmp", "#ifdef USE_LIBRTMP" },
{"rtmpt", "#ifdef USE_LIBRTMP" },
{"rtmpe", "#ifdef USE_LIBRTMP" },
{"rtmpte", "#ifdef USE_LIBRTMP" },
{"rtmps", "#ifdef USE_LIBRTMP" },
{"rtmpts", "#ifdef USE_LIBRTMP" },
{"rtsp", "#ifndef CURL_DISABLE_RTSP" },
{"scp", "#ifdef USE_SSH" },
{"sftp", "#ifdef USE_SSH" },
{"smb", "#if !defined(CURL_DISABLE_SMB) && \\\n"
" defined(USE_CURL_NTLM_CORE) && (SIZEOF_CURL_OFF_T > 4)" },
{"smbs", "#if defined(USE_SSL) && !defined(CURL_DISABLE_SMB) && \\\n"
" defined(USE_CURL_NTLM_CORE) && (SIZEOF_CURL_OFF_T > 4)" },
{"smtp", "#ifndef CURL_DISABLE_SMTP" },
{"smtps", "#if defined(USE_SSL) && !defined(CURL_DISABLE_SMTP)" },
{"telnet", "#ifndef CURL_DISABLE_TELNET" },
{"tftp", "#ifndef CURL_DISABLE_TFTP" },
{"ws",
"#if !defined(CURL_DISABLE_WEBSOCKETS) && !defined(CURL_DISABLE_HTTP)" },
{"wss", "#if !defined(CURL_DISABLE_WEBSOCKETS) && \\\n"
" defined(USE_SSL) && !defined(CURL_DISABLE_HTTP)" },
{ "dict", "#ifndef CURL_DISABLE_DICT" },
{ "file", "#ifndef CURL_DISABLE_FILE" },
{ "ftp", "#ifndef CURL_DISABLE_FTP" },
{ "ftps", "#if defined(USE_SSL) && !defined(CURL_DISABLE_FTP)" },
{ "gopher", "#ifndef CURL_DISABLE_GOPHER" },
{ "gophers", "#if defined(USE_SSL) && !defined(CURL_DISABLE_GOPHER)" },
{ "http", "#ifndef CURL_DISABLE_HTTP" },
{ "https", "#if defined(USE_SSL) && !defined(CURL_DISABLE_HTTP)" },
{ "imap", "#ifndef CURL_DISABLE_IMAP" },
{ "imaps", "#if defined(USE_SSL) && !defined(CURL_DISABLE_IMAP)" },
{ "ldap", "#ifndef CURL_DISABLE_LDAP" },
{ "ldaps", "#if !defined(CURL_DISABLE_LDAP) && \\\n"
" !defined(CURL_DISABLE_LDAPS) && \\\n"
" ((defined(USE_OPENLDAP) && defined(USE_SSL)) || \\\n"
" (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL)))" },
{ "mqtt", "#ifndef CURL_DISABLE_MQTT" },
{ "pop3", "#ifndef CURL_DISABLE_POP3" },
{ "pop3s", "#if defined(USE_SSL) && !defined(CURL_DISABLE_POP3)" },
{ "rtmp", "#ifdef USE_LIBRTMP" },
{ "rtmpt", "#ifdef USE_LIBRTMP" },
{ "rtmpe", "#ifdef USE_LIBRTMP" },
{ "rtmpte", "#ifdef USE_LIBRTMP" },
{ "rtmps", "#ifdef USE_LIBRTMP" },
{ "rtmpts", "#ifdef USE_LIBRTMP" },
{ "rtsp", "#ifndef CURL_DISABLE_RTSP" },
{ "scp", "#ifdef USE_SSH" },
{ "sftp", "#ifdef USE_SSH" },
{ "smb", "#if !defined(CURL_DISABLE_SMB) && \\\n"
" defined(USE_CURL_NTLM_CORE) && (SIZEOF_CURL_OFF_T > 4)" },
{ "smbs", "#if defined(USE_SSL) && !defined(CURL_DISABLE_SMB) && \\\n"
" defined(USE_CURL_NTLM_CORE) && (SIZEOF_CURL_OFF_T > 4)" },
{ "smtp", "#ifndef CURL_DISABLE_SMTP" },
{ "smtps", "#if defined(USE_SSL) && !defined(CURL_DISABLE_SMTP)" },
{ "telnet", "#ifndef CURL_DISABLE_TELNET" },
{ "tftp", "#ifndef CURL_DISABLE_TFTP" },
{ "ws",
"#if !defined(CURL_DISABLE_WEBSOCKETS) && !defined(CURL_DISABLE_HTTP)" },
{ "wss", "#if !defined(CURL_DISABLE_WEBSOCKETS) && \\\n"
" defined(USE_SSL) && !defined(CURL_DISABLE_HTTP)" },
{ NULL, NULL }
};
@@ -108,7 +108,8 @@ static void showtable(int try, int init, int shift)
" s++;\n"
" l--;\n"
" }\n"
"*/\n", init, shift);
"*/\n",
init, shift);
printf(" static const struct Curl_handler * const protocols[%d] = {", try);
@@ -158,10 +159,10 @@ int main(void)
for(j = 0; j < i; j++) {
if(num[j] == v) {
/*
#if 0
printf("NOPE: %u is a dupe (%s and %s)\n",
v, scheme[i], scheme[j]);
*/
#endif
badcombo = 1;
break;
}

View File

@@ -273,7 +273,6 @@ ParameterError parseconfig(const char *filename, int max_recursive,
return err;
}
static bool get_line(FILE *input, struct dynbuf *buf, bool *error)
{
CURLcode result;

View File

@@ -38,7 +38,6 @@ BEGIN {
);
}
my %APPVEYOR_TEST_NAMES; # JSON and shell-quoted test names by test number
sub appveyor_check_environment {

View File

@@ -1,7 +1,6 @@
<HTML><BODY>
<CENTER><H1>This is <a href="http://www.gnu.org/software/gnutls">GnuTLS</a></H1></CENTER>
<p>Session ID: <i>003030000100000001000000000000000030330001000000B062410001000000</i></p>
<h5>If your browser supports session resuming, then you should see the same session ID, when you press the <b>reload</b> button.</h5>
<p>Connected as user 'jsmith'.</p>

View File

@@ -30,7 +30,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER#test
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<protocol crlf="headers">

View File

@@ -31,7 +31,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER?q=foobar#fragment
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<protocol crlf="headers">

View File

@@ -31,7 +31,6 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER?q=foobar#fragment#fragment2
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<protocol crlf="headers">

View File

@@ -49,8 +49,6 @@ Content-Length: 6
hello
</datacheck>
</reply>
# Client-side

View File

@@ -31,8 +31,6 @@ Set-Cookie: time=2
-foo-
</data2>
</reply>
#

View File

@@ -6,7 +6,6 @@ FAILURE
</keywords>
</info>
#
# Client-side
<client>

View File

@@ -6,7 +6,6 @@ FAILURE
</keywords>
</info>
#
# Client-side
<client>

View File

@@ -23,7 +23,6 @@ Funny-head: yesyes
</data>
</reply>
#
# Client-side
<client>

View File

@@ -29,7 +29,6 @@ ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
</command>
</client>
# Verify data after the test has been "shot"
<verify>
# This does not send QUIT because of known bug:

View File

@@ -25,7 +25,6 @@ ensure that the order does not matter. -->
-->
<!-- First request has NTLM auth, wrong password -->
<data100 crlf="headers">
HTTP/1.1 401 Need Digest or NTLM auth

View File

@@ -6,7 +6,6 @@ FTP
</keywords>
</info>
#
# Server-side
<reply>

View File

@@ -17,7 +17,6 @@ connection-monitor
auth_required
</servercmd>
# this is returned first since we get no proxy-auth
<connect crlf="headers">
HTTP/1.1 407 Authorization Required to proxy me my dear

View File

@@ -50,7 +50,6 @@ client CONNECT 2e 00044d51545404c2003c000c6375726c
server CONNACK 2 20020005
</protocol>
# 8 is CURLE_WEIRD_SERVER_REPLY
<errorcode>
8

View File

@@ -34,7 +34,6 @@ ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --ftp-account "one count"
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<protocol crlf="yes">

View File

@@ -5,7 +5,6 @@ curl_multi_remove_handle
</keywords>
</info>
#
# Client-side
<client>

View File

@@ -5,7 +5,6 @@ URL
</keywords>
</info>
#
# Client-side
<client>

View File

@@ -34,7 +34,6 @@ ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --ftp-account "one count" ftp://%HOSTIP:%FTPP
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<protocol crlf="yes">

View File

@@ -64,7 +64,6 @@ use testutil qw(
);
use getpart;
#######################################################################
# logmsg is our general message logging subroutine.
# This function is currently required to be here by servers.pm
@@ -105,7 +104,6 @@ sub parseprotocols {
push @protocols, 'none';
}
#######################################################################
# Initialize @protocols from the curl binary under test
#
@@ -117,7 +115,6 @@ sub init_protocols {
}
}
#######################################################################
# Initialize the test harness to run tests
#

View File

@@ -37,7 +37,6 @@ BEGIN {
);
}
my %file_chmod1 = (
'name' => 'chmod1',
'content' => "This file should have permissions 444\n",

View File

@@ -103,8 +103,8 @@ sub getpartattr {
if(!$inside && ($_ =~ /^ *\<$section/)) {
$inside++;
}
if((1 ==$inside) && ( ($_ =~ /^ *\<$part ([^>]*)/) ||
!(defined($part)) )
if((1 == $inside) && (($_ =~ /^ *\<$part ([^>]*)/) ||
!(defined($part)))
) {
$inside++;
my $attr=$1;
@@ -118,10 +118,10 @@ sub getpartattr {
last;
}
# detect end of section when part was not found
elsif((1 ==$inside) && ($_ =~ /^ *\<\/$section\>/)) {
elsif((1 == $inside) && ($_ =~ /^ *\<\/$section\>/)) {
last;
}
elsif((2 ==$inside) && ($_ =~ /^ *\<\/$part/)) {
elsif((2 == $inside) && ($_ =~ /^ *\<\/$part/)) {
$inside--;
}
}
@@ -252,7 +252,6 @@ sub loadtest {
return 0;
}
# Return entire document as list of lines
sub fulltest {
return @xml;
@@ -323,7 +322,6 @@ sub savetest {
# Strip off all lines that match the specified pattern and return
# the new array.
#
sub striparray {
my ($pattern, $arrayref) = @_;
@@ -423,5 +421,4 @@ sub loadarray {
return @array;
}
1;

View File

@@ -85,7 +85,6 @@ use pathhelp qw(
use Cwd qw(getcwd);
use File::Spec;
#######################################################################
# global configuration variables
#

View File

@@ -21,12 +21,10 @@
* SPDX-License-Identifier: curl
*
***************************************************************************/
#include "first.h"
#include "testtrace.h"
#ifndef CURL_DISABLE_FTP
struct test_cli_ftp_upload_data {
@@ -85,8 +83,7 @@ static CURLcode test_cli_ftp_upload(const char *URL)
curl_off_t uploadsize = -1;
(void)URL;
while((ch = cgetopt(test_argc, test_argv, "r:"))
!= -1) {
while((ch = cgetopt(test_argc, test_argv, "r:")) != -1) {
switch(ch) {
case 'r':
resolve = coptarg;

View File

@@ -55,7 +55,6 @@ static CURLcode test_lib651(const char *URL)
if(formrc)
curl_mprintf("curl_formadd(1) = %d\n", formrc);
curl = curl_easy_init();
if(!curl) {
curl_mfprintf(stderr, "curl_easy_init() failed\n");

View File

@@ -74,7 +74,6 @@ my @not_built_in_num = (
'CURLOPT_SOCKS5_AUTH',
);
#
# Generate a set of string checks
#
@@ -626,7 +625,6 @@ MOO
}
}
print $fh <<FOOTER
/* NOLINTNEXTLINE(clang-analyzer-optin.core.EnumCastOutOfRange) */

View File

@@ -92,6 +92,7 @@
goto unit_test_abort; \
} while(0)
/* begin/end macros */
#define UNITTEST_BEGIN_SIMPLE \
(void)arg; \

View File

@@ -43,12 +43,10 @@ log = logging.getLogger(__name__)
HOST = "localhost"
IDENT = "NTEL"
# The strings that indicate the test framework is checking our aliveness
VERIFIED_REQ = "verifiedserver"
VERIFIED_RSP = "WE ROOLZ: {pid}"
def telnetserver(options):
"""Start up a TCP server with a telnet handler and serve DICT requests forever."""
if options.pidfile:
@@ -69,7 +67,6 @@ def telnetserver(options):
# leaving `with` calls server.close() automatically
return ScriptRC.SUCCESS
class NegotiatingTelnetHandler(socketserver.BaseRequestHandler):
"""Handler class for Telnet connections."""
@@ -113,7 +110,6 @@ class NegotiatingTelnetHandler(socketserver.BaseRequestHandler):
except IOError:
log.exception("IOError hit during request")
class Negotiator(object):
NO_NEG = 0
START_NEG = 1
@@ -242,7 +238,6 @@ class Negotiator(object):
log.debug("Sending WONT %s", option_str)
self.send_iac([NegTokens.WONT, NegOptions.to_val(option_str)])
class NegBase(object):
@classmethod
def to_val(cls, name):
@@ -256,7 +251,6 @@ class NegBase(object):
return "<unknown>"
class NegTokens(NegBase):
# The start of a negotiation sequence
IAC = 255
@@ -274,7 +268,6 @@ class NegTokens(NegBase):
# The end of sub-negotiation options.
SE = 240
class NegOptions(NegBase):
# Binary Transmission
BINARY = 0
@@ -287,7 +280,6 @@ class NegOptions(NegBase):
# Charset option
CHARSET = 42
def get_options():
parser = argparse.ArgumentParser()
@@ -306,7 +298,6 @@ def get_options():
return parser.parse_args()
def setup_logging(options):
"""Set up logging from the command line options."""
root_logger = logging.getLogger()
@@ -339,7 +330,6 @@ def setup_logging(options):
stdout_handler.setLevel(logging.DEBUG)
root_logger.addHandler(stdout_handler)
class ScriptRC(object):
"""Enum for script return codes."""
@@ -347,7 +337,6 @@ class ScriptRC(object):
FAILURE = 1
EXCEPTION = 2
if __name__ == '__main__':
# Get the options from the user.
options = get_options()

View File

@@ -67,7 +67,6 @@ BEGIN {
);
}
#######################################################################
# Block for cached static variables
#

View File

@@ -468,7 +468,6 @@ sub killallsockfilters {
}
}
sub set_advisor_read_lock {
my ($filename) = @_;
@@ -479,7 +478,6 @@ sub set_advisor_read_lock {
printf "Error creating lock file $filename error: $!\n";
}
sub clear_advisor_read_lock {
my ($filename) = @_;
@@ -488,5 +486,4 @@ sub clear_advisor_read_lock {
}
}
1;

View File

@@ -111,7 +111,6 @@ use testutil qw(
use valgrind;
use memanalyzer;
#######################################################################
# Global variables set elsewhere but used only by this package
# These may only be set *before* runner_init is called
@@ -384,7 +383,6 @@ sub prepro {
return @out;
}
#######################################################################
# Load test keywords into %keywords hash
#
@@ -399,7 +397,6 @@ sub readtestkeywords {
}
}
#######################################################################
# Return a list of log locks that still exist
#
@@ -585,7 +582,6 @@ sub torture {
return 0;
}
#######################################################################
# restore environment variables that were modified in test
sub restore_test_env {
@@ -603,7 +599,6 @@ sub restore_test_env {
}
}
#######################################################################
# Start the servers needed to run this test case
sub singletest_startservers {
@@ -639,7 +634,6 @@ sub singletest_startservers {
return ($why, $error);
}
#######################################################################
# Generate preprocessed test file
sub singletest_preprocess {
@@ -663,7 +657,6 @@ sub singletest_preprocess {
loadtest("$LOGDIR/test${testnum}");
}
#######################################################################
# Set up the test environment to run this test case
sub singletest_setenv {
@@ -693,7 +686,6 @@ sub singletest_setenv {
}
}
#######################################################################
# Check that test environment is fine to run this test case
sub singletest_precheck {
@@ -731,7 +723,6 @@ sub singletest_precheck {
return $why;
}
#######################################################################
# Prepare the test environment to run this test case
sub singletest_prepare {
@@ -804,7 +795,6 @@ sub singletest_prepare {
return 0;
}
#######################################################################
# Run the test command
sub singletest_run {
@@ -1072,7 +1062,6 @@ sub singletest_run {
return (0, $cmdres, $dumped_core, $CURLOUT, $tool, use_valgrind() && !$disablevalgrind);
}
#######################################################################
# Clean up after test command
sub singletest_clean {
@@ -1181,7 +1170,6 @@ sub singletest_postcheck {
return 0;
}
###################################################################
# Get ready to run a single test case
sub runner_test_preprocess {
@@ -1239,7 +1227,6 @@ sub runner_test_preprocess {
return ($why, $error, clearlogs(), \%testtimings);
}
###################################################################
# Run a single test case with an environment that already been prepared
# Returns 0=success, -1=skippable failure, -2=permanent error,
@@ -1437,7 +1424,6 @@ sub runnerar_ready {
return (undef, undef);
}
###################################################################
# Cleanly abort and exit the runner
# This uses print since there is no longer any controller to write logs.
@@ -1537,5 +1523,4 @@ sub runner_shutdown {
undef $runnerw;
}
1;

View File

@@ -220,6 +220,7 @@ sub logmsg_bufferfortest {
$singletest_bufferedrunner = $runnerid;
}
}
#######################################################################
# Store a log message in a buffer for this test
# The messages can then be displayed all at once at the end of the test
@@ -325,7 +326,6 @@ if($ENV{"NGHTTPX"}) {
chomp $nghttpx_h3;
}
#######################################################################
# Get the list of tests that the tests/data/Makefile.am knows about!
#
@@ -344,7 +344,6 @@ sub get_disttests {
close($dh);
}
#######################################################################
# Remove all files in the specified directory
#
@@ -381,7 +380,6 @@ sub cleardir {
return $done;
}
#######################################################################
# Given two array references, this function will store them in two temporary
# files, run 'diff' on them, store the result and return the diff output!
@@ -424,7 +422,6 @@ sub showdiff {
return @out;
}
#######################################################################
# compare test results with the expected output, we might filter off
# some pattern that is allowed to differ, output test results
@@ -951,7 +948,6 @@ sub timestampskippedevents {
}
}
# Setup CI Test Run
sub citest_starttestrun {
if(azure_check_environment()) {
@@ -961,7 +957,6 @@ sub citest_starttestrun {
# Appveyor does not require anything here
}
# Register the test case with the CI runner
sub citest_starttest {
my $testnum = $_[0];
@@ -979,7 +974,6 @@ sub citest_starttest {
}
}
# Submit the test case result with the CI runner
sub citest_finishtest {
my ($testnum, $error) = @_;
@@ -1001,7 +995,6 @@ sub citest_finishtestrun {
# Appveyor does not require anything here
}
# add one set of test timings from the runner to global set
sub updatetesttimings {
my ($testnum, %testtimings)=@_;
@@ -1026,7 +1019,6 @@ sub updatetesttimings {
}
}
#######################################################################
# Return the log directory for the given test runner
sub getrunnernumlogdir {
@@ -1050,7 +1042,6 @@ sub getrunnerlogdir {
die "Internal error: runner ID $runnerid not found";
}
#######################################################################
# Verify that this test case should be run
sub singletest_shouldrun {
@@ -1195,7 +1186,6 @@ sub singletest_shouldrun {
return ($why, $errorreturncode);
}
#######################################################################
# Print the test name and count tests
sub singletest_count {
@@ -1903,7 +1893,6 @@ sub singletest_check {
return 0;
}
#######################################################################
# Report a successful test
sub singletest_success {
@@ -2105,7 +2094,6 @@ sub singletest {
return ($cmdres, 0);
}
#######################################################################
# Report a successful test
singletest_success($testnum, $count, $total, ignoreresultcode($testnum));
@@ -2763,7 +2751,6 @@ if(!$listonly) {
#######################################################################
# Fetch all disabled tests, if there are any
#
sub disabledtests {
my ($file) = @_;
my @input;
@@ -3129,8 +3116,8 @@ while() {
$total++; # number of tests we have run
$executed++;
if($error>0) {
if($error==2) {
if($error > 0) {
if($error == 2) {
# ignored test failures
$failedign .= "$testnum ";
}
@@ -3151,7 +3138,7 @@ while() {
# display all files in $LOGDIR/ in a nice way
displaylogs($ridready, $testnum);
}
if($error==2) {
if($error == 2) {
$ign++; # ignored test result counter
}
elsif(!$anyway) {
@@ -3255,7 +3242,7 @@ if(%skipped && !$short) {
my $r = $_;
my $skip_count = $skipped{$r};
my $log_line = sprintf("TESTINFO: \"%s\" %d time%s (", $r, $skip_count,
($skip_count == 1) ? "" : "s");
($skip_count == 1) ? "" : "s");
# now gather all test case numbers that had this reason for being
# skipped

View File

@@ -90,7 +90,6 @@ sub logmsg {
}
}
#***************************************************************************
# Return server characterization factors given a server id string.
#
@@ -118,7 +117,6 @@ sub serverfactors {
return($proto, $ipvnum, $idnum);
}
#***************************************************************************
# Return server name string formatted for presentation purposes
#
@@ -142,7 +140,6 @@ sub servername_str {
return "${proto}${idnum}${ipver}";
}
#***************************************************************************
# Return server name string formatted for identification purposes
#
@@ -151,7 +148,6 @@ sub servername_id {
return lc(servername_str($proto, $ipver, $idnum));
}
#***************************************************************************
# Return server name string formatted for filename purposes
#
@@ -163,7 +159,6 @@ sub servername_canon {
return $string;
}
#***************************************************************************
# Return filename for server pid file.
#
@@ -182,7 +177,6 @@ sub server_portfilename {
return "${piddir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
}
#***************************************************************************
# Return filename for server log file.
#
@@ -193,7 +187,6 @@ sub server_logfilename {
return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
}
#***************************************************************************
# Return filename for server commands file.
#
@@ -203,7 +196,6 @@ sub server_cmdfilename {
return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
}
#***************************************************************************
# Return filename for server input file.
#
@@ -213,7 +205,6 @@ sub server_inputfilename {
return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
}
#***************************************************************************
# Return filename for server output file.
#
@@ -223,7 +214,6 @@ sub server_outputfilename {
return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
}
#***************************************************************************
# Return filename for a server executable
#
@@ -235,7 +225,6 @@ sub server_exe {
return exerunner() . $SRVDIR . "servers" . exe_ext($ext) . " $name";
}
#***************************************************************************
# Return filename for a server executable as an argument list
#
@@ -251,7 +240,6 @@ sub server_exe_args {
return @cmd;
}
#***************************************************************************
# Return filename for main or primary sockfilter pid file.
#
@@ -263,7 +251,6 @@ sub mainsockf_pidfilename {
return "${piddir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
}
#***************************************************************************
# Return filename for main or primary sockfilter log file.
#
@@ -275,7 +262,6 @@ sub mainsockf_logfilename {
return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
}
#***************************************************************************
# Return filename for data or secondary sockfilter pid file.
#
@@ -287,7 +273,6 @@ sub datasockf_pidfilename {
return "${piddir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
}
#***************************************************************************
# Return filename for data or secondary sockfilter log file.
#
@@ -299,7 +284,6 @@ sub datasockf_logfilename {
return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
}
#***************************************************************************
# End of library
1;

View File

@@ -117,7 +117,6 @@ use testutil qw(
exerunner
);
my %serverpidfile; # all server pid filenames, identified by server id
my %serverportfile;# all server port filenames, identified by server id
my $sshdvernum; # for socks server, ssh daemon version number
@@ -150,7 +149,6 @@ our $err_unexpected; # error instead of warning on server unexpectedly alive
our $debugprotocol; # nonzero for verbose server logs
our $stunnel; # path to stunnel command
#######################################################################
# Check for a command in the PATH of the test server.
#
@@ -266,7 +264,6 @@ sub init_serverpidfile_hash {
}
}
#######################################################################
# Check if a given child process has just died. Reaps it if so.
#
@@ -280,7 +277,6 @@ sub checkdied {
return ($rc == $pid)?1:0;
}
##############################################################################
# This function makes sure the right set of server is running for the
# specified test case. This is a useful design when we run single tests as not
@@ -331,7 +327,6 @@ sub serverfortest {
return &startservers(@what);
}
#######################################################################
# Start a new thread/process and run the given command line in there.
# Return the pids (yes plural) of the new child process to the parent.
@@ -410,7 +405,6 @@ sub startnew {
return ($child, $pid2);
}
#######################################################################
# Return the port to use for the given protocol.
#
@@ -419,7 +413,6 @@ sub protoport {
return $PORT{$proto} || "[not running]";
}
#######################################################################
# Stop a test server along with pids which are not in the %run hash yet.
# This also stops all servers which are relative to the given one.
@@ -506,7 +499,6 @@ sub stopserver {
return $result;
}
#######################################################################
# Return flags to let curl use an external HTTP proxy
#
@@ -1072,7 +1064,6 @@ sub responsiveserver {
return 0;
}
#######################################################################
# start the http server
#
@@ -1167,7 +1158,6 @@ sub runhttpserver {
return (0, $httppid, $pid2, $port);
}
#######################################################################
# start the http2 server
#
@@ -1790,7 +1780,6 @@ sub runrtspserver {
return (0, $rtsppid, $pid2, $port);
}
#######################################################################
# Start the ssh (scp/sftp) server
#
@@ -2237,7 +2226,6 @@ sub runnegtelnetserver {
return (0+!$ntelpid, $ntelpid, $pid2, $port);
}
#######################################################################
# Single shot http and gopher server responsiveness test. This should only
# be used to verify that a server present in %run hash is still functional
@@ -3084,7 +3072,6 @@ sub stopservers {
return $result;
}
#######################################################################
# substitute the variable stuff into either a joined up file or
# a command, in either case passed by reference

View File

@@ -54,7 +54,6 @@ TESTS_MAGIC = "TESTS_MAGIC"
VERIFIED_REQ = "verifiedserver"
VERIFIED_RSP = "WE ROOLZ: {pid}\n"
class ShutdownHandler(threading.Thread):
"""
Cleanly shut down the SMB server.

Some files were not shown because too many files have changed in this diff Show More