curl/tests/server/Makefile.inc
Viktor Szakats 34ad78da89
curlx: move Curl_strerror, use in src and tests, ban strerror globally
Also:
- tests/server: replace local `sstrerror()` with `curlx_strerror()`.
- tests/server: show the error code next to the string, where missing.
- curlx: use `curl_msnprintf()` when building for src and tests.
  (units was already using it.)
- lib: drop unused includes found along the way.
- curlx_strerror(): avoid compiler warning (and another similar one):
  ```
  In file included from servers.c:14:
  ../../lib/../../lib/curlx/strerr.c: In function ‘curlx_strerror’:
  ../../lib/../../lib/curlx/strerr.c:328:32: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
    328 |       SNPRINTF(buf, buflen, "%s", msg);
        |                                ^
  ../../lib/../../lib/curlx/strerr.c:47:18: note: ‘snprintf’ output 1 or more bytes (assuming 2) into a destination of size 1
     47 | #define SNPRINTF snprintf
        |                  ^
  ../../lib/../../lib/curlx/strerr.c:328:7: note: in expansion of macro ‘SNPRINTF’
    328 |       SNPRINTF(buf, buflen, "%s", msg);
        |       ^~~~~~~~
  ```

Follow-up to 45438c8d6f #18823

Closes #18840
2025-10-06 09:44:23 +02:00

61 lines
1.8 KiB
Makefile

#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# SPDX-License-Identifier: curl
#
###########################################################################
# Shared between CMakeLists.txt and Makefile.am
BUNDLE = servers
# Files referenced from the bundle source
FIRST_C = first.c
FIRST_H = first.h
# Common files used by test programs
UTILS_C = memptr.c getpart.c util.c
UTILS_H =
CURLX_C = \
../../lib/curlx/base64.c \
../../lib/curlx/fopen.c \
../../lib/curlx/inet_ntop.c \
../../lib/curlx/inet_pton.c \
../../lib/curlx/multibyte.c \
../../lib/curlx/nonblock.c \
../../lib/curlx/strerr.c \
../../lib/curlx/strparse.c \
../../lib/curlx/timediff.c \
../../lib/curlx/timeval.c \
../../lib/curlx/version_win32.c \
../../lib/curlx/wait.c \
../../lib/curlx/warnless.c \
../../lib/curlx/winapi.c
# All test servers
TESTS_C = \
dnsd.c \
mqttd.c \
resolve.c \
rtspd.c \
sockfilt.c \
socksd.c \
sws.c \
tftpd.c