]> mj.ucw.cz Git - pciutils.git/blobdiff - lib/header.h
Redhat and Mandrake fixes
[pciutils.git] / lib / header.h
index 1b75d8eb901a2b7fd21bda3ca3fd49d0eab56f81..5fb4101e87aa04623688d068d27e4b0bc10d1246 100644 (file)
@@ -1,6 +1,4 @@
 /*
- *     $Id: header.h,v 1.9 2002/12/26 20:24:50 mj Exp $
- *
  *     The PCI Library -- PCI Header Structure (extracted from <linux/pci.h>)
  *
  *     Copyright (c) 1997--2002 Martin Mares <mj@ucw.cz>
@@ -80,8 +78,8 @@
 #define  PCI_BASE_ADDRESS_MEM_TYPE_1M  0x02    /* Below 1M [obsolete] */
 #define  PCI_BASE_ADDRESS_MEM_TYPE_64  0x04    /* 64 bit address */
 #define  PCI_BASE_ADDRESS_MEM_PREFETCH 0x08    /* prefetchable? */
-#define  PCI_BASE_ADDRESS_MEM_MASK     (~0x0fUL)
-#define  PCI_BASE_ADDRESS_IO_MASK      (~0x03UL)
+#define  PCI_BASE_ADDRESS_MEM_MASK     (~(pciaddr_t)0x0f)
+#define  PCI_BASE_ADDRESS_IO_MASK      (~(pciaddr_t)0x03)
 /* bit 1 is reserved if address_space = 1 */
 
 /* Header type 0 (normal devices) */
@@ -90,7 +88,7 @@
 #define PCI_SUBSYSTEM_ID       0x2e  
 #define PCI_ROM_ADDRESS                0x30    /* Bits 31..11 are address, 10..1 reserved */
 #define  PCI_ROM_ADDRESS_ENABLE        0x01
-#define PCI_ROM_ADDRESS_MASK   (~0x7ffUL)
+#define PCI_ROM_ADDRESS_MASK   (~(pciaddr_t)0x7ff)
 
 #define PCI_CAPABILITY_LIST    0x34    /* Offset of first capability list entry */