>Number: 158418 >Category: misc >Synopsis: /usr/include librarys broken by unnecessary extra macro >indirection. >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jun 29 07:10:05 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Alan Larson >Release: FreeBSD 8.2-STABLE i386 >Organization: not relevant to this report >Environment: System: FreeBSD w6yx.stanford.edu 8.2-STABLE FreeBSD 8.2-STABLE #0: Tue May 3 15:19:30 PDT 2011 tec...@w.wbopera.holt:/w0/obj/usr/src/sys/GENERIC i386
>Description: The macro __aligned(x) is used several places in files in /usr/include, but is only defined if using a sufficiently new version of GCC, or an Intel compiler. The definitions are inside an #if __GNUC_PREREQ__(2, 7) and #if defined(__INTEL_COMPILER) This breaks things when compiled with PCC or TCC. ( http://pcc.ludd.ltu.se/jira/browse/PCC-18 ) >How-To-Repeat: Attempt to compile something that has an #include <signal.h> with TCC (or presumably, PCC). Inspection of the code indicates that the same problem is true for __packed . Other values are also redefined in those same conditionals, and they probably have the same problems. >Fix: Two likely fixes come to mind: 1. Don't use these macro shortcuts, use the __attribute__ form directly. Many of the files in /usr/include do this, so fixing the remaining ones would simplify things. It should only take a few minutes to fix them. There are still lots of places using the __attribute__ form, so this is a proven safe and reasonable solution. 2. If you absolutely must include macros for this, define the macro all the time. But seriously, you should take solution #1. >Release-Note: >Audit-Trail: >Unformatted: _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"