texlive[73298] Build/source/texk/web2c/luatexdir: Clean-up ffi.h.
commits+lscarso at tug.org
commits+lscarso at tug.org
Sat Jan 4 18:42:43 CET 2025
Revision: 73298
https://tug.org/svn/texlive?view=revision&revision=73298
Author: lscarso
Date: 2025-01-04 18:42:43 +0100 (Sat, 04 Jan 2025)
Log Message:
-----------
Clean-up ffi.h. LuaTeX 1.20.1
Modified Paths:
--------------
trunk/Build/source/texk/web2c/luatexdir/ChangeLog
trunk/Build/source/texk/web2c/luatexdir/luaffi/ffi.h
trunk/Build/source/texk/web2c/luatexdir/luatex.c
trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
Modified: trunk/Build/source/texk/web2c/luatexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/ChangeLog 2025-01-04 14:31:54 UTC (rev 73297)
+++ trunk/Build/source/texk/web2c/luatexdir/ChangeLog 2025-01-04 17:42:43 UTC (rev 73298)
@@ -1,3 +1,8 @@
+2025-01-04 Luigi Scarso <luigi.scarso at gmail.com>
+ * Clean-up ffi.h
+ * LuaTeX 1.20.1
+
+
2025-01-01 Luigi Scarso <luigi.scarso at gmail.com>
* New luaffi, support for aarch64.
* LuaTeX 1.20.0
Modified: trunk/Build/source/texk/web2c/luatexdir/luaffi/ffi.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/luaffi/ffi.h 2025-01-04 14:31:54 UTC (rev 73297)
+++ trunk/Build/source/texk/web2c/luatexdir/luaffi/ffi.h 2025-01-04 17:42:43 UTC (rev 73298)
@@ -44,12 +44,28 @@
#if __STDC_VERSION__+0 >= 199901L
+#if ( defined( _WIN32) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__bsdi__) || defined(__DragonFly__))
+/* We should include something equivalent to */
+/* complex.h */
+/* e.g. Mingw GCC >=10 should have complex functions builtin */
+/* and we can check them with the macro __has_include */
+#if (__GNUC__ >= 10)
+# if defined __has_include
+# if __has_include (<complex.h>)
+# include <complex.h>
+# define HAVE_COMPLEX
+# define HAVE_LONG_DOUBLE
+# endif
+# endif
+#endif
+#else
#include <complex.h>
#define HAVE_COMPLEX
#define HAVE_LONG_DOUBLE
-
#endif
+#endif
+
#ifndef NDEBUG
#define DASM_CHECKS
#endif
@@ -121,13 +137,18 @@
#if defined ARCH_X86 || defined ARCH_X64
#define ALLOW_MISALIGNED_ACCESS
#endif
-#ifdef OS_WIN
-#define ALWAYS_INLINE __forceinline
-#elif defined(__GNUC__)
-#define ALWAYS_INLINE __attribute__ ((always_inline))
-#else
+
+/* #ifdef OS_WIN */
+/* #define ALWAYS_INLINE __forceinline */
+/* #elif defined(__GNUC__) */
+/* #define ALWAYS_INLINE __attribute__ ((always_inline)) */
+/* #else */
+/* #define ALWAYS_INLINE inline */
+/* #endif */
+
#define ALWAYS_INLINE inline
-#endif
+
+
EXTERN_C EXPORT int luaopen_ffi(lua_State* L);
static int lua_absindex2(lua_State* L, int idx) {
@@ -463,20 +484,14 @@
return real + imag * 1i;
}
#endif
-/* static ALWAYS_INLINE complex_double mk_complex_double(double real, double imag) { */
-/* return (complex_double){real , imag }; */
-/* } */
-/* static ALWAYS_INLINE complex_float mk_complex_float(double real, double imag) { */
-/* return (complex_float){real , imag}; */
-/* } */
+/* AlpineLinux musl doesn't like them */
+/* extern float cimagf(complex_float); */
+/* extern float crealf(complex_float); */
+/* extern double cimag(complex_double); */
+/* extern double creal(complex_double); */
-extern float cimagf(complex_float);
-extern float crealf(complex_float);
-extern double cimag(complex_double);
-extern double creal(complex_double);
-
#if defined(OS_ANDROID) && __ANDROID_API__<26
#include <math.h>
@@ -514,6 +529,7 @@
static ALWAYS_INLINE complex_float mk_complex_float(double real, double imag) {
return (complex_float){ real, imag };
}
+
static ALWAYS_INLINE double creal(complex_double c) {
return c.real;
}
@@ -544,6 +560,7 @@
r = exp(f.real);
return (complex_double) {r*cos(f.imag),r*sin(f.imag)};
}
+
#endif
#define CALLBACK_FUNC_USR_IDX 1
Modified: trunk/Build/source/texk/web2c/luatexdir/luatex.c
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/luatex.c 2025-01-04 14:31:54 UTC (rev 73297)
+++ trunk/Build/source/texk/web2c/luatexdir/luatex.c 2025-01-04 17:42:43 UTC (rev 73298)
@@ -33,8 +33,8 @@
*/
int luatex_version = 120;
-int luatex_revision = '0';
-const char *luatex_version_string = "1.20.0";
+int luatex_revision = '1';
+const char *luatex_version_string = "1.20.1";
const char *engine_name = my_name;
#include <kpathsea/c-ctype.h>
Modified: trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h
===================================================================
--- trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h 2025-01-04 14:31:54 UTC (rev 73297)
+++ trunk/Build/source/texk/web2c/luatexdir/luatex_svnversion.h 2025-01-04 17:42:43 UTC (rev 73298)
@@ -1,4 +1,4 @@
#ifndef luatex_svn_revision_h
#define luatex_svn_revision_h
-#define luatex_svn_revision 7635
+#define luatex_svn_revision 7636
#endif
More information about the tex-live-commits
mailing list.