conditionnal compilation to __UNIX__ with warning on other systems

This commit is contained in:
nojhan 2011-10-07 15:12:14 +02:00
commit 0f6aa0581b

View file

@ -21,6 +21,13 @@ Authors:
Johann Dréo <johann.dreo@thalesgroup.com>
*/
#ifndef __UNIX__
#warning "Warning: class 'eoEvalUserTimeThrowException' is only available under UNIX systems (defining 'rusage' in 'sys/resource.h'), contributions for other systems are welcomed."
#else
#ifndef __EOEVALUSERTIMETHROWEXCEPTION_H__
#define __EOEVALUSERTIMETHROWEXCEPTION_H__
#include <sys/time.h>
#include <sys/resource.h>
@ -60,3 +67,6 @@ protected:
const long _max;
struct rusage _usage;
};
#endif // __EOEVALUSERTIMETHROWEXCEPTION_H__
#endif // __UNIX__