diff --git a/texk/web2c/luatexdir/ChangeLog b/texk/web2c/luatexdir/ChangeLog index f4f2f1d877..2598636417 100644 --- a/texk/web2c/luatexdir/ChangeLog +++ b/texk/web2c/luatexdir/ChangeLog @@ -1,3 +1,8 @@ +2025-01-04 Luigi Scarso + * Clean-up ffi.h + * LuaTeX 1.20.1 + + 2025-01-01 Luigi Scarso * New luaffi, support for aarch64. * LuaTeX 1.20.0 diff --git a/texk/web2c/luatexdir/luaffi/ffi.h b/texk/web2c/luatexdir/luaffi/ffi.h index 5555894e0c..08f42f96c6 100644 --- a/texk/web2c/luatexdir/luaffi/ffi.h +++ b/texk/web2c/luatexdir/luaffi/ffi.h @@ -44,11 +44,27 @@ extern "C" { #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 () +# include +# define HAVE_COMPLEX +# define HAVE_LONG_DOUBLE +# endif +# endif +#endif +#else #include #define HAVE_COMPLEX #define HAVE_LONG_DOUBLE - #endif +#endif + #ifndef NDEBUG #define DASM_CHECKS @@ -121,13 +137,18 @@ struct jit; #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,18 +484,12 @@ static ALWAYS_INLINE complex_float mk_complex_float(double real, double imag) { 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}; */ -/* } */ - -extern float cimagf(complex_float); -extern float crealf(complex_float); -extern double cimag(complex_double); -extern double creal(complex_double); +/* 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); */ #if defined(OS_ANDROID) && __ANDROID_API__<26 @@ -514,6 +529,7 @@ static ALWAYS_INLINE complex_double mk_complex_double(double real, double imag) 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 @@ static complex_double cpow(complex_double f, complex_double s) { r = exp(f.real); return (complex_double) {r*cos(f.imag),r*sin(f.imag)}; } + #endif #define CALLBACK_FUNC_USR_IDX 1 diff --git a/texk/web2c/luatexdir/luatex.c b/texk/web2c/luatexdir/luatex.c index 413ddfd77e..517672f865 100644 --- a/texk/web2c/luatexdir/luatex.c +++ b/texk/web2c/luatexdir/luatex.c @@ -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 diff --git a/texk/web2c/luatexdir/luatex_svnversion.h b/texk/web2c/luatexdir/luatex_svnversion.h index e88e01b487..e79a15c306 100644 --- a/texk/web2c/luatexdir/luatex_svnversion.h +++ b/texk/web2c/luatexdir/luatex_svnversion.h @@ -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