[tex-live] Build fails for FreeBSD 4.10

Vladimir Volovich vvv at vsu.ru
Fri Oct 1 08:08:38 CEST 2004


"KB" == Karl Berry writes:

 KB> Eddie, will you accept the changes?  The CDECL stuff is ugly but
 KB> harmless, just is an empty #define on non-Windows.  If so,
 KB> Vladimir, could you send a diff please?  Since you already have
 KB> the trees set up.

Here is the diff between the official version 1.31 of t1utils and the
version from the texlive depot:

--- official-1.31/t1ascii.c	2004-01-24 05:31:33.000000000 +0300
+++ texlive/t1ascii.c	2004-02-16 00:37:23.000000000 +0300
@@ -79,7 +79,7 @@
 static const char *ifp_filename = "<stdin>";
 static int line_length_warning = -1;
 
-void
+void CDECL
 fatal_error(const char *message, ...)
 {
   va_list val;
@@ -90,7 +90,7 @@
   exit(1);
 }
 
-void
+void CDECL
 error(const char *message, ...)
 {
   va_list val;
--- official-1.31/t1asm.c	2004-01-24 05:28:23.000000000 +0300
+++ texlive/t1asm.c	2004-03-01 16:05:09.000000000 +0300
@@ -64,6 +64,7 @@
 #include <lcdf/clp.h>
 #include "t1lib.h"
 
+typedef unsigned short uint16_t;
 #define LINESIZE 512
 
 #ifdef __cplusplus
@@ -346,7 +347,7 @@
 /* This function is used by the binary search, bsearch(), for command names in
    the command table. */
 
-static int command_compare(const void *key, const void *item)
+static int CDECL command_compare(const void *key, const void *item)
 {
   return strcmp((const char *) key, ((const struct command *) item)->name);
 }
@@ -551,7 +552,7 @@
 };
 static const char *program_name;
 
-void
+void CDECL
 fatal_error(const char *message, ...)
 {
   va_list val;
@@ -562,7 +563,7 @@
   exit(1);
 }
 
-void
+void CDECL
 error(const char *message, ...)
 {
   va_list val;
--- official-1.31/t1disasm.c	2004-01-24 05:32:57.000000000 +0300
+++ texlive/t1disasm.c	2004-03-01 16:05:09.000000000 +0300
@@ -67,6 +67,7 @@
 #include <lcdf/clp.h>
 #include "t1lib.h"
 
+typedef unsigned short uint16_t;
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -84,8 +85,8 @@
 static uint16_t er_default = 55665;
 
 static int error_count = 0;
-void fatal_error(const char *message, ...);
-void error(const char *message, ...);
+void CDECL fatal_error(const char *message, ...);
+void CDECL error(const char *message, ...);
 
 /* If the line contains an entry of the form `/lenIV <num>' then set the global
    lenIV to <num>.  This indicates the number of random bytes at the beginning
@@ -593,7 +594,7 @@
 };
 static const char *program_name;
 
-void
+void CDECL
 fatal_error(const char *message, ...)
 {
   va_list val;
@@ -604,7 +605,7 @@
   exit(1);
 }
 
-void
+void CDECL
 error(const char *message, ...)
 {
   va_list val;
--- official-1.31/t1lib.h	2003-11-08 21:12:06.000000000 +0300
+++ texlive/t1lib.h	2004-02-16 00:37:23.000000000 +0300
@@ -4,6 +4,13 @@
 extern "C" {
 #endif
 
+#ifdef WIN32
+#pragma warning (disable : 4007 4096)
+#define CDECL __cdecl
+#else
+#define CDECL
+#endif
+
 #define PFB_MARKER	128
 #define PFB_ASCII	1
 #define PFB_BINARY	2

Also, texlive depot contains the following files which are not present
in the official version:

depend.mak, win32.mak, t1asm.rc, t1disasm.rc

While depend.mak and win32.mak make sense, it seems that t1asm.rc and
t1disasm.rc are unused and should be deleted. Also, their content is
outdated.

And as Eddie noted: "I don't terribly mind these changes although I'd
feel better if they were like real changes, with justification, rather
than just random bolts from the blue.  Why is CDECL only needed on
_those_ functions?!?! Weird." - and I fully agree. Fabrice, is there a
rational explanation on why you need these CDECL only in these
specific places?

Best,
v.



More information about the tex-live mailing list