[tlbuild] build failure: usage of __attribute__ ((format(printf, 1, 0))) in texk/web2c/luatexdir/luafontloader/src/ffdummies.c

Karl Berry karl at freefriends.org
Mon May 31 02:33:35 CEST 2010


    vvv> so the only remaining problem with __attribute__ usage
    > occurs in texk/web2c/synctexdir/synctex.c 

I installed the following change.  Ok, Jerome?  Can you include it in
your master source?

   taco> I, the luatex files, I actually used a slightly different version
   > (copied from obsdcompat):
   /*  fix for non-gcc compilation: */
   #if !defined(__GNUC__) || (__GNUC__ < 2)
   # define __attribute__(x)
   #endif /* !defined(__GNUC__) || (__GNUC__ < 2) */

The simpler formulation seems more reliable to me.  It's conceivable
that another compiler could define __attribute__, in which case we'd end
up with a re#definition.  And no one is using GCC 1 these days/years.

Thanks,
karl


--- synctex.c	(revision 18628)
+++ synctex.c	(working copy)
@@ -272,6 +272,11 @@
 #   define SYNCTEX_RULE_HT ruleht
 #   define SYNCTEX_RULE_DP ruledp
 
+/*  Do not worry if the compiler doesn't support __attribute__.  */
+#   ifndef __attribute__
+#   define __attribute__(A)
+#   endif
+
 /*  In the header file below, TEX-OR-MF-OR-MP is replaced by the real name (tex, etex...)
  *  Some macros will be redefined and additional headers will be imported */
 #   include "synctex-TEX-OR-MF-OR-MP.h"


More information about the tlbuild mailing list