From 7b8a7038ce47e879f30f2961ee583cbb88ee7daa Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Tue, 18 Aug 2009 21:15:04 +0000 Subject: [PATCH] Add #ifndef #define SYSTEM_DIMENSIONS logic where needed. Note that config.h.in is rebuilt by autogen.sh, so we can't put it there --- config.h.in | 4 ---- src/common/hostlist.c | 4 ++++ src/common/proc_args.c | 4 ++++ src/salloc/opt.h | 4 ++++ src/sbatch/opt.h | 4 ++++ src/smap/smap.h | 3 +++ src/srun/opt.h | 4 ++++ 7 files changed, 23 insertions(+), 4 deletions(-) diff --git a/config.h.in b/config.h.in index 36e919bb707..8d7355dc4c1 100644 --- a/config.h.in +++ b/config.h.in @@ -435,10 +435,6 @@ dimension */ #undef SYSTEM_DIMENSIONS -#ifndef SYSTEM_DIMENSIONS -#define SYSTEM_DIMENSIONS 1 -#endif - /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ #undef TIME_WITH_SYS_TIME diff --git a/src/common/hostlist.c b/src/common/hostlist.c index 8d38f22e9b9..87f6ac4dc55 100644 --- a/src/common/hostlist.c +++ b/src/common/hostlist.c @@ -265,6 +265,10 @@ struct _range { char *alpha_num = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; enum {A, B, C, D}; +#ifndef SYSTEM_DIMENSIONS +# define SYSTEM_DIMENSIONS 1 +#endif + #if (SYSTEM_DIMENSIONS > 1) /* logic for block node description */ diff --git a/src/common/proc_args.c b/src/common/proc_args.c index 7c0ce548989..8ee70394e13 100644 --- a/src/common/proc_args.c +++ b/src/common/proc_args.c @@ -43,6 +43,10 @@ # define _GNU_SOURCE #endif +#ifndef SYSTEM_DIMENSIONS +# define SYSTEM_DIMENSIONS 1 +#endif + #include <fcntl.h> #include <stdarg.h> /* va_start */ #include <stdio.h> diff --git a/src/salloc/opt.h b/src/salloc/opt.h index 3fbfd6d297f..1772de9dc7c 100644 --- a/src/salloc/opt.h +++ b/src/salloc/opt.h @@ -41,6 +41,10 @@ #include "src/common/env.h" #include "src/common/macros.h" /* true and false */ +#ifndef SYSTEM_DIMENSIONS +# define SYSTEM_DIMENSIONS 1 +#endif + #define DEFAULT_IMMEDIATE 1 #define MAX_USERNAME 9 #define DEFAULT_BELL_DELAY 10 diff --git a/src/sbatch/opt.h b/src/sbatch/opt.h index 16d08a8f640..dde2d8f1bd2 100644 --- a/src/sbatch/opt.h +++ b/src/sbatch/opt.h @@ -41,6 +41,10 @@ #include "src/common/macros.h" /* true and false */ #include "src/common/env.h" +#ifndef SYSTEM_DIMENSIONS +# define SYSTEM_DIMENSIONS 1 +#endif + #define MAX_USERNAME 9 diff --git a/src/smap/smap.h b/src/smap/smap.h index 97d46c5d6d2..2f91ce89547 100644 --- a/src/smap/smap.h +++ b/src/smap/smap.h @@ -81,6 +81,9 @@ #ifdef lines # undef lines #endif +#ifndef SYSTEM_DIMENSIONS +# define SYSTEM_DIMENSIONS 1 +#endif #include <stdlib.h> #include <pwd.h> diff --git a/src/srun/opt.h b/src/srun/opt.h index adabce9233e..58c8316cb24 100644 --- a/src/srun/opt.h +++ b/src/srun/opt.h @@ -45,6 +45,10 @@ # include "config.h" #endif +#ifndef SYSTEM_DIMENSIONS +# define SYSTEM_DIMENSIONS 1 +#endif + #include <time.h> #include <sys/types.h> #include <unistd.h> -- GitLab