mirror of
https://github.com/curl/curl.git
synced 2026-08-26 06:43:31 +03:00
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:
parent
47734f3244
commit
96fa42c7c0
7 changed files with 24 additions and 27 deletions
|
|
@ -86,7 +86,7 @@ int tool_ftruncate64(int fd, curl_off_t where)
|
|||
{
|
||||
intptr_t handle = _get_osfhandle(fd);
|
||||
|
||||
if(_lseeki64(fd, where, SEEK_SET) < 0)
|
||||
if(curl_lseek(fd, where, SEEK_SET) == LSEEK_ERROR)
|
||||
return -1;
|
||||
|
||||
if(!SetEndOfFile((HANDLE)handle))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue