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

Re: [RFH] Loki bug #409370: missing 64-bit executablex



On Tue, Mar 25, 2008 at 11:59:53AM +0100, Andreas Tille wrote:
Well, the file param_lex.c was autogenerated in the first place

Right.

$ grep -A2 -B2 __unused *
param_lex.c-#include <sys/cdefs.h>
param_lex.c-#else
param_lex.c:#define __unused
param_lex.c-#endif
param_lex.c-

I believe that <sys/cdefs.h> on FreeBSD defines __unused to __attribute__(unused), or something similar. This was probably generated by a patched flex for FreeBSD. freebsd-lex might generate the same output, I don't know.

So while I probably might be able to patch this via

  s/__unused/__unused_by_other_systems_but__FREEBSD__/

this might break on som Debian/FREEBSD port and it would be better to
fix the according flex input.

Debian GNU/kFreeBSD uses __FreeBSD_kernel__, not __FreeBSD__, so it shouldn't affect anything as far as Debian goes. I don't know what Debian GNU/kFreeBSD includes in <sys/cdefs.h>; perhaps one of the porters could tell you.

I also wonder whether there is some hidden quirk in flex.  It might be that
this only happens in old versions of flex and I have to admit that I have
no idea at all about flex and what I would have to do to.

If you apply the attached patch, and regenerate the C file using flex, the program should compile properly. At least on my amd64 system, the executable is built.

HTH.

--
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
troff on top of XML: http://crustytoothpaste.ath.cx/~bmc/code/thwack
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
--- param_lex.l.old	2008-03-25 13:46:59.000000000 +0000
+++ param_lex.l	2008-03-25 13:47:19.000000000 +0000
@@ -127,7 +127,7 @@
 
 void yy_cleanup(void)
 {
-	yy_delete_buffer(yy_current_buffer);
+	yy_delete_buffer(YY_CURRENT_BUFFER);
 }
 
 #ifdef FUNC_NAME

Attachment: signature.asc
Description: Digital signature


Reply to: