curl/src
Viktor Szakats a3585c9576
Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3)
`Makefile.mk` supported MS-DOS and Amiga, but `./configure` also
supported them in a better tested and more flexible way.

This patch also adds CMake support for MS-DOS/DJGPP and Amiga OS 3.

`Makefile.mk` was not maintained. Delete it in favour of first-tier
build methods.

Also include some non-MS-DOS/AmigaOS-specific tidy-up, see details at
the end of this message.

Details:

- fix/silence all MS-DOS/DJGPP build warnings and issues.
- add MS-DOS support to cmake.
  - default to `ENABLE_THREADED_RESOLVER=OFF` for MS-DOS.
  - add support for `WATT_ROOT`.
  - use static libcurl with MS-DOS.
  - fixup default CMake suffixes/prefixes for DJGPP.
  - disable hidden symbols for MS-DOS. Not supported on MS-DOS.
  - opt-in MS-DOS into `USE_UNIX_SOCKETS`.
- improve MS-DOS support in autotools.
  - default to `--disable-threaded-resolver` for MS-DOS.
- make sure to use `close_s()` (from Watt-32) with autotools and cmake.
  `Makefile.mk` used it before this patch.
- GHA: add DJGPP cmake (~30s) and autotools (~60s) build jobs.
  Also build tests and examples with cmake.
- improve AmigaOS support in autotools:
  - configure: detect `CloseSocket()` when it's a macro.
  - configure: fix `IoctlSocket` detection on AmigaOS.
  - curl-amissl.m4: pass AmiSSL libs to tests/servers.
- add AmigaOS3 support to cmake:
  - cmake: fix `HAVE_IOCTLSOCKET_CAMEL` and
    `HAVE_IOCTLSOCKET_CAMEL_FIONBIO` detections.
  - set necessary system libs.
  - add AmiSSL support.
  - inet_ntop, inet_pton: fix using it for AmigaOS. cmake detects them,
    and they did not compile with AmigaOS.
  - cmake: better sync `gethostname` detection with autotools.
    Fixes detection for AmigaOS, where `gethostname` is a macro.
  - cmake: fix `sys/utime.h` detection on AmigaOS.
  - cmake: force-disable `getaddrinfo` for AmigaOS.
  - cmake: tweak threading and static/shared default for AmigaOS.
  - cmake: rely on manual variable `AMIGA` to enable the platform.
- GHA: add AmigaOS cmake and autotools (~45s) jobs.
  Also build tests and examples with cmake.
- INSTALL: update MS-DOS and AmigaOS build instructions.
- amigaos: fix `-Wpointer-sign` and
  `zero or negative size array '_args'` in `Printf()`.
- amigaos: fix `-Wpointer-sign`
- amigaos: fix `-Wredundant-decls` `errno` and `h_errno`.
- amigaos: brute-force silence `lseek()` size warnings.
- amigaos: server/resolve: silence `-Wdiscarded-qualifiers`.
- amigaos: server/resolve: fix `-Wpointer-sign`.
- amigaos: fix `CURL_SA_FAMILY_T` type.
- nonblock: prefer `HAVE_IOCTLSOCKET_CAMEL_FIONBIO` for AmigaOS.
  `ioctl` is also detected, but fails when used. Make the above override
  it for a successful build.
  Authored-by: Darren Banfi
  Fixes #15537
  Closes #15603
- tftpd: prefer `HAVE_IOCTLSOCKET_CAMEL_FIONBIO` for AmigaOS.
- tftpd: tidy-up conditional code.
- curl: set stack size to 16384 for AmigaOS3/4
  Overriding the default 4096.
  Suggested-by: Darren Banfi
  Ref: https://github.com/curl/curl/pull/15543#issuecomment-2498783123
  Ref: https://wiki.amigaos.net/wiki/Controlling_Application_Stack
- functypes.h: fix `SEND_QUAL_ARG2` for AmigaOS.
- tftp: add missing cast in sendto() call for AmigaOS.
- getinfo: fix warning with AmigaOS.
- tool_operate: silence warning with AmigaOS
- amigaos: fix building libtests due to missing `RLIMIT_NOFILE`.
- curl_gethostname: silence warning for AmigaOS.
- ftp: silence `-Wtype-limits` for AmigaOS.
- libtest: fix timeval initialization for AmigaOS.
- examples: fix `timeval` initialization for AmigaOS.
- examples: silence warning for AmigaOS.
- configure: fix IPv6 detection for cross-builds.
- netrc: fix to build with AmigaOS cleanly.
- buildinfo: detect and add `DOS` tag for MS-DOS builds.
- buildinfo: add `AMIGA` to buildinfo.txt in auttools.
- build: move `USE_WATT32` macro definition to cmake/configure.

Non-MS-DOS/AmigeOS-specific tidy-ups:

- configure: sync `sa_family_t` detection with cmake.
- configure: sync `ADDRESS_FAMILY` detection signals with cmake.
- doh: use `CURL_SA_FAMILY_T`.
- lib: drop mingw-specific `CURL_SA_FAMILY_T` workaround.
- cmake: extend instead of override check-specific
  configurations/requirements.
  This allows to honor global requirements added earlier.
  Necessary for AmigaOS for example.
- cmake: omit warning on disabled IPv6 for MS-DOS and AmigaOS.
  No IPv6 support on these platforms. Also sync with autotools.
- lib1960: use libcurl `inet_pton()` wrapper.
- cmake: detect LibreSSL (to match autotools).
- cmake: say the specific OpenSSL flavour detected.
- hostip: add missing `HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID` guard.
- lib: simplify classic mac feature guards.

Follow-up to a8861b6ccd #9764

Closes #15543
2024-12-16 23:20:55 +01:00
..
.checksrc tool_getparam: replace two uses of strncpy(), ban strncpy 2024-10-09 23:43:24 +02:00
.gitignore curl: support embedding a CA bundle 2024-08-03 09:22:26 +02:00
CMakeLists.txt cmake: namespace functions and macros 2024-12-16 21:55:00 +01:00
curl.rc (lib)curl.rc: set debug flag also for CURLDEBUG and UNITTESTS 2024-05-22 08:38:12 +02:00
Makefile.am Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
Makefile.inc code: language cleanup in comments 2024-07-01 22:58:55 +02:00
mk-file-embed.pl src: guard for double declaration of curl_ca_embed in unity builds 2024-10-16 17:27:56 +02:00
mkhelp.pl tidy-up: misc build, tests, lib/macos.c 2024-08-16 16:05:36 +02:00
slist_wc.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
slist_wc.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
terminal.c source: avoid use of 'very' in comments 2024-10-17 13:36:33 +02:00
terminal.h curl: make warnings and other messages aware of terminal width 2024-05-28 23:12:32 +02:00
tool_binmode.c build: detect and use _setmode() with Cygwin/MSYS, also use on Windows 2024-10-07 12:31:21 +02:00
tool_binmode.h build: detect and use _setmode() with Cygwin/MSYS, also use on Windows 2024-10-07 12:31:21 +02:00
tool_bname.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_bname.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_cb_dbg.c curl: use realtime in trace timestamps 2024-12-02 21:21:18 +01:00
tool_cb_dbg.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_cb_hdr.c tool: support --show-headers AND --remote-header-name 2024-10-02 08:04:33 +02:00
tool_cb_hdr.h tool: support --show-headers AND --remote-header-name 2024-10-02 08:04:33 +02:00
tool_cb_prg.c lib/src: white space edits to comply better with code style 2024-09-19 14:59:12 +02:00
tool_cb_prg.h curl: make warnings and other messages aware of terminal width 2024-05-28 23:12:32 +02:00
tool_cb_rea.c Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
tool_cb_rea.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_cb_see.c Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
tool_cb_see.h tool: move tool_ftruncate64 to tool_util.c 2024-04-25 09:20:38 +02:00
tool_cb_soc.c curl: (on linux) add MPTCP support 2024-06-07 10:54:19 +02:00
tool_cb_soc.h curl: (on linux) add MPTCP support 2024-06-07 10:54:19 +02:00
tool_cb_wrt.c tool: support --show-headers AND --remote-header-name 2024-10-02 08:04:33 +02:00
tool_cb_wrt.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_cfgable.c curl: detect ECH support dynamically, not at build time 2024-10-24 16:10:39 +02:00
tool_cfgable.h curl: return error if etag options are used with multiple URLs 2024-12-13 10:11:26 +01:00
tool_dirhie.c src: fix potential macro confusion in cmake unity builds 2024-08-22 10:45:04 +02:00
tool_dirhie.h tool: use errorf() for error output 2023-06-01 08:19:11 +02:00
tool_doswin.c Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
tool_doswin.h Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
tool_easysrc.c lib, src: delete stray curl_ prefix from printf calls 2024-08-26 11:00:15 +02:00
tool_easysrc.h build: enable missing OpenSSF-recommended warnings, with fixes 2023-12-16 13:12:37 +00:00
tool_filetime.c tidy-up: rename CURL_WINDOWS_APP to CURL_WINDOWS_UWP 2024-09-19 19:24:12 +02:00
tool_filetime.h windows: use built-in _WIN32 macro to detect Windows 2023-11-22 15:42:25 +00:00
tool_findfile.c Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
tool_findfile.h windows: use built-in _WIN32 macro to detect Windows 2023-11-22 15:42:25 +00:00
tool_formparse.c tool_formparse: remove use of sscanf() 2024-12-05 07:58:45 +01:00
tool_formparse.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_getparam.c Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
tool_getparam.h curl: --test-duphandle in debug builds runs "duphandled" 2024-11-08 13:22:47 +01:00
tool_getpass.c tool_getpass: replace getch() call with _getch() on Windows 2024-11-27 11:19:16 +01:00
tool_getpass.h code: language cleanup in comments 2024-07-01 22:58:55 +02:00
tool_help.c Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
tool_help.h tool_help: handle longer lines, exit on too long 2024-08-07 00:31:07 +02:00
tool_helpers.c tool: support --show-headers AND --remote-header-name 2024-10-02 08:04:33 +02:00
tool_helpers.h src: tidy up types, add necessary casts 2024-05-17 12:32:04 +02:00
tool_hugehelp.c.cvs buildconf.bat: fix tool_hugehelp.c generation 2024-08-21 03:36:18 -04:00
tool_hugehelp.h curl: --help [option] displays documentation for given cmdline option 2024-08-04 16:06:17 +02:00
tool_ipfs.c ipfs: add options to disable 2024-09-21 12:08:32 +02:00
tool_ipfs.h ipfs: add options to disable 2024-09-21 12:08:32 +02:00
tool_libinfo.c curl: detect ECH support dynamically, not at build time 2024-10-24 16:10:39 +02:00
tool_libinfo.h curl: detect ECH support dynamically, not at build time 2024-10-24 16:10:39 +02:00
tool_listhelp.c TLS: TLSv1.3 earlydata support for curl 2024-10-11 12:28:22 +02:00
tool_main.c Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
tool_main.h tool: use our own stderr variable 2023-09-28 10:50:56 +00:00
tool_msgs.c lib, src: delete stray curl_ prefix from printf calls 2024-08-26 11:00:15 +02:00
tool_msgs.h build: enable missing OpenSSF-recommended warnings, with fixes 2023-12-16 13:12:37 +00:00
tool_operate.c Makefile.mk: drop in favour of autotools and cmake (MS-DOS, AmigaOS3) 2024-12-16 23:20:55 +01:00
tool_operate.h tool_operate: split up the huge single_transfer into sub functions 2024-10-23 23:12:54 +02:00
tool_operhlp.c src/lib: remove redundant ternary operators 2024-10-29 08:18:30 +01:00
tool_operhlp.h tool_cb_wrt: use "curl_response" if no file name in URL 2024-09-17 13:39:51 +02:00
tool_paramhlp.c lib, src: delete stray curl_ prefix from printf calls 2024-08-26 11:00:15 +02:00
tool_paramhlp.h tool_paramhlp: bump maximum post data size in memory to 16GB 2024-08-14 07:57:24 +02:00
tool_parsecfg.c src/lib: remove redundant ternary operators 2024-10-29 08:18:30 +01:00
tool_parsecfg.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_progress.c src: fix potential macro confusion in cmake unity builds 2024-08-22 10:45:04 +02:00
tool_progress.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_sdecls.h src: namespace symbols clashing with lib 2024-09-05 00:55:44 +02:00
tool_setopt.c src: fix potential macro confusion in cmake unity builds 2024-08-22 10:45:04 +02:00
tool_setopt.h curl: make --libcurl output better CURLOPT_*SSLVERSION 2024-03-14 17:59:22 +01:00
tool_setup.h config: rename the OS define to CURL_OS to reduce collision risk 2024-10-30 14:59:54 +01:00
tool_sleep.c select: use poll() if existing, avoid poll() with no sockets 2024-10-01 15:11:50 +02:00
tool_sleep.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_stderr.c tool: use our own stderr variable 2023-09-28 10:50:56 +00:00
tool_stderr.h tool: use errorf() for error output 2023-06-01 08:19:11 +02:00
tool_strdup.c copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_strdup.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_urlglob.c tool_urlglob: parse character globbing range without sscanf 2024-12-05 07:56:55 +01:00
tool_urlglob.h tool_operate: split up the huge single_transfer into sub functions 2024-10-23 23:12:54 +02:00
tool_util.c curl: use realtime in trace timestamps 2024-12-02 21:21:18 +01:00
tool_util.h curl: use realtime in trace timestamps 2024-12-02 21:21:18 +01:00
tool_version.h config: rename the OS define to CURL_OS to reduce collision risk 2024-10-30 14:59:54 +01:00
tool_vms.c src: fix potential macro confusion in cmake unity builds 2024-08-22 10:45:04 +02:00
tool_vms.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
tool_writeout_json.c src: fix potential macro confusion in cmake unity builds 2024-08-22 10:45:04 +02:00
tool_writeout_json.h tool_writeout: bsearch the variable name 2024-06-10 23:12:05 +02:00
tool_writeout.c tool_operate: split up the huge single_transfer into sub functions 2024-10-23 23:12:54 +02:00
tool_writeout.h curl: fix the -w urle.* variables 2024-08-15 14:01:24 +02:00
tool_xattr.c tool_xattr: create the user.creator xattr attribute 2024-10-11 10:13:37 -07:00
tool_xattr.h copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
var.c Rename struct var to fix AIX build 2024-11-15 13:55:55 -08:00
var.h Rename struct var to fix AIX build 2024-11-15 13:55:55 -08:00