mirror of
https://github.com/curl/curl.git
synced 2026-08-25 13:13:31 +03:00
tidy-up: avoid using the reserved macro namespace
To avoid hitting `-Wreserved-macro-identifier` where possible. - amigaos: introduce local macro instead of reusing `__request()`. - easy_lock: avoid redefining `__has_builtin()`. Follow-up to33fd57b8ff#9062 - rand: drop interim macro `_random()`. - windows: rename local macro `_tcsdup()` to `Curl_tcsdup()`. To avoid using the reserved macro namespace and to avoid colliding with `_tcsdup()` as defined by Windows headers. - checksrc: ban `_tcsdup()` in favor of `Curl_tcsdup()`. - tool_doswin: avoid redefining `_use_lfn()` (MS-DOS). - tool_findfile: limit `__NO_NET_API` hack to AmigaOS. Syncing this pattern with `lib/netrc.c`. Follow-up to784a8ec2c1#16279 - examples/http2-upload: avoid reserved namespace for local macro. More cases will be removed when dropping WinCE support via #17927. Cases remain when defining external macros out of curl's control. Ref: #18477 Closes #18482
This commit is contained in:
parent
096fc4325b
commit
ad26a6cb99
16 changed files with 40 additions and 36 deletions
|
|
@ -48,11 +48,11 @@
|
|||
#define recv(a,b,c,d) curl_dbg_recv(a,b,c,d, __LINE__, __FILE__)
|
||||
|
||||
#ifdef _WIN32
|
||||
#undef _tcsdup
|
||||
#undef Curl_tcsdup
|
||||
#ifdef UNICODE
|
||||
#define _tcsdup(ptr) curl_dbg_wcsdup(ptr, __LINE__, __FILE__)
|
||||
#define Curl_tcsdup(ptr) curl_dbg_wcsdup(ptr, __LINE__, __FILE__)
|
||||
#else
|
||||
#define _tcsdup(ptr) curl_dbg_strdup(ptr, __LINE__, __FILE__)
|
||||
#define Curl_tcsdup(ptr) curl_dbg_strdup(ptr, __LINE__, __FILE__)
|
||||
#endif
|
||||
#endif /* _WIN32 */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue