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

@ -49,6 +49,7 @@ my @ignore_line;
my %banfunc = (
"_access" => 1,
"_lseeki64" => 1,
"_mbscat" => 1,
"_mbsncat" => 1,
"_open" => 1,
@ -84,6 +85,7 @@ my %banfunc = (
"getaddrinfo" => 1,
"gets" => 1,
"gmtime" => 1,
"llseek" => 1,
"LoadLibrary" => 1,
"LoadLibraryA" => 1,
"LoadLibraryEx" => 1,
@ -91,6 +93,7 @@ my %banfunc = (
"LoadLibraryExW" => 1,
"LoadLibraryW" => 1,
"localtime" => 1,
"lseek" => 1,
"malloc" => 1,
"mbstowcs" => 1,
"MoveFileEx" => 1,