HP-UX cc doesn't understand __alignof__ I tried to write some macros by myself with sizeof, but I just get some Core dumps (BUS Signal) :-( with gcc it seems to work, but gcc builds only a static library.
A few approaches to simulate alignof are documented here: http://www.m17n.org/martin/writings/alignof.html The following macro would work for fontconfig's uses, and would also go toward fixing bug 6099. #define fc_alignof(type) offsetof (struct { char c; type member; }, member) Patch forthcoming.
Created attachment 5219 [details] [review] patch to implement __alignof__ portably
First problem: fcint.h uses HAVE_INTTYPES_H before config.h is included.
HP-UX doesn't understand __inline__ to :-( So I set CFLAGS to -D__inline__= cc: "fcint.h", line 486: error 1000: Unexpected symbol: "int". cc: "fcint.h", line 626: error 1000: Unexpected symbol: "int". cc: "fcint.h", line 626: error 1586: Redefinition of function "__inline__". cc: "fcint.h", line 626: error 1711: Inconsistent parameter list declaration for "__inline__". cc: "fcint.h", line 833: error 1000: Unexpected symbol: "int". cc: "fcint.h", line 833: error 1586: Redefinition of function "__inline__". cc: "fcint.h", line 833: error 1711: Inconsistent parameter list declaration for "__inline__". cc: "fcint.h", line 901: error 1000: Unexpected symbol: "FcValueList". cc: "fcint.h", line 905: warning 604: Pointers are not assignment-compatible. cc: "fcint.h", line 907: warning 604: Pointers are not assignment-compatible. cc: "fcint.h", line 910: error 1000: Unexpected symbol: "FcPatternElt". cc: "fcint.h", line 914: warning 604: Pointers are not assignment-compatible. cc: "fcint.h", line 916: warning 604: Pointers are not assignment-compatible.
in fcint.h is a macro ALIGN. It has to be fixed, too.
Created attachment 5222 [details] [review] missed 2 __alignof__ in fcint.h This catches another __alignof__ use in fcint.h. There is a patch in bug 6171 to handle the stdint/inttypes problem.
Created attachment 5223 [details] [review] patch to check for 'inline' in configure.in Uses AC_C_INLINE, which should expand to inline/__inline__/__inline/nothing as appropriate.
I've committed these patches. Please REOPEN if it doesn't work.
config.h includes now a definition for inline: /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #define inline __inline #endif But now I get this error cc -O -Ae +DAportable -Wl,+vshlibunsats -Wl,-z -Wl,+s -Wl,-B,immediate -o fc-case fc-case.o /usr/ccs/bin/ld: Unsatisfied symbols: _fcValueLists (first referenced in fc-case.o) (data) _fcPatternElts (first referenced in fc-case.o) (data) FcDebugVal (first referenced in fc-case.o) (data) Should I make a new bug report or reopen this one?
BTW, many thanks Dom & Patrick for your support so far.
New bug report, please. Thanks.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.