]> git.ipfire.org Git - thirdparty/squid.git/commit
MinGW: Fix aiops_win32.cc (#2030)
authorFrancesco Chemolli <5175948+kinkie@users.noreply.github.com>
Fri, 28 Mar 2025 19:15:46 +0000 (19:15 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sun, 30 Mar 2025 08:53:34 +0000 (08:53 +0000)
commit84bb09abbd37baca3637ba9b8acf46976c41f6ac
treedb87f772d334d43fe43bfa2da66a0efcf0510c05
parentc807ccfd49d9af13dfb3f25f1f454194eff3a995
MinGW: Fix aiops_win32.cc (#2030)

Fixed missing includes, type mismatches in some
local variables, applied some AAA;
extracted WIN32_maperror
into own header and implementation files using NoMoreGlobals,
and used modern c++ data types for it.

This change also mirrors changes introduced in aiops.cc by commit
91d1cfb. These changes require further refinement (in both files).

Examples of errors fixed:
```
aiops_win32.cc: In function
    'void* squidaio_xmalloc(int)':
aiops_win32.cc:161:17: error:
    invalid use of incomplete type 'class Mem::Allocator'

aiops_win32.cc: In function 'void squidaio_init()':
aiops_win32.cc:278:19: error:
    comparison of integer expressions of different signedness:
    'int' and 'size_t' {aka 'long long unsigned int'}

aiops_win32.cc: In function
    'void squidaio_do_read(squidaio_request_t*)':
aiops_win32.cc:782:9: error:
    'WIN32_maperror' was not declared in this scope
```
compat/Makefile.am
compat/mswindows.cc
compat/os/mswindows.h
compat/win32_maperror.cc [new file with mode: 0644]
compat/win32_maperror.h [new file with mode: 0644]
src/DiskIO/DiskThreads/aiops_win32.cc