xref: /trunk/main/expat/expat-2.8.1.patch (revision 0f155d76b3fa3703e54ee72457a8422ca7d11b60)
1--- misc/expat-2.8.1/lib/makefile.mk    2026-11-05 08:28:38
2+++ misc/build/expat-2.8.1/lib/makefile.mk  2026-11-05 08:30:26
3@@ -1 +1,102 @@
4-dummy
5+#**************************************************************
6+#
7+#  Licensed to the Apache Software Foundation (ASF) under one
8+#  or more contributor license agreements.  See the NOTICE file
9+#  distributed with this work for additional information
10+#  regarding copyright ownership.  The ASF licenses this file
11+#  to you under the Apache License, Version 2.0 (the
12+#  "License"); you may not use this file except in compliance
13+#  with the License.  You may obtain a copy of the License at
14+#
15+#    http://www.apache.org/licenses/LICENSE-2.0
16+#
17+#  Unless required by applicable law or agreed to in writing,
18+#  software distributed under the License is distributed on an
19+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20+#  KIND, either express or implied.  See the License for the
21+#  specific language governing permissions and limitations
22+#  under the License.
23+#
24+#**************************************************************
25+PRJ=..$/..$/..$/..$/..
26+
27+PRJNAME=expat
28+TARGET=expat
29+LIBTARGET=NO
30+EXTERNAL_WARNINGS_NOT_ERRORS=TRUE
31+
32+# --- Settings -----------------------------------------------------
33+.INCLUDE :  settings.mk
34+# --- Files --------------------------------------------------------
35+
36+CFLAGS+=-I..
37+
38+.IF "$(OS)"=="WNT"
39+CDEFS+=-DWIN32
40+.ELSE
41+CDEFS+=-DHAVE_EXPAT_CONFIG_H
42+.ENDIF
43+
44+.IF "$(OS)"=="MACOSX" && "$(SYSBASE)"!=""
45+CDEFS+=-DHAVE_MEMMOVE -DHAVE_BCOPY
46+.ENDIF # "$(OS)"=="MACOSX"
47+
48+# Entropy sources. Same selection as lib/Makefile.am; on Unix it is read from
49+# the expat_config.h that configure has just written.
50+.IF "$(OS)"=="WNT"
51+RANDOM_OBJS=$(SLO)$/random_rand_s.obj
52+.ELSE
53+RANDOM_OBJS=$(SLO)$/random_dev_urandom.obj
54+.IF "$(shell grep -c 'define HAVE_ARC4RANDOM 1' ..$/expat_config.h || true)"!="0"
55+RANDOM_OBJS+=$(SLO)$/random_arc4random.obj
56+.ENDIF
57+.IF "$(shell grep -c 'define HAVE_ARC4RANDOM_BUF 1' ..$/expat_config.h || true)"!="0"
58+RANDOM_OBJS+=$(SLO)$/random_arc4random_buf.obj
59+.ENDIF
60+.IF "$(shell grep -c 'define HAVE_GETENTROPY 1' ..$/expat_config.h || true)"!="0"
61+RANDOM_OBJS+=$(SLO)$/random_getentropy.obj
62+.ENDIF
63+.IF "$(shell grep -c -E 'define (HAVE_GETRANDOM|HAVE_SYSCALL_GETRANDOM) 1' ..$/expat_config.h || true)"!="0"
64+RANDOM_OBJS+=$(SLO)$/random_getrandom.obj
65+.ENDIF
66+.ENDIF
67+
68+SECOND_BUILD=UNICODE
69+UNICODE_SLOFILES=$(SLO)$/xmlparse.obj
70+UNICODECDEFS+=-DXML_UNICODE
71+
72+LIB1ARCHIV=$(LB)$/libascii_$(TARGET)_xmlparse.a
73+LIB1TARGET=$(SLB)$/ascii_$(TARGET)_xmlparse.lib
74+LIB1OBJFILES=$(SLO)$/xmlparse.obj
75+
76+LIB2ARCHIV=$(LB)$/lib$(TARGET)_xmlparse.a
77+LIB2TARGET=$(SLB)$/$(TARGET)_xmlparse.lib
78+LIB2OBJFILES =$(REAL_UNICODE_SLOFILES)
79+
80+# xmlparse calls the entropy functions, and both xmlparse libraries are
81+# always linked ahead of this one, so they live here.
82+LIB3ARCHIV=$(LB)$/lib$(TARGET)_xmltok.a
83+LIB3TARGET=$(SLB)$/$(TARGET)_xmltok.lib
84+LIB3OBJFILES=$(SLO)$/xmlrole.obj $(SLO)$/xmltok.obj $(RANDOM_OBJS)
85+
86+.IF "$(BUILD_X64)"!=""
87+# ---------------- X64 stuff special ---------------------
88+#  use UNICODE only because shell/shlxthandler
89+#  doesn't link against ascii_expat_xmlparse
90+#---------------------------------------------------------
91+SLOFILES_X64=$(SLO_X64)$/xmlparse.obj \
92+             $(SLO_X64)$/xmlrole.obj \
93+             $(SLO_X64)$/xmltok.obj \
94+             $(SLO_X64)$/random_rand_s.obj
95+CDEFS_X64+=-DXML_UNICODE -DWIN32
96+CFLAGS_X64+=-I..
97+LIB1TARGET_X64=$(SLB_X64)$/$(TARGET)_xmlparse.lib
98+LIB1OBJFILES_X64=$(SLO_X64)$/xmlparse.obj
99+LIB2TARGET_X64=$(SLB_X64)$/$(TARGET)_xmltok.lib
100+LIB2OBJFILES_X64=$(SLO_X64)$/xmlrole.obj $(SLO_X64)$/xmltok.obj $(SLO_X64)$/random_rand_s.obj
101+.ENDIF # "$(BUILD_X64)"!=""
102+
103+# --- Targets ------------------------------------------------------
104+.INCLUDE :  set_wntx64.mk
105+.INCLUDE : target.mk
106+.INCLUDE :  tg_wntx64.mk
107--- misc/expat-2.8.1/expat_config.h 2026-11-05 08:28:38
108+++ misc/build/expat-2.8.1/expat_config.h   2026-11-05 08:28:46
109@@ -11,10 +11,14 @@
110 #define BYTEORDER 1234
111
112 /* Define to 1 if you have the `arc4random' function. */
113+#if ! defined(_WIN32)
114 #define HAVE_ARC4RANDOM 1
115+#endif
116
117 /* Define to 1 if you have the `arc4random_buf' function. */
118+#if ! defined(_WIN32)
119 #define HAVE_ARC4RANDOM_BUF 1
120+#endif
121
122 /* define if the compiler supports basic C++11 syntax */
123 #define HAVE_CXX11 1
124@@ -26,13 +30,17 @@
125 #define HAVE_FCNTL_H 1
126
127 /* Define to 1 if you have the `getentropy' function. */
128+#if ! defined(_WIN32)
129 #define HAVE_GETENTROPY 1
130+#endif
131
132 /* Define to 1 if you have the 'getpagesize' function. */
133 #define HAVE_GETPAGESIZE 1
134
135 /* Define to 1 if you have the `getrandom' function. */
136+#if ! defined(_WIN32)
137 #define HAVE_GETRANDOM 1
138+#endif
139
140 /* Define to 1 if you have the <inttypes.h> header file. */
141 #define HAVE_INTTYPES_H 1
142@@ -56,7 +64,9 @@
143 #define HAVE_STRING_H 1
144
145 /* Define to 1 if you have `syscall' and `SYS_getrandom'. */
146+#if ! defined(_WIN32)
147 #define HAVE_SYSCALL_GETRANDOM 1
148+#endif
149
150 /* Define to 1 if you have the <sys/param.h> header file. */
151 #define HAVE_SYS_PARAM_H 1
152@@ -77,13 +87,13 @@
153 #define PACKAGE "expat"
154
155 /* Define to the address where bug reports for this package should be sent. */
156-#define PACKAGE_BUGREPORT "https://github.com/libexpat/libexpat/issues"
157+#define PACKAGE_BUGREPORT "dev@openoffice.apache.org"
158
159 /* Define to the full name of this package. */
160 #define PACKAGE_NAME "expat"
161
162 /* Define to the full name and version of this package. */
163-#define PACKAGE_STRING "expat 2.8.1"
164+#define PACKAGE_STRING "expat 2.8.1-aoo"
165
166 /* Define to the one symbol short name of this package. */
167 #define PACKAGE_TARNAME "expat"
168@@ -92,7 +102,7 @@
169 #define PACKAGE_URL ""
170
171 /* Define to the version of this package. */
172-#define PACKAGE_VERSION "2.8.1"
173+#define PACKAGE_VERSION "2.8.1-aoo"
174
175 /* Define to 1 if all of the C89 standard headers exist (not just the ones
176    required in a freestanding environment). This macro is provided for
177@@ -100,7 +110,7 @@
178 #define STDC_HEADERS 1
179
180 /* Version number of package */
181-#define VERSION "2.8.1"
182+#define VERSION "2.8.1-aoo"
183
184 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
185    significant byte first (like Motorola and SPARC, unlike Intel). */
186@@ -123,7 +133,9 @@
187 #define XML_CONTEXT_BYTES 1024
188
189 /* Define to include code reading entropy from `/dev/urandom'. */
190+#if ! defined(_WIN32)
191 #define XML_DEV_URANDOM 1
192+#endif
193
194 /* Define to make parameter entity parsing functionality available. */
195 #define XML_DTD 1
196