Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LlOxU-0003nm-ND for qemu-devel@nongnu.org; Sun, 22 Mar 2009 10:47:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LlOxQ-0003nW-Ag for qemu-devel@nongnu.org; Sun, 22 Mar 2009 10:47:28 -0400 Received: from [199.232.76.173] (port=56190 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LlOxQ-0003nM-5N for qemu-devel@nongnu.org; Sun, 22 Mar 2009 10:47:24 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:39760) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LlOxP-0002LX-9c for qemu-devel@nongnu.org; Sun, 22 Mar 2009 10:47:23 -0400 Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172]) by fmmailgate03.web.de (Postfix) with ESMTP id E7651F973099 for ; Sun, 22 Mar 2009 15:47:21 +0100 (CET) Received: from [84.148.119.38] (helo=[10.0.0.2]) by smtp06.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.110 #277) id 1LlOxN-0004UZ-00 for qemu-devel@nongnu.org; Sun, 22 Mar 2009 15:47:21 +0100 Message-Id: From: =?ISO-8859-1?Q?Andreas_F=E4rber?= In-Reply-To: <49C64930.1070509@mail.berlios.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: [Qemu-devel] [PATCH] [STABLE] Clean some PCI defines Date: Sun, 22 Mar 2009 15:46:58 +0100 References: <49C62504.8070208@mail.berlios.de> <49C64930.1070509@mail.berlios.de> Sender: andreas.faerber@web.de Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Am 22.03.2009 um 15:20 schrieb Stefan Weil: > Andreas F=E4rber schrieb: >> Am 22.03.2009 um 12:46 schrieb Stefan Weil: >> >>> Some defines from linux/pci_regs.h had similar, but not >>> the same defines in hw/pci.h (PCI_REVISION_ID / PCI_REVISION, >>> PCI_SUBSYSTEM_VENDOR_ID / PCI_SUBVENDOR_ID, >>> PCI_SUBSYSTEM_ID / PCI_SUBDEVICE_ID). >>> >>> I suggest to use the "standard" from linux/pci_regs.h and >>> replace the "old" Qemu ones. [...] >>> After a migration to the "standard" defines, >>> pci.h could use linux/pci_regs.h which is far more complete. >> >> Please keep in mind that linux/pci_regs.h is most likely not suitable >> for cross-platform use. >> >> You could of course do >> >> #ifdef __linux__ >> #include >> #else >> #define PCI_... 0x1234 >> ... >> #endif >> >> but then you would still need to sync the two sections. > > There is nothing platform-specific in linux/pci_regs.h, only > general PCI stuff. No need for conditional compilation. The *linux*/pci_regs.h file doesn't seem present on Mac OS X, Solaris, =20= Haiku, not to mention Windows. So either you need to #include it =20 conditionally where available, as outlined above, or ship a copy from =20= Linux/NetBSD with QEMU, as suggested by Warner, and #include that =20 local file only. Andreas