fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / external / firebird / firebird-no-open-temp-on-shutdown.patch.1
blob5ce748ca8e5dff0f6325275cc17fded96efcb500
1 Only in firebird: Makefile
2 Only in firebird: build.log
3 diff -ur firebird.org/builds/posix/Makefile.in.client.gfix firebird/builds/posix/Makefile.in.client.gfix
4 --- firebird.org/builds/posix/Makefile.in.client.gfix   2014-07-03 13:40:07.000000000 +0200
5 +++ firebird/builds/posix/Makefile.in.client.gfix       2014-07-03 13:45:17.000000000 +0200
6 @@ -39,7 +39,8 @@
7  @SET_MAKE@
8  
9  
10 -GFIX_Other_Sources = jrd/isc.cpp jrd/ThreadData.cpp jrd/path_utils.cpp common/UtilSvc.cpp
11 +GFIX_Other_Sources = jrd/isc.cpp jrd/ThreadData.cpp jrd/path_utils.cpp common/UtilSvc.cpp \
12 +                                        $(OS_SPECIFIC_Sources)
14  GFIX_Files = alice_meta.epp alice.cpp exe.cpp tdr.cpp aliceMain.cpp
15  GFIX_Sources = $(addprefix alice/, $(GFIX_Files)) $(GFIX_Other_Sources)
16 diff -ur firebird.org/builds/posix/Makefile.in.client.util firebird/builds/posix/Makefile.in.client.util
17 --- firebird.org/builds/posix/Makefile.in.client.util   2014-07-03 13:40:07.000000000 +0200
18 +++ firebird/builds/posix/Makefile.in.client.util       2014-07-03 13:45:17.000000000 +0200
19 @@ -90,7 +90,7 @@
20         $(FBCLASSES_MsgObjects) $(CLUMPLETS_Objects) $(FBCOMMON_ClientObjects)
23 -FBGUARD_Other_Sources = jrd/isc.cpp jrd/divorce.cpp jrd/path_utils.cpp
24 +FBGUARD_Other_Sources = jrd/isc.cpp jrd/divorce.cpp jrd/path_utils.cpp $(OS_SPECIFIC_Sources)
25  FBGUARD_Files =  guard.cpp util.cpp
26  FBGUARD_Sources = $(addprefix utilities/guard/, $(FBGUARD_Files)) $(FBGUARD_Other_Sources)
27  FBGUARD_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(FBGUARD_Sources)))) $(FBCLASSES_ClientObjects)
28 diff -ur firebird.org/builds/posix/Makefile.in.embed.gfix firebird/builds/posix/Makefile.in.embed.gfix
29 --- firebird.org/builds/posix/Makefile.in.embed.gfix    2014-07-03 13:40:07.000000000 +0200
30 +++ firebird/builds/posix/Makefile.in.embed.gfix        2014-07-03 13:54:55.000000000 +0200
31 @@ -43,7 +43,8 @@
32                          alice.cpp exe.cpp tdr.cpp aliceMain.cpp
34  GFIX_Other_Sources += jrd/isc.cpp jrd/ThreadData.cpp jrd/path_utils.cpp \
35 -                                         common/UtilSvc.cpp
36 +                                         common/UtilSvc.cpp \
37 +                                         $(OS_SPECIFIC_Sources)
39  GFIX_Sources = $(addprefix alice/, $(GFIX_Files)) $(GFIX_Other_Sources)
40  GFIX_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(GFIX_Sources))))
41 Only in firebird/builds/posix: Makefile.in.embed.gfix.orig
42 Only in firebird/builds/posix: Makefile.in.embed.gfix.rej
43 Only in firebird/builds/posix: Makefile.in.embed.gfix~
44 diff -ur firebird.org/builds/posix/Makefile.in.embed.util firebird/builds/posix/Makefile.in.embed.util
45 --- firebird.org/builds/posix/Makefile.in.embed.util    2014-07-03 13:40:07.000000000 +0200
46 +++ firebird/builds/posix/Makefile.in.embed.util        2014-07-03 13:45:17.000000000 +0200
47 @@ -103,7 +103,7 @@
48  $(FBCLASSES_MsgObjects) $(CLUMPLETS_Objects) $(FBCOMMON_ClientObjects)
51 -FBGUARD_Other_Sources = jrd/isc.cpp jrd/divorce.cpp jrd/path_utils.cpp
52 +FBGUARD_Other_Sources = jrd/isc.cpp jrd/divorce.cpp jrd/path_utils.cpp $(OS_SPECIFIC_Sources)
53  FBGUARD_Files =  guard.cpp util.cpp
54  FBGUARD_Sources = $(addprefix utilities/guard/, $(FBGUARD_Files)) $(FBGUARD_Other_Sources)
55  FBGUARD_Objects = $(addprefix $(OBJ)/, $(addsuffix .o, $(basename $(FBGUARD_Sources)))) $(FBCLASSES_ClientObjects)
56 diff -ur firebird.org/builds/posix/prefix.aix_powerpc_xlc firebird/builds/posix/prefix.aix_powerpc_xlc
57 --- firebird.org/builds/posix/prefix.aix_powerpc_xlc    2014-07-03 13:40:07.000000000 +0200
58 +++ firebird/builds/posix/prefix.aix_powerpc_xlc        2014-07-03 13:45:17.000000000 +0200
59 @@ -118,7 +118,7 @@
60         common/classes/MsgPrint.cpp common/classes/SafeArg.cpp \
61         common/classes/BaseStream.cpp common/classes/fb_string.cpp \
62         common/classes/TempFile.cpp \
63 -       jrd/gds.cpp jrd/isc.cpp \
64 +       jrd/gds.cpp jrd/isc.cpp $(OS_SPECIFIC_Sources)\
65         jrd/os/posix/path_utils.cpp jrd/os/posix/os_utils.cpp \
66         jrd/os/posix/config_root.cpp jrd/os/posix/fbsyslog.cpp
68 Only in firebird: config.log
69 Only in firebird: config.status
70 Only in firebird/extern/btyacc: btyacc
71 Only in firebird: gen
72 Only in firebird: libtool
73 Only in firebird/src/dsql: dsql.tab.h
74 Only in firebird/src/dsql: parse.cpp
75 Only in firebird/src/gpre: gpre_meta.cpp
76 Only in firebird/src/include/gen: autoconfig.h
77 Only in firebird/src/include/gen: blrtable.h
78 diff -ur firebird.org/src/jrd/gds.cpp firebird/src/jrd/gds.cpp
79 --- firebird.org/src/jrd/gds.cpp        2014-07-03 13:40:08.000000000 +0200
80 +++ firebird/src/jrd/gds.cpp    2014-07-03 13:45:17.000000000 +0200
81 @@ -200,8 +200,6 @@
83  static void            sanitize(Firebird::string& locale);
85 -static void            safe_concat_path(TEXT* destbuf, const TEXT* srcbuf);
87  // New functions that try to be safe.
88  static SLONG safe_interpret(char* const s, const size_t bufsize,
89         const ISC_STATUS** const vector, bool legacy = false);
90 @@ -1734,7 +1732,7 @@
91         GDS_init_prefix();
93         strcpy(resultString, fb_prefix);        // safe - no BO
94 -       safe_concat_path(resultString, file);
95 +       iscSafeConcatPath(resultString, file);
96  }
99 @@ -1755,12 +1753,7 @@
100         GDS_init_prefix();
102         strcpy(string, fb_prefix_lock); // safe - no BO
104 -       // if someone wants to know prefix for lock files,
105 -       // sooner of all he wants that directory to exist
106 -       os_utils::createLockDirectory(string);
108 -       safe_concat_path(string, root);
109 +       iscSafeConcatPath(string, root);
113 @@ -1784,7 +1777,7 @@
114         GDS_init_prefix();
116         strcpy(string, fb_prefix_msg);  // safe - no BO
117 -       safe_concat_path(string, root);
118 +       iscSafeConcatPath(string, root);
122 @@ -3553,43 +3546,6 @@
123         }
126 -static void safe_concat_path(TEXT *resultString, const TEXT *appendString)
128 -/**************************************
129 - *
130 - *     s a f e _ c o n c a t _ p a t h
131 - *
132 - **************************************
133 - *
134 - * Functional description
135 - *     Safely appends appendString to resultString using paths rules.
136 - *  resultString must be at most MAXPATHLEN size.
137 - *     Thread/signal safe code.
138 - *
139 - **************************************/
140 -       size_t len = strlen(resultString);
141 -       fb_assert(len > 0);
143 -       if (resultString[len - 1] != PathUtils::dir_sep && len < MAXPATHLEN - 1)
144 -       {
145 -               resultString[len++] = PathUtils::dir_sep;
146 -               resultString[len] = 0;
147 -       }
149 -       size_t alen = strlen(appendString);
150 -       if (len + alen > MAXPATHLEN - 1)
151 -       {
152 -               alen = MAXPATHLEN - 1 - len;
153 -       }
155 -       fb_assert(len < MAXPATHLEN);
156 -       fb_assert(alen < MAXPATHLEN);
157 -       fb_assert(len + alen < MAXPATHLEN);
159 -       memcpy(&resultString[len], appendString, alen);
160 -       resultString[len + alen] = 0;
164  void FB_EXPORTED gds__default_printer(void* /*arg*/, SSHORT offset, const TEXT* line)
166 Only in firebird/src/jrd: gds.cpp.orig
167 diff -ur firebird.org/src/jrd/isc.cpp firebird/src/jrd/isc.cpp
168 --- firebird.org/src/jrd/isc.cpp        2014-07-03 13:40:08.000000000 +0200
169 +++ firebird/src/jrd/isc.cpp    2014-07-03 13:45:17.000000000 +0200
170 @@ -48,6 +48,8 @@
171  #include "../jrd/gds_proto.h"
172  #include "../jrd/isc_proto.h"
173  #include "../jrd/jrd_proto.h"
174 +#include "../jrd/os/os_utils.h"
175 +#include "../jrd/os/path_utils.h"
177  #include "../common/classes/init.h"
179 @@ -632,3 +634,61 @@
180         iscLogStatus(text, s);
184 +void iscPrefixLock(TEXT* string, const TEXT* root, bool createLockDir)
186 +/**************************************
187 + *
188 + *     i s c P r e f i x L o c k
189 + *
190 + **************************************
191 + *
192 + * Functional description
193 + *     Find appropriate Firebird lock file prefix.
194 + *
195 + **************************************/
196 +       gds__prefix_lock(string, "");
198 +       if (createLockDir)
199 +               os_utils::createLockDirectory(string);
201 +       iscSafeConcatPath(string, root);
205 +void iscSafeConcatPath(TEXT *resultString, const TEXT *appendString)
207 +/**************************************
208 + *
209 + *     i s c S a f e C o n c a t P a t h
210 + *
211 + **************************************
212 + *
213 + * Functional description
214 + *     Safely appends appendString to resultString using paths rules.
215 + *  resultString must be at most MAXPATHLEN size.
216 + *     Thread/signal safe code.
217 + *
218 + **************************************/
219 +       size_t len = strlen(resultString);
220 +       fb_assert(len > 0);
222 +       if (resultString[len - 1] != PathUtils::dir_sep && len < MAXPATHLEN - 1)
223 +       {
224 +               resultString[len++] = PathUtils::dir_sep;
225 +               resultString[len] = 0;
226 +       }
228 +       size_t alen = strlen(appendString);
229 +       if (len + alen > MAXPATHLEN - 1)
230 +       {
231 +               alen = MAXPATHLEN - 1 - len;
232 +       }
234 +       fb_assert(len < MAXPATHLEN);
235 +       fb_assert(alen < MAXPATHLEN);
236 +       fb_assert(len + alen < MAXPATHLEN);
238 +       memcpy(&resultString[len], appendString, alen);
239 +       resultString[len + alen] = 0;
241 diff -ur firebird.org/src/jrd/isc_proto.h firebird/src/jrd/isc_proto.h
242 --- firebird.org/src/jrd/isc_proto.h    2014-07-03 13:40:08.000000000 +0200
243 +++ firebird/src/jrd/isc_proto.h        2014-07-03 13:45:17.000000000 +0200
244 @@ -44,4 +44,7 @@
245  struct _SECURITY_ATTRIBUTES* ISC_get_security_desc();
246  #endif
248 +void iscPrefixLock(TEXT* string, const TEXT* root, bool createLockDir);
249 +void iscSafeConcatPath(TEXT *resultString, const TEXT *appendString);
251  #endif // JRD_ISC_PROTO_H
252 diff -ur firebird.org/src/jrd/isc_sync.cpp firebird/src/jrd/isc_sync.cpp
253 --- firebird.org/src/jrd/isc_sync.cpp   2014-07-03 13:40:08.000000000 +0200
254 +++ firebird/src/jrd/isc_sync.cpp       2014-07-03 13:45:17.000000000 +0200
255 @@ -2296,7 +2296,7 @@
257  #ifndef WIN_NT
258         TEXT expanded_filename[MAXPATHLEN];
259 -       gds__prefix_lock(expanded_filename, filename);
260 +       iscPrefixLock(expanded_filename, filename, false);
262         // We can't do much (specially in dtors) when it fails
263         // therefore do not check for errors - at least it's just /tmp.
264 @@ -2332,7 +2332,7 @@
265   **************************************/
267         TEXT expanded_filename[MAXPATHLEN];
268 -       gds__prefix_lock(expanded_filename, filename);
269 +       iscPrefixLock(expanded_filename, filename, true);
271  /* make the complete filename for the init file this file is to be used as a
272     master lock to eliminate possible race conditions with just a single file
273 @@ -2340,7 +2340,7 @@
274     lock to a LCK_SHARED lock is not atomic*/
276         TEXT init_filename[MAXPATHLEN];
277 -       gds__prefix_lock(init_filename, INIT_FILE);
278 +       iscPrefixLock(init_filename, INIT_FILE, true);
280         const bool trunc_flag = (length != 0);
282 @@ -2373,7 +2373,7 @@
283         if (fdSem < 0)
284         {
285                 TEXT sem_filename[MAXPATHLEN];
286 -               gds__prefix_lock(sem_filename, SEM_FILE);
287 +               iscPrefixLock(sem_filename, SEM_FILE, true);
288                 const int f = openFile(sem_filename);
289                 if (f == -1)
290                 {
291 @@ -2554,7 +2554,7 @@
292         int retry_count = 0;
294         TEXT expanded_filename[MAXPATHLEN];
295 -       gds__prefix_lock(expanded_filename, filename);
296 +       iscPrefixLock(expanded_filename, filename, true);
298         const bool trunc_flag = (length != 0);
299         bool init_flag = false;
300 @@ -4187,7 +4187,7 @@
301         CloseHandle(shmem_data->sh_mem_hdr_object);
303         TEXT expanded_filename[MAXPATHLEN];
304 -       gds__prefix_lock(expanded_filename, shmem_data->sh_mem_name);
305 +       iscPrefixLock(expanded_filename, shmem_data->sh_mem_name, false);
307         // Delete file only if it is not used by anyone else
308         HANDLE hFile = CreateFile(expanded_filename,
309 Only in firebird/src/jrd: isc_sync.cpp.orig
310 diff -ur firebird.org/src/jrd/svc.cpp firebird/src/jrd/svc.cpp
311 --- firebird.org/src/jrd/svc.cpp        2014-07-03 13:40:08.000000000 +0200
312 +++ firebird/src/jrd/svc.cpp    2014-07-03 13:45:17.000000000 +0200
313 @@ -1360,7 +1360,7 @@
314                                         gds__prefix(auxBuf, "");
315                                         break;
316                                 case isc_info_svc_get_env_lock:
317 -                                       gds__prefix_lock(auxBuf, "");
318 +                                       iscPrefixLock(auxBuf, "", false);
319                                         break;
320                                 case isc_info_svc_get_env_msg:
321                                         gds__prefix_msg(auxBuf, "");
322 @@ -1844,7 +1844,7 @@
323                                         gds__prefix(PathBuffer, "");
324                                         break;
325                                 case isc_info_svc_get_env_lock:
326 -                                       gds__prefix_lock(PathBuffer, "");
327 +                                       iscPrefixLock(PathBuffer, "", false);
328                                         break;
329                                 case isc_info_svc_get_env_msg:
330                                         gds__prefix_msg(PathBuffer, "");
331 Only in firebird/src/jrd: svc.cpp.orig
332 diff -ur firebird.org/src/jrd/trace/TraceConfigStorage.cpp firebird/src/jrd/trace/TraceConfigStorage.cpp
333 --- firebird.org/src/jrd/trace/TraceConfigStorage.cpp   2014-07-03 13:40:08.000000000 +0200
334 +++ firebird/src/jrd/trace/TraceConfigStorage.cpp       2014-07-03 13:45:17.000000000 +0200
335 @@ -221,7 +221,7 @@
336                 fb_assert(m_base->cnt_uses == 0);
338                 char dir[MAXPATHLEN];
339 -               gds__prefix_lock(dir, "");
340 +               iscPrefixLock(dir, "", true);
342                 PathName filename = TempFile::create("fb_trace_", dir);
343                 filename.copyTo(cfg_file_name, sizeof(m_base->cfg_file_name));
344 Only in firebird/src/jrd/trace: TraceConfigStorage.cpp.orig
345 diff -ur firebird.org/src/jrd/trace/TraceLog.cpp firebird/src/jrd/trace/TraceLog.cpp
346 --- firebird.org/src/jrd/trace/TraceLog.cpp     2014-07-03 13:40:08.000000000 +0200
347 +++ firebird/src/jrd/trace/TraceLog.cpp 2014-07-03 13:45:17.000000000 +0200
348 @@ -69,7 +69,7 @@
349         }
351         char dir[MAXPATHLEN];
352 -       gds__prefix_lock(dir, "");
353 +       iscPrefixLock(dir, "", true);
354         PathUtils::concatPath(m_baseFileName, dir, fileName);
356         TraceLogGuard guard(this);
357 Only in firebird/src/jrd/trace: TraceLog.cpp.orig
358 Only in firebird/src/misc: codes.cpp
359 Only in firebird: temp