From 271af406f33d44a455b171f01d23a8006a18d471 Mon Sep 17 00:00:00 2001 From: wernsaar Date: Fri, 1 Aug 2014 23:10:08 +0200 Subject: [PATCH] bugfix for linux affinity code --- common.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/common.h b/common.h index 7125ce3..1250e2e 100644 --- a/common.h +++ b/common.h @@ -524,10 +524,21 @@ static __inline void blas_unlock(volatile BLASULONG *address){ *address = 0; } + +#ifdef OS_WINDOWS static __inline int readenv_atoi(char *env) { env_var_t p; return readenv(p,env) ? 0 : atoi(p); } +#else +static __inline int readenv_atoi(char *env) { + char *p; + if (( p = getenv(env) )) + return (atoi(p)); + else + return(0); +} +#endif #if !defined(XDOUBLE) || !defined(QUAD_PRECISION) -- 2.7.4