From 0f6aa0581bb7792a6cf93886bb53f0d10e9a979d Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 7 Oct 2011 15:12:14 +0200 Subject: [PATCH] conditionnal compilation to __UNIX__ with warning on other systems --- eo/src/eoEvalUserTimeThrowException.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/eo/src/eoEvalUserTimeThrowException.h b/eo/src/eoEvalUserTimeThrowException.h index 5d1f4c8a..0da39e57 100644 --- a/eo/src/eoEvalUserTimeThrowException.h +++ b/eo/src/eoEvalUserTimeThrowException.h @@ -21,6 +21,13 @@ Authors: Johann Dréo */ +#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 #include @@ -60,3 +67,6 @@ protected: const long _max; struct rusage _usage; }; + +#endif // __EOEVALUSERTIMETHROWEXCEPTION_H__ +#endif // __UNIX__