00001 /*************************************************************************** 00002 missing_includes.h - Replacements for missing include files 00003 ------------------- 00004 begin : di jul 14 2009 00005 copyright : (C) 2009 by CJP 00006 email : cornware-cjp@users.sourceforge.net 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 #ifndef LIBPLANETMISSING_INCLUDES_H 00018 #define LIBPLANETMISSING_INCLUDES_H 00019 00020 #ifdef HAVE_CONFIG_H 00021 #include <config.h> 00022 #endif 00023 00024 #if defined(_WIN32) || defined(_WIN64) || defined(_WINDOWS) 00025 #include "windows-includes.h" 00026 #define USE_WINDOWS_API 00027 #endif 00028 00029 00030 #ifndef HAVE_STDINT_H 00031 00032 typedef unsigned char uint8_t; 00033 00034 #endif 00035 00036 00037 00038 #ifndef HAVE_UNISTD_H 00039 00040 //usleep replacement on windows: 00041 #ifdef USE_WINDOWS_API 00042 00043 inline void usleep(unsigned int useconds) 00044 { 00045 //TODO: find a win32 function with microsecond resolution 00046 Sleep(useconds/1000); 00047 } 00048 00049 #endif 00050 00051 #endif 00052 00053 #endif 00054