SocketError should be a threadvar, I think
Mailing lists / fpc-devel / 2006-01
patch for unit sockets
6 messages · 4 people ·
- AAles Katona 2
- NNikolay Nikolov 2
- JJonas Maebe 1
- MMarco van de Voort 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
SocketError should be a threadvar, I think
Socketerror is legacy. Use fpgeterrno (or errno) to get the error.
1.0.x had no threadsupport
Marco van de Voort wrote> SocketError should be a threadvar, I think Socketerror is legacy. Use fpgeterrno (or errno) to get the error.
It should either be removed or fixed. Currently it's e.g. nowhere set anymore for *nix, yet still used in rtl/inc/sockovl.inc. Also, sockets is a platform-independent unit afaik while fpgeterrno is fairly *nix-specific (in our rtl anyway).
Jonas
Socketerror is legacy. Use fpgeterrno (or errno) to get the error. 1.0.x had no…
Marco van de Voort wrote 8 lines
Yes, but there's no fpgeterrno in win32 :)
Socketerror is legacy. Use fpgeterrno (or errno) to get the error. 1.0.x had no…
Marco van de Voort wrote 13 lines
I use socketerror on unix still. Altho luckily I don't use threads anymore.
The unix "fp" naming convention is a bit sad.
Ales
I propose to make SocketError a function with hidden OS specific "get"-ers.
This will make it threadsafe and cross-platform.
