microsoft / Microsoft-MPI

Microsoft MPI
MIT License
244 stars 74 forks source link

Update mspms.h to be compatible with MinGW GCC <= 5.1.0 #32

Closed stepas-toliautas closed 4 years ago

stepas-toliautas commented 4 years ago

On MinGW (TDM) build of 32-bit GCC 5.1.0, which is currently bundled with Code::Blocks 17.12 IDE, ws2ipdef.h header is missing, therefore ADDRESS_FAMILY and _SOCKADDR_INET types end up not defined in msmps.h. This also affects earlier 32-bit GCC versions (tested on TDM 4.9.2). Provided patch introduces missing typedefs when required. Additionally, the following SAL annotations are needed for MinGW GCC <= 5.1.0: _Outptropt (always), _Outopt, _Inopt (if including mspms.h before mpi.h). NOTE: this is backward-compatibility patch, it is not required for newer MinGW GCC builds (tested on MinGW-w64 8.1.0, both 32- and 64-bit).

msftclas commented 4 years ago

CLA assistant check
All CLA requirements met.