medfall

A super great game engine
Log | Files | Refs

platform_io.h (433B)


      1 #pragma once
      2 
      3 #include "platform.h"
      4 
      5 #if PLATFORM_WINDOWS
      6 
      7 #include <windows.h>
      8 #include <io.h>
      9 
     10 #if !COMPILER_MINGW
     11 typedef int ssize_t;
     12 #endif
     13 
     14 #define snprintf _snprintf
     15 #define mkdir( path, mode ) ( CreateDirectoryA( path, NULL ) != 0 ? 0 : -1 )
     16 #define rmdir( path ) ( RemoveDirectory( path ) != 0 ? 0 : -1 )
     17 
     18 #elif PLATFORM_UNIX
     19 #include <sys/stat.h>
     20 #include <sys/types.h>
     21 #include <unistd.h>
     22 #else
     23 #error new platform
     24 #endif