[flashrom] [patch] compilation fix for djgpp

Idwer Vollering vidwer at gmail.com
Sun Dec 26 23:06:05 CET 2010


2010/12/26 Michael Karcher <Michael.Karcher at fu-berlin.de>

> Am Montag, den 06.12.2010, 18:01 +0100 schrieb Idwer Vollering:
> > This corrects a djgpp build error, seen with r1232 and later.
> >
> > Signed-off-by: Idwer Vollering <vidwer at gmail.com>
> Not acked...
>
> > -int rpci_write_long(struct pci_dev *dev, int reg, uint32_t data)
> > +int rpci_write_long(struct pci_dev *dev, int reg, u32 data)
>
> > pcidev.c:210: error: conflicting types for 'rpci_write_long'
> > programmer.h:226: error: previous declaration of 'rpci_write_long' was
> > here
>
> I'd rather patch the header file to use uint32_t/uint16_t/uint8_t
> instead of u8/u16/u32, as the former types are used throughout flashrom.
>

Patch v2.

Signed-off-by: Idwer Vollering <vidwer at gmail.com>

Index: programmer.h
===================================================================
--- programmer.h        (revision 1247)
+++ programmer.h        (working copy)
@@ -221,9 +221,9 @@
 /* rpci_write_* are reversible writes. The original PCI config space
register
  * contents will be restored on shutdown.
  */
-int rpci_write_byte(struct pci_dev *dev, int reg, u8 data);
-int rpci_write_word(struct pci_dev *dev, int reg, u16 data);
-int rpci_write_long(struct pci_dev *dev, int reg, u32 data);
+int rpci_write_byte(struct pci_dev *dev, int reg, uint8_t data);
+int rpci_write_word(struct pci_dev *dev, int reg, uint16_t data);
+int rpci_write_long(struct pci_dev *dev, int reg, uint32_t data);
 #endif

 /* print.c */


> Is there any reason to not use them on rpci_write_*?
>

No, using the same type in a header as well as in the file that includes
that header makes sense.
Compile- and runtime tested using make (linux and djgpp) and gmake
respectively.


> Regards,
>   Michael Karcher
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.flashrom.org/pipermail/flashrom/attachments/20101226/3462e7d0/attachment.html>


More information about the flashrom mailing list