src/Network/Platform.hh
author nireco
Sat, 31 Jan 2009 12:33:08 +0200
changeset 443 5d1119729f58
parent 423 947ab54de4b7
permissions -rw-r--r--
worm02 two pics to comment
#ifndef NETWORK_PLATFORM_HH
#define NETWORK_PLATFORM_HH

/**
 * @file
 *
 * Takes care of platform-specific imports and #defines as regards the Network code
 */

#ifndef WIN32
    // NetworkAddress
    #include <netinet/in.h>
    
    // NetworkEndpoint
    #include <sys/types.h>
    #include <netdb.h>
    
    // NetworkSocket
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <unistd.h>
    #include <fcntl.h>
    #define closesocket close
    
    // NetworkReactor
    #include <sys/select.h>
    #include <errno.h>

    // misc, here because ClanLib included these... 
    #include <arpa/inet.h>
    #include <sys/time.h>
    #include <unistd.h> 

    // NetworkErrno
    #include <string.h>
    #include <errno.h>
#else
    // misc, here because ClanLib included these...
    #include <winsock2.h>
    #include <windows.h>
    typedef int socklen_t;

    #error "This network code won't compile on win32 :)"
#endif


#endif