diff options
author | obrien <obrien@FreeBSD.org> | 2003-04-30 17:14:58 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2003-04-30 17:14:58 +0000 |
commit | e7abd7e44d08912e719fda4b53b1f302a61662ba (patch) | |
tree | eb372e436faa6d36be7b249c75460def7c354188 /lib | |
parent | a7da2328fb427e0fc6efe6c2f755ab3538a4904c (diff) | |
download | FreeBSD-src-e7abd7e44d08912e719fda4b53b1f302a61662ba.zip FreeBSD-src-e7abd7e44d08912e719fda4b53b1f302a61662ba.tar.gz |
Only define platform once -- in a C file.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libdisk/disk.c | 20 | ||||
-rw-r--r-- | lib/libdisk/libdisk.h | 23 |
2 files changed, 23 insertions, 20 deletions
diff --git a/lib/libdisk/disk.c b/lib/libdisk/disk.c index 319a065..9b013a39 100644 --- a/lib/libdisk/disk.c +++ b/lib/libdisk/disk.c @@ -41,6 +41,26 @@ __FBSDID("$FreeBSD$"); #define DPRINTX(x) #endif +const enum platform platform = +#if defined (P_DEBUG) + P_DEBUG +#elif defined (PC98) + p_pc98 +#elif defined(__i386__) + p_i386 +#elif defined(__alpha__) + p_alpha +#elif defined(__sparc64__) + p_sparc64 +#elif defined(__ia64__) + p_ia64 +#elif defined(__ppc__) + p_ppc +#else + IHAVENOIDEA +#endif + ; + const char * chunk_name(chunk_e type) { diff --git a/lib/libdisk/libdisk.h b/lib/libdisk/libdisk.h index 5b86f59..785b25a 100644 --- a/lib/libdisk/libdisk.h +++ b/lib/libdisk/libdisk.h @@ -20,7 +20,7 @@ #define MAX_SEC_SIZE 2048 /* maximum sector size that is supported */ #define MIN_SEC_SIZE 512 /* the sector size to end sensing at */ -static const enum platform { +enum platform { p_any, /* for debugging ! */ p_alpha, p_i386, @@ -28,25 +28,8 @@ static const enum platform { p_sparc64, p_ia64, p_ppc -} platform = -#if defined (P_DEBUG) - P_DEBUG -#elif defined (PC98) - p_pc98 -#elif defined(__i386__) - p_i386 -#elif defined(__alpha__) - p_alpha -#elif defined(__sparc64__) - p_sparc64 -#elif defined(__ia64__) - p_ia64 -#elif defined(__ppc__) - p_ppc -#else - IHAVENOIDEA -#endif - ; +}; +extern const enum platform platform; typedef enum { whole, |