[fpc-pascal] INVALID_SOCKET constant not defined for Linux

LacaK lacak at zoznam.sk
Tue Mar 28 10:02:05 CEST 2017


Hi,

I am porting application from Windows to Linux. I use Sockets unit.

There is defined on Windows (and also on BeOS, FreeBSD, OS2):
   INVALID_SOCKET = TSocket(Not 0); // or -1
   SOCKET_ERROR = -1;

But not for Linux. Does it means, that result of unsuccessfull call to 
Sockets.FPSocket can be other than -1 ?
(in fcl-net is used test for -1 to check invalid socket so I think, that 
it is crossplatform ... if yes why isn't INVALID_SOCKET defined also for 
Linux in RTL?)

Thanks

-Laco.




More information about the fpc-pascal mailing list