summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2003-04-30 17:14:58 +0000
committerobrien <obrien@FreeBSD.org>2003-04-30 17:14:58 +0000
commite7abd7e44d08912e719fda4b53b1f302a61662ba (patch)
treeeb372e436faa6d36be7b249c75460def7c354188 /lib
parenta7da2328fb427e0fc6efe6c2f755ab3538a4904c (diff)
downloadFreeBSD-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.c20
-rw-r--r--lib/libdisk/libdisk.h23
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,
OpenPOWER on IntegriCloud