|
1 There are a lot of separate ipcv2 patches collected here in one file. |
|
2 Some of them are Studio specific and can hopefully be removed. |
|
3 |
|
4 In more detail: |
|
5 |
|
6 First part is for studio, we may be able to remove. |
|
7 Need to keep the if defined(OS_LINUX)... parts, should try to send upstream. |
|
8 Using evpoll/devpoll instead of epoll may be Studio specific. |
|
9 asm_volatile changes may also be studio specific. |
|
10 |
|
11 For Solaris, we have no proc/self/exe location so we get the name of the |
|
12 process some other way. Should be able to send this part upstream. |
|
13 |
|
14 Patch to use FTS (tool for traversing tool hierarchies). We have these |
|
15 functions but they're not in libraries for C. This part is included in firefox |
|
16 40. |
|
17 |
|
18 ENABLE_XSS_SUPPORT links XSS libraries; needs further investigation. |
|
19 |
|
20 In Solaris, the queue can be too long so we have it read 32 bits only (?) for |
|
21 the wakeup_pip_read function. |
|
22 |
|
23 DCHECK(std::find...) may be because we couldn't compile it otherwise. Needs |
|
24 namespace added. |
|
25 |
|
26 We can remove the part for wstring because it's for studio. |
|
27 |
|
28 Solaris specific change for adding definition of thr_self. |
|
29 |
|
30 Differing memory for munmap((caddr_t)... patch |
|
31 |
|
32 We don't have timestruct defined in solaris (#ifndef SOLARIS...timstruct...) |
|
33 |
|
34 event2/event-config.h: Adds a new file so that libevent will compile on Solaris.In the .mozconfig file, we are using system libevent, so this shouldn't be necessary. |
|
35 |
|
36 IPC_RMID -- shared memory; on solaris, need to detach the shared memory first. So we move that segment of code up. If we detach the memory in Solaris, we cannot do a new attach. |
|
37 |
|
38 Add flags for Studio compiler. (CXXFLAGS) |
|
39 |
|
40 extern *C* int madvise(...) not defined , so we need to define it. |
|
41 |
|
42 --- comm-esr31/mozilla//configure.orig 2015-06-04 17:42:51.721170546 -0700 |
|
43 +++ comm-esr31/mozilla//configure 2015-06-04 17:42:52.022280764 -0700 |
|
44 @@ -9675,7 +9675,7 @@ |
|
45 EOF |
|
46 |
|
47 CFLAGS="$CFLAGS -xlibmieee -xstrconst -xbuiltin=%all -D__FUNCTION__=__func__" |
|
48 - CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic,extensions,no%except -norunpath -D__FUNCTION__=__func__ -template=no%extdef" |
|
49 + CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic,extensions,no%except -norunpath -D__FUNCTION__=__func__ -template=no%extdef -D_XOPEN_SOURCE=500 -D__EXTENSIONS__" |
|
50 LDFLAGS="-xildoff $LDFLAGS" |
|
51 MMX_FLAGS="-xarch=mmx -xO4" |
|
52 SSE_FLAGS="-xarch=sse" |
|
53 --- comm-esr31/mozilla/dom/plugins/ipc/PluginMessageUtils.cpp.orig 2015-06-04 17:42:51.729961817 -0700 |
|
54 +++ comm-esr31/mozilla/dom/plugins/ipc/PluginMessageUtils.cpp 2015-06-04 17:42:52.022446816 -0700 |
|
55 @@ -85,7 +85,7 @@ |
|
56 } |
|
57 } |
|
58 |
|
59 -#if defined(OS_LINUX) |
|
60 +#if defined(OS_LINUX) || defined(OS_SOLARIS) |
|
61 static string |
|
62 ReplaceAll(const string& haystack, const string& needle, const string& with) |
|
63 { |
|
64 @@ -104,7 +104,7 @@ |
|
65 string |
|
66 MungePluginDsoPath(const string& path) |
|
67 { |
|
68 -#if defined(OS_LINUX) |
|
69 +#if defined(OS_LINUX) || defined(OS_SOLARIS) |
|
70 // https://bugzilla.mozilla.org/show_bug.cgi?id=519601 |
|
71 return ReplaceAll(path, "netscape", "netsc@pe"); |
|
72 #else |
|
73 @@ -115,7 +115,7 @@ |
|
74 string |
|
75 UnmungePluginDsoPath(const string& munged) |
|
76 { |
|
77 -#if defined(OS_LINUX) |
|
78 +#if defined(OS_LINUX) || defined(OS_SOLARIS) |
|
79 return ReplaceAll(munged, "netsc@pe", "netscape"); |
|
80 #else |
|
81 return munged; |
|
82 --- comm-esr31/mozilla/dom/plugins/ipc/PluginModuleChild.cpp.orig 2015-06-04 17:42:51.732749854 -0700 |
|
83 +++ comm-esr31/mozilla/dom/plugins/ipc/PluginModuleChild.cpp 2015-06-04 17:42:52.022749494 -0700 |
|
84 @@ -207,7 +207,7 @@ |
|
85 |
|
86 // TODO: use PluginPRLibrary here |
|
87 |
|
88 -#if defined(OS_LINUX) || defined(OS_BSD) |
|
89 +#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) |
|
90 mShutdownFunc = |
|
91 (NP_PLUGINSHUTDOWN) PR_FindFunctionSymbol(mLibrary, "NP_Shutdown"); |
|
92 |
|
93 @@ -238,9 +238,11 @@ |
|
94 } |
|
95 |
|
96 #if defined(MOZ_WIDGET_GTK) |
|
97 +extern "C" { |
|
98 typedef void (*GObjectDisposeFn)(GObject*); |
|
99 typedef gboolean (*GtkWidgetScrollEventFn)(GtkWidget*, GdkEventScroll*); |
|
100 typedef void (*GtkPlugEmbeddedFn)(GtkPlug*); |
|
101 +} |
|
102 |
|
103 static GObjectDisposeFn real_gtk_plug_dispose; |
|
104 static GtkPlugEmbeddedFn real_gtk_plug_embedded; |
|
105 @@ -1837,7 +1839,7 @@ |
|
106 PLUGIN_LOG_DEBUG_METHOD; |
|
107 AssertPluginThread(); |
|
108 |
|
109 -#if defined(OS_LINUX) || defined(OS_BSD) |
|
110 +#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) |
|
111 return true; |
|
112 #elif defined(OS_WIN) || defined(OS_MACOSX) |
|
113 *_retval = mGetEntryPointsFunc(&mFunctions); |
|
114 @@ -1866,7 +1868,7 @@ |
|
115 SendBackUpXResources(FileDescriptor(xSocketFd)); |
|
116 #endif |
|
117 |
|
118 -#if defined(OS_LINUX) || defined(OS_BSD) |
|
119 +#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) |
|
120 *_retval = mInitializeFunc(&sBrowserFuncs, &mFunctions); |
|
121 return true; |
|
122 #elif defined(OS_WIN) || defined(OS_MACOSX) |
|
123 --- comm-esr31/mozilla/dom/plugins/ipc/PluginModuleChild.h.orig 2015-06-04 17:42:51.740779458 -0700 |
|
124 +++ comm-esr31/mozilla/dom/plugins/ipc/PluginModuleChild.h 2015-06-04 17:42:52.022883746 -0700 |
|
125 @@ -319,7 +319,7 @@ |
|
126 |
|
127 // we get this from the plugin |
|
128 NP_PLUGINSHUTDOWN mShutdownFunc; |
|
129 -#if defined(OS_LINUX) || defined(OS_BSD) |
|
130 +#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) |
|
131 NP_PLUGINUNIXINIT mInitializeFunc; |
|
132 #elif defined(OS_WIN) || defined(OS_MACOSX) |
|
133 NP_PLUGININIT mInitializeFunc; |
|
134 --- comm-esr31/mozilla/dom/plugins/ipc/PluginModuleParent.h.orig 2015-06-04 17:42:51.746067316 -0700 |
|
135 +++ comm-esr31/mozilla/dom/plugins/ipc/PluginModuleParent.h 2015-06-04 17:42:52.023009056 -0700 |
|
136 @@ -203,7 +203,7 @@ |
|
137 |
|
138 // Implement the module-level functions from NPAPI; these are |
|
139 // normally resolved directly from the DSO. |
|
140 -#ifdef OS_LINUX |
|
141 +#if defined(OS_LINUX) || defined(OS_SOLARIS) |
|
142 NPError NP_Initialize(const NPNetscapeFuncs* npnIface, |
|
143 NPPluginFuncs* nppIface); |
|
144 #else |
|
145 --- comm-esr31/mozilla/dom/plugins/ipc/PluginProcessParent.cpp.orig 2015-06-04 17:42:51.751413278 -0700 |
|
146 +++ comm-esr31/mozilla/dom/plugins/ipc/PluginProcessParent.cpp 2015-06-04 17:42:52.023117720 -0700 |
|
147 @@ -68,6 +68,9 @@ |
|
148 else if (base::PROCESS_ARCH_ARM & pluginLibArchitectures & containerArchitectures) { |
|
149 selectedArchitecture = base::PROCESS_ARCH_ARM; |
|
150 } |
|
151 + else if (base::PROCESS_ARCH_SPARC & pluginLibArchitectures & containerArchitectures) { |
|
152 + selectedArchitecture = base::PROCESS_ARCH_SPARC; |
|
153 + } |
|
154 else { |
|
155 return false; |
|
156 } |
|
157 --- comm-esr31/mozilla/ipc/chromium/Makefile.in.orig 2015-06-04 17:42:51.757175197 -0700 |
|
158 +++ comm-esr31/mozilla/ipc/chromium/Makefile.in 2015-06-04 17:42:52.023226892 -0700 |
|
159 @@ -4,7 +4,9 @@ |
|
160 |
|
161 OS_CXXFLAGS := $(filter-out -fshort-wchar,$(OS_CXXFLAGS)) |
|
162 |
|
163 +ifndef SOLARIS_SUNPRO_CC |
|
164 ACDEFINES = |
|
165 +endif |
|
166 |
|
167 ifndef MOZ_NATIVE_LIBEVENT # { |
|
168 vpath %.c \ |
|
169 --- comm-esr31/mozilla/ipc/chromium/chromium-config.mozbuild.orig 2015-06-04 17:42:51.762667985 -0700 |
|
170 +++ comm-esr31/mozilla/ipc/chromium/chromium-config.mozbuild 2015-06-04 17:42:52.023331021 -0700 |
|
171 @@ -41,6 +41,9 @@ |
|
172 if CONFIG['OS_ARCH'] == 'Darwin': |
|
173 DEFINES['OS_MACOSX'] = 1 |
|
174 |
|
175 + elif CONFIG['OS_ARCH'] == 'SunOS': |
|
176 + DEFINES['OS_SOLARIS'] = 1 |
|
177 + |
|
178 elif CONFIG['OS_ARCH'] == 'DragonFly': |
|
179 OS_LIBS += [ '$(call EXPAND_LIBNAME,kvm)' ] |
|
180 DEFINES.update({ |
|
181 --- comm-esr31/mozilla/ipc/chromium/moz.build.orig 2015-06-04 17:42:51.765444586 -0700 |
|
182 +++ comm-esr31/mozilla/ipc/chromium/moz.build 2015-06-04 17:42:52.023499565 -0700 |
|
183 @@ -230,17 +230,25 @@ |
|
184 'moc_message_pump_qt.cc', |
|
185 ] |
|
186 if not CONFIG['MOZ_NATIVE_LIBEVENT']: |
|
187 - if CONFIG['OS_TARGET'] != 'Android': |
|
188 + if CONFIG['OS_TARGET'] != 'SunOS': |
|
189 + if CONFIG['OS_TARGET'] != 'Android': |
|
190 + SOURCES += [ |
|
191 + 'src/third_party/libevent/epoll_sub.c', |
|
192 + ] |
|
193 SOURCES += [ |
|
194 - 'src/third_party/libevent/epoll_sub.c', |
|
195 + 'src/third_party/libevent/epoll.c', |
|
196 ] |
|
197 - SOURCES += [ |
|
198 - 'src/third_party/libevent/epoll.c', |
|
199 - ] |
|
200 if CONFIG['OS_TARGET'] == 'Android': |
|
201 LOCAL_INCLUDES += ['src/third_party/libevent/android'] |
|
202 else: |
|
203 - LOCAL_INCLUDES += ['src/third_party/libevent/linux'] |
|
204 + if CONFIG['OS_TARGET'] != 'SunOS': |
|
205 + LOCAL_INCLUDES += ['src/third_party/libevent/linux'] |
|
206 + else: |
|
207 + LOCAL_INCLUDES += ['src/third_party/libevent/solaris'] |
|
208 + SOURCES += [ |
|
209 + 'src/third_party/libevent/devpoll.c', |
|
210 + 'src/third_party/libevent/evport.c', |
|
211 + ] |
|
212 |
|
213 if os_bsd: |
|
214 SOURCES += [ |
|
215 --- comm-esr31/mozilla/ipc/chromium/src/base/atomicops.h.orig 2015-06-04 17:42:51.773913952 -0700 |
|
216 +++ comm-esr31/mozilla/ipc/chromium/src/base/atomicops.h 2015-06-04 17:42:52.023614155 -0700 |
|
217 @@ -138,6 +138,10 @@ |
|
218 #include "base/atomicops_internals_x86_macosx.h" |
|
219 #elif defined(COMPILER_GCC) && defined(ARCH_CPU_X86_FAMILY) |
|
220 #include "base/atomicops_internals_x86_gcc.h" |
|
221 +#elif defined(COMPILER_SUNPRO) && defined(ARCH_CPU_X86_FAMILY) |
|
222 +#define __asm__ asm |
|
223 +#define __volatile__ volatile |
|
224 +#include "base/atomicops_internals_x86_gcc.h" |
|
225 #elif defined(COMPILER_GCC) && defined(ARCH_CPU_ARM_FAMILY) |
|
226 #include "base/atomicops_internals_arm_gcc.h" |
|
227 #elif defined(COMPILER_GCC) && defined(ARCH_CPU_MIPS) |
|
228 --- comm-esr31/mozilla/ipc/chromium/src/base/atomicops_internals_x86_gcc.cc.orig 2015-06-04 17:42:51.779492901 -0700 |
|
229 +++ comm-esr31/mozilla/ipc/chromium/src/base/atomicops_internals_x86_gcc.cc 2015-06-04 17:42:52.023724795 -0700 |
|
230 @@ -19,13 +19,13 @@ |
|
231 // Inline cpuid instruction. In PIC compilations, %ebx contains the address |
|
232 // of the global offset table. To avoid breaking such executables, this code |
|
233 // must preserve that register's value across cpuid instructions. |
|
234 -#if defined(__i386__) |
|
235 +#if defined(__i386__) || defined (__i386) |
|
236 #define cpuid(a, b, c, d, inp) \ |
|
237 asm ("mov %%ebx, %%edi\n" \ |
|
238 "cpuid\n" \ |
|
239 "xchg %%edi, %%ebx\n" \ |
|
240 : "=a" (a), "=D" (b), "=c" (c), "=d" (d) : "a" (inp)) |
|
241 -#elif defined (__x86_64__) |
|
242 +#elif defined (__x86_64__) || defined(__x86_64) |
|
243 #define cpuid(a, b, c, d, inp) \ |
|
244 asm ("mov %%rbx, %%rdi\n" \ |
|
245 "cpuid\n" \ |
|
246 --- comm-esr31/mozilla/ipc/chromium/src/base/atomicops_internals_x86_gcc.h.orig 2015-06-04 17:42:51.785051435 -0700 |
|
247 +++ comm-esr31/mozilla/ipc/chromium/src/base/atomicops_internals_x86_gcc.h 2015-06-04 17:42:52.023927132 -0700 |
|
248 @@ -29,18 +29,18 @@ |
|
249 Atomic32 old_value, |
|
250 Atomic32 new_value) { |
|
251 Atomic32 prev; |
|
252 - __asm__ __volatile__("lock; cmpxchgl %1,%2" |
|
253 + __asm__ __volatile__("lock; cmpxchgl %1,(%2)" |
|
254 : "=a" (prev) |
|
255 - : "q" (new_value), "m" (*ptr), "0" (old_value) |
|
256 + : "q" (new_value), "r" (ptr), "0" (old_value) |
|
257 : "memory"); |
|
258 return prev; |
|
259 } |
|
260 |
|
261 inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr, |
|
262 Atomic32 new_value) { |
|
263 - __asm__ __volatile__("xchgl %1,%0" // The lock prefix is implicit for xchg. |
|
264 + __asm__ __volatile__("xchgl (%1),%0" // The lock prefix is implicit for xchg. |
|
265 : "=r" (new_value) |
|
266 - : "m" (*ptr), "0" (new_value) |
|
267 + : "r" (ptr), "0" (new_value) |
|
268 : "memory"); |
|
269 return new_value; // Now it's the previous value. |
|
270 } |
|
271 @@ -48,8 +48,8 @@ |
|
272 inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr, |
|
273 Atomic32 increment) { |
|
274 Atomic32 temp = increment; |
|
275 - __asm__ __volatile__("lock; xaddl %0,%1" |
|
276 - : "+r" (temp), "+m" (*ptr) |
|
277 + __asm__ __volatile__("lock; xaddl %0,(%1)" |
|
278 + : "+r" (temp), "+r" (ptr) |
|
279 : : "memory"); |
|
280 // temp now holds the old value of *ptr |
|
281 return temp + increment; |
|
282 @@ -58,8 +58,8 @@ |
|
283 inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr, |
|
284 Atomic32 increment) { |
|
285 Atomic32 temp = increment; |
|
286 - __asm__ __volatile__("lock; xaddl %0,%1" |
|
287 - : "+r" (temp), "+m" (*ptr) |
|
288 + __asm__ __volatile__("lock; xaddl %0,(%1)" |
|
289 + : "+r" (temp), "+r" (ptr) |
|
290 : : "memory"); |
|
291 // temp now holds the old value of *ptr |
|
292 if (AtomicOps_Internalx86CPUFeatures.has_amd_lock_mb_bug) { |
|
293 @@ -153,18 +153,18 @@ |
|
294 Atomic64 old_value, |
|
295 Atomic64 new_value) { |
|
296 Atomic64 prev; |
|
297 - __asm__ __volatile__("lock; cmpxchgq %1,%2" |
|
298 + __asm__ __volatile__("lock; cmpxchgq %1,(%2)" |
|
299 : "=a" (prev) |
|
300 - : "q" (new_value), "m" (*ptr), "0" (old_value) |
|
301 + : "q" (new_value), "r" (ptr), "0" (old_value) |
|
302 : "memory"); |
|
303 return prev; |
|
304 } |
|
305 |
|
306 inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr, |
|
307 Atomic64 new_value) { |
|
308 - __asm__ __volatile__("xchgq %1,%0" // The lock prefix is implicit for xchg. |
|
309 + __asm__ __volatile__("xchgq (%1),%0" // The lock prefix is implicit for xchg. |
|
310 : "=r" (new_value) |
|
311 - : "m" (*ptr), "0" (new_value) |
|
312 + : "r" (ptr), "0" (new_value) |
|
313 : "memory"); |
|
314 return new_value; // Now it's the previous value. |
|
315 } |
|
316 @@ -172,8 +172,8 @@ |
|
317 inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr, |
|
318 Atomic64 increment) { |
|
319 Atomic64 temp = increment; |
|
320 - __asm__ __volatile__("lock; xaddq %0,%1" |
|
321 - : "+r" (temp), "+m" (*ptr) |
|
322 + __asm__ __volatile__("lock; xaddq %0,(%1)" |
|
323 + : "+r" (temp), "+r" (ptr) |
|
324 : : "memory"); |
|
325 // temp now contains the previous value of *ptr |
|
326 return temp + increment; |
|
327 @@ -182,8 +182,8 @@ |
|
328 inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr, |
|
329 Atomic64 increment) { |
|
330 Atomic64 temp = increment; |
|
331 - __asm__ __volatile__("lock; xaddq %0,%1" |
|
332 - : "+r" (temp), "+m" (*ptr) |
|
333 + __asm__ __volatile__("lock; xaddq %0,(%1)" |
|
334 + : "+r" (temp), "+r" (ptr) |
|
335 : : "memory"); |
|
336 // temp now contains the previous value of *ptr |
|
337 if (AtomicOps_Internalx86CPUFeatures.has_amd_lock_mb_bug) { |
|
338 --- comm-esr31/mozilla/ipc/chromium/src/base/base_paths.h.orig 2015-06-04 17:42:51.790740170 -0700 |
|
339 +++ comm-esr31/mozilla/ipc/chromium/src/base/base_paths.h 2015-06-04 17:42:52.024028774 -0700 |
|
340 @@ -13,7 +13,7 @@ |
|
341 #include "base/base_paths_win.h" |
|
342 #elif defined(OS_MACOSX) |
|
343 #include "base/base_paths_mac.h" |
|
344 -#elif defined(OS_LINUX) || defined(OS_BSD) |
|
345 +#elif defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) |
|
346 #include "base/base_paths_linux.h" |
|
347 #endif |
|
348 #include "base/path_service.h" |
|
349 --- comm-esr31/mozilla/ipc/chromium/src/base/base_paths_linux.cc.orig 2015-06-04 17:42:51.796070387 -0700 |
|
350 +++ comm-esr31/mozilla/ipc/chromium/src/base/base_paths_linux.cc 2015-06-04 17:42:52.024134065 -0700 |
|
351 @@ -21,11 +21,19 @@ |
|
352 case base::FILE_EXE: |
|
353 case base::FILE_MODULE: { // TODO(evanm): is this correct? |
|
354 char bin_dir[PATH_MAX + 1]; |
|
355 +#ifdef OS_SOLARIS |
|
356 + if (!(realpath(getexecname(), bin_dir) && bin_dir[0] != '[')) { |
|
357 + NOTREACHED() << "Unable to get exec name."; |
|
358 + return false; |
|
359 + } |
|
360 + int bin_dir_size = strlen(bin_dir); |
|
361 +#else |
|
362 int bin_dir_size = readlink("/proc/self/exe", bin_dir, PATH_MAX); |
|
363 if (bin_dir_size < 0 || bin_dir_size > PATH_MAX) { |
|
364 NOTREACHED() << "Unable to resolve /proc/self/exe."; |
|
365 return false; |
|
366 } |
|
367 +#endif |
|
368 bin_dir[bin_dir_size] = 0; |
|
369 *result = FilePath(bin_dir); |
|
370 return true; |
|
371 --- comm-esr31/mozilla/ipc/chromium/src/base/basictypes.h.orig 2015-06-04 17:42:51.801414416 -0700 |
|
372 +++ comm-esr31/mozilla/ipc/chromium/src/base/basictypes.h 2015-06-04 17:42:52.024290833 -0700 |
|
373 @@ -35,9 +35,15 @@ |
|
374 |
|
375 // Platform- and hardware-dependent printf specifiers |
|
376 # if defined(OS_POSIX) |
|
377 +# if defined(COMPILER_SUNPRO) |
|
378 +# define PRId64L L"I64d" |
|
379 +# define PRIu64L L"I64u" |
|
380 +# define PRIx64L L"I64x" |
|
381 +# else |
|
382 # define PRId64L "I64d" |
|
383 # define PRIu64L "I64u" |
|
384 # define PRIx64L "I64x" |
|
385 +# endif |
|
386 # elif defined(OS_WIN) |
|
387 # define PRId64L L"I64d" |
|
388 # define PRIu64L L"I64u" |
|
389 @@ -77,6 +83,7 @@ |
|
390 // This template function declaration is used in defining arraysize. |
|
391 // Note that the function doesn't need an implementation, as we only |
|
392 // use its type. |
|
393 +#if !defined(COMPILER_SUNPRO) || __SUNPRO_CC >= 0x5100 |
|
394 template <typename T, size_t N> |
|
395 char (&ArraySizeHelper(T (&array)[N]))[N]; |
|
396 |
|
397 @@ -89,6 +96,7 @@ |
|
398 #endif |
|
399 |
|
400 #define arraysize(array) (sizeof(ArraySizeHelper(array))) |
|
401 +#endif |
|
402 |
|
403 // ARRAYSIZE_UNSAFE performs essentially the same calculation as arraysize, |
|
404 // but can be used on anonymous types or types defined inside |
|
405 @@ -131,6 +139,9 @@ |
|
406 ((sizeof(a) / sizeof(*(a))) / \ |
|
407 static_cast<size_t>(!(sizeof(a) % sizeof(*(a))))) |
|
408 |
|
409 +#if defined(COMPILER_SUNPRO) && __SUNPRO_CC < 0x5100 |
|
410 +#define arraysize(array) (ARRAYSIZE_UNSAFE(array)) |
|
411 +#endif |
|
412 |
|
413 // Use implicit_cast as a safe version of static_cast or const_cast |
|
414 // for upcasting in the type hierarchy (i.e. casting a pointer to Foo |
|
415 --- comm-esr31/mozilla/ipc/chromium/src/base/debug_util_posix.cc.orig 2015-06-04 17:42:51.806726871 -0700 |
|
416 +++ comm-esr31/mozilla/ipc/chromium/src/base/debug_util_posix.cc 2015-06-04 17:42:52.024415350 -0700 |
|
417 @@ -110,7 +110,7 @@ |
|
418 return being_debugged; |
|
419 } |
|
420 |
|
421 -#elif defined(OS_LINUX) |
|
422 +#elif defined(OS_LINUX) || defined(OS_SOLARIS) |
|
423 |
|
424 // We can look in /proc/self/status for TracerPid. We are likely used in crash |
|
425 // handling, so we are careful not to use the heap or have side effects. |
|
426 @@ -145,13 +145,17 @@ |
|
427 return pid_index < status.size() && status[pid_index] != '0'; |
|
428 } |
|
429 |
|
430 -#endif // OS_LINUX |
|
431 +#endif // OS_LINUX || OS_SOLARIS |
|
432 |
|
433 // static |
|
434 void DebugUtil::BreakDebugger() { |
|
435 #if defined(ARCH_CPU_X86_FAMILY) |
|
436 +#if defined(COMPILER_SUNPRO) |
|
437 + asm ("int $3"); |
|
438 +#else |
|
439 asm ("int3"); |
|
440 #endif |
|
441 +#endif |
|
442 } |
|
443 |
|
444 StackTrace::StackTrace() { |
|
445 --- comm-esr31/mozilla/ipc/chromium/src/base/eintr_wrapper.h.orig 2015-06-04 17:42:51.812077951 -0700 |
|
446 +++ comm-esr31/mozilla/ipc/chromium/src/base/eintr_wrapper.h 2015-06-04 17:42:52.024531694 -0700 |
|
447 @@ -16,6 +16,7 @@ |
|
448 |
|
449 #include <errno.h> |
|
450 |
|
451 +#ifndef COMPILER_SUNPRO |
|
452 #define HANDLE_EINTR(x) ({ \ |
|
453 typeof(x) __eintr_result__; \ |
|
454 do { \ |
|
455 @@ -23,6 +24,15 @@ |
|
456 } while (__eintr_result__ == -1 && errno == EINTR); \ |
|
457 __eintr_result__;\ |
|
458 }) |
|
459 +#else |
|
460 +#define HANDLE_EINTR(x) ({ \ |
|
461 + ssize_t __eintr_result__; \ |
|
462 + do { \ |
|
463 + __eintr_result__ = x; \ |
|
464 + } while (__eintr_result__ == -1 && errno == EINTR); \ |
|
465 + __eintr_result__;\ |
|
466 +}) |
|
467 +#endif |
|
468 |
|
469 #else |
|
470 |
|
471 --- comm-esr31/mozilla/ipc/chromium/src/base/file_util.cc.orig 2015-06-04 17:42:51.817383612 -0700 |
|
472 +++ comm-esr31/mozilla/ipc/chromium/src/base/file_util.cc 2015-06-04 17:42:52.024645830 -0700 |
|
473 @@ -245,4 +245,25 @@ |
|
474 int WriteFile(const std::wstring& filename, const char* data, int size) { |
|
475 return WriteFile(FilePath::FromWStringHack(filename), data, size); |
|
476 } |
|
477 + |
|
478 +#ifdef OS_SOLARIS |
|
479 + |
|
480 +bool IsDot(const FilePath& path) { |
|
481 + return FILE_PATH_LITERAL(".") == path.BaseName().value(); |
|
482 +} |
|
483 + |
|
484 +bool IsDotDot(const FilePath& path) { |
|
485 + return FILE_PATH_LITERAL("..") == path.BaseName().value(); |
|
486 +} |
|
487 + |
|
488 +/////////////////////////////////////////////// |
|
489 +// FileEnumerator |
|
490 +// |
|
491 +// Note: the main logic is in file_util_<platform>.cc |
|
492 + |
|
493 +bool FileEnumerator::ShouldSkip(const FilePath& path) { |
|
494 + FilePath::StringType basename = path.BaseName().value(); |
|
495 + return IsDot(path) || (IsDotDot(path) && !(INCLUDE_DOT_DOT & file_type_)); |
|
496 +} |
|
497 +#endif |
|
498 } // namespace |
|
499 --- comm-esr31/mozilla/ipc/chromium/src/base/file_util.h.orig 2015-06-04 17:42:51.822731946 -0700 |
|
500 +++ comm-esr31/mozilla/ipc/chromium/src/base/file_util.h 2015-06-04 17:42:52.024795816 -0700 |
|
501 @@ -12,7 +12,7 @@ |
|
502 |
|
503 #if defined(OS_WIN) |
|
504 #include <windows.h> |
|
505 -#elif defined(ANDROID) |
|
506 +#elif defined(ANDROID) || defined(OS_SOLARIS) |
|
507 #include <sys/stat.h> |
|
508 #elif defined(OS_POSIX) |
|
509 #include <sys/types.h> |
|
510 @@ -241,6 +241,103 @@ |
|
511 // Deprecated temporary compatibility function. |
|
512 bool SetCurrentDirectory(const std::wstring& current_directory); |
|
513 |
|
514 +#ifdef OS_SOLARIS |
|
515 +// A class for enumerating the files in a provided path. The order of the |
|
516 +// results is not guaranteed. |
|
517 +// |
|
518 +// DO NOT USE FROM THE MAIN THREAD of your application unless it is a test |
|
519 +// program where latency does not matter. This class is blocking. |
|
520 +class FileEnumerator { |
|
521 + public: |
|
522 + typedef struct { |
|
523 + struct stat stat; |
|
524 + std::string filename; |
|
525 + } FindInfo; |
|
526 + |
|
527 + enum FILE_TYPE { |
|
528 + FILES = 1 << 0, |
|
529 + DIRECTORIES = 1 << 1, |
|
530 + INCLUDE_DOT_DOT = 1 << 2, |
|
531 + SHOW_SYM_LINKS = 1 << 4, |
|
532 + }; |
|
533 + |
|
534 + // |root_path| is the starting directory to search for. It may or may not end |
|
535 + // in a slash. |
|
536 + // |
|
537 + // If |recursive| is true, this will enumerate all matches in any |
|
538 + // subdirectories matched as well. It does a breadth-first search, so all |
|
539 + // files in one directory will be returned before any files in a |
|
540 + // subdirectory. |
|
541 + // |
|
542 + // |file_type| specifies whether the enumerator should match files, |
|
543 + // directories, or both. |
|
544 + // |
|
545 + // |pattern| is an optional pattern for which files to match. This |
|
546 + // works like shell globbing. For example, "*.txt" or "Foo???.doc". |
|
547 + // However, be careful in specifying patterns that aren't cross platform |
|
548 + // since the underlying code uses OS-specific matching routines. In general, |
|
549 + // Windows matching is less featureful than others, so test there first. |
|
550 + // If unspecified, this will match all files. |
|
551 + // NOTE: the pattern only matches the contents of root_path, not files in |
|
552 + // recursive subdirectories. |
|
553 + // TODO(erikkay): Fix the pattern matching to work at all levels. |
|
554 + FileEnumerator(const FilePath& root_path, |
|
555 + bool recursive, |
|
556 + FileEnumerator::FILE_TYPE file_type); |
|
557 + FileEnumerator(const FilePath& root_path, |
|
558 + bool recursive, |
|
559 + FileEnumerator::FILE_TYPE file_type, |
|
560 + const FilePath::StringType& pattern); |
|
561 + ~FileEnumerator(); |
|
562 + |
|
563 + // Returns an empty string if there are no more results. |
|
564 + FilePath Next(); |
|
565 + |
|
566 + // Write the file info into |info|. |
|
567 + void GetFindInfo(FindInfo* info); |
|
568 + |
|
569 + // Looks inside a FindInfo and determines if it's a directory. |
|
570 + static bool IsDirectory(const FindInfo& info); |
|
571 + |
|
572 + static FilePath GetFilename(const FindInfo& find_info); |
|
573 + |
|
574 + private: |
|
575 + // Returns true if the given path should be skipped in enumeration. |
|
576 + bool ShouldSkip(const FilePath& path); |
|
577 + |
|
578 + |
|
579 + typedef struct { |
|
580 + FilePath filename; |
|
581 + struct stat stat; |
|
582 + } DirectoryEntryInfo; |
|
583 + |
|
584 + // Read the filenames in source into the vector of DirectoryEntryInfo's |
|
585 + static bool ReadDirectory(std::vector<DirectoryEntryInfo>* entries, |
|
586 + const FilePath& source, bool show_links); |
|
587 + |
|
588 + // The files in the current directory |
|
589 + std::vector<DirectoryEntryInfo> directory_entries_; |
|
590 + |
|
591 + // The next entry to use from the directory_entries_ vector |
|
592 + size_t current_directory_entry_; |
|
593 + |
|
594 + FilePath root_path_; |
|
595 + bool recursive_; |
|
596 + FILE_TYPE file_type_; |
|
597 + FilePath::StringType pattern_; // Empty when we want to find everything. |
|
598 + |
|
599 + // Set to true when there is a find operation open. This way, we can lazily |
|
600 + // start the operations when the caller calls Next(). |
|
601 + bool is_in_find_op_; |
|
602 + |
|
603 + // A stack that keeps track of which subdirectories we still need to |
|
604 + // enumerate in the breadth-first search. |
|
605 + std::stack<FilePath> pending_paths_; |
|
606 + |
|
607 + DISALLOW_COPY_AND_ASSIGN(FileEnumerator); |
|
608 +}; |
|
609 +#endif |
|
610 + |
|
611 } // namespace file_util |
|
612 |
|
613 #endif // BASE_FILE_UTIL_H_ |
|
614 --- comm-esr31/mozilla/ipc/chromium/src/base/file_util_posix.cc.orig 2015-06-04 17:42:51.828082851 -0700 |
|
615 +++ comm-esr31/mozilla/ipc/chromium/src/base/file_util_posix.cc 2015-06-04 17:42:52.025067753 -0700 |
|
616 @@ -8,7 +8,7 @@ |
|
617 #include <errno.h> |
|
618 #include <fcntl.h> |
|
619 #include <fnmatch.h> |
|
620 -#ifndef ANDROID |
|
621 +#if !defined(ANDROID) && !defined(OS_SOLARIS) |
|
622 #include <fts.h> |
|
623 #endif |
|
624 #include <libgen.h> |
|
625 @@ -67,9 +67,34 @@ |
|
626 if (!recursive) |
|
627 return (rmdir(path_str) == 0); |
|
628 |
|
629 -#ifdef ANDROID |
|
630 +#if defined(ANDROID) |
|
631 // XXX Need ftsless impl for bionic |
|
632 return false; |
|
633 +#elif defined(OS_SOLARIS) |
|
634 + bool success = true; |
|
635 + std::stack<std::string> directories; |
|
636 + directories.push(path.value()); |
|
637 + FileEnumerator traversal(path, true, static_cast<FileEnumerator::FILE_TYPE>( |
|
638 + FileEnumerator::FILES | FileEnumerator::DIRECTORIES | |
|
639 + FileEnumerator::SHOW_SYM_LINKS)); |
|
640 + for (FilePath current = traversal.Next(); success && !current.empty(); |
|
641 + current = traversal.Next()) { |
|
642 + FileEnumerator::FindInfo info; |
|
643 + traversal.GetFindInfo(&info); |
|
644 + |
|
645 + if (S_ISDIR(info.stat.st_mode)) |
|
646 + directories.push(current.value()); |
|
647 + else |
|
648 + success = (unlink(current.value().c_str()) == 0); |
|
649 + } |
|
650 + |
|
651 + while (success && !directories.empty()) { |
|
652 + FilePath dir = FilePath(directories.top()); |
|
653 + directories.pop(); |
|
654 + success = (rmdir(dir.value().c_str()) == 0); |
|
655 + } |
|
656 + |
|
657 + return success; |
|
658 #else |
|
659 bool success = true; |
|
660 int ftsflags = FTS_PHYSICAL | FTS_NOSTAT; |
|
661 @@ -140,14 +165,98 @@ |
|
662 return false; |
|
663 } |
|
664 |
|
665 -#ifdef ANDROID |
|
666 +#if defined(ANDROID) |
|
667 // XXX Need ftsless impl for bionic |
|
668 return false; |
|
669 +#elif defined(OS_SOLARIS) |
|
670 + // This function does not properly handle destinations within the source |
|
671 + FilePath real_to_path = to_path; |
|
672 + if (PathExists(real_to_path)) { |
|
673 + if (!AbsolutePath(&real_to_path)) |
|
674 + return false; |
|
675 + } else { |
|
676 + real_to_path = real_to_path.DirName(); |
|
677 + if (!AbsolutePath(&real_to_path)) |
|
678 + return false; |
|
679 + } |
|
680 + FilePath real_from_path = from_path; |
|
681 + if (!AbsolutePath(&real_from_path)) |
|
682 + return false; |
|
683 + if (real_to_path.value().size() >= real_from_path.value().size() && |
|
684 + real_to_path.value().compare(0, real_from_path.value().size(), |
|
685 + real_from_path.value()) == 0) |
|
686 + return false; |
|
687 + |
|
688 + bool success = true; |
|
689 + FileEnumerator::FILE_TYPE traverse_type = |
|
690 + static_cast<FileEnumerator::FILE_TYPE>(FileEnumerator::FILES | |
|
691 + FileEnumerator::SHOW_SYM_LINKS); |
|
692 + if (recursive) |
|
693 + traverse_type = static_cast<FileEnumerator::FILE_TYPE>( |
|
694 + traverse_type | FileEnumerator::DIRECTORIES); |
|
695 + FileEnumerator traversal(from_path, recursive, traverse_type); |
|
696 + |
|
697 + // We have to mimic windows behavior here. |to_path| may not exist yet, |
|
698 + // start the loop with |to_path|. |
|
699 + FileEnumerator::FindInfo info; |
|
700 + FilePath current = from_path; |
|
701 + if (stat(from_path.value().c_str(), &info.stat) < 0) { |
|
702 + CHROMIUM_LOG(ERROR) << "CopyDirectory() couldn't stat source directory: " << |
|
703 + from_path.value() << " errno = " << errno; |
|
704 + success = false; |
|
705 + } |
|
706 + struct stat to_path_stat; |
|
707 + FilePath from_path_base = from_path; |
|
708 + if (recursive && stat(to_path.value().c_str(), &to_path_stat) == 0 && |
|
709 + S_ISDIR(to_path_stat.st_mode)) { |
|
710 + // If the destination already exists and is a directory, then the |
|
711 + // top level of source needs to be copied. |
|
712 + from_path_base = from_path.DirName(); |
|
713 + } |
|
714 + |
|
715 + // The Windows version of this function assumes that non-recursive calls |
|
716 + // will always have a directory for from_path. |
|
717 + DCHECK(recursive || S_ISDIR(info.stat.st_mode)); |
|
718 + |
|
719 + while (success && !current.empty()) { |
|
720 + // current is the source path, including from_path, so paste |
|
721 + // the suffix after from_path onto to_path to create the target_path. |
|
722 + std::string suffix(¤t.value().c_str()[from_path_base.value().size()]); |
|
723 + // Strip the leading '/' (if any). |
|
724 + if (!suffix.empty()) { |
|
725 + DCHECK_EQ('/', suffix[0]); |
|
726 + suffix.erase(0, 1); |
|
727 + } |
|
728 + const FilePath target_path = to_path.Append(suffix); |
|
729 + |
|
730 + if (S_ISDIR(info.stat.st_mode)) { |
|
731 + if (mkdir(target_path.value().c_str(), info.stat.st_mode & 01777) != 0 && |
|
732 + errno != EEXIST) { |
|
733 + CHROMIUM_LOG(ERROR) << "CopyDirectory() couldn't create directory: " << |
|
734 + target_path.value() << " errno = " << errno; |
|
735 + success = false; |
|
736 + } |
|
737 + } else if (S_ISREG(info.stat.st_mode)) { |
|
738 + if (!CopyFile(current, target_path)) { |
|
739 + CHROMIUM_LOG(ERROR) << "CopyDirectory() couldn't create file: " << |
|
740 + target_path.value(); |
|
741 + success = false; |
|
742 + } |
|
743 + } else { |
|
744 + CHROMIUM_LOG(WARNING) << "CopyDirectory() skipping non-regular file: " << |
|
745 + current.value(); |
|
746 + } |
|
747 + |
|
748 + current = traversal.Next(); |
|
749 + traversal.GetFindInfo(&info); |
|
750 + } |
|
751 + |
|
752 + return success; |
|
753 #else |
|
754 char* dir_list[] = { top_dir, NULL }; |
|
755 FTS* fts = fts_open(dir_list, FTS_PHYSICAL | FTS_NOSTAT, NULL); |
|
756 if (!fts) { |
|
757 - CHROMIUM_LOG(ERROR) << "fts_open failed: " << strerror(errno); |
|
758 + CHROMIUM_CHROMIUM_LOG(ERROR) << "fts_open failed: " << strerror(errno); |
|
759 return false; |
|
760 } |
|
761 |
|
762 @@ -203,11 +312,11 @@ |
|
763 break; |
|
764 case FTS_SL: // Symlink. |
|
765 case FTS_SLNONE: // Symlink with broken target. |
|
766 - CHROMIUM_LOG(WARNING) << "CopyDirectory() skipping symbolic link: " << |
|
767 + CHROMIUM_CHROMIUM_LOG(WARNING) << "CopyDirectory() skipping symbolic link: " << |
|
768 ent->fts_path; |
|
769 continue; |
|
770 case FTS_DEFAULT: // Some other sort of file. |
|
771 - CHROMIUM_LOG(WARNING) << "CopyDirectory() skipping file of unknown type: " << |
|
772 + CHROMIUM_CHROMIUM_LOG(WARNING) << "CopyDirectory() skipping file of unknown type: " << |
|
773 ent->fts_path; |
|
774 continue; |
|
775 default: |
|
776 @@ -227,7 +336,7 @@ |
|
777 } |
|
778 |
|
779 if (error) { |
|
780 - CHROMIUM_LOG(ERROR) << "CopyDirectory(): " << strerror(error); |
|
781 + CHROMIUM_CHROMIUM_LOG(ERROR) << "CopyDirectory(): " << strerror(error); |
|
782 return false; |
|
783 } |
|
784 return true; |
|
785 @@ -446,7 +555,7 @@ |
|
786 } |
|
787 |
|
788 bool GetShmemTempDir(FilePath* path) { |
|
789 -#if defined(OS_LINUX) && !defined(ANDROID) |
|
790 +#if defined(OS_LINUX) && !defined(ANDROID) && !defined(OS_SOLARIS) |
|
791 *path = FilePath("/dev/shm"); |
|
792 return true; |
|
793 #else |
|
794 @@ -501,4 +610,144 @@ |
|
795 } |
|
796 #endif // !defined(OS_MACOSX) |
|
797 |
|
798 +#ifdef OS_SOLARIS |
|
799 +/////////////////////////////////////////////// |
|
800 +// FileEnumerator |
|
801 + |
|
802 +FileEnumerator::FileEnumerator(const FilePath& root_path, |
|
803 + bool recursive, |
|
804 + FileEnumerator::FILE_TYPE file_type) |
|
805 + : current_directory_entry_(0), |
|
806 + root_path_(root_path), |
|
807 + recursive_(recursive), |
|
808 + file_type_(file_type), |
|
809 + is_in_find_op_(false) { |
|
810 + // INCLUDE_DOT_DOT must not be specified if recursive. |
|
811 + DCHECK(!(recursive && (INCLUDE_DOT_DOT & file_type_))); |
|
812 + pending_paths_.push(root_path); |
|
813 +} |
|
814 + |
|
815 +FileEnumerator::FileEnumerator(const FilePath& root_path, |
|
816 + bool recursive, |
|
817 + FileEnumerator::FILE_TYPE file_type, |
|
818 + const FilePath::StringType& pattern) |
|
819 + : current_directory_entry_(0), |
|
820 + root_path_(root_path), |
|
821 + recursive_(recursive), |
|
822 + file_type_(file_type), |
|
823 + pattern_(root_path.Append(pattern).value()), |
|
824 + is_in_find_op_(false) { |
|
825 + // INCLUDE_DOT_DOT must not be specified if recursive. |
|
826 + DCHECK(!(recursive && (INCLUDE_DOT_DOT & file_type_))); |
|
827 + // The Windows version of this code appends the pattern to the root_path, |
|
828 + // potentially only matching against items in the top-most directory. |
|
829 + // Do the same here. |
|
830 + if (pattern.size() == 0) |
|
831 + pattern_ = FilePath::StringType(); |
|
832 + pending_paths_.push(root_path); |
|
833 +} |
|
834 + |
|
835 +FileEnumerator::~FileEnumerator() { |
|
836 +} |
|
837 + |
|
838 +void FileEnumerator::GetFindInfo(FindInfo* info) { |
|
839 + DCHECK(info); |
|
840 + |
|
841 + if (current_directory_entry_ >= directory_entries_.size()) |
|
842 + return; |
|
843 + |
|
844 + DirectoryEntryInfo* cur_entry = &directory_entries_[current_directory_entry_]; |
|
845 + memcpy(&(info->stat), &(cur_entry->stat), sizeof(info->stat)); |
|
846 + info->filename.assign(cur_entry->filename.value()); |
|
847 +} |
|
848 + |
|
849 +bool FileEnumerator::IsDirectory(const FindInfo& info) { |
|
850 + return S_ISDIR(info.stat.st_mode); |
|
851 +} |
|
852 + |
|
853 +// static |
|
854 +FilePath FileEnumerator::GetFilename(const FindInfo& find_info) { |
|
855 + return FilePath(find_info.filename); |
|
856 +} |
|
857 + |
|
858 +FilePath FileEnumerator::Next() { |
|
859 + ++current_directory_entry_; |
|
860 + |
|
861 + // While we've exhausted the entries in the current directory, do the next |
|
862 + while (current_directory_entry_ >= directory_entries_.size()) { |
|
863 + if (pending_paths_.empty()) |
|
864 + return FilePath(); |
|
865 + |
|
866 + root_path_ = pending_paths_.top(); |
|
867 + root_path_ = root_path_.StripTrailingSeparators(); |
|
868 + pending_paths_.pop(); |
|
869 + |
|
870 + std::vector<DirectoryEntryInfo> entries; |
|
871 + if (!ReadDirectory(&entries, root_path_, file_type_ & SHOW_SYM_LINKS)) |
|
872 + continue; |
|
873 + |
|
874 + directory_entries_.clear(); |
|
875 + current_directory_entry_ = 0; |
|
876 + for (std::vector<DirectoryEntryInfo>::const_iterator |
|
877 + i = entries.begin(); i != entries.end(); ++i) { |
|
878 + FilePath full_path = root_path_.Append(i->filename); |
|
879 + if (ShouldSkip(full_path)) |
|
880 + continue; |
|
881 + |
|
882 + if (pattern_.size() && |
|
883 + fnmatch(pattern_.c_str(), full_path.value().c_str(), FNM_NOESCAPE)) |
|
884 + continue; |
|
885 + |
|
886 + if (recursive_ && S_ISDIR(i->stat.st_mode)) |
|
887 + pending_paths_.push(full_path); |
|
888 + |
|
889 + if ((S_ISDIR(i->stat.st_mode) && (file_type_ & DIRECTORIES)) || |
|
890 + (!S_ISDIR(i->stat.st_mode) && (file_type_ & FILES))) |
|
891 + directory_entries_.push_back(*i); |
|
892 + } |
|
893 + } |
|
894 + |
|
895 + return root_path_.Append(directory_entries_[current_directory_entry_ |
|
896 + ].filename); |
|
897 +} |
|
898 + |
|
899 +bool FileEnumerator::ReadDirectory(std::vector<DirectoryEntryInfo>* entries, |
|
900 + const FilePath& source, bool show_links) { |
|
901 + |
|
902 + DIR* dir = opendir(source.value().c_str()); |
|
903 + if (!dir) |
|
904 + return false; |
|
905 + struct { |
|
906 + dirent dent_buffer; |
|
907 + char chars[MAXNAMLEN]; |
|
908 + } dent_buf; |
|
909 + struct dirent* dent; |
|
910 + |
|
911 + while (readdir_r(dir, (dirent *)&dent_buf, &dent) == 0 && dent) { |
|
912 + DirectoryEntryInfo info; |
|
913 + info.filename = FilePath(dent->d_name); |
|
914 + |
|
915 + FilePath full_name = source.Append(dent->d_name); |
|
916 + int ret; |
|
917 + if (show_links) |
|
918 + ret = lstat(full_name.value().c_str(), &info.stat); |
|
919 + else |
|
920 + ret = stat(full_name.value().c_str(), &info.stat); |
|
921 + if (ret < 0) { |
|
922 + // Print the stat() error message unless it was ENOENT and we're |
|
923 + // following symlinks. |
|
924 + if (!(errno == ENOENT && !show_links)) { |
|
925 + CHROMIUM_LOG(ERROR) << "Couldn't stat " |
|
926 + << source.Append(dent->d_name).value(); |
|
927 + } |
|
928 + memset(&info.stat, 0, sizeof(info.stat)); |
|
929 + } |
|
930 + entries->push_back(info); |
|
931 + } |
|
932 + |
|
933 + closedir(dir); |
|
934 + return true; |
|
935 +} |
|
936 +#endif |
|
937 + |
|
938 } // namespace file_util |
|
939 --- comm-esr31/mozilla/ipc/chromium/src/base/hash_tables.h.orig 2015-06-04 17:42:51.833802483 -0700 |
|
940 +++ comm-esr31/mozilla/ipc/chromium/src/base/hash_tables.h 2015-06-04 17:42:52.025172080 -0700 |
|
941 @@ -31,6 +31,15 @@ |
|
942 using stdext::hash_set; |
|
943 #endif |
|
944 } |
|
945 +#elif defined(COMPILER_SUNPRO) |
|
946 +#include <map> |
|
947 +#include <set> |
|
948 +namespace base { |
|
949 +using std::map; |
|
950 +using std::set; |
|
951 +} |
|
952 +#define hash_map map |
|
953 +#define hash_set set |
|
954 #elif defined(COMPILER_GCC) |
|
955 // This is a hack to disable the gcc 4.4 warning about hash_map and hash_set |
|
956 // being deprecated. We can get rid of this when we upgrade to VS2008 and we |
|
957 --- comm-esr31/mozilla/ipc/chromium/src/base/idle_timer.cc.orig 2015-06-04 17:42:51.839092878 -0700 |
|
958 +++ comm-esr31/mozilla/ipc/chromium/src/base/idle_timer.cc 2015-06-04 17:42:52.025292118 -0700 |
|
959 @@ -7,13 +7,13 @@ |
|
960 // We may not want to port idle_timer to Linux, but we have implemented it |
|
961 // anyway. Define this to 1 to enable the Linux idle timer and then add the |
|
962 // libs that need to be linked (Xss). |
|
963 -#define ENABLE_XSS_SUPPORT 0 |
|
964 +#define ENABLE_XSS_SUPPORT 1 |
|
965 |
|
966 #if defined(OS_MACOSX) |
|
967 #include <ApplicationServices/ApplicationServices.h> |
|
968 #endif |
|
969 |
|
970 -#if defined(OS_LINUX) && ENABLE_XSS_SUPPORT |
|
971 +#if (defined(OS_LINUX) || defined(OS_SOLARIS)) && ENABLE_XSS_SUPPORT |
|
972 // We may not want to port idle_timer to Linux, but we have implemented it |
|
973 // anyway. Remove the 0 above if we want it. |
|
974 #include <gdk/gdkx.h> |
|
975 @@ -54,7 +54,7 @@ |
|
976 kCGAnyInputEventType) * 1000.0; |
|
977 return true; |
|
978 } |
|
979 -#elif defined(OS_LINUX) && ENABLE_XSS_SUPPORT |
|
980 +#elif (defined(OS_LINUX) || defined(OS_SOLARIS)) && ENABLE_XSS_SUPPORT |
|
981 class IdleState { |
|
982 public: |
|
983 IdleState() { |
|
984 --- comm-esr31/mozilla/ipc/chromium/src/base/message_loop.cc.orig 2015-06-04 17:42:51.844404204 -0700 |
|
985 +++ comm-esr31/mozilla/ipc/chromium/src/base/message_loop.cc 2015-06-04 17:42:52.025433046 -0700 |
|
986 @@ -20,7 +20,7 @@ |
|
987 #if defined(OS_POSIX) |
|
988 #include "base/message_pump_libevent.h" |
|
989 #endif |
|
990 -#if defined(OS_LINUX) || defined(OS_BSD) |
|
991 +#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) |
|
992 #if defined(MOZ_WIDGET_GTK) |
|
993 #include "base/message_pump_glib.h" |
|
994 #endif |
|
995 @@ -140,9 +140,9 @@ |
|
996 if (type_ == TYPE_UI) { |
|
997 #if defined(OS_MACOSX) |
|
998 pump_ = base::MessagePumpMac::Create(); |
|
999 -#elif defined(OS_LINUX) || defined(OS_BSD) |
|
1000 +#elif defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) |
|
1001 pump_ = new base::MessagePumpForUI(); |
|
1002 -#endif // OS_LINUX |
|
1003 +#endif // OS_LINUX || OS_SOLARIS |
|
1004 } else if (type_ == TYPE_IO) { |
|
1005 pump_ = new base::MessagePumpLibevent(); |
|
1006 } else { |
|
1007 --- comm-esr31/mozilla/ipc/chromium/src/base/message_pump_glib.cc.orig 2015-06-04 17:42:51.849699822 -0700 |
|
1008 +++ comm-esr31/mozilla/ipc/chromium/src/base/message_pump_glib.cc 2015-06-04 17:42:52.025576630 -0700 |
|
1009 @@ -131,6 +131,12 @@ |
|
1010 // Create our wakeup pipe, which is used to flag when work was scheduled. |
|
1011 int fds[2]; |
|
1012 CHECK(pipe(fds) == 0); |
|
1013 + |
|
1014 + int flags = fcntl(fds[0], F_GETFL, 0); |
|
1015 + if (flags == -1) |
|
1016 + flags = 0; |
|
1017 + fcntl(fds[0], F_SETFL, flags | O_NDELAY); |
|
1018 + |
|
1019 wakeup_pipe_read_ = fds[0]; |
|
1020 wakeup_pipe_write_ = fds[1]; |
|
1021 wakeup_gpollfd_->fd = wakeup_pipe_read_; |
|
1022 @@ -237,10 +243,9 @@ |
|
1023 // are only signaled when the queue went from empty to non-empty. The glib |
|
1024 // poll will tell us whether there was data, so this read shouldn't block. |
|
1025 if (wakeup_gpollfd_->revents & G_IO_IN) { |
|
1026 - char msg; |
|
1027 - if (HANDLE_EINTR(read(wakeup_pipe_read_, &msg, 1)) != 1 || msg != '!') { |
|
1028 - NOTREACHED() << "Error reading from the wakeup pipe."; |
|
1029 - } |
|
1030 + char buf[32]; |
|
1031 + while (HANDLE_EINTR(read(wakeup_pipe_read_, &buf, 32))); |
|
1032 + |
|
1033 // Since we ate the message, we need to record that we have more work, |
|
1034 // because HandleCheck() may be called without HandleDispatch being called |
|
1035 // afterwards. |
|
1036 @@ -304,6 +309,9 @@ |
|
1037 // variables as we would then need locks all over. This ensures that if |
|
1038 // we are sleeping in a poll that we will wake up. |
|
1039 char msg = '!'; |
|
1040 + char buf[32]; |
|
1041 + while (HANDLE_EINTR(read(wakeup_pipe_read_, &buf, 32))); |
|
1042 + |
|
1043 if (HANDLE_EINTR(write(wakeup_pipe_write_, &msg, 1)) != 1) { |
|
1044 NOTREACHED() << "Could not write to the UI message loop wakeup pipe!"; |
|
1045 } |
|
1046 --- comm-esr31/mozilla/ipc/chromium/src/base/message_pump_libevent.cc.orig 2015-06-04 17:42:51.855133081 -0700 |
|
1047 +++ comm-esr31/mozilla/ipc/chromium/src/base/message_pump_libevent.cc 2015-06-04 17:42:52.025700484 -0700 |
|
1048 @@ -6,6 +6,10 @@ |
|
1049 |
|
1050 #include <errno.h> |
|
1051 #include <fcntl.h> |
|
1052 +#if defined(OS_SOLARIS) |
|
1053 +#include <unistd.h> |
|
1054 +#include <sys/stat.h> |
|
1055 +#endif |
|
1056 #if defined(ANDROID) || defined(OS_POSIX) |
|
1057 #include <unistd.h> |
|
1058 #endif |
|
1059 --- comm-esr31/mozilla/ipc/chromium/src/base/observer_list.h.orig 2015-06-04 17:42:51.860470602 -0700 |
|
1060 +++ comm-esr31/mozilla/ipc/chromium/src/base/observer_list.h 2015-06-04 17:42:52.025805253 -0700 |
|
1061 @@ -88,7 +88,7 @@ |
|
1062 |
|
1063 // Add an observer to the list. |
|
1064 void AddObserver(ObserverType* obs) { |
|
1065 - DCHECK(find(observers_.begin(), observers_.end(), obs) == observers_.end()) |
|
1066 + DCHECK(std::find(observers_.begin(), observers_.end(), obs) == observers_.end()) |
|
1067 << "Observers can only be added once!"; |
|
1068 observers_.push_back(obs); |
|
1069 } |
|
1070 --- comm-esr31/mozilla/ipc/chromium/src/base/path_service.cc.orig 2015-06-04 17:42:51.865762507 -0700 |
|
1071 +++ comm-esr31/mozilla/ipc/chromium/src/base/path_service.cc 2015-06-04 17:42:52.025978038 -0700 |
|
1072 @@ -24,7 +24,7 @@ |
|
1073 bool PathProviderWin(int key, FilePath* result); |
|
1074 #elif defined(OS_MACOSX) |
|
1075 bool PathProviderMac(int key, FilePath* result); |
|
1076 -#elif defined(OS_LINUX) |
|
1077 +#elif defined(OS_LINUX) || defined(OS_SOLARIS) |
|
1078 bool PathProviderLinux(int key, FilePath* result); |
|
1079 #endif |
|
1080 } |
|
1081 @@ -80,7 +80,7 @@ |
|
1082 }; |
|
1083 #endif |
|
1084 |
|
1085 -#if defined(OS_LINUX) |
|
1086 +#if defined(OS_LINUX) || defined(OS_SOLARIS) |
|
1087 static Provider base_provider_linux = { |
|
1088 base::PathProviderLinux, |
|
1089 &base_provider, |
|
1090 @@ -92,6 +92,17 @@ |
|
1091 }; |
|
1092 #endif |
|
1093 |
|
1094 +#if 0//defined(OS_SOLARIS) |
|
1095 +static Provider base_provider_posix = { |
|
1096 + base::PathProviderPosix, |
|
1097 + &base_provider, |
|
1098 +#ifndef NDEBUG |
|
1099 + 0, |
|
1100 + 0, |
|
1101 +#endif |
|
1102 + true |
|
1103 +}; |
|
1104 +#endif |
|
1105 |
|
1106 struct PathData { |
|
1107 Lock lock; |
|
1108 @@ -104,7 +115,7 @@ |
|
1109 providers = &base_provider_win; |
|
1110 #elif defined(OS_MACOSX) |
|
1111 providers = &base_provider_mac; |
|
1112 -#elif defined(OS_LINUX) |
|
1113 +#elif defined(OS_LINUX) || defined(OS_SOLARIS) |
|
1114 providers = &base_provider_linux; |
|
1115 #endif |
|
1116 } |
|
1117 @@ -206,6 +217,24 @@ |
|
1118 return path_data->overrides.find(key) != path_data->overrides.end(); |
|
1119 } |
|
1120 |
|
1121 +#ifdef OS_SOLARIS |
|
1122 +bool PathService::Override(int key, const FilePath& path) { |
|
1123 + PathData* path_data = GetPathData(); |
|
1124 + DCHECK(path_data); |
|
1125 + DCHECK(key > base::DIR_CURRENT) << "invalid path key"; |
|
1126 + |
|
1127 + FilePath file_path = path; |
|
1128 + |
|
1129 + // make sure the directory exists: |
|
1130 + if (!file_util::CreateDirectory(file_path)) |
|
1131 + return false; |
|
1132 + |
|
1133 + AutoLock scoped_lock(path_data->lock); |
|
1134 + path_data->cache[key] = file_path; |
|
1135 + path_data->overrides.insert(key); |
|
1136 + return true; |
|
1137 +} |
|
1138 +#else |
|
1139 bool PathService::Override(int key, const std::wstring& path) { |
|
1140 PathData* path_data = GetPathData(); |
|
1141 DCHECK(path_data); |
|
1142 @@ -231,8 +260,13 @@ |
|
1143 path_data->overrides.insert(key); |
|
1144 return true; |
|
1145 } |
|
1146 +#endif |
|
1147 |
|
1148 +#ifdef OS_SOLARIS |
|
1149 +bool PathService::SetCurrentDirectory(const FilePath& current_directory) { |
|
1150 +#else |
|
1151 bool PathService::SetCurrentDirectory(const std::wstring& current_directory) { |
|
1152 +#endif |
|
1153 return file_util::SetCurrentDirectory(current_directory); |
|
1154 } |
|
1155 |
|
1156 --- comm-esr31/mozilla/ipc/chromium/src/base/path_service.h.orig 2015-06-04 17:42:51.871131068 -0700 |
|
1157 +++ comm-esr31/mozilla/ipc/chromium/src/base/path_service.h 2015-06-04 17:42:52.026081564 -0700 |
|
1158 @@ -48,13 +48,21 @@ |
|
1159 // |
|
1160 // WARNING: Consumers of PathService::Get may expect paths to be constant |
|
1161 // over the lifetime of the app, so this method should be used with caution. |
|
1162 +#ifdef OS_SOLARIS |
|
1163 + static bool Override(int key, const FilePath& path); |
|
1164 +#else |
|
1165 static bool Override(int key, const std::wstring& path); |
|
1166 +#endif |
|
1167 |
|
1168 // Return whether a path was overridden. |
|
1169 static bool IsOverridden(int key); |
|
1170 |
|
1171 // Sets the current directory. |
|
1172 +#ifdef OS_SOLARIS |
|
1173 + static bool SetCurrentDirectory(const FilePath& current_directory); |
|
1174 +#else |
|
1175 static bool SetCurrentDirectory(const std::wstring& current_directory); |
|
1176 +#endif |
|
1177 |
|
1178 // To extend the set of supported keys, you can register a path provider, |
|
1179 // which is just a function mirroring PathService::Get. The ProviderFunc |
|
1180 --- comm-esr31/mozilla/ipc/chromium/src/base/platform_thread.h.orig 2015-06-04 17:42:51.876432809 -0700 |
|
1181 +++ comm-esr31/mozilla/ipc/chromium/src/base/platform_thread.h 2015-06-04 17:42:52.026181532 -0700 |
|
1182 @@ -22,7 +22,7 @@ |
|
1183 #elif defined(OS_POSIX) |
|
1184 #include <pthread.h> |
|
1185 typedef pthread_t PlatformThreadHandle; |
|
1186 -#if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(__GLIBC__) |
|
1187 +#if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_SOLARIS) || defined(__GLIBC__) |
|
1188 #include <unistd.h> |
|
1189 typedef pid_t PlatformThreadId; |
|
1190 #elif defined(OS_BSD) |
|
1191 --- comm-esr31/mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig 2015-06-04 17:42:51.881741384 -0700 |
|
1192 +++ comm-esr31/mozilla/ipc/chromium/src/base/platform_thread_posix.cc 2015-06-04 17:42:52.026320376 -0700 |
|
1193 @@ -27,6 +27,12 @@ |
|
1194 #include <pthread_np.h> |
|
1195 #endif |
|
1196 |
|
1197 +#if defined(OS_SOLARIS) |
|
1198 +#include <sys/syscall.h> |
|
1199 +#include <unistd.h> |
|
1200 +#include <thread.h> |
|
1201 +#endif |
|
1202 + |
|
1203 #if defined(OS_MACOSX) |
|
1204 namespace base { |
|
1205 void InitThreading(); |
|
1206 @@ -54,6 +60,8 @@ |
|
1207 #else |
|
1208 return syscall(__NR_gettid); |
|
1209 #endif |
|
1210 +#elif defined(OS_SOLARIS) |
|
1211 + return thr_self(); |
|
1212 #elif defined(OS_OPENBSD) || defined(__GLIBC__) |
|
1213 return (intptr_t) (pthread_self()); |
|
1214 #elif defined(OS_NETBSD) |
|
1215 @@ -96,6 +104,7 @@ |
|
1216 |
|
1217 // static |
|
1218 void PlatformThread::SetName(const char* name) { |
|
1219 +#ifndef OS_SOLARIS |
|
1220 // On linux we can get the thread names to show up in the debugger by setting |
|
1221 // the process name for the LWP. We don't want to do this for the main |
|
1222 // thread because that would rename the process, causing tools like killall |
|
1223 @@ -116,6 +125,7 @@ |
|
1224 pthread_set_name_np(pthread_self(), name); |
|
1225 #else |
|
1226 #endif |
|
1227 +#endif // !OS_SOLARIS |
|
1228 } |
|
1229 #endif // !OS_MACOSX |
|
1230 |
|
1231 --- comm-esr31/mozilla/ipc/chromium/src/base/port.h.orig 2015-06-04 17:42:51.887028405 -0700 |
|
1232 +++ comm-esr31/mozilla/ipc/chromium/src/base/port.h 2015-06-04 17:42:52.026427782 -0700 |
|
1233 @@ -45,7 +45,7 @@ |
|
1234 // use va_list as ref args to a function, as above, breaks some machines. |
|
1235 # if defined(COMPILER_GCC) |
|
1236 # define base_va_copy(_a, _b) ::va_copy(_a, _b) |
|
1237 -# elif defined(COMPILER_MSVC) |
|
1238 +# elif defined(COMPILER_MSVC) || defined(COMPILER_SUNPRO) |
|
1239 # define base_va_copy(_a, _b) (_a = _b) |
|
1240 # else |
|
1241 # error No va_copy for your compiler |
|
1242 @@ -56,7 +56,7 @@ |
|
1243 // Define an OS-neutral wrapper for shared library entry points |
|
1244 #if defined(OS_WIN) |
|
1245 #define API_CALL __stdcall |
|
1246 -#elif defined(OS_LINUX) || defined(OS_MACOSX) |
|
1247 +#elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(OS_MACOSX) |
|
1248 #define API_CALL |
|
1249 #endif |
|
1250 |
|
1251 --- comm-esr31/mozilla/ipc/chromium/src/base/process_util.h.orig 2015-06-04 17:42:51.892333219 -0700 |
|
1252 +++ comm-esr31/mozilla/ipc/chromium/src/base/process_util.h 2015-06-04 17:42:52.026584078 -0700 |
|
1253 @@ -13,7 +13,7 @@ |
|
1254 #if defined(OS_WIN) |
|
1255 #include <windows.h> |
|
1256 #include <tlhelp32.h> |
|
1257 -#elif defined(OS_LINUX) || defined(__GLIBC__) |
|
1258 +#elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(__GLIBC__) |
|
1259 #include <dirent.h> |
|
1260 #include <limits.h> |
|
1261 #include <sys/types.h> |
|
1262 @@ -21,6 +21,10 @@ |
|
1263 #include <mach/mach.h> |
|
1264 #endif |
|
1265 |
|
1266 +#if defined(OS_SOLARIS) |
|
1267 +#define NAME_MAX 14 |
|
1268 +#endif |
|
1269 + |
|
1270 #include <map> |
|
1271 #include <string> |
|
1272 #include <vector> |
|
1273 @@ -62,7 +66,8 @@ |
|
1274 PROCESS_ARCH_I386 = 0x1, |
|
1275 PROCESS_ARCH_X86_64 = 0x2, |
|
1276 PROCESS_ARCH_PPC = 0x4, |
|
1277 - PROCESS_ARCH_ARM = 0x8 |
|
1278 + PROCESS_ARCH_ARM = 0x8, |
|
1279 + PROCESS_ARCH_SPARC = 0x10 |
|
1280 }; |
|
1281 |
|
1282 inline ProcessArchitecture GetCurrentProcessArchitecture() |
|
1283 @@ -76,6 +81,8 @@ |
|
1284 currentArchitecture = base::PROCESS_ARCH_PPC; |
|
1285 #elif defined(ARCH_CPU_ARMEL) |
|
1286 currentArchitecture = base::PROCESS_ARCH_ARM; |
|
1287 +#elif defined(ARCH_CPU_SPARC) |
|
1288 + currentArchitecture = base::PROCESS_ARCH_SPARC; |
|
1289 #endif |
|
1290 return currentArchitecture; |
|
1291 } |
|
1292 @@ -249,7 +256,7 @@ |
|
1293 #if defined(OS_WIN) |
|
1294 HANDLE snapshot_; |
|
1295 bool started_iteration_; |
|
1296 -#elif defined(OS_LINUX) || defined(__GLIBC__) |
|
1297 +#elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(__GLIBC__) |
|
1298 DIR *procfs_dir_; |
|
1299 #elif defined(OS_BSD) |
|
1300 std::vector<ProcessEntry> content; |
|
1301 --- comm-esr31/mozilla/ipc/chromium/src/base/process_util_posix.cc.orig 2015-06-04 17:42:51.897626965 -0700 |
|
1302 +++ comm-esr31/mozilla/ipc/chromium/src/base/process_util_posix.cc 2015-06-04 17:42:52.026710300 -0700 |
|
1303 @@ -110,7 +110,7 @@ |
|
1304 #if defined(ANDROID) |
|
1305 static const rlim_t kSystemDefaultMaxFds = 1024; |
|
1306 static const char kFDDir[] = "/proc/self/fd"; |
|
1307 -#elif defined(OS_LINUX) |
|
1308 +#elif defined(OS_LINUX) || defined(OS_SOLARIS) |
|
1309 static const rlim_t kSystemDefaultMaxFds = 8192; |
|
1310 static const char kFDDir[] = "/proc/self/fd"; |
|
1311 #elif defined(OS_MACOSX) |
|
1312 @@ -202,7 +202,7 @@ |
|
1313 // TODO(agl): Remove this function. It's fundamentally broken for multithreaded |
|
1314 // apps. |
|
1315 void SetAllFDsToCloseOnExec() { |
|
1316 -#if defined(OS_LINUX) |
|
1317 +#if defined(OS_LINUX) || defined(OS_SOLARIS) |
|
1318 const char fd_dir[] = "/proc/self/fd"; |
|
1319 #elif defined(OS_MACOSX) || defined(OS_BSD) |
|
1320 const char fd_dir[] = "/dev/fd"; |
|
1321 --- comm-esr31/mozilla/ipc/chromium/src/base/shared_memory_posix.cc.orig 2015-06-04 17:42:51.902973938 -0700 |
|
1322 +++ comm-esr31/mozilla/ipc/chromium/src/base/shared_memory_posix.cc 2015-06-04 17:42:52.026834474 -0700 |
|
1323 @@ -124,9 +124,15 @@ |
|
1324 if (file_util::GetShmemTempDir(&temp_dir) == false) |
|
1325 return false; |
|
1326 |
|
1327 +#ifndef OS_SOLARIS |
|
1328 mem_filename = UTF8ToWide(temp_dir.value()); |
|
1329 file_util::AppendToPath(&mem_filename, L"com.google.chrome.shmem." + memname); |
|
1330 *filename = mem_filename; |
|
1331 +#else |
|
1332 + *filename = (temp_dir.Append("com.google.chrome.shmem." + |
|
1333 + WideToUTF8(memname))).ToWStringHack(); |
|
1334 +#endif |
|
1335 + |
|
1336 return true; |
|
1337 } |
|
1338 |
|
1339 @@ -246,7 +252,7 @@ |
|
1340 if (memory_ == NULL) |
|
1341 return false; |
|
1342 |
|
1343 - munmap(memory_, max_size_); |
|
1344 + munmap((caddr_t)memory_, max_size_); |
|
1345 memory_ = NULL; |
|
1346 max_size_ = 0; |
|
1347 return true; |
|
1348 --- comm-esr31/mozilla/ipc/chromium/src/base/stack_container.h.orig 2015-06-04 17:42:51.908286276 -0700 |
|
1349 +++ comm-esr31/mozilla/ipc/chromium/src/base/stack_container.h 2015-06-04 17:42:52.026945124 -0700 |
|
1350 @@ -96,12 +96,17 @@ |
|
1351 // and the size requested fits. Otherwise, fall through to the standard |
|
1352 // allocator. |
|
1353 pointer allocate(size_type n, void* hint = 0) { |
|
1354 +#ifdef COMPILER_SUNPRO |
|
1355 + if (source_ != NULL && !source_->used_stack_buffer_ |
|
1356 + && (n/sizeof(T)) <= stack_capacity) { |
|
1357 +#else |
|
1358 if (source_ != NULL && !source_->used_stack_buffer_ |
|
1359 && n <= stack_capacity) { |
|
1360 +#endif |
|
1361 source_->used_stack_buffer_ = true; |
|
1362 return source_->stack_buffer(); |
|
1363 } else { |
|
1364 - return std::allocator<T>::allocate(n, hint); |
|
1365 + return (pointer)std::allocator<T>::allocate(n, hint); |
|
1366 } |
|
1367 } |
|
1368 |
|
1369 --- comm-esr31/mozilla/ipc/chromium/src/base/string16.h.orig 2015-06-04 17:42:51.913634746 -0700 |
|
1370 +++ comm-esr31/mozilla/ipc/chromium/src/base/string16.h 2015-06-04 17:42:52.027048241 -0700 |
|
1371 @@ -162,7 +162,9 @@ |
|
1372 // |
|
1373 // TODO(mark): File this bug with Apple and update this note with a bug number. |
|
1374 |
|
1375 +#ifndef COMPILER_SUNPRO |
|
1376 extern template class std::basic_string<char16, base::string16_char_traits>; |
|
1377 +#endif |
|
1378 |
|
1379 typedef std::basic_string<char16, base::string16_char_traits> string16; |
|
1380 |
|
1381 --- comm-esr31/mozilla/ipc/chromium/src/base/string_piece.h.orig 2015-06-04 17:42:51.918913848 -0700 |
|
1382 +++ comm-esr31/mozilla/ipc/chromium/src/base/string_piece.h 2015-06-04 17:42:52.027154192 -0700 |
|
1383 @@ -113,8 +113,13 @@ |
|
1384 static const size_type npos; |
|
1385 typedef const char* const_iterator; |
|
1386 typedef const char* iterator; |
|
1387 +#ifdef COMPILER_SUNPRO |
|
1388 + typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag, const value_type> const_reverse_iterator; |
|
1389 + typedef std::reverse_iterator<iterator, std::random_access_iterator_tag, value_type> reverse_iterator; |
|
1390 +#else |
|
1391 typedef std::reverse_iterator<const_iterator> const_reverse_iterator; |
|
1392 typedef std::reverse_iterator<iterator> reverse_iterator; |
|
1393 +#endif |
|
1394 iterator begin() const { return ptr_; } |
|
1395 iterator end() const { return ptr_ + length_; } |
|
1396 const_reverse_iterator rbegin() const { |
|
1397 --- comm-esr31/mozilla/ipc/chromium/src/base/string_util.cc.orig 2015-06-04 17:42:51.924232478 -0700 |
|
1398 +++ comm-esr31/mozilla/ipc/chromium/src/base/string_util.cc 2015-06-04 17:42:52.027298248 -0700 |
|
1399 @@ -324,22 +324,46 @@ |
|
1400 |
|
1401 std::string WideToASCII(const std::wstring& wide) { |
|
1402 DCHECK(IsStringASCII(wide)); |
|
1403 +#ifdef COMPILER_SUNPRO |
|
1404 + std::string str(wide.length(), ' '); |
|
1405 + std::copy(wide.begin(), wide.end(), str.begin()); |
|
1406 + return str; |
|
1407 +#else |
|
1408 return std::string(wide.begin(), wide.end()); |
|
1409 +#endif |
|
1410 } |
|
1411 |
|
1412 std::wstring ASCIIToWide(const std::string& ascii) { |
|
1413 DCHECK(IsStringASCII(ascii)); |
|
1414 +#ifdef COMPILER_SUNPRO |
|
1415 + std::wstring wstr(ascii.length(), L' '); |
|
1416 + std::copy(ascii.begin(), ascii.end(), wstr.begin()); |
|
1417 + return wstr; |
|
1418 +#else |
|
1419 return std::wstring(ascii.begin(), ascii.end()); |
|
1420 +#endif |
|
1421 } |
|
1422 |
|
1423 std::string UTF16ToASCII(const string16& utf16) { |
|
1424 DCHECK(IsStringASCII(utf16)); |
|
1425 +#ifdef COMPILER_SUNPRO |
|
1426 + std::string str(utf16.length(), ' '); |
|
1427 + std::copy(utf16.begin(), utf16.end(), str.begin()); |
|
1428 + return str; |
|
1429 +#else |
|
1430 return std::string(utf16.begin(), utf16.end()); |
|
1431 +#endif |
|
1432 } |
|
1433 |
|
1434 string16 ASCIIToUTF16(const std::string& ascii) { |
|
1435 DCHECK(IsStringASCII(ascii)); |
|
1436 +#ifdef COMPILER_SUNPRO |
|
1437 + string16 str(ascii.length(), ' '); |
|
1438 + std::copy(ascii.begin(), ascii.end(), str.begin()); |
|
1439 + return str; |
|
1440 +#else |
|
1441 return string16(ascii.begin(), ascii.end()); |
|
1442 +#endif |
|
1443 } |
|
1444 |
|
1445 template<class STR> |
|
1446 --- comm-esr31/mozilla/ipc/chromium/src/base/sys_info_posix.cc.orig 2015-06-04 17:42:51.929533186 -0700 |
|
1447 +++ comm-esr31/mozilla/ipc/chromium/src/base/sys_info_posix.cc 2015-06-04 17:42:52.027419274 -0700 |
|
1448 @@ -119,7 +119,7 @@ |
|
1449 |
|
1450 // static |
|
1451 std::string SysInfo::OperatingSystemName() { |
|
1452 - utsname info; |
|
1453 + struct utsname info; |
|
1454 if (uname(&info) < 0) { |
|
1455 NOTREACHED(); |
|
1456 return ""; |
|
1457 @@ -129,7 +129,7 @@ |
|
1458 |
|
1459 // static |
|
1460 std::string SysInfo::OperatingSystemVersion() { |
|
1461 - utsname info; |
|
1462 + struct utsname info; |
|
1463 if (uname(&info) < 0) { |
|
1464 NOTREACHED(); |
|
1465 return ""; |
|
1466 @@ -139,7 +139,7 @@ |
|
1467 |
|
1468 // static |
|
1469 std::string SysInfo::CPUArchitecture() { |
|
1470 - utsname info; |
|
1471 + struct utsname info; |
|
1472 if (uname(&info) < 0) { |
|
1473 NOTREACHED(); |
|
1474 return ""; |
|
1475 --- comm-esr31/mozilla/ipc/chromium/src/base/time.h.orig 2015-06-04 17:42:51.935020865 -0700 |
|
1476 +++ comm-esr31/mozilla/ipc/chromium/src/base/time.h 2015-06-04 17:42:52.027549556 -0700 |
|
1477 @@ -62,6 +62,10 @@ |
|
1478 return delta_; |
|
1479 } |
|
1480 |
|
1481 +#if defined(OS_POSIX) |
|
1482 + struct timespec ToTimeSpec() const; |
|
1483 +#endif |
|
1484 + |
|
1485 // Returns the time delta in some unit. The F versions return a floating |
|
1486 // point value, the "regular" versions return a rounded-down value. |
|
1487 int InDays() const; |
|
1488 @@ -224,6 +228,10 @@ |
|
1489 static Time FromDoubleT(double dt); |
|
1490 double ToDoubleT() const; |
|
1491 |
|
1492 +#if defined(OS_POSIX) |
|
1493 + struct timeval ToTimeVal() const; |
|
1494 +#endif |
|
1495 + |
|
1496 |
|
1497 #if defined(OS_WIN) |
|
1498 static Time FromFileTime(FILETIME ft); |
|
1499 --- comm-esr31/mozilla/ipc/chromium/src/base/time_posix.cc.orig 2015-06-04 17:42:51.940371366 -0700 |
|
1500 +++ comm-esr31/mozilla/ipc/chromium/src/base/time_posix.cc 2015-06-04 17:42:52.027684078 -0700 |
|
1501 @@ -65,11 +65,13 @@ |
|
1502 timestruct.tm_wday = exploded.day_of_week; // mktime/timegm ignore this |
|
1503 timestruct.tm_yday = 0; // mktime/timegm ignore this |
|
1504 timestruct.tm_isdst = -1; // attempt to figure it out |
|
1505 +#ifndef OS_SOLARIS |
|
1506 timestruct.tm_gmtoff = 0; // not a POSIX field, so mktime/timegm ignore |
|
1507 timestruct.tm_zone = NULL; // not a POSIX field, so mktime/timegm ignore |
|
1508 - |
|
1509 +#endif |
|
1510 + |
|
1511 time_t seconds; |
|
1512 -#ifdef ANDROID |
|
1513 +#if defined(ANDROID) || defined(OS_SOLARIS) |
|
1514 seconds = mktime(×truct); |
|
1515 #else |
|
1516 if (is_local) |
|
1517 @@ -167,7 +169,7 @@ |
|
1518 // With numer and denom = 1 (the expected case), the 64-bit absolute time |
|
1519 // reported in nanoseconds is enough to last nearly 585 years. |
|
1520 |
|
1521 -#elif defined(OS_OPENBSD) || defined(OS_POSIX) && \ |
|
1522 +#elif defined(OS_OPENBSD) || defined(OS_SOLARIS) || defined(OS_POSIX) && \ |
|
1523 defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 |
|
1524 |
|
1525 struct timespec ts; |
|
1526 @@ -192,4 +194,25 @@ |
|
1527 return Now(); |
|
1528 } |
|
1529 |
|
1530 +struct timespec TimeDelta::ToTimeSpec() const { |
|
1531 + int64_t microseconds = InMicroseconds(); |
|
1532 + time_t seconds = 0; |
|
1533 + if (microseconds >= Time::kMicrosecondsPerSecond) { |
|
1534 + seconds = InSeconds(); |
|
1535 + microseconds -= seconds * Time::kMicrosecondsPerSecond; |
|
1536 + } |
|
1537 + struct timespec result = |
|
1538 + {seconds, |
|
1539 + microseconds * Time::kNanosecondsPerMicrosecond}; |
|
1540 + return result; |
|
1541 +} |
|
1542 + |
|
1543 +struct timeval Time::ToTimeVal() const { |
|
1544 + struct timeval result; |
|
1545 + int64_t us = us_ - kTimeTToMicrosecondsOffset; |
|
1546 + result.tv_sec = us / Time::kMicrosecondsPerSecond; |
|
1547 + result.tv_usec = us % Time::kMicrosecondsPerSecond; |
|
1548 + return result; |
|
1549 +} |
|
1550 + |
|
1551 } // namespace base |
|
1552 --- comm-esr31/mozilla/ipc/chromium/src/build/build_config.h.orig 2015-06-04 17:42:51.945838858 -0700 |
|
1553 +++ comm-esr31/mozilla/ipc/chromium/src/build/build_config.h 2015-06-04 17:42:52.027834010 -0700 |
|
1554 @@ -4,9 +4,9 @@ |
|
1555 |
|
1556 // This file adds defines about the platform we're currently building on. |
|
1557 // Operating System: |
|
1558 -// OS_WIN / OS_MACOSX / OS_LINUX / OS_POSIX (MACOSX or LINUX) |
|
1559 +// OS_WIN / OS_MACOSX / OS_LINUX / OS_SOLARIS / OS_POSIX (MACOSX or LINUX) |
|
1560 // Compiler: |
|
1561 -// COMPILER_MSVC / COMPILER_GCC |
|
1562 +// COMPILER_MSVC / COMPILER_GCC / COMPILER_SUNPRO |
|
1563 // Processor: |
|
1564 // ARCH_CPU_X86 / ARCH_CPU_X86_64 / ARCH_CPU_X86_FAMILY (X86 or X86_64) |
|
1565 // ARCH_CPU_32_BITS / ARCH_CPU_64_BITS |
|
1566 @@ -30,6 +30,8 @@ |
|
1567 #define OS_NETBSD 1 |
|
1568 #elif defined(__OpenBSD__) |
|
1569 #define OS_OPENBSD 1 |
|
1570 +#elif defined(__sun__) || defined(__sun) |
|
1571 +#define OS_SOLARIS 1 |
|
1572 #elif defined(_WIN32) |
|
1573 #define OS_WIN 1 |
|
1574 #else |
|
1575 @@ -45,13 +47,15 @@ |
|
1576 |
|
1577 // For access to standard POSIX features, use OS_POSIX instead of a more |
|
1578 // specific macro. |
|
1579 -#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) |
|
1580 +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) |
|
1581 #define OS_POSIX 1 |
|
1582 #endif |
|
1583 |
|
1584 // Compiler detection. |
|
1585 #if defined(__GNUC__) |
|
1586 #define COMPILER_GCC 1 |
|
1587 +#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) |
|
1588 +#define COMPILER_SUNPRO 1 |
|
1589 #elif defined(_MSC_VER) |
|
1590 #define COMPILER_MSVC 1 |
|
1591 #else |
|
1592 @@ -62,11 +66,11 @@ |
|
1593 // http://msdn.microsoft.com/en-us/library/b0084kay.aspx |
|
1594 // http://www.agner.org/optimize/calling_conventions.pdf |
|
1595 // or with gcc, run: "echo | gcc -E -dM -" |
|
1596 -#if defined(_M_X64) || defined(__x86_64__) |
|
1597 +#if defined(_M_X64) || defined(__x86_64__) || defined(__x86_64) |
|
1598 #define ARCH_CPU_X86_FAMILY 1 |
|
1599 #define ARCH_CPU_X86_64 1 |
|
1600 #define ARCH_CPU_64_BITS 1 |
|
1601 -#elif defined(_M_IX86) || defined(__i386__) |
|
1602 +#elif defined(_M_IX86) || defined(__i386__) || defined(__i386) |
|
1603 #define ARCH_CPU_X86_FAMILY 1 |
|
1604 #define ARCH_CPU_X86 1 |
|
1605 #define ARCH_CPU_32_BITS 1 |
|
1606 @@ -84,7 +88,7 @@ |
|
1607 #elif defined(__sparc64__) |
|
1608 #define ARCH_CPU_SPARC 1 |
|
1609 #define ARCH_CPU_64_BITS 1 |
|
1610 -#elif defined(__sparc__) |
|
1611 +#elif defined(__sparc__) || defined(__sparc) |
|
1612 #define ARCH_CPU_SPARC 1 |
|
1613 #define ARCH_CPU_32_BITS 1 |
|
1614 #elif defined(__mips__) |
|
1615 --- comm-esr31/mozilla/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc.orig 2015-06-04 17:42:51.951499640 -0700 |
|
1616 +++ comm-esr31/mozilla/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc 2015-06-04 17:42:52.027937295 -0700 |
|
1617 @@ -4,6 +4,10 @@ |
|
1618 |
|
1619 #include "chrome/common/file_descriptor_set_posix.h" |
|
1620 |
|
1621 +#if defined(OS_SOLARIS) |
|
1622 +#include <unistd.h> |
|
1623 +#endif |
|
1624 + |
|
1625 #include "base/eintr_wrapper.h" |
|
1626 #include "base/logging.h" |
|
1627 |
|
1628 --- comm-esr31/mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h.orig 2015-06-04 17:42:51.956835709 -0700 |
|
1629 +++ comm-esr31/mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h 2015-06-04 17:42:52.028050266 -0700 |
|
1630 @@ -111,7 +111,7 @@ |
|
1631 }; |
|
1632 |
|
1633 // This is a control message buffer large enough to hold kMaxReadFDs |
|
1634 -#if defined(OS_MACOSX) || defined(OS_NETBSD) |
|
1635 +#if defined(OS_MACOSX) || defined(OS_NETBSD) || defined(OS_SOLARIS) |
|
1636 // TODO(agl): OSX appears to have non-constant CMSG macros! |
|
1637 char input_cmsg_buf_[1024]; |
|
1638 #else |
|
1639 --- comm-esr31/mozilla/ipc/chromium/src/chrome/common/transport_dib.h.orig 2015-06-04 17:42:51.962135898 -0700 |
|
1640 +++ comm-esr31/mozilla/ipc/chromium/src/chrome/common/transport_dib.h 2015-06-04 17:42:52.028183580 -0700 |
|
1641 @@ -13,7 +13,7 @@ |
|
1642 |
|
1643 #if defined(OS_WIN) |
|
1644 #include <windows.h> |
|
1645 -#elif defined(OS_LINUX) |
|
1646 +#elif defined(OS_LINUX) || defined(OS_SOLARIS) |
|
1647 #include "chrome/common/x11_util.h" |
|
1648 #endif |
|
1649 |
|
1650 @@ -66,7 +66,7 @@ |
|
1651 typedef base::SharedMemoryHandle Handle; |
|
1652 // On Mac, the inode number of the backing file is used as an id. |
|
1653 typedef base::SharedMemoryId Id; |
|
1654 -#elif defined(OS_LINUX) |
|
1655 +#elif defined(OS_LINUX) || defined(OS_SOLARIS) |
|
1656 typedef int Handle; // These two ints are SysV IPC shared memory keys |
|
1657 typedef int Id; |
|
1658 #endif |
|
1659 @@ -96,7 +96,7 @@ |
|
1660 // wire to give this transport DIB to another process. |
|
1661 Handle handle() const; |
|
1662 |
|
1663 -#if defined(OS_LINUX) |
|
1664 +#if defined(OS_LINUX) || defined(OS_SOLARIS) |
|
1665 // Map the shared memory into the X server and return an id for the shared |
|
1666 // segment. |
|
1667 XID MapToX(Display* connection); |
|
1668 @@ -107,7 +107,7 @@ |
|
1669 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) |
|
1670 explicit TransportDIB(base::SharedMemoryHandle dib); |
|
1671 base::SharedMemory shared_memory_; |
|
1672 -#elif defined(OS_LINUX) |
|
1673 +#elif defined(OS_LINUX) || defined(OS_SOLARIS) |
|
1674 int key_; // SysV shared memory id |
|
1675 void* address_; // mapped address |
|
1676 XID x_shm_; // X id for the shared segment |
|
1677 --- comm-esr31/mozilla/ipc/chromium/src/third_party/libevent/solaris/event2/event-config.h.orig 1969-12-31 16:00:00.000000000 -0800 |
|
1678 +++ comm-esr31/mozilla/ipc/chromium/src/third_party/libevent/solaris/event2/event-config.h 2015-06-04 17:42:52.028377621 -0700 |
|
1679 @@ -0,0 +1,455 @@ |
|
1680 +/* event2/event-config.h |
|
1681 + * |
|
1682 + * This file was generated by autoconf when libevent was built, and post- |
|
1683 + * processed by Libevent so that its macros would have a uniform prefix. |
|
1684 + * |
|
1685 + * DO NOT EDIT THIS FILE. |
|
1686 + * |
|
1687 + * Do not rely on macros in this file existing in later versions. |
|
1688 + */ |
|
1689 + |
|
1690 +#ifndef _EVENT2_EVENT_CONFIG_H_ |
|
1691 +#define _EVENT2_EVENT_CONFIG_H_ |
|
1692 + |
|
1693 +/* config.h. Generated from config.h.in by configure. */ |
|
1694 +/* config.h.in. Generated from configure.in by autoheader. */ |
|
1695 + |
|
1696 +/* Define if libevent should build without support for a debug mode */ |
|
1697 +/* #undef _EVENT_DISABLE_DEBUG_MODE */ |
|
1698 + |
|
1699 +/* Define if libevent should not allow replacing the mm functions */ |
|
1700 +/* #undef _EVENT_DISABLE_MM_REPLACEMENT */ |
|
1701 + |
|
1702 +/* Define if libevent should not be compiled with thread support */ |
|
1703 +/* #undef _EVENT_DISABLE_THREAD_SUPPORT */ |
|
1704 + |
|
1705 +/* Define to 1 if you have the `arc4random' function. */ |
|
1706 +/* #undef _EVENT_HAVE_ARC4RANDOM */ |
|
1707 + |
|
1708 +/* Define to 1 if you have the `arc4random_buf' function. */ |
|
1709 +/* #undef _EVENT_HAVE_ARC4RANDOM_BUF */ |
|
1710 + |
|
1711 +/* Define to 1 if you have the <arpa/inet.h> header file. */ |
|
1712 +#define _EVENT_HAVE_ARPA_INET_H 1 |
|
1713 + |
|
1714 +/* Define to 1 if you have the `clock_gettime' function. */ |
|
1715 +#define _EVENT_HAVE_CLOCK_GETTIME 1 |
|
1716 + |
|
1717 +/* Define to 1 if you have the declaration of `CTL_KERN', and to 0 if you |
|
1718 + don't. */ |
|
1719 +/* #undef _EVENT_HAVE_DECL_CTL_KERN */ |
|
1720 + |
|
1721 +/* Define to 1 if you have the declaration of `KERN_ARND', and to 0 if you |
|
1722 + don't. */ |
|
1723 +/* #undef _EVENT_HAVE_DECL_KERN_ARND */ |
|
1724 + |
|
1725 +/* Define to 1 if you have the declaration of `KERN_RANDOM', and to 0 if you |
|
1726 + don't. */ |
|
1727 +/* #undef _EVENT_HAVE_DECL_KERN_RANDOM */ |
|
1728 + |
|
1729 +/* Define to 1 if you have the declaration of `RANDOM_UUID', and to 0 if you |
|
1730 + don't. */ |
|
1731 +#define _EVENT_HAVE_DECL_RANDOM_UUID 1 |
|
1732 + |
|
1733 +/* Define if /dev/poll is available */ |
|
1734 +#define _EVENT_HAVE_DEVPOLL 1 |
|
1735 + |
|
1736 +/* Define to 1 if you have the <dlfcn.h> header file. */ |
|
1737 +#define _EVENT_HAVE_DLFCN_H 1 |
|
1738 + |
|
1739 +/* Define if your system supports the epoll system calls */ |
|
1740 +/* #undef _EVENT_HAVE_EPOLL */ |
|
1741 + |
|
1742 +/* Define to 1 if you have the `epoll_ctl' function. */ |
|
1743 +/* #undef _EVENT_HAVE_EPOLL_CTL */ |
|
1744 + |
|
1745 +/* Define to 1 if you have the `eventfd' function. */ |
|
1746 +/* #undef _EVENT_HAVE_EVENTFD */ |
|
1747 + |
|
1748 +/* Define if your system supports event ports */ |
|
1749 +#define _EVENT_HAVE_EVENT_PORTS 1 |
|
1750 + |
|
1751 +/* Define to 1 if you have the `fcntl' function. */ |
|
1752 +#define _EVENT_HAVE_FCNTL 1 |
|
1753 + |
|
1754 +/* Define to 1 if you have the <fcntl.h> header file. */ |
|
1755 +#define _EVENT_HAVE_FCNTL_H 1 |
|
1756 + |
|
1757 +/* Define to 1 if the system has the type `fd_mask'. */ |
|
1758 +#define _EVENT_HAVE_FD_MASK 1 |
|
1759 + |
|
1760 +/* Do we have getaddrinfo()? */ |
|
1761 +#define _EVENT_HAVE_GETADDRINFO 1 |
|
1762 + |
|
1763 +/* Define to 1 if you have the `getegid' function. */ |
|
1764 +#define _EVENT_HAVE_GETEGID 1 |
|
1765 + |
|
1766 +/* Define to 1 if you have the `geteuid' function. */ |
|
1767 +#define _EVENT_HAVE_GETEUID 1 |
|
1768 + |
|
1769 +/* Define this if you have any gethostbyname_r() */ |
|
1770 +/* #undef _EVENT_HAVE_GETHOSTBYNAME_R */ |
|
1771 + |
|
1772 +/* Define this if gethostbyname_r takes 3 arguments */ |
|
1773 +/* #undef _EVENT_HAVE_GETHOSTBYNAME_R_3_ARG */ |
|
1774 + |
|
1775 +/* Define this if gethostbyname_r takes 5 arguments */ |
|
1776 +/* #undef _EVENT_HAVE_GETHOSTBYNAME_R_5_ARG */ |
|
1777 + |
|
1778 +/* Define this if gethostbyname_r takes 6 arguments */ |
|
1779 +/* #undef _EVENT_HAVE_GETHOSTBYNAME_R_6_ARG */ |
|
1780 + |
|
1781 +/* Define to 1 if you have the `getnameinfo' function. */ |
|
1782 +#define _EVENT_HAVE_GETNAMEINFO 1 |
|
1783 + |
|
1784 +/* Define to 1 if you have the `getprotobynumber' function. */ |
|
1785 +#define _EVENT_HAVE_GETPROTOBYNUMBER 1 |
|
1786 + |
|
1787 +/* Define to 1 if you have the `getservbyname' function. */ |
|
1788 +/* #undef _EVENT_HAVE_GETSERVBYNAME */ |
|
1789 + |
|
1790 +/* Define to 1 if you have the `gettimeofday' function. */ |
|
1791 +#define _EVENT_HAVE_GETTIMEOFDAY 1 |
|
1792 + |
|
1793 +/* Define to 1 if you have the `inet_aton' function. */ |
|
1794 +#define _EVENT_HAVE_INET_ATON 1 |
|
1795 + |
|
1796 +/* Define to 1 if you have the `inet_ntop' function. */ |
|
1797 +#define _EVENT_HAVE_INET_NTOP 1 |
|
1798 + |
|
1799 +/* Define to 1 if you have the `inet_pton' function. */ |
|
1800 +#define _EVENT_HAVE_INET_PTON 1 |
|
1801 + |
|
1802 +/* Define to 1 if you have the <inttypes.h> header file. */ |
|
1803 +#define _EVENT_HAVE_INTTYPES_H 1 |
|
1804 + |
|
1805 +/* Define to 1 if you have the `issetugid' function. */ |
|
1806 +#define _EVENT_HAVE_ISSETUGID 1 |
|
1807 + |
|
1808 +/* Define to 1 if you have the `kqueue' function. */ |
|
1809 +/* #undef _EVENT_HAVE_KQUEUE */ |
|
1810 + |
|
1811 +/* Define if the system has zlib */ |
|
1812 +#define _EVENT_HAVE_LIBZ 1 |
|
1813 + |
|
1814 +/* Define to 1 if you have the <memory.h> header file. */ |
|
1815 +#define _EVENT_HAVE_MEMORY_H 1 |
|
1816 + |
|
1817 +/* Define to 1 if you have the `mmap' function. */ |
|
1818 +#define _EVENT_HAVE_MMAP 1 |
|
1819 + |
|
1820 +/* Define to 1 if you have the <netdb.h> header file. */ |
|
1821 +#define _EVENT_HAVE_NETDB_H 1 |
|
1822 + |
|
1823 +/* Define to 1 if you have the <netinet/in6.h> header file. */ |
|
1824 +/* #undef _EVENT_HAVE_NETINET_IN6_H */ |
|
1825 + |
|
1826 +/* Define to 1 if you have the <netinet/in.h> header file. */ |
|
1827 +#define _EVENT_HAVE_NETINET_IN_H 1 |
|
1828 + |
|
1829 +/* Define if the system has openssl */ |
|
1830 +#define _EVENT_HAVE_OPENSSL 1 |
|
1831 + |
|
1832 +/* Define to 1 if you have the <openssl/bio.h> header file. */ |
|
1833 +#define _EVENT_HAVE_OPENSSL_BIO_H 1 |
|
1834 + |
|
1835 +/* Define to 1 if you have the `pipe' function. */ |
|
1836 +#define _EVENT_HAVE_PIPE 1 |
|
1837 + |
|
1838 +/* Define to 1 if you have the `poll' function. */ |
|
1839 +#define _EVENT_HAVE_POLL 1 |
|
1840 + |
|
1841 +/* Define to 1 if you have the <poll.h> header file. */ |
|
1842 +#define _EVENT_HAVE_POLL_H 1 |
|
1843 + |
|
1844 +/* Define to 1 if you have the `port_create' function. */ |
|
1845 +#define _EVENT_HAVE_PORT_CREATE 1 |
|
1846 + |
|
1847 +/* Define to 1 if you have the <port.h> header file. */ |
|
1848 +#define _EVENT_HAVE_PORT_H 1 |
|
1849 + |
|
1850 +/* Define if you have POSIX threads libraries and header files. */ |
|
1851 +/* #undef _EVENT_HAVE_PTHREAD */ |
|
1852 + |
|
1853 +/* Define if we have pthreads on this system */ |
|
1854 +#define _EVENT_HAVE_PTHREADS 1 |
|
1855 + |
|
1856 +/* Define to 1 if you have the `putenv' function. */ |
|
1857 +#define _EVENT_HAVE_PUTENV 1 |
|
1858 + |
|
1859 +/* Define to 1 if the system has the type `sa_family_t'. */ |
|
1860 +#define _EVENT_HAVE_SA_FAMILY_T 1 |
|
1861 + |
|
1862 +/* Define to 1 if you have the `select' function. */ |
|
1863 +#define _EVENT_HAVE_SELECT 1 |
|
1864 + |
|
1865 +/* Define to 1 if you have the `sendfile' function. */ |
|
1866 +#define _EVENT_HAVE_SENDFILE 1 |
|
1867 + |
|
1868 +/* Define to 1 if you have the `setenv' function. */ |
|
1869 +#define _EVENT_HAVE_SETENV 1 |
|
1870 + |
|
1871 +/* Define if F_SETFD is defined in <fcntl.h> */ |
|
1872 +#define _EVENT_HAVE_SETFD 1 |
|
1873 + |
|
1874 +/* Define to 1 if you have the `sigaction' function. */ |
|
1875 +#define _EVENT_HAVE_SIGACTION 1 |
|
1876 + |
|
1877 +/* Define to 1 if you have the `signal' function. */ |
|
1878 +#define _EVENT_HAVE_SIGNAL 1 |
|
1879 + |
|
1880 +/* Define to 1 if you have the `splice' function. */ |
|
1881 +#define _EVENT_HAVE_SPLICE 1 |
|
1882 + |
|
1883 +/* Define to 1 if you have the <stdarg.h> header file. */ |
|
1884 +#define _EVENT_HAVE_STDARG_H 1 |
|
1885 + |
|
1886 +/* Define to 1 if you have the <stddef.h> header file. */ |
|
1887 +#define _EVENT_HAVE_STDDEF_H 1 |
|
1888 + |
|
1889 +/* Define to 1 if you have the <stdint.h> header file. */ |
|
1890 +#define _EVENT_HAVE_STDINT_H 1 |
|
1891 + |
|
1892 +/* Define to 1 if you have the <stdlib.h> header file. */ |
|
1893 +#define _EVENT_HAVE_STDLIB_H 1 |
|
1894 + |
|
1895 +/* Define to 1 if you have the <strings.h> header file. */ |
|
1896 +#define _EVENT_HAVE_STRINGS_H 1 |
|
1897 + |
|
1898 +/* Define to 1 if you have the <string.h> header file. */ |
|
1899 +#define _EVENT_HAVE_STRING_H 1 |
|
1900 + |
|
1901 +/* Define to 1 if you have the `strlcpy' function. */ |
|
1902 +#define _EVENT_HAVE_STRLCPY 1 |
|
1903 + |
|
1904 +/* Define to 1 if you have the `strsep' function. */ |
|
1905 +#define _EVENT_HAVE_STRSEP 1 |
|
1906 + |
|
1907 +/* Define to 1 if you have the `strtok_r' function. */ |
|
1908 +#define _EVENT_HAVE_STRTOK_R 1 |
|
1909 + |
|
1910 +/* Define to 1 if you have the `strtoll' function. */ |
|
1911 +#define _EVENT_HAVE_STRTOLL 1 |
|
1912 + |
|
1913 +/* Define to 1 if the system has the type `struct addrinfo'. */ |
|
1914 +#define _EVENT_HAVE_STRUCT_ADDRINFO 1 |
|
1915 + |
|
1916 +/* Define to 1 if the system has the type `struct in6_addr'. */ |
|
1917 +#define _EVENT_HAVE_STRUCT_IN6_ADDR 1 |
|
1918 + |
|
1919 +/* Define to 1 if `s6_addr16' is a member of `struct in6_addr'. */ |
|
1920 +/* #undef _EVENT_HAVE_STRUCT_IN6_ADDR_S6_ADDR16 */ |
|
1921 + |
|
1922 +/* Define to 1 if `s6_addr32' is a member of `struct in6_addr'. */ |
|
1923 +/* #undef _EVENT_HAVE_STRUCT_IN6_ADDR_S6_ADDR32 */ |
|
1924 + |
|
1925 +/* Define to 1 if the system has the type `struct sockaddr_in6'. */ |
|
1926 +#define _EVENT_HAVE_STRUCT_SOCKADDR_IN6 1 |
|
1927 + |
|
1928 +/* Define to 1 if `sin6_len' is a member of `struct sockaddr_in6'. */ |
|
1929 +/* #undef _EVENT_HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN */ |
|
1930 + |
|
1931 +/* Define to 1 if `sin_len' is a member of `struct sockaddr_in'. */ |
|
1932 +/* #undef _EVENT_HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ |
|
1933 + |
|
1934 +/* Define to 1 if the system has the type `struct sockaddr_storage'. */ |
|
1935 +#define _EVENT_HAVE_STRUCT_SOCKADDR_STORAGE 1 |
|
1936 + |
|
1937 +/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ |
|
1938 +#define _EVENT_HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 |
|
1939 + |
|
1940 +/* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */ |
|
1941 +/* #undef _EVENT_HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */ |
|
1942 + |
|
1943 +/* Define to 1 if you have the `sysctl' function. */ |
|
1944 +/* #undef _EVENT_HAVE_SYSCTL */ |
|
1945 + |
|
1946 +/* Define to 1 if you have the <sys/devpoll.h> header file. */ |
|
1947 +#define _EVENT_HAVE_SYS_DEVPOLL_H 1 |
|
1948 + |
|
1949 +/* Define to 1 if you have the <sys/epoll.h> header file. */ |
|
1950 +/* #undef _EVENT_HAVE_SYS_EPOLL_H 1 */ |
|
1951 + |
|
1952 +/* Define to 1 if you have the <sys/eventfd.h> header file. */ |
|
1953 +/* #define _EVENT_HAVE_SYS_EVENTFD_H 1 */ |
|
1954 + |
|
1955 +/* Define to 1 if you have the <sys/event.h> header file. */ |
|
1956 +/* #undef _EVENT_HAVE_SYS_EVENT_H */ |
|
1957 + |
|
1958 +/* Define to 1 if you have the <sys/ioctl.h> header file. */ |
|
1959 +#define _EVENT_HAVE_SYS_IOCTL_H 1 |
|
1960 + |
|
1961 +/* Define to 1 if you have the <sys/mman.h> header file. */ |
|
1962 +#define _EVENT_HAVE_SYS_MMAN_H 1 |
|
1963 + |
|
1964 +/* Define to 1 if you have the <sys/param.h> header file. */ |
|
1965 +#define _EVENT_HAVE_SYS_PARAM_H 1 |
|
1966 + |
|
1967 +/* Define to 1 if you have the <sys/queue.h> header file. */ |
|
1968 +#define _EVENT_HAVE_SYS_QUEUE_H 1 |
|
1969 + |
|
1970 +/* Define to 1 if you have the <sys/select.h> header file. */ |
|
1971 +#define _EVENT_HAVE_SYS_SELECT_H 1 |
|
1972 + |
|
1973 +/* Define to 1 if you have the <sys/sendfile.h> header file. */ |
|
1974 +#define _EVENT_HAVE_SYS_SENDFILE_H 1 |
|
1975 + |
|
1976 +/* Define to 1 if you have the <sys/socket.h> header file. */ |
|
1977 +#define _EVENT_HAVE_SYS_SOCKET_H 1 |
|
1978 + |
|
1979 +/* Define to 1 if you have the <sys/stat.h> header file. */ |
|
1980 +#define _EVENT_HAVE_SYS_STAT_H 1 |
|
1981 + |
|
1982 +/* Define to 1 if you have the <sys/sysctl.h> header file. */ |
|
1983 +/* #undef _EVENT_HAVE_SYS_SYSCTL_H */ |
|
1984 + |
|
1985 +/* Define to 1 if you have the <sys/time.h> header file. */ |
|
1986 +#define _EVENT_HAVE_SYS_TIME_H 1 |
|
1987 + |
|
1988 +/* Define to 1 if you have the <sys/types.h> header file. */ |
|
1989 +#define _EVENT_HAVE_SYS_TYPES_H 1 |
|
1990 + |
|
1991 +/* Define to 1 if you have the <sys/uio.h> header file. */ |
|
1992 +#define _EVENT_HAVE_SYS_UIO_H 1 |
|
1993 + |
|
1994 +/* Define to 1 if you have the <sys/wait.h> header file. */ |
|
1995 +#define _EVENT_HAVE_SYS_WAIT_H 1 |
|
1996 + |
|
1997 +/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */ |
|
1998 +#define _EVENT_HAVE_TAILQFOREACH 1 |
|
1999 + |
|
2000 +/* Define if timeradd is defined in <sys/time.h> */ |
|
2001 +#define _EVENT_HAVE_TIMERADD 1 |
|
2002 + |
|
2003 +/* Define if timerclear is defined in <sys/time.h> */ |
|
2004 +#define _EVENT_HAVE_TIMERCLEAR 1 |
|
2005 + |
|
2006 +/* Define if timercmp is defined in <sys/time.h> */ |
|
2007 +#define _EVENT_HAVE_TIMERCMP 1 |
|
2008 + |
|
2009 +/* Define if timerisset is defined in <sys/time.h> */ |
|
2010 +#define _EVENT_HAVE_TIMERISSET 1 |
|
2011 + |
|
2012 +/* Define to 1 if the system has the type `uint16_t'. */ |
|
2013 +#define _EVENT_HAVE_UINT16_T 1 |
|
2014 + |
|
2015 +/* Define to 1 if the system has the type `uint32_t'. */ |
|
2016 +#define _EVENT_HAVE_UINT32_T 1 |
|
2017 + |
|
2018 +/* Define to 1 if the system has the type `uint64_t'. */ |
|
2019 +#define _EVENT_HAVE_UINT64_T 1 |
|
2020 + |
|
2021 +/* Define to 1 if the system has the type `uint8_t'. */ |
|
2022 +#define _EVENT_HAVE_UINT8_T 1 |
|
2023 + |
|
2024 +/* Define to 1 if the system has the type `uintptr_t'. */ |
|
2025 +#define _EVENT_HAVE_UINTPTR_T 1 |
|
2026 + |
|
2027 +/* Define to 1 if you have the `umask' function. */ |
|
2028 +#define _EVENT_HAVE_UMASK 1 |
|
2029 + |
|
2030 +/* Define to 1 if you have the <unistd.h> header file. */ |
|
2031 +#define _EVENT_HAVE_UNISTD_H 1 |
|
2032 + |
|
2033 +/* Define to 1 if you have the `unsetenv' function. */ |
|
2034 +#define _EVENT_HAVE_UNSETENV 1 |
|
2035 + |
|
2036 +/* Define to 1 if you have the `vasprintf' function. */ |
|
2037 +#define _EVENT_HAVE_VASPRINTF 1 |
|
2038 + |
|
2039 +/* Define if kqueue works correctly with pipes */ |
|
2040 +/* #undef _EVENT_HAVE_WORKING_KQUEUE */ |
|
2041 + |
|
2042 +/* Define to 1 if you have the <zlib.h> header file. */ |
|
2043 +#define _EVENT_HAVE_ZLIB_H 1 |
|
2044 + |
|
2045 +/* Define to the sub-directory in which libtool stores uninstalled libraries. |
|
2046 + */ |
|
2047 +#define _EVENT_LT_OBJDIR ".libs/" |
|
2048 + |
|
2049 +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ |
|
2050 +/* #undef _EVENT_NO_MINUS_C_MINUS_O */ |
|
2051 + |
|
2052 +/* Numeric representation of the version */ |
|
2053 +#define _EVENT_NUMERIC_VERSION 0x02001500 |
|
2054 + |
|
2055 +/* Name of package */ |
|
2056 +#define _EVENT_PACKAGE "libevent" |
|
2057 + |
|
2058 +/* Define to the address where bug reports for this package should be sent. */ |
|
2059 +#define _EVENT_PACKAGE_BUGREPORT "" |
|
2060 + |
|
2061 +/* Define to the full name of this package. */ |
|
2062 +#define _EVENT_PACKAGE_NAME "" |
|
2063 + |
|
2064 +/* Define to the full name and version of this package. */ |
|
2065 +#define _EVENT_PACKAGE_STRING "" |
|
2066 + |
|
2067 +/* Define to the one symbol short name of this package. */ |
|
2068 +#define _EVENT_PACKAGE_TARNAME "" |
|
2069 + |
|
2070 +/* Define to the home page for this package. */ |
|
2071 +#define _EVENT_PACKAGE_URL "" |
|
2072 + |
|
2073 +/* Define to the version of this package. */ |
|
2074 +#define _EVENT_PACKAGE_VERSION "" |
|
2075 + |
|
2076 +/* Define to necessary symbol if this constant uses a non-standard name on |
|
2077 + your system. */ |
|
2078 +/* #undef _EVENT_PTHREAD_CREATE_JOINABLE */ |
|
2079 + |
|
2080 +/* The size of `int', as computed by sizeof. */ |
|
2081 +#define _EVENT_SIZEOF_INT 4 |
|
2082 + |
|
2083 +/* The size of `long', as computed by sizeof. */ |
|
2084 +#define _EVENT_SIZEOF_LONG 4 |
|
2085 + |
|
2086 +/* The size of `long long', as computed by sizeof. */ |
|
2087 +#define _EVENT_SIZEOF_LONG_LONG 8 |
|
2088 + |
|
2089 +/* The size of `pthread_t', as computed by sizeof. */ |
|
2090 +#define _EVENT_SIZEOF_PTHREAD_T 4 |
|
2091 + |
|
2092 +/* The size of `short', as computed by sizeof. */ |
|
2093 +#define _EVENT_SIZEOF_SHORT 2 |
|
2094 + |
|
2095 +/* The size of `size_t', as computed by sizeof. */ |
|
2096 +#define _EVENT_SIZEOF_SIZE_T 4 |
|
2097 + |
|
2098 +/* The size of `void *', as computed by sizeof. */ |
|
2099 +#define _EVENT_SIZEOF_VOID_P 4 |
|
2100 + |
|
2101 +/* Define to 1 if you have the ANSI C header files. */ |
|
2102 +#define _EVENT_STDC_HEADERS 1 |
|
2103 + |
|
2104 +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ |
|
2105 +#define _EVENT_TIME_WITH_SYS_TIME 1 |
|
2106 + |
|
2107 +/* Version number of package */ |
|
2108 +#define _EVENT_VERSION "2.0.21-stable" |
|
2109 + |
|
2110 +/* Define to appropriate substitue if compiler doesnt have __func__ */ |
|
2111 +/* #undef _EVENT___func__ */ |
|
2112 + |
|
2113 +/* Define to empty if `const' does not conform to ANSI C. */ |
|
2114 +/* #undef _EVENT_const */ |
|
2115 + |
|
2116 +/* Define to `__inline__' or `__inline' if that's what the C compiler |
|
2117 + calls it, or to nothing if 'inline' is not supported under any name. */ |
|
2118 +#ifndef _EVENT___cplusplus |
|
2119 +/* #undef _EVENT_inline */ |
|
2120 +#endif |
|
2121 + |
|
2122 +/* Define to `int' if <sys/types.h> does not define. */ |
|
2123 +/* #undef _EVENT_pid_t */ |
|
2124 + |
|
2125 +/* Define to `unsigned int' if <sys/types.h> does not define. */ |
|
2126 +/* #undef _EVENT_size_t */ |
|
2127 + |
|
2128 +/* Define to unsigned int if you dont have it */ |
|
2129 +/* #undef _EVENT_socklen_t */ |
|
2130 + |
|
2131 +/* Define to `int' if <sys/types.h> does not define. */ |
|
2132 +/* #undef _EVENT_ssize_t */ |
|
2133 + |
|
2134 +#endif /* event2/event-config.h */ |
|
2135 --- comm-esr31/mozilla/ipc/glue/BrowserProcessSubThread.cpp.orig 2015-06-04 17:42:51.968125755 -0700 |
|
2136 +++ comm-esr31/mozilla/ipc/glue/BrowserProcessSubThread.cpp 2015-06-04 17:42:52.028493604 -0700 |
|
2137 @@ -25,7 +25,7 @@ |
|
2138 // "Chrome_FileThread", // FILE |
|
2139 // "Chrome_DBThread", // DB |
|
2140 // "Chrome_HistoryThread", // HISTORY |
|
2141 -#if defined(OS_LINUX) |
|
2142 +#if defined(OS_LINUX) || defined(OS_SOLARIS) |
|
2143 "Gecko_Background_X11Thread", // BACKGROUND_X11 |
|
2144 #endif |
|
2145 }; |
|
2146 @@ -36,7 +36,7 @@ |
|
2147 // nullptr, // FILE |
|
2148 // nullptr, // DB |
|
2149 // nullptr, // HISTORY |
|
2150 -#if defined(OS_LINUX) |
|
2151 +#if defined(OS_LINUX) || defined(OS_SOLARIS) |
|
2152 nullptr, // BACKGROUND_X11 |
|
2153 #endif |
|
2154 }; |
|
2155 --- comm-esr31/mozilla/ipc/glue/BrowserProcessSubThread.h.orig 2015-06-04 17:42:51.973476461 -0700 |
|
2156 +++ comm-esr31/mozilla/ipc/glue/BrowserProcessSubThread.h 2015-06-04 17:42:52.028585516 -0700 |
|
2157 @@ -28,7 +28,7 @@ |
|
2158 //FILE, |
|
2159 //DB, |
|
2160 //HISTORY, |
|
2161 -#if defined(OS_LINUX) |
|
2162 +#if defined(OS_LINUX) || defined(OS_SOLARIS) |
|
2163 // This thread has a second connection to the X server and is used |
|
2164 // to process UI requests when routing the request to the UI |
|
2165 // thread would risk deadlock. |
|
2166 --- comm-esr31/mozilla/ipc/glue/GeckoChildProcessHost.cpp.orig 2015-06-04 17:42:51.978784250 -0700 |
|
2167 +++ comm-esr31/mozilla/ipc/glue/GeckoChildProcessHost.cpp 2015-06-04 17:42:52.028760031 -0700 |
|
2168 @@ -548,12 +548,15 @@ |
|
2169 // and passing wstrings from one config to the other is unsafe. So |
|
2170 // we split the logic here. |
|
2171 |
|
2172 -#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) |
|
2173 - base::environment_map newEnvVars; |
|
2174 +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) || defined(OS_SOLARIS) |
|
2175 ChildPrivileges privs = mPrivileges; |
|
2176 if (privs == base::PRIVILEGES_DEFAULT) { |
|
2177 privs = DefaultChildPrivileges(); |
|
2178 } |
|
2179 +#endif |
|
2180 + |
|
2181 +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) |
|
2182 + base::environment_map newEnvVars; |
|
2183 // XPCOM may not be initialized in some subprocesses. We don't want |
|
2184 // to initialize XPCOM just for the directory service, especially |
|
2185 // since LD_LIBRARY_PATH is already set correctly in subprocesses |
|
2186 @@ -671,7 +674,7 @@ |
|
2187 childArgv.push_back(pidstring); |
|
2188 |
|
2189 #if defined(MOZ_CRASHREPORTER) |
|
2190 -# if defined(OS_LINUX) || defined(OS_BSD) |
|
2191 +# if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) |
|
2192 int childCrashFd, childCrashRemapFd; |
|
2193 if (!CrashReporter::CreateNotificationPipeForChild( |
|
2194 &childCrashFd, &childCrashRemapFd)) |
|
2195 @@ -687,7 +690,7 @@ |
|
2196 } |
|
2197 # elif defined(MOZ_WIDGET_COCOA) |
|
2198 childArgv.push_back(CrashReporter::GetChildNotificationPipe()); |
|
2199 -# endif // OS_LINUX |
|
2200 +# endif // OS_LINUX || defined(OS_SOLARIS) |
|
2201 #endif |
|
2202 |
|
2203 #ifdef MOZ_WIDGET_COCOA |
|
2204 @@ -706,6 +709,8 @@ |
|
2205 base::LaunchApp(childArgv, mFileMap, |
|
2206 #if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) |
|
2207 newEnvVars, privs, |
|
2208 +#elif defined(OS_SOLARIS) |
|
2209 + base::environment_map(), privs, |
|
2210 #endif |
|
2211 false, &process, arch); |
|
2212 |
|
2213 --- comm-esr31/mozilla/ipc/glue/SharedMemorySysV.h.orig 2015-06-04 17:42:51.984117091 -0700 |
|
2214 +++ comm-esr31/mozilla/ipc/glue/SharedMemorySysV.h 2015-06-04 17:42:52.028880854 -0700 |
|
2215 @@ -8,7 +8,7 @@ |
|
2216 #ifndef mozilla_ipc_SharedMemorySysV_h |
|
2217 #define mozilla_ipc_SharedMemorySysV_h |
|
2218 |
|
2219 -#if (defined(OS_LINUX) && !defined(ANDROID)) || defined(OS_BSD) |
|
2220 +#if (defined(OS_LINUX) && !defined(ANDROID)) || defined(OS_BSD) || defined(OS_SOLARIS) |
|
2221 |
|
2222 // SysV shared memory isn't available on Windows, but we define the |
|
2223 // following macro so that #ifdefs are clearer (compared to #ifdef |
|
2224 @@ -55,6 +55,9 @@ |
|
2225 virtual ~SharedMemorySysV() |
|
2226 { |
|
2227 shmdt(mData); |
|
2228 +#ifdef OS_SOLARIS |
|
2229 + shmctl(mHandle, IPC_RMID, 0); |
|
2230 +#endif |
|
2231 mHandle = -1; |
|
2232 mData = nullptr; |
|
2233 } |
|
2234 @@ -94,7 +97,9 @@ |
|
2235 |
|
2236 // Mark the handle as deleted so that, should this process go away, the |
|
2237 // segment is cleaned up. |
|
2238 +#ifndef OS_SOLARIS |
|
2239 shmctl(mHandle, IPC_RMID, 0); |
|
2240 +#endif |
|
2241 |
|
2242 mData = mem; |
|
2243 |
|
2244 @@ -145,6 +150,6 @@ |
|
2245 } // namespace ipc |
|
2246 } // namespace mozilla |
|
2247 |
|
2248 -#endif // OS_LINUX |
|
2249 +#endif // OS_LINUX || OS_SOLARIS |
|
2250 |
|
2251 #endif // ifndef mozilla_ipc_SharedMemorySysV_h |
|
2252 --- comm-esr31/mozilla/ipc/ipdl/test/cxx/Makefile.in.orig 2015-06-04 17:42:51.989770256 -0700 |
|
2253 +++ comm-esr31/mozilla/ipc/ipdl/test/cxx/Makefile.in 2015-06-04 17:42:52.028974010 -0700 |
|
2254 @@ -9,6 +9,10 @@ |
|
2255 TestBridgeSub \ |
|
2256 $(NULL) |
|
2257 |
|
2258 +ifeq ($(OS_ARCH),SunOS) |
|
2259 +IPDLTESTS += TestSysVShmem |
|
2260 +endif |
|
2261 + |
|
2262 IPDLTESTHDRS = $(addprefix $(srcdir)/,$(addsuffix .h,$(IPDLTESTS))) |
|
2263 |
|
2264 TESTER_TEMPLATE := $(srcdir)/IPDLUnitTests.template.cpp |
|
2265 --- comm-esr31/mozilla/ipc/ipdl/test/cxx/TestShutdown.cpp.orig 2015-06-04 17:42:51.995172293 -0700 |
|
2266 +++ comm-esr31/mozilla/ipc/ipdl/test/cxx/TestShutdown.cpp 2015-06-04 17:42:52.029072732 -0700 |
|
2267 @@ -184,6 +184,8 @@ |
|
2268 // detectors |
|
2269 _exit(0); |
|
2270 } |
|
2271 + |
|
2272 + return false; |
|
2273 } |
|
2274 |
|
2275 void |
|
2276 --- comm-esr31/mozilla/js/src/configure.orig 2015-06-04 17:42:52.000916637 -0700 |
|
2277 +++ comm-esr31/mozilla/js/src/configure 2015-06-04 17:42:52.030137803 -0700 |
|
2278 @@ -8283,7 +8283,7 @@ |
|
2279 EOF |
|
2280 |
|
2281 CFLAGS="$CFLAGS -xlibmieee -xstrconst -xbuiltin=%all -D__FUNCTION__=__func__" |
|
2282 - CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic,extensions,no%except -norunpath -D__FUNCTION__=__func__ -template=no%extdef" |
|
2283 + CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic,extensions,no%except -norunpath -D__FUNCTION__=__func__ -template=no%extdef -D_XOPEN_SOURCE=500 -D__EXTENSIONS__" |
|
2284 LDFLAGS="-xildoff $LDFLAGS" |
|
2285 if test -z "$CROSS_COMPILE" -a -f /usr/lib/ld/map.noexstk; then |
|
2286 _SAVE_LDFLAGS=$LDFLAGS |
|
2287 --- comm-esr31/mozilla/mfbt/Poison.cpp.orig 2015-06-04 17:42:52.006353842 -0700 |
|
2288 +++ comm-esr31/mozilla/mfbt/Poison.cpp 2015-06-04 17:42:52.030249726 -0700 |
|
2289 @@ -25,6 +25,7 @@ |
|
2290 # endif |
|
2291 # endif |
|
2292 #endif |
|
2293 +extern "C" int madvise(caddr_t, size_t, int); |
|
2294 |
|
2295 extern "C" { |
|
2296 uintptr_t gMozillaPoisonValue; |
|
2297 @@ -125,7 +126,7 @@ |
|
2298 static bool |
|
2299 ProbeRegion(uintptr_t region, uintptr_t size) |
|
2300 { |
|
2301 - if (madvise(reinterpret_cast<void*>(region), size, MADV_NORMAL)) { |
|
2302 + if (madvise(reinterpret_cast<char*>(region), size, MADV_NORMAL)) { |
|
2303 return true; |
|
2304 } else { |
|
2305 return false; |
|
2306 --- comm-esr31/mozilla/mfbt/tests/TestPoisonArea.cpp.orig 2015-06-04 17:42:52.011890810 -0700 |
|
2307 +++ comm-esr31/mozilla/mfbt/tests/TestPoisonArea.cpp 2015-06-04 17:42:52.030377829 -0700 |
|
2308 @@ -104,6 +104,7 @@ |
|
2309 #include <sys/wait.h> |
|
2310 |
|
2311 #include <sys/mman.h> |
|
2312 +extern "C" int madvise(caddr_t, size_t, int); |
|
2313 #ifndef MAP_ANON |
|
2314 #ifdef MAP_ANONYMOUS |
|
2315 #define MAP_ANON MAP_ANONYMOUS |
|
2316 @@ -261,7 +262,7 @@ |
|
2317 static bool |
|
2318 ProbeRegion(uintptr_t page) |
|
2319 { |
|
2320 - if (madvise(reinterpret_cast<void*>(page), PAGESIZE, MADV_NORMAL)) { |
|
2321 + if (madvise(reinterpret_cast<char*>(page), PAGESIZE, MADV_NORMAL)) { |
|
2322 return true; |
|
2323 } else { |
|
2324 return false; |
|
2325 --- comm-esr31/mozilla/modules/libjar/nsZipArchive.cpp.orig 2015-06-04 17:42:52.017442262 -0700 |
|
2326 +++ comm-esr31/mozilla/modules/libjar/nsZipArchive.cpp 2015-06-04 17:42:52.030536960 -0700 |
|
2327 @@ -40,7 +40,8 @@ |
|
2328 #include <sys/stat.h> |
|
2329 #include <limits.h> |
|
2330 #include <unistd.h> |
|
2331 -#elif defined(XP_WIN) |
|
2332 +extern "C" int madvise(caddr_t, size_t, int); |
|
2333 +#elif defined(XP_WIN) || defined(XP_OS2) |
|
2334 #include <io.h> |
|
2335 #endif |
|
2336 |
|
2337 @@ -596,7 +597,7 @@ |
|
2338 uint32_t readaheadLength = xtolong(startp); |
|
2339 if (readaheadLength) { |
|
2340 #if defined(XP_UNIX) |
|
2341 - madvise(const_cast<uint8_t*>(startp), readaheadLength, MADV_WILLNEED); |
|
2342 + madvise((caddr_t)const_cast<uint8_t*>(startp), readaheadLength, MADV_WILLNEED); |
|
2343 #elif defined(XP_WIN) |
|
2344 if (aFd) { |
|
2345 HANDLE hFile = (HANDLE) PR_FileDesc2NativeHandle(aFd); |