* [Qemu-devel] [PATCH] build fix: xen on NetBSD/amd64 @ 2009-06-30 13:13 Christoph Egger 2009-07-09 19:21 ` Anthony Liguori 0 siblings, 1 reply; 11+ messages in thread From: Christoph Egger @ 2009-06-30 13:13 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 583 bytes --] Hi! Attached patch fixes this build error on NetBSD/amd64: hw/xen_blkif.h:20: warning: #pragma pack(psuh[, id], <n>) is not supported on this target hw/xen_blkif.h:36: warning: #pragma pack(pop[, id], <n>) is not supported on this target Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 [-- Attachment #2: qemu_xen_blkif.diff --] [-- Type: text/x-diff, Size: 1243 bytes --] diff --git a/hw/xen_blkif.h b/hw/xen_blkif.h index 738b8fe..bb4ff02 100644 --- a/hw/xen_blkif.h +++ b/hw/xen_blkif.h @@ -16,8 +16,9 @@ struct blkif_common_response { char dummy; }; +/* XXX move this into a proper header */ +#define __aligned(x) __attribute__((__aligned__(x))) /* i386 protocol version */ -#pragma pack(push, 4) struct blkif_x86_32_request { uint8_t operation; /* BLKIF_OP_??? */ uint8_t nr_segments; /* number of segments */ @@ -25,15 +26,14 @@ struct blkif_x86_32_request { uint64_t id; /* private guest value, echoed in resp */ blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */ struct blkif_request_segment seg[BLKIF_MAX_SEGMENTS_PER_REQUEST]; -}; +} __aligned(4); struct blkif_x86_32_response { uint64_t id; /* copied from request */ uint8_t operation; /* copied from request */ int16_t status; /* BLKIF_RSP_??? */ -}; +} __aligned(4); typedef struct blkif_x86_32_request blkif_x86_32_request_t; typedef struct blkif_x86_32_response blkif_x86_32_response_t; -#pragma pack(pop) /* x86_64 protocol version */ struct blkif_x86_64_request { ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH] build fix: xen on NetBSD/amd64 2009-06-30 13:13 [Qemu-devel] [PATCH] build fix: xen on NetBSD/amd64 Christoph Egger @ 2009-07-09 19:21 ` Anthony Liguori 2009-07-10 8:19 ` Christoph Egger 0 siblings, 1 reply; 11+ messages in thread From: Anthony Liguori @ 2009-07-09 19:21 UTC (permalink / raw) To: Christoph Egger; +Cc: qemu-devel Christoph Egger wrote: > Hi! > > Attached patch fixes this build error on NetBSD/amd64: > > hw/xen_blkif.h:20: warning: #pragma pack(psuh[, id], <n>) is not supported on > this target > hw/xen_blkif.h:36: warning: #pragma pack(pop[, id], <n>) is not supported on > this target > > Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> > You'll invoke the fury of malc for introducing an identifier that begins with '__' :-) There really isn't pragma pack on NetBSD? That's ashame. Regards, Anthony Liguori ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH] build fix: xen on NetBSD/amd64 2009-07-09 19:21 ` Anthony Liguori @ 2009-07-10 8:19 ` Christoph Egger 2009-07-10 10:18 ` malc 2009-07-10 12:58 ` Anthony Liguori 0 siblings, 2 replies; 11+ messages in thread From: Christoph Egger @ 2009-07-10 8:19 UTC (permalink / raw) To: Anthony Liguori; +Cc: qemu-devel On Thursday 09 July 2009 21:21:06 Anthony Liguori wrote: > Christoph Egger wrote: > > Hi! > > > > Attached patch fixes this build error on NetBSD/amd64: > > > > hw/xen_blkif.h:20: warning: #pragma pack(psuh[, id], <n>) is not > > supported on this target > > hw/xen_blkif.h:36: warning: #pragma pack(pop[, id], <n>) is not supported > > on this target > > > > Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> > > You'll invoke the fury of malc for introducing an identifier that begins > with '__' :-) In NetBSD, there is this in <sys/cdefs.h> : #if __GNUC_PREREQ__(2, 7) #define __packed __attribute__((__packed__)) #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x))) #elif defined(__PCC__) #define __packed _Pragma("packed 1") #define __aligned(x) _Pragma("aligned " __STRING(x)) #define __section(x) _Pragma("section " ## x) #elif defined(__lint__) #define __packed /* delete */ #define __aligned(x) /* delete */ #define __section(x) /* delete */ #else #define __packed error: no __packed for this compiler #define __aligned(x) error: no __aligned for this compiler #define __section(x) error: no __section for this compiler #endif > There really isn't pragma pack on NetBSD? That's ashame. No. Above defines are sufficient and portable. Now you know where the __aligned define in my patch comes from. :-) Christoph -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH] build fix: xen on NetBSD/amd64 2009-07-10 8:19 ` Christoph Egger @ 2009-07-10 10:18 ` malc 2009-07-10 12:36 ` Christoph Egger 2009-07-10 12:58 ` Anthony Liguori 1 sibling, 1 reply; 11+ messages in thread From: malc @ 2009-07-10 10:18 UTC (permalink / raw) To: Christoph Egger; +Cc: qemu-devel On Fri, 10 Jul 2009, Christoph Egger wrote: > On Thursday 09 July 2009 21:21:06 Anthony Liguori wrote: > > Christoph Egger wrote: > > > Hi! > > > > > > Attached patch fixes this build error on NetBSD/amd64: > > > > > > hw/xen_blkif.h:20: warning: #pragma pack(psuh[, id], <n>) is not > > > supported on this target > > > hw/xen_blkif.h:36: warning: #pragma pack(pop[, id], <n>) is not supported > > > on this target > > > > > > Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> > > > > You'll invoke the fury of malc for introducing an identifier that begins > > with '__' :-) > > In NetBSD, there is this in <sys/cdefs.h> : > > #if __GNUC_PREREQ__(2, 7) > #define __packed __attribute__((__packed__)) > #define __aligned(x) __attribute__((__aligned__(x))) > #define __section(x) __attribute__((__section__(x))) > #elif defined(__PCC__) > #define __packed _Pragma("packed 1") > #define __aligned(x) _Pragma("aligned " __STRING(x)) > #define __section(x) _Pragma("section " ## x) > #elif defined(__lint__) > #define __packed /* delete */ > #define __aligned(x) /* delete */ > #define __section(x) /* delete */ > #else > #define __packed error: no __packed for this compiler > #define __aligned(x) error: no __aligned for this compiler > #define __section(x) error: no __section for this compiler > #endif > > > > There really isn't pragma pack on NetBSD? That's ashame. > > No. Above defines are sufficient and portable. Above defines are sufficient but not anywhere near portable. > Now you know where the __aligned define in my patch comes from. :-) You should conditionally include include sys/cdefs.h on NetBSD and not defining your own version of __aligned (which is forbidden by the standard). Few more points: a. the file in question already uses aligned attribute _inside_ the structures without any macros b. unlike all other xen* files the header guard is __XEN_BLKIF_H__ and not QEMU_XEN_BLKIF_H (that should be fixed too) -- mailto:av1474@comtv.ru ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH] build fix: xen on NetBSD/amd64 2009-07-10 10:18 ` malc @ 2009-07-10 12:36 ` Christoph Egger 2009-07-10 15:22 ` malc 0 siblings, 1 reply; 11+ messages in thread From: Christoph Egger @ 2009-07-10 12:36 UTC (permalink / raw) To: malc; +Cc: qemu-devel On Friday 10 July 2009 12:18:39 malc wrote: > On Fri, 10 Jul 2009, Christoph Egger wrote: > > On Thursday 09 July 2009 21:21:06 Anthony Liguori wrote: > > > Christoph Egger wrote: > > > > Hi! > > > > > > > > Attached patch fixes this build error on NetBSD/amd64: > > > > > > > > hw/xen_blkif.h:20: warning: #pragma pack(psuh[, id], <n>) is not > > > > supported on this target > > > > hw/xen_blkif.h:36: warning: #pragma pack(pop[, id], <n>) is not > > > > supported on this target > > > > > > > > Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> > > > > > > You'll invoke the fury of malc for introducing an identifier that > > > begins with '__' :-) > > > > In NetBSD, there is this in <sys/cdefs.h> : > > > > #if __GNUC_PREREQ__(2, 7) > > #define __packed __attribute__((__packed__)) > > #define __aligned(x) __attribute__((__aligned__(x))) > > #define __section(x) __attribute__((__section__(x))) > > #elif defined(__PCC__) > > #define __packed _Pragma("packed 1") > > #define __aligned(x) _Pragma("aligned " __STRING(x)) > > #define __section(x) _Pragma("section " ## x) > > #elif defined(__lint__) > > #define __packed /* delete */ > > #define __aligned(x) /* delete */ > > #define __section(x) /* delete */ > > #else > > #define __packed error: no __packed for this compiler > > #define __aligned(x) error: no __aligned for this compiler > > #define __section(x) error: no __section for this compiler > > #endif > > > > > There really isn't pragma pack on NetBSD? That's ashame. > > > > No. Above defines are sufficient and portable. > > Above defines are sufficient but not anywhere near portable. Well, across different compilers, they are. > > Now you know where the __aligned define in my patch comes from. :-) > > You should conditionally include include sys/cdefs.h on NetBSD and not > defining your own version of __aligned (which is forbidden by the > standard). sys/cdefs.h is included implicitely by any libc standard header on NetBSD. No need for an #ifdef __NetBSD__ ... #endif for this. > Few more points: > > a. the file in question already uses aligned attribute _inside_ the > structures without any macros So the pragmas have no effect then ? If so, then just remove them. > b. unlike all other xen* files the header guard is __XEN_BLKIF_H__ > and not QEMU_XEN_BLKIF_H (that should be fixed too) Easy to fix. Will you do or should I send a diff ? Christoph -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH] build fix: xen on NetBSD/amd64 2009-07-10 12:36 ` Christoph Egger @ 2009-07-10 15:22 ` malc 2009-07-17 13:28 ` Christoph Egger 0 siblings, 1 reply; 11+ messages in thread From: malc @ 2009-07-10 15:22 UTC (permalink / raw) To: Christoph Egger; +Cc: qemu-devel On Fri, 10 Jul 2009, Christoph Egger wrote: > On Friday 10 July 2009 12:18:39 malc wrote: > > On Fri, 10 Jul 2009, Christoph Egger wrote: > > > On Thursday 09 July 2009 21:21:06 Anthony Liguori wrote: > > > > Christoph Egger wrote: > > > > > Hi! > > > > > > > > > > Attached patch fixes this build error on NetBSD/amd64: > > > > > > > > > > hw/xen_blkif.h:20: warning: #pragma pack(psuh[, id], <n>) is not > > > > > supported on this target > > > > > hw/xen_blkif.h:36: warning: #pragma pack(pop[, id], <n>) is not > > > > > supported on this target > > > > > > > > > > Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> > > > > > > > > You'll invoke the fury of malc for introducing an identifier that > > > > begins with '__' :-) > > > > > > In NetBSD, there is this in <sys/cdefs.h> : > > > > > > #if __GNUC_PREREQ__(2, 7) > > > #define __packed __attribute__((__packed__)) > > > #define __aligned(x) __attribute__((__aligned__(x))) > > > #define __section(x) __attribute__((__section__(x))) > > > #elif defined(__PCC__) > > > #define __packed _Pragma("packed 1") > > > #define __aligned(x) _Pragma("aligned " __STRING(x)) > > > #define __section(x) _Pragma("section " ## x) > > > #elif defined(__lint__) > > > #define __packed /* delete */ > > > #define __aligned(x) /* delete */ > > > #define __section(x) /* delete */ > > > #else > > > #define __packed error: no __packed for this compiler > > > #define __aligned(x) error: no __aligned for this compiler > > > #define __section(x) error: no __section for this compiler > > > #endif > > > > > > > There really isn't pragma pack on NetBSD? That's ashame. > > > > > > No. Above defines are sufficient and portable. > > > > Above defines are sufficient but not anywhere near portable. > > Well, across different compilers, they are. What i meant is that they (the system provider) are free to do that, you (the user) can not do that though. > > > > Now you know where the __aligned define in my patch comes from. :-) > > > > You should conditionally include include sys/cdefs.h on NetBSD and not > > defining your own version of __aligned (which is forbidden by the > > standard). > > sys/cdefs.h is included implicitely by any libc standard header on NetBSD. > No need for an #ifdef __NetBSD__ ... #endif for this. Then i actually fail to see how your original patch is supposed to work at all, gcc should raise hell about redefinition of __aligned. > > Few more points: > > > > a. the file in question already uses aligned attribute _inside_ the > > structures without any macros > > So the pragmas have no effect then ? If so, then just remove them. Not really, the individual members are marked with attribute aligned (just take a look), not the whole structures. > > > b. unlike all other xen* files the header guard is __XEN_BLKIF_H__ > > and not QEMU_XEN_BLKIF_H (that should be fixed too) > > Easy to fix. Will you do or should I send a diff ? > That would be very nice of you. -- mailto:av1474@comtv.ru ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH] build fix: xen on NetBSD/amd64 2009-07-10 15:22 ` malc @ 2009-07-17 13:28 ` Christoph Egger 2009-07-17 16:58 ` malc 0 siblings, 1 reply; 11+ messages in thread From: Christoph Egger @ 2009-07-17 13:28 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 3576 bytes --] On Friday 10 July 2009 17:22:04 malc wrote: > On Fri, 10 Jul 2009, Christoph Egger wrote: > > On Friday 10 July 2009 12:18:39 malc wrote: > > > On Fri, 10 Jul 2009, Christoph Egger wrote: > > > > On Thursday 09 July 2009 21:21:06 Anthony Liguori wrote: > > > > > Christoph Egger wrote: > > > > > > Hi! > > > > > > > > > > > > Attached patch fixes this build error on NetBSD/amd64: > > > > > > > > > > > > hw/xen_blkif.h:20: warning: #pragma pack(psuh[, id], <n>) is not > > > > > > supported on this target > > > > > > hw/xen_blkif.h:36: warning: #pragma pack(pop[, id], <n>) is not > > > > > > supported on this target > > > > > > > > > > > > Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> > > > > > > > > > > You'll invoke the fury of malc for introducing an identifier that > > > > > begins with '__' :-) > > > > > > > > In NetBSD, there is this in <sys/cdefs.h> : > > > > > > > > #if __GNUC_PREREQ__(2, 7) > > > > #define __packed __attribute__((__packed__)) > > > > #define __aligned(x) __attribute__((__aligned__(x))) > > > > #define __section(x) __attribute__((__section__(x))) > > > > #elif defined(__PCC__) > > > > #define __packed _Pragma("packed 1") > > > > #define __aligned(x) _Pragma("aligned " __STRING(x)) > > > > #define __section(x) _Pragma("section " ## x) > > > > #elif defined(__lint__) > > > > #define __packed /* delete */ > > > > #define __aligned(x) /* delete */ > > > > #define __section(x) /* delete */ > > > > #else > > > > #define __packed error: no __packed for this compiler > > > > #define __aligned(x) error: no __aligned for this compiler > > > > #define __section(x) error: no __section for this compiler > > > > #endif > > > > > > > > > There really isn't pragma pack on NetBSD? That's ashame. > > > > > > > > No. Above defines are sufficient and portable. > > > > > > Above defines are sufficient but not anywhere near portable. > > > > Well, across different compilers, they are. > > What i meant is that they (the system provider) are free to do that, > you (the user) can not do that though. > > > > > Now you know where the __aligned define in my patch comes from. :-) > > > > > > You should conditionally include include sys/cdefs.h on NetBSD and not > > > defining your own version of __aligned (which is forbidden by the > > > standard). > > > > sys/cdefs.h is included implicitely by any libc standard header on > > NetBSD. No need for an #ifdef __NetBSD__ ... #endif for this. > > Then i actually fail to see how your original patch is supposed to work > at all, gcc should raise hell about redefinition of __aligned. > > > > Few more points: > > > > > > a. the file in question already uses aligned attribute _inside_ the > > > structures without any macros > > > > So the pragmas have no effect then ? If so, then just remove them. > > Not really, the individual members are marked with attribute aligned > (just take a look), not the whole structures. > > > > b. unlike all other xen* files the header guard is __XEN_BLKIF_H__ > > > and not QEMU_XEN_BLKIF_H (that should be fixed too) > > > > Easy to fix. Will you do or should I send a diff ? > > That would be very nice of you. Is attached patch fine with you ? Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 [-- Attachment #2: qemu_xen_blkif.diff --] [-- Type: text/x-diff, Size: 1032 bytes --] diff --git a/hw/xen_blkif.h b/hw/xen_blkif.h index 738b8fe..f47f9a4 100644 --- a/hw/xen_blkif.h +++ b/hw/xen_blkif.h @@ -1,5 +1,5 @@ -#ifndef __XEN_BLKIF_H__ -#define __XEN_BLKIF_H__ +#ifndef __QEMU_BLKIF_H__ +#define __QEMU_BLKIF_H__ #include <xen/io/ring.h> #include <xen/io/blkif.h> @@ -17,7 +17,6 @@ struct blkif_common_response { }; /* i386 protocol version */ -#pragma pack(push, 4) struct blkif_x86_32_request { uint8_t operation; /* BLKIF_OP_??? */ uint8_t nr_segments; /* number of segments */ @@ -33,7 +32,6 @@ struct blkif_x86_32_response { }; typedef struct blkif_x86_32_request blkif_x86_32_request_t; typedef struct blkif_x86_32_response blkif_x86_32_response_t; -#pragma pack(pop) /* x86_64 protocol version */ struct blkif_x86_64_request { @@ -100,4 +98,4 @@ static void inline blkif_get_x86_64_req(blkif_request_t *dst, blkif_x86_64_reque dst->seg[i] = src->seg[i]; } -#endif /* __XEN_BLKIF_H__ */ +#endif /* __QEMU_BLKIF_H__ */ ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH] build fix: xen on NetBSD/amd64 2009-07-17 13:28 ` Christoph Egger @ 2009-07-17 16:58 ` malc 0 siblings, 0 replies; 11+ messages in thread From: malc @ 2009-07-17 16:58 UTC (permalink / raw) To: Christoph Egger; +Cc: qemu-devel On Fri, 17 Jul 2009, Christoph Egger wrote: > On Friday 10 July 2009 17:22:04 malc wrote: > > On Fri, 10 Jul 2009, Christoph Egger wrote: > > > On Friday 10 July 2009 12:18:39 malc wrote: > > > > On Fri, 10 Jul 2009, Christoph Egger wrote: > > > > > On Thursday 09 July 2009 21:21:06 Anthony Liguori wrote: > > > > > > Christoph Egger wrote: > > > > > > > Hi! > > > > > > > > > > > > > > Attached patch fixes this build error on NetBSD/amd64: > > > > > > > > > > > > > > hw/xen_blkif.h:20: warning: #pragma pack(psuh[, id], <n>) is not > > > > > > > supported on this target > > > > > > > hw/xen_blkif.h:36: warning: #pragma pack(pop[, id], <n>) is not > > > > > > > supported on this target > > > > > > > > > > > > > > Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> > > > > > > > > > > > > You'll invoke the fury of malc for introducing an identifier that > > > > > > begins with '__' :-) > > > > > [..snip..] > > > > That would be very nice of you. > > Is attached patch fine with you ? > > Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> > No. It replaces one identifier starting with __ with another. -- mailto:av1474@comtv.ru ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH] build fix: xen on NetBSD/amd64 2009-07-10 8:19 ` Christoph Egger 2009-07-10 10:18 ` malc @ 2009-07-10 12:58 ` Anthony Liguori 2009-07-10 13:20 ` Christoph Egger 1 sibling, 1 reply; 11+ messages in thread From: Anthony Liguori @ 2009-07-10 12:58 UTC (permalink / raw) To: Christoph Egger; +Cc: qemu-devel Christoph Egger wrote: > On Thursday 09 July 2009 21:21:06 Anthony Liguori wrote: > >> Christoph Egger wrote: >> >>> Hi! >>> >>> Attached patch fixes this build error on NetBSD/amd64: >>> >>> hw/xen_blkif.h:20: warning: #pragma pack(psuh[, id], <n>) is not >>> supported on this target >>> hw/xen_blkif.h:36: warning: #pragma pack(pop[, id], <n>) is not supported >>> on this target >>> >>> Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> >>> >> You'll invoke the fury of malc for introducing an identifier that begins >> with '__' :-) >> > > In NetBSD, there is this in <sys/cdefs.h> : > NetBSD is allowed to use these names in system headers but according to the C standard, normal programs like QEMU aren't. So we need to use something other than __aligned. Regards, Anthony Liguori ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH] build fix: xen on NetBSD/amd64 2009-07-10 12:58 ` Anthony Liguori @ 2009-07-10 13:20 ` Christoph Egger 2009-07-10 15:24 ` malc 0 siblings, 1 reply; 11+ messages in thread From: Christoph Egger @ 2009-07-10 13:20 UTC (permalink / raw) To: Anthony Liguori; +Cc: qemu-devel On Friday 10 July 2009 14:58:48 Anthony Liguori wrote: > Christoph Egger wrote: > > On Thursday 09 July 2009 21:21:06 Anthony Liguori wrote: > >> Christoph Egger wrote: > >>> Hi! > >>> > >>> Attached patch fixes this build error on NetBSD/amd64: > >>> > >>> hw/xen_blkif.h:20: warning: #pragma pack(psuh[, id], <n>) is not > >>> supported on this target > >>> hw/xen_blkif.h:36: warning: #pragma pack(pop[, id], <n>) is not > >>> supported on this target > >>> > >>> Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> > >> > >> You'll invoke the fury of malc for introducing an identifier that begins > >> with '__' :-) > > > > In NetBSD, there is this in <sys/cdefs.h> : > > NetBSD is allowed to use these names in system headers but according to > the C standard, normal programs like QEMU aren't. So we need to use > something other than __aligned. What about __qemu_aligned ? #ifdef __NetBSD__ #define __qemu_aligned(x) __aligned(x) #else #define __qemu_aligned(x) __attribute__((__aligned__(x))) #endif > Regards, > > Anthony Liguori -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH] build fix: xen on NetBSD/amd64 2009-07-10 13:20 ` Christoph Egger @ 2009-07-10 15:24 ` malc 0 siblings, 0 replies; 11+ messages in thread From: malc @ 2009-07-10 15:24 UTC (permalink / raw) To: Christoph Egger; +Cc: qemu-devel On Fri, 10 Jul 2009, Christoph Egger wrote: > On Friday 10 July 2009 14:58:48 Anthony Liguori wrote: > > Christoph Egger wrote: > > > On Thursday 09 July 2009 21:21:06 Anthony Liguori wrote: > > >> Christoph Egger wrote: > > >>> Hi! > > >>> > > >>> Attached patch fixes this build error on NetBSD/amd64: > > >>> > > >>> hw/xen_blkif.h:20: warning: #pragma pack(psuh[, id], <n>) is not > > >>> supported on this target > > >>> hw/xen_blkif.h:36: warning: #pragma pack(pop[, id], <n>) is not > > >>> supported on this target > > >>> > > >>> Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> > > >> > > >> You'll invoke the fury of malc for introducing an identifier that begins > > >> with '__' :-) > > > > > > In NetBSD, there is this in <sys/cdefs.h> : > > > > NetBSD is allowed to use these names in system headers but according to > > the C standard, normal programs like QEMU aren't. So we need to use > > something other than __aligned. > > What about __qemu_aligned ? > > #ifdef __NetBSD__ > #define __qemu_aligned(x) __aligned(x) > #else > #define __qemu_aligned(x) __attribute__((__aligned__(x))) > #endif Let me quote the standard once again: 7.1.3 Reserved identifiers [..snip..] -- All identifiers that begin with an underscore and either an uppercase letter or another underscore are always reserved for any use. -- mailto:av1474@comtv.ru ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2009-07-17 16:58 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-06-30 13:13 [Qemu-devel] [PATCH] build fix: xen on NetBSD/amd64 Christoph Egger 2009-07-09 19:21 ` Anthony Liguori 2009-07-10 8:19 ` Christoph Egger 2009-07-10 10:18 ` malc 2009-07-10 12:36 ` Christoph Egger 2009-07-10 15:22 ` malc 2009-07-17 13:28 ` Christoph Egger 2009-07-17 16:58 ` malc 2009-07-10 12:58 ` Anthony Liguori 2009-07-10 13:20 ` Christoph Egger 2009-07-10 15:24 ` malc
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.