Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci wrap kernel bits in shared kernel/userland files



details:   https://anonhg.NetBSD.org/src/rev/97aca4d8b152
branches:  trunk
changeset: 467480:97aca4d8b152
user:      explorer <explorer%NetBSD.org@localhost>
date:      Thu Mar 25 04:09:33 1999 +0000

description:
wrap kernel bits in shared kernel/userland files

diffstat:

 sys/dev/pci/if_lmc_types.h |  26 ++++++++++++++++++++++++--
 sys/dev/pci/if_lmcioctl.h  |  17 ++---------------
 2 files changed, 26 insertions(+), 17 deletions(-)

diffs (76 lines):

diff -r 8087ee3051ea -r 97aca4d8b152 sys/dev/pci/if_lmc_types.h
--- a/sys/dev/pci/if_lmc_types.h        Thu Mar 25 04:08:59 1999 +0000
+++ b/sys/dev/pci/if_lmc_types.h        Thu Mar 25 04:09:33 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_lmc_types.h,v 1.1 1999/03/25 03:32:43 explorer Exp $        */
+/*     $NetBSD: if_lmc_types.h,v 1.2 1999/03/25 04:09:33 explorer Exp $        */
 
 /*-
  * Copyright (c) 1997-1999 LAN Media Corporation (LMC)
@@ -38,6 +38,23 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef LMC_TYPES_H
+#define LMC_TYPES_H
+
+/*
+ * NetBSD uses _KERNEL, FreeBSD uses KERNEL.
+ */
+#if defined(_KERNEL) && defined(__NetBSD__)
+#define LMC_IS_KERNEL
+#endif
+#if defined(KERNEL) && defined(__FreeBSD__)
+#define LMC_IS_KERNEL
+#endif
+#if defined(__KERNEL__) && defined(linux)
+#define LMC_IS_KERNEL
+#endif
+
+#if defined(LMC_IS_KERNEL)
 #if defined(__NetBSD__)
 typedef bus_addr_t lmc_csrptr_t;
 #else
@@ -62,5 +79,10 @@
 
 typedef struct lmc___softc lmc_softc_t;
 typedef struct lmc___media lmc_media_t;
+typedef struct lmc_ringinfo lmc_ringinfo_t;
+
+#endif /* LMC_IS_KERNEL */
+
 typedef struct lmc___ctl lmc_ctl_t;
-typedef struct lmc_ringinfo lmc_ringinfo_t;
+
+#endif /* LMC_TYPES_H */
diff -r 8087ee3051ea -r 97aca4d8b152 sys/dev/pci/if_lmcioctl.h
--- a/sys/dev/pci/if_lmcioctl.h Thu Mar 25 04:08:59 1999 +0000
+++ b/sys/dev/pci/if_lmcioctl.h Thu Mar 25 04:09:33 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_lmcioctl.h,v 1.1 1999/03/25 03:32:43 explorer Exp $ */
+/*     $NetBSD: if_lmcioctl.h,v 1.2 1999/03/25 04:09:34 explorer Exp $ */
 
 /*-
  * Copyright (c) 1997-1999 LAN Media Corporation (LMC)
@@ -203,20 +203,7 @@
 #define LMC_CARDTYPE_DS3        2      /* probed card is a DS3 card */
 #define LMC_CARDTYPE_T1                 3      /* probed card is a T1 card */
 
-/*
- * NetBSD uses _KERNEL, FreeBSD uses KERNEL.
- */
-#if defined(_KERNEL) && defined(__NetBSD__)
-#define LMC_IS_KERNEL
-#endif
-#if defined(KERNEL) && defined(__FreeBSD__)
-#define LMC_IS_KERNEL
-#endif
-#if defined(__KERNEL__) && defined(linux)
-#define LMC_IS_KERNEL
-#endif
-
-#if defined(LMC_IS_KERNEL)
+#if defined(LMC_IS_KERNEL) /* defined in if_lmc_types.h */
 
 /*
  * media independent methods to check on media status, link, light LEDs,



Home | Main Index | Thread Index | Old Index