Edit

thodg/cgminer/compat.h

Branch :

  • Show log

    Commit

  • Author : Ycros
    Date : 2011-07-18 11:37:16
    Hash : 31d98cf1
    Message : Fix suseconds_t for OSX.

  • compat.h
  • #ifndef __COMPAT_H__
    #define __COMPAT_H__
    
    #ifdef WIN32
    
    #include <windows.h>
    
    static inline void sleep(int secs)
    {
    	Sleep(secs * 1000);
    }
    
    enum {
    	PRIO_PROCESS		= 0,
    };
    
    static inline int setpriority(int which, int who, int prio)
    {
    	/* FIXME - actually do something */
    	return 0;
    }
    
    typedef unsigned long int ulong;
    typedef unsigned short int ushort;
    typedef unsigned int uint;
    
    #ifndef __SUSECONDS_T_TYPE
    typedef long suseconds_t;
    #endif
    
    #endif /* WIN32 */
    
    #endif /* __COMPAT_H__ */