Euphoria Ticket #105: socket option constants are only for winsock

These need to be made portable across all supported platforms. Right now the sockets unittest makes up its own constants to use when on Linux, because the ones the library uses, the Winsock ones, don't work.

Details

Type: Bug Report Severity: Blocking Category: Library Routine
Assigned To: SPringle Status: Fixed Reported Release:
Fixed in SVN #: 3087, 3090 View VCS: 3087, 3090 Milestone:

1. Comment by SDPringle Feb 12, 2010

Constants have been renamed to not have the U and moved to std/socket.e. In addition Windows also does the tests that previously would only be done under Linux. Winsock constants are now hidden in other platforms.

There are only four constants for LINUX defined and none for other platforms. The comments do not document the constants at all. So, I'd consider this fixed.

2. Comment by jimcbrown Feb 12, 2010

I believe we originally had different constants, but then later tried to standardize them so the constants would be the same integer regardless of platform.

But then the job of converting the internal EU constants to OS specific socket constants was never completed...

This is good enough for beta, but we should see if we can fix this properly before 4.0RC1

3. Comment by mattlewis Feb 13, 2010

Except that now I'm getting failures for t_net_dns.e and t_socket.e (same errors for both):

$ build/eui -i ../include/ ../tests/t_net_dns.e 
../tests/t_net_dns.e:412 
<0074>:: Errors resolving the following references: 
    /home/matt/euphoria/dev/rds/source/../include/std/socket.e (413): SO_KEEPALIVE 
    /home/matt/euphoria/dev/rds/source/../include/std/socket.e (413): SO_TYPE 
    /home/matt/euphoria/dev/rds/source/../include/std/socket.e (412): SO_TYPE 
 
        SO_TYPE = 3 

4. Comment by mattlewis Feb 14, 2010

OK, that error was just some missing commas.

5. Comment by SDPringle Mar 12, 2010

There should be more option constants for in std/sockets.e non-Windows platforms. This is probably a matter of getting C headers from the various OSes and they should ofcourse be documented.

Search



Quick Links

User menu

Not signed in.

Misc Menu