socklen_t data type
Eli Zaretskii <eliz-mXXj517/[email protected]> Mon, 29 Jun 2020 20:09:42 +0300
| Newsgroups | gmane.comp.gnu.mingw.user |
|---|---|
| Message-ID | <[email protected]> |
MinGW 5.3.x changed the data type of socklen_t to 'unsigned int' in ws2tcpip.h (it was 'int' in previous versions). This causes trouble when compiling a recent GDB: both Gnulib and GDB's own sources assume that socklen_t is a signed int. Moreover, winsock functions like 'accept' and 'getsockname', expect an 'int *' type of their last argument, and it is customary to pass a 'socklen_t *' value there. MinGW64 also uses a signed int. We could of course tell Gnulib, GDB, and the rest of folks to get their act together and not make such assumptions, but instead add configure-time tests for the definition of the type and its signedness. But is there a good reason for MinGW to make socklen_t an unsigned data type? It looks like it's more trouble than help -- if we want to keep this, we'd need to fight half the world and their dog to not make the assumptions they do now. TIA _______________________________________________ MinGW-Users mailing list [email protected] This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists. We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated. _______________________________________________ You may change your MinGW Account Options or unsubscribe at: https://lists.osdn.me/mailman/listinfo/mingw-users Also: mailto:[email protected]?subject=unsubscribe