11
I am aware that, a C program in ANSI standard can be compiled both on Windows, both on Linux.
But when it comes to using sockets? That’s not part of the pattern ANSI C
? Because when I use sockets in Windows, I have to use a library called "Winsock.h"
, on Linux, this library does not exist, and it uses another library called "socket.h"
. In this case, a program on Windows that uses the library "Winsock.h"
, error when compiled on Linux, and vise-versa. However, Sockets are not in default?
Another thing is the function fork()
, this function exists only in Linux to make threads, I believe. Therefore this function, being non-existent in Windows, is outside the standard ANSI C
?
Here’s a good question +1
– Jorge B.