[tlbuild] [tex-live] TL2010 pretest luatex fails on Solaris 10 sparc
Vladimir Volovich
vvv at vsu.ru
Sat Jun 12 22:12:15 CEST 2010
"VV" == Vladimir Volovich writes:
VV> i'm able to get a working luatex when i change int
VV> cattable_field:16; to short cattable_field; in inputstack.h.
VV> i'm not sure if the behavior of the compiler is buggy, or the code
VV> is not 100% portable.
i made some search on google, and see this page:
http://docs.sun.com/app/docs/doc/820-7598/bjbbg?a=view
which says:
==================
(6.5.2.1) Whether a plain int bit-field is treated as a signed int
bit-field or as an unsigned int bit-field:
It is treated as an unsigned int.
==================
thus, i guess that it is not 100% portable to rely on "int" bit-fields
to be signed on all platforms, and a more portable approach is to
explicitly declare them signed. with the following patch, luatex appears
to work properly when built by Sun Studio compiler:
==================
--- texk/web2c/luatexdir/tex/inputstack.h (revision 18876)
+++ texk/web2c/luatexdir/tex/inputstack.h (working copy)
@@ -36,7 +36,7 @@
halfword ocp_lstack_field; /* used for omega translation processes */
int synctex_tag_field; /* stack the tag of the current file */
halfword ocp_no_field:16; /* used for omega translation processes */
- int cattable_field:16; /* category table used by the current line (see textoken.c) */
+ signed int cattable_field:16; /* category table used by the current line (see textoken.c) */
quarterword state_field:8;
quarterword index_field:8;
boolean partial_field:8; /* is the current line partial? (see textoken.c) */
==================
Please note that there are some other fields (e.g. "halfword
ocp_no_field:16" here, and maybe some other structs) which may need to
be changed if they are meant to be signed.
Best,
v.
More information about the tlbuild
mailing list