[Dev-luatex] portability fixes for luatex

Vladimir Volovich vvv at vsu.ru
Mon Apr 28 23:08:17 CEST 2008


"TH" == Taco Hoekwater writes:

 TH> I am going through this now. My comments:

 TH> xxx/xxx/Makefile: Patches are fine for texlive, but I will not
 TH> apply these changes in the upstream. These packages do not use
 TH> autoconf (yet) and I really need the -Wall etc. while developing.

 TH> libs/luafilesystem/src/lfs.c: I changedthat a bit because your
 TH> patch broke compilation on win32.

yeah, i didn't notice that this declaration was in the #else
conditional. i should have used this instead:

======================================
--- libs/luafilesystem/src/lfs.c
+++ libs/luafilesystem/src/lfs.c
@@ -256,6 +256,8 @@
 static int dir_iter (lua_State *L) {
 #ifdef _WIN32
 	struct _finddata_t c_file;
+#else
+	struct dirent *entry;
 #endif
 	dir_data *d = (dir_data *)lua_touserdata (L, lua_upvalueindex (1));
 	luaL_argcheck (L, !d->closed, 1, "closed directory");
@@ -281,7 +283,6 @@
 		}
 	}
 #else
-	struct dirent *entry;
 	if ((entry = readdir (d->dir)) != NULL) {
 		lua_pushstring (L, entry->d_name);
 		return 1;
======================================

 TH> libs/luafontforge/fontforge/inc/basics.h: what was the problem? You
 TH> have commented out some typedefs, but these should be harmless.
 TH> (Fontforge is upstream for me myself, so I prefer not to make
 TH> changes to headers unlees absolutely necessary.)

i was getting errors:

xlc -g -c -o splinerefigure.o -I../../../../libs/luafontforge/fontforge/inc -I../../../../libs/luafontforge/fontforge/fontforge -I.  -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_UNISTD_H=1 -D_NO_PYTHON=1 -DHAVE_LANGINFO_H=1 -DX_DISPLAY_MISSING=1 -DHAVE_LONG_DOUBLE=1 -D_HAS_LONGLONG=1 -DNODYNAMIC=1 -D_NO_FREETYPE=1 -D_NO_LIBUNINAMESLIST=1 -DFONTFORGE_CONFIG_NO_WINDOWING_UI=1 -DLUA_FF_LIB=1 -UHAVE_LIBINTL_H ../../../../libs/luafontforge/fontforge/fontforge/splinerefigure.c
"../../../../libs/luafontforge/fontforge/inc/basics.h", line 48.25: 1506-334 (S) Identifier int32 has already been defined on line 624 of "/usr/include/sys/inttypes.h".
"../../../../libs/luafontforge/fontforge/inc/basics.h", line 50.25: 1506-334 (S) Identifier int16 has already been defined on line 623 of "/usr/include/sys/inttypes.h".
"../../../../libs/luafontforge/fontforge/inc/basics.h", line 52.25: 1506-334 (S) Identifier int8 has already been defined on line 622 of "/usr/include/sys/inttypes.h".

because typedefs in libs/luafontforge/fontforge/inc/basics.h
were clashing with typedefs in system header <sys/inttypes.h>

 TH> src/texk/web2c/luatexdir/font/luafont.c: one of the new "halfword
 TH> next"s was a level off.

thanks for looking at this.

Best,
v.



More information about the dev-luatex mailing list