curl/docs/examples/.checksrc
Viktor Szakats e50aa46fb2
build: update to not need _CRT_NONSTDC_NO_DEPRECATE with MSVC
Use non-deprecated CRT function variants on Windows.

- introduce `curlx_fdopen()`, `curlx_close()` and use them. Map them to
  non-deprecated, underscored, CRT functions on Windows.

- replace `close()` uses with either `sclose()` (for sockets) or
  `curlx_close()` (for files).

- map `fileno`, `unlink`, `isatty` to their non-deprecated, underscored,
  versions on Windows.

- tool_dirhie: map `mkdir` to `_mkdir` on Windows.

- easy: use `_strdup()` on Windows, regardless of how `HAVE_STRDUP` is
  set.

- cmake: assume `HAVE_STRDUP` on Windows. To allow dropping a detection
  hack using `_CRT_NONSTDC_NO_DEPRECATE` with MSVC. Windows always has
  `_strdup()` which the code uses, but also needs `HAVE_STRDUP` defined
  to disable curl's own `strdup()` implementation.

- curl_setup.h: drop `_CRT_NONSTDC_NO_DEPRECATE` as no longer necessary.

Closes #20212
2026-01-20 23:19:54 +01:00

35 lines
679 B
Text

# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# SPDX-License-Identifier: curl
allowfunc atoi
allowfunc atol
allowfunc calloc
allowfunc close
allowfunc fclose
allowfunc fdopen
allowfunc fopen
allowfunc fprintf
allowfunc free
allowfunc gmtime
allowfunc localtime
allowfunc malloc
allowfunc open
allowfunc printf
allowfunc realloc
allowfunc snprintf
allowfunc socket
allowfunc sscanf
allowfunc strdup
allowfunc strerror
allowfunc vsnprintf
# Use of curl printf functions is discouraged
banfunc curl_maprintf
banfunc curl_mfprintf
banfunc curl_mprintf
banfunc curl_msnprintf
banfunc curl_mvaprintf
banfunc curl_mvfprintf
banfunc curl_mvprintf
banfunc curl_mvsnprintf