live-bootstrap/steps/gettext-0.26/patches/build_glob.patch
Samuel Tyler 5dcb00878f
Update to gettext 0.26
gettext: Update to 0.26 + regenerate pregened files

A lot of silly pregenerated files in this one, and very slow too :(
2026-01-02 10:09:45 +11:00

36 lines
1.9 KiB
Diff

SPDX-FileCopyrightText: 2025 Samuel Tyler <samuel@samuelt.me>
SPDX-License-Identifier: MIT
For whatever reason, the regeneration script for globals.{c,h} does not match
what it should be. This is probably because the files were hand edited
afterward. We do the proper fix and update the generation script.
--- libxml2-v2.9.9/build_glob.py 2019-01-04 05:14:17.000000000 +1100
+++ libxml2-v2.9.9/build_glob.py 2025-12-31 10:30:55.384538752 +1100
@@ -68,7 +68,7 @@
fields = string.split(line, ",")
# Update the header file
writeline(global_functions_hdr)
- global_functions_hdr.write("extern "+fields[0]+" *")
+ global_functions_hdr.write("XMLPUBFUN "+fields[0]+" * XMLCALL ")
if fields[2]:
global_functions_hdr.write("(*")
global_functions_hdr.write("__"+fields[1]+"(void)")
@@ -80,13 +80,13 @@
writeline(global_functions_hdr,"(*(__"+fields[1]+"()))")
writeline(global_functions_hdr,"#else")
if fields[2]:
- writeline(global_functions_hdr,"LIBXML_DLL_IMPORT extern "+fields[0]+" "+fields[1]+fields[2]+";")
+ writeline(global_functions_hdr,"XMLPUBVAR "+fields[0]+" "+fields[1]+fields[2]+";")
else:
- writeline(global_functions_hdr,"LIBXML_DLL_IMPORT extern "+fields[0]+" "+fields[1]+";")
+ writeline(global_functions_hdr,"XMLPUBVAR "+fields[0]+" "+fields[1]+";")
writeline(global_functions_hdr,"#endif")
# set/get for per-thread global defaults
if fields[3]:
- writeline(global_functions_hdr,fields[0]+" "+fields[1][:3]+"ThrDef"+fields[1][3:]+"("+fields[0]+" v);")
+ writeline(global_functions_hdr,"XMLPUBFUN "+fields[0]+" XMLCALL "+fields[1][:3]+"ThrDef"+fields[1][3:]+"("+fields[0]+" v);")
# Update the implementation file
writeline(global_functions_impl)
# writeline(global_functions_impl, "extern "+fields[0]+" "+fields[1]+";")