The following problems are with compilation in tta/

     d:/usr/bin/gcc.exe -DHAVE_CONFIG_H -I.  -I./parsetexi -I./convert -I./main 
-I./structuring_transfo -I. -DDATADIR=\"d:/usr/share\"  
-DSYSCONFDIR=\"d:/usr/etc\" -I../gnulib/lib  -I../gnulib/lib -DPATH_SEP=\":\" 
-DEMBED_PERL -Id:/usr/include -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS 
-DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO 
-fwrapv -fno-strict-aliasing -mms-bitfields  -MT ctexi2any-texi2any.o -MD -MP 
-MF .deps/ctexi2any-texi2any.Tpo -c -o ctexi2any-texi2any.o `test -f 
'texi2any.c' || echo './'`texi2any.c
     <command-line>: error: expected identifier or '(' before string constant

   This is because texi2any.c includes <windows.h> which uses DATADIR.

Here's a simple patch to solve this:

--- tta/C/texi2any.c~0  2026-01-01 20:44:40.000000000 +0200
+++ tta/C/texi2any.c    2026-01-14 17:25:26.663585700 +0200
@@ -42,6 +42,7 @@
 #include <getopt.h>
 #ifdef _WIN32
 /* for GetACP */
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #endif
 

Next a couple of places where a missing dTHX causes compilation
errors:

--- tta/C/main/get_perl_info.c~0        2026-01-01 20:44:40.000000000 +0200
+++ tta/C/main/get_perl_info.c  2026-01-14 17:37:14.165983600 +0200
@@ -1079,6 +1079,8 @@ find_index_entry_subentry (const ELEMENT
   size_t l;
   CONST_ELEMENT_LIST subentries_list;
 
+  dTHX;
+
   memset (&subentries_list, 0, sizeof (CONST_ELEMENT_LIST));
 
   collect_subentries (index_element, &subentries_list);

--- tta/C/main/api_to_perl.c~0  2026-01-01 20:44:40.000000000 +0200
+++ tta/C/main/api_to_perl.c    2026-01-14 17:39:42.580146200 +0200
@@ -115,6 +115,8 @@ croak_message (char *message)
 void
 show_sv_hv (const void *sv, const char *msg)
 {
+  dTHX;
+
   fprintf (stderr, "show_sv_hv: %s: %p %p\n", msg, sv, SvRV ((SV *) sv));
 }
 

And after all that, the tree finally builds successfully.  Testing
will begin tomorrow; probably again lots of fun!

Thanks.

Reply via email to