build: tidy up local lseek() mappings

- stop redefining system symbol `lseek`, by introducing `curl_lseek()`.
- handle AmigaOS quirk within the macro mapping.
- add missing parenthesis to `LSEEK_ERROR` values.
- tool_util: use curl `lseek` macros in `tool_ftruncate64()`.
- move `LSEEK_ERROR` to right-hand side of if expressions.
- checksrc: disallow direct uses of `_lseeki64`, `llseek`, `lseek`.

Closes #20488
This commit is contained in:
Viktor Szakats 2026-02-01 01:04:58 +01:00
parent 47734f3244
commit 96fa42c7c0
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
7 changed files with 24 additions and 27 deletions

View file

@ -332,6 +332,7 @@ makes us write better code.
This is the full list of functions generally banned.
_access
_lseeki64
_mbscat
_mbsncat
_open
@ -367,6 +368,7 @@ This is the full list of functions generally banned.
getaddrinfo
gets
gmtime
llseek
LoadLibrary
LoadLibraryA
LoadLibraryEx
@ -374,6 +376,7 @@ This is the full list of functions generally banned.
LoadLibraryExW
LoadLibraryW
localtime
lseek
malloc
mbstowcs
MoveFileEx