From: Martin Mares Date: Fri, 13 Aug 2004 20:57:23 +0000 (+0000) Subject: Unexport byte, word. X-Git-Tag: v3.0.0~102 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=f31412d11275a3d303bc3337b8fa2b91432ddffc;p=pciutils.git Unexport byte, word. git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-63 --- diff --git a/ChangeLog b/ChangeLog index 6205984..9db67d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-08-13 Martin Mares + * lib/types.h, lib/pci.h, lib/sysdep.h: `byte' and `word' are + no longer exported to the outside world. + * README.Windows: Updated. * maint/release: Substitute version number in win32/config.h. diff --git a/lib/pci.h b/lib/pci.h index c01e6b1..3d8f865 100644 --- a/lib/pci.h +++ b/lib/pci.h @@ -78,11 +78,11 @@ void pci_free_dev(struct pci_dev *); struct pci_dev { struct pci_dev *next; /* Next device in the chain */ u16 domain; /* PCI domain (host bridge) */ - byte bus, dev, func; /* Bus inside domain, device and function */ + u8 bus, dev, func; /* Bus inside domain, device and function */ /* These fields are set by pci_fill_info() */ int known_fields; /* Set of info fields already known */ - word vendor_id, device_id; /* Identity of the device */ + u16 vendor_id, device_id; /* Identity of the device */ int irq; /* IRQ number */ pciaddr_t base_addr[6]; /* Base addresses */ pciaddr_t size[6]; /* Region sizes */ @@ -92,7 +92,7 @@ struct pci_dev { /* Fields used internally: */ struct pci_access *access; struct pci_methods *methods; - byte *cache; /* Cached config registers */ + u8 *cache; /* Cached config registers */ int cache_len; int hdrtype; /* Cached low 7 bits of header type, -1 if unknown */ void *aux; /* Auxillary data */ @@ -101,14 +101,14 @@ struct pci_dev { #define PCI_ADDR_IO_MASK (~(pciaddr_t) 0x3) #define PCI_ADDR_MEM_MASK (~(pciaddr_t) 0xf) -byte pci_read_byte(struct pci_dev *, int pos); /* Access to configuration space */ -word pci_read_word(struct pci_dev *, int pos); +u8 pci_read_byte(struct pci_dev *, int pos); /* Access to configuration space */ +u16 pci_read_word(struct pci_dev *, int pos); u32 pci_read_long(struct pci_dev *, int pos); -int pci_read_block(struct pci_dev *, int pos, byte *buf, int len); -int pci_write_byte(struct pci_dev *, int pos, byte data); -int pci_write_word(struct pci_dev *, int pos, word data); +int pci_read_block(struct pci_dev *, int pos, u8 *buf, int len); +int pci_write_byte(struct pci_dev *, int pos, u8 data); +int pci_write_word(struct pci_dev *, int pos, u16 data); int pci_write_long(struct pci_dev *, int pos, u32 data); -int pci_write_block(struct pci_dev *, int pos, byte *buf, int len); +int pci_write_block(struct pci_dev *, int pos, u8 *buf, int len); int pci_fill_info(struct pci_dev *, int flags); /* Fill in device information */ @@ -119,7 +119,7 @@ int pci_fill_info(struct pci_dev *, int flags); /* Fill in device information */ #define PCI_FILL_SIZES 16 #define PCI_FILL_RESCAN 0x10000 -void pci_setup_cache(struct pci_dev *, byte *cache, int len); +void pci_setup_cache(struct pci_dev *, u8 *cache, int len); /* * Filters diff --git a/lib/sysdep.h b/lib/sysdep.h index a599686..a54222f 100644 --- a/lib/sysdep.h +++ b/lib/sysdep.h @@ -15,6 +15,9 @@ #define inline #endif +typedef u8 byte; +typedef u16 word; + #ifdef PCI_OS_WINDOWS #define bzero(x,y) memset(x,0,y) #define strcasecmp strcmpi diff --git a/lib/types.h b/lib/types.h index 0b55feb..053477e 100644 --- a/lib/types.h +++ b/lib/types.h @@ -20,9 +20,6 @@ typedef u_int16_t u16; typedef u_int32_t u32; #endif -typedef u8 byte; -typedef u16 word; - #ifdef PCI_HAVE_64BIT_ADDRESS #include #if ULONG_MAX > 0xffffffff