Windows CE/ARM Winsock Unit Declarations Incorrect Due to Packed Records
Original Reporter info from Mantis: TimYoung
-
Reporter name: Tim Young
Original Reporter info from Mantis: TimYoung
- Reporter name: Tim Young
Description:
The winsock.pp unit for FPC for the Windows CE/ARM platform contains incorrect type declarations, and even something as simple as a connect() API call will fail with an 10014 error (WSAEFAULT) due to the Winsock layer complaining about the size of certain record structures.
Additional information:
The following declaration is at the start of the unit:
{$PACKRECORDS 1}
And the two following declarations for the SunB and SunW record types are:
SunB = record
s_b1,s_b2,s_b3,s_b4 : u_char;
end;
SunW = record
s_w1,s_w2 : u_short;
end;
This is not correct. The PACKRECORDS compiler directive should be removed, and the two declarations should be:
SunB = packed record
s_b1,s_b2,s_b3,s_b4 : u_char;
end;
SunW = packed record
s_w1,s_w2 : u_short;
end;
Without these changes, the
Mantis conversion info:
- Mantis ID: 13614
- Version: 2.2.5
- Fixed in version: 2.4.0
- Fixed in revision: 13083 (#4da38a77)
- Target version: 2.2.5