Skip to content

Commit 271af40

Browse files
committed
bugfix for linux affinity code
1 parent f5f50b3 commit 271af40

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

common.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,10 +524,21 @@ static __inline void blas_unlock(volatile BLASULONG *address){
524524
*address = 0;
525525
}
526526

527+
528+
#ifdef OS_WINDOWS
527529
static __inline int readenv_atoi(char *env) {
528530
env_var_t p;
529531
return readenv(p,env) ? 0 : atoi(p);
530532
}
533+
#else
534+
static __inline int readenv_atoi(char *env) {
535+
char *p;
536+
if (( p = getenv(env) ))
537+
return (atoi(p));
538+
else
539+
return(0);
540+
}
541+
#endif
531542

532543

533544
#if !defined(XDOUBLE) || !defined(QUAD_PRECISION)

0 commit comments

Comments
 (0)