[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#656562: some __aligned issues remain



On 21/01/12 00:36, Debian Bug Tracking System wrote:
> In file included from ../../../tools/ipod-usb.c:1:0:
> /usr/include/libusb.h:254:43: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__aligned'

Hi,

This problem still affects a few other header files, where the parameter
to __aligned was a macro and not a bare number, e.g.:

> /usr/include/dev/usb/usb_device.h:} __aligned(USB_HOST_ALIGN);
> /usr/include/dev/usb/usb_device.h:} __aligned(USB_HOST_ALIGN);
> /usr/include/netinet/in_pcb.h:} __aligned(CACHE_LINE_SIZE);
> /usr/include/sys/pcpu.h:} __aligned(CACHE_LINE_SIZE);
> /usr/include/vm/uma_int.h:#define UMA_ALIGN	__aligned(CACHE_LINE_SIZE)
> /usr/include/vm/vm_page.h:} __aligned(CACHE_LINE_SIZE);

Packages with build failures due to this so far:
* php5 --
https://buildd.debian.org/status/fetch.php?pkg=php5&arch=kfreebsd-i386&ver=5.3.9-3&stamp=1327716668
* zabbix --
https://buildd.debian.org/status/fetch.php?pkg=zabbix&arch=kfreebsd-i386&ver=1%3A1.8.10-1&stamp=1327712644
* cups --
https://buildd.debian.org/status/fetch.php?pkg=cups&arch=kfreebsd-i386&ver=1.5.0-15&stamp=1327718267

Please consider my attached diff for kfreebsd-kernel-headers.  The regex
\([0-9A-Z_]*\) covers these remaining cases.

Something more generic, like \([^)]*\?\) might seem better, but then it
would have wrongly modified this also:

./usr/include/osreldate.h:#define __aligned(x)
__attribute__((__aligned__(x)))

Thanks,
Regards,
-- 
Steven Chamberlain
steven@pyro.eu.org
Index: debian/rules
===================================================================
--- debian/rules	(revision 4012)
+++ debian/rules	(working copy)
@@ -53,7 +53,7 @@
 		-e 's/#\s*ifndef\s*__GNUCLIKE_[A-Z_]\+\(\s\|$$\)/#if 0/g' \
 		\
 		-e 's/__packed\(\s\|;\)/ __attribute__((__packed__))\1/g' \
-		-e 's/__aligned(\([0-9]*\))/ __attribute__((aligned(\1)))/g' \
+		-e 's/__aligned(\([0-9A-Z_]*\))/ __attribute__((aligned(\1)))/g' \
 		-e 's/\(\s\|^\|(\)u_\(char\|int\|short\|long\)\(\s\)/\1unsigned \2\3/g' \
 		\
 		-e 's/defined\s*(\s*_SYS_CDEFS_H_\s*)/defined(_SYS_CDEFS_H)/g' \

Reply to: