diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2014-11-13 11:36:51 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2014-11-13 11:36:51 +0100 |
commit | feb041170121b703ddb48cc02c2e0c9ccfd94e7c (patch) | |
tree | e7c96fef7e6aae625e22bdbe32e93986200f69fc /src/port.h | |
parent | 5ebbe3d69ae442d5f751137cf000012870ba85a7 (diff) | |
download | biruda-feb041170121b703ddb48cc02c2e0c9ccfd94e7c.tar.gz biruda-feb041170121b703ddb48cc02c2e0c9ccfd94e7c.tar.bz2 |
renamed sleep.h to port.h (for easy porting macros for Windows/Unix)
Diffstat (limited to 'src/port.h')
-rw-r--r-- | src/port.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/port.h b/src/port.h new file mode 100644 index 0000000..9585255 --- /dev/null +++ b/src/port.h @@ -0,0 +1,16 @@ +#ifndef _BIRUDA_PORT_HEADER_INCLUDED +#define _BIRUDA_PORT_HEADER_INCLUDED + +#ifndef _WIN32 +#include <unistd.h> +#else +#define WIN32_MEAN_AND_LEAN +#include <windows.h> +#define sleep( SECONDS ) Sleep( SECONDS * 1000 ) +#endif + +#ifdef _WIN32 +#define snprintf _snprintf +#endif + +#endif |