curl-curl/include
Viktor Szakats daa6b27b4d
include: avoid recursive macros
To fix potential `-Wdisabled-macro-expansion` warnings when using these
macros within other macros. Fixing for example:
```
lib/doh.c:328:3: error: disabled expansion of recursive macro [clang-diagnostic-disabled-macro-expansion,-warnings-as-errors]
  328 |   ERROR_CHECK_SETOPT(CURLOPT_URL, url);
      |   ^
lib/doh.c:271:14: note: expanded from macro 'ERROR_CHECK_SETOPT'
  271 |     result = curl_easy_setopt((CURL *)doh, x, y);       \
      |              ^
include/curl/curl.h:3332:44: note: expanded from macro 'curl_easy_setopt'
 3332 | #define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param)
      |                                            ^
[...]
```

Also update comments on why curl continues to disable
`-Wdisabled-macro-expansion` and `-Wused-but-marked-unused` warnings.

Follow-up to 92f215fea1 #18477

Closes #20597
2026-02-15 22:54:32 +01:00
..
curl include: avoid recursive macros 2026-02-15 22:54:32 +01:00
Makefile.am copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
README.md code: language cleanup in comments 2024-07-01 22:58:55 +02:00

include

Public include files for libcurl, external users.

They are all placed in the curl subdirectory here for better fit in any kind of environment. You must include files from here using...

#include <curl/curl.h>

... style and point the compiler's include path to the directory holding the curl subdirectory. It makes it more likely to survive future modifications.

The public curl include files can be shared freely between different platforms and different architectures.