Euphoria
Ticket #711:
socket:select is broken in Windows/MinGW
-
Reported by
jeremy
Sep 07, 2011
This is now vital since we are possibly dropping Watcom support. It seems that the dynamic loading was done and MinGW was not tested. The problem affects http_get/http_post. It's easy to see the error by doing:
eui demo/net/wget.ex http://google.com
The result is nothing. It's actually a machine crash in the C function. Euphoria terminates abruptly and w/o stack trace.
Reverting to a pre-dynamic be_socket.c/.h causes all to work great.
Details
1. Comment by mattlewis
Sep 07, 2011
The problem appears to be calling convention of WSAFDIsSet_fntype on windows.
2. Comment by mattlewis
Sep 07, 2011
See: hg:euphoria/rev/47cbddc45025
changeset: 5138:47cbddc45025 tag: tip parent: 5133:362980e9d4ca user: Matt Lewis date: Wed Sep 07 18:27:03 2011 -0400 files: source/be_socket.c description:
- add PASCAL calling convention for windows
- fixes ticket 711
3. Comment by SDPringle
Sep 13, 2011
Regarding your change set. It is better to use WASAPI macro instead of optionally defining PASCAL again because WASAPI is the coding convention macro for these functions (which is set to PASCAL already), its redundant to define PASCAL.
4. Comment by mattlewis
Sep 13, 2011
The PASCAL macro is based on the MinGW headers. Since it's a MinGW problem, that seems like the correct way to handle it.
5. Comment by SDPringle
Sep 13, 2011
See: hg:euphoria/rev/e4b0bd393ab7
changeset: 5154:e4b0bd393ab7 branch: 4.0 tag: tip user: Shawn Pringle <shawn.pringle@gmail.com> date: Tue Sep 13 20:01:07 2011 -0300 files: source/be_socket.c description: fixes ticket 711 with fewer macros