firefox.patch 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931
  1. Index: nsprpub/pr/include/md/_freebsd.h
  2. --- nsprpub/pr/include/md/_freebsd.h.orig Sat Feb 16 09:12:55 2002
  3. +++ nsprpub/pr/include/md/_freebsd.h Thu Aug 8 19:31:23 2002
  4. @@ -40,6 +40,7 @@
  5. #if __FreeBSD__ >= 2
  6. #include <osreldate.h> /* for __FreeBSD_version */
  7. #endif
  8. +#include <sys/param.h>
  9. #include <sys/syscall.h>
  10. #define PR_LINKER_ARCH "freebsd"
  11. Index: nsprpub/pr/include/md/_pth.h
  12. --- nsprpub/pr/include/md/_pth.h.orig 2002-12-12 00:10:39 +0100
  13. +++ nsprpub/pr/include/md/_pth.h 2004-12-27 19:52:48 +0100
  14. @@ -90,7 +90,7 @@
  15. #define _PT_PTHREAD_MUTEXATTR_INIT pthread_mutexattr_init
  16. #define _PT_PTHREAD_MUTEXATTR_DESTROY pthread_mutexattr_destroy
  17. #define _PT_PTHREAD_MUTEX_INIT(m, a) pthread_mutex_init(&(m), &(a))
  18. -#define _PT_PTHREAD_MUTEX_IS_LOCKED(m) (EBUSY == pthread_mutex_trylock(&(m)))
  19. +#define _PT_PTHREAD_MUTEX_IS_LOCKED(m) (0 != pthread_mutex_trylock(&(m)))
  20. #if defined(DARWIN)
  21. #define _PT_PTHREAD_CONDATTR_INIT(x) 0
  22. #else
  23. Index: nsprpub/pr/src/md/unix/unix.c
  24. --- nsprpub/pr/src/md/unix/unix.c.orig Sat May 31 18:06:04 2003
  25. +++ nsprpub/pr/src/md/unix/unix.c Sat May 31 18:04:43 2003
  26. @@ -65,7 +65,8 @@
  27. * PRInt32* pointer to a _PRSockLen_t* pointer.
  28. */
  29. #if defined(HAVE_SOCKLEN_T) \
  30. - || (defined(LINUX) && defined(__GLIBC__) && __GLIBC__ >= 2)
  31. + || (defined(LINUX) && defined(__GLIBC__) && __GLIBC__ >= 2) \
  32. + || defined(FREEBSD)
  33. #define _PRSockLen_t socklen_t
  34. #elif defined(IRIX) || defined(HPUX) || defined(OSF1) || defined(SOLARIS) \
  35. || defined(AIX4_1) || defined(LINUX) || defined(SONY) \
  36. @@ -73,7 +74,7 @@
  37. || defined(SUNOS4) || defined(NCR) || defined(DARWIN) \
  38. || defined(NEXTSTEP) || defined(QNX)
  39. #define _PRSockLen_t int
  40. -#elif (defined(AIX) && !defined(AIX4_1)) || defined(FREEBSD) \
  41. +#elif (defined(AIX) && !defined(AIX4_1)) \
  42. || defined(NETBSD) || defined(OPENBSD) || defined(UNIXWARE) \
  43. || defined(DGUX) || defined(VMS) || defined(NTO)
  44. #define _PRSockLen_t size_t
  45. Index: nsprpub/pr/src/pthreads/ptio.c
  46. --- nsprpub/pr/src/pthreads/ptio.c.orig 2003-07-15 00:12:19 +0200
  47. +++ nsprpub/pr/src/pthreads/ptio.c 2004-12-27 19:54:28 +0100
  48. @@ -189,7 +189,7 @@
  49. #endif
  50. #endif
  51. -#ifdef DARWIN
  52. +#if defined(DARWIN) || defined(FREEBSD)
  53. static PRBool _pr_ipv6_v6only_on_by_default;
  54. /* The IPV6_V6ONLY socket option is not defined on Mac OS X 10.1. */
  55. #ifndef IPV6_V6ONLY
  56. @@ -1154,7 +1154,7 @@
  57. _pr_stderr = pt_SetMethods(2, PR_DESC_FILE, PR_FALSE, PR_TRUE);
  58. PR_ASSERT(_pr_stdin && _pr_stdout && _pr_stderr);
  59. -#ifdef DARWIN
  60. +#if defined(DARWIN) || defined(FREEBSD)
  61. /* In Mac OS X v10.3 Panther Beta the IPV6_V6ONLY socket option
  62. * is turned on by default, contrary to what RFC 3493, Section
  63. * 5.3 says. So we have to turn it off. Find out whether we
  64. @@ -3462,7 +3462,7 @@
  65. if (osfd == -1) pt_MapError(_PR_MD_MAP_SOCKET_ERROR, errno);
  66. else
  67. {
  68. -#ifdef DARWIN
  69. +#if defined(DARWIN) || defined(FREEBSD)
  70. if ((domain == AF_INET6) && _pr_ipv6_v6only_on_by_default)
  71. {
  72. int on = 0;
  73. @@ -3470,6 +3470,17 @@
  74. &on, sizeof(on));
  75. }
  76. #endif
  77. +#if (defined(_PR_INET6_PROBE) || defined(_PR_INET6)) && \
  78. + defined(__FreeBSD__) && defined(IPV6_V6ONLY)
  79. + if (domain == PR_AF_INET6) {
  80. + int opt = 0;
  81. + if (setsockopt(osfd, IPPROTO_IPV6, IPV6_V6ONLY,
  82. + &opt, sizeof(opt))) {
  83. + close(osfd);
  84. + return NULL;
  85. + }
  86. + }
  87. +#endif
  88. fd = pt_SetMethods(osfd, ftype, PR_FALSE, PR_FALSE);
  89. if (fd == NULL) close(osfd);
  90. }
  91. Index: layout/svg/renderer/src/cairo/nsSVGCairoCanvas.cpp
  92. --- layout/svg/renderer/src/cairo/nsSVGCairoCanvas.cpp.orig 2005-02-04 20:01:59 +0100
  93. +++ layout/svg/renderer/src/cairo/nsSVGCairoCanvas.cpp 2005-02-04 20:02:52 +0100
  94. @@ -50,6 +50,11 @@
  95. #include "nsRenderingContextGTK.h"
  96. #include <gdk/gdkx.h>
  97. #include <cairo.h>
  98. +#ifdef CAIRO_HAS_XLIB_SURFACE
  99. +#include <cairo-xlib.h>
  100. +#else
  101. +#error Require Cairo with Xlib backend
  102. +#endif
  103. /**
  104. * \addtogroup cairo_renderer Cairo Rendering Engine
  105. Index: layout/svg/renderer/src/cairo/nsSVGCairoGlyphMetrics.cpp
  106. --- layout/svg/renderer/src/cairo/nsSVGCairoGlyphMetrics.cpp.orig 2004-03-16 22:40:07 +0100
  107. +++ layout/svg/renderer/src/cairo/nsSVGCairoGlyphMetrics.cpp 2005-02-04 20:03:40 +0100
  108. @@ -50,6 +50,7 @@
  109. #include "nsIDOMSVGRect.h"
  110. #include "nsSVGTypeCIDs.h"
  111. #include "nsIComponentManager.h"
  112. +#include <stdlib.h>
  113. #include <cairo.h>
  114. /**
  115. Index: config/make-jars.pl
  116. --- config/make-jars.pl.orig 2004-07-21 20:33:37 +0200
  117. +++ config/make-jars.pl 2005-04-22 20:34:14 +0200
  118. @@ -40,6 +40,7 @@
  119. last if ($arg eq "--");
  120. }
  121. my $defines = join(' ', @ARGV[ $ddindex .. $#ARGV ]);
  122. +splice @ARGV, $ddindex, $#ARGV;
  123. getopts("d:s:t:f:avlD:o:p:xz:");
  124. The binutils ld(1) doesn't properly link with Solaris 10 libc(3) anymore,
  125. probably influenced by Sun's new decision to only provide dynamic libraries.
  126. Strangely only a few link tasks fail, so selectively override the otherwise
  127. correct makefiles containing binutils ld(1).
  128. Index: xpcom/tools/registry/Makefile
  129. --- xpcom/tools/registry/Makefile.in.orig 2004-02-19 03:44:01.000000000 +0100
  130. +++ xpcom/tools/registry/Makefile.in 2005-04-27 11:32:16.843943386 +0200
  131. @@ -59,3 +59,13 @@
  132. include $(topsrcdir)/config/rules.mk
  133. +# The binutils ld(1) doesn't properly link with Solaris 10 libc(3).
  134. +# Strangely only a few link tasks fail like this one, so selectively
  135. +# override the otherwise correct rules.mk Makefile containing binutils ld(1).
  136. +ifeq ($(OS_ARCH),SunOS)
  137. +OS_LIBS += -lc
  138. +$(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile Makefile.in
  139. + $(LD) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) -lxpcom $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB)
  140. +$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile Makefile.in
  141. + $(LD) -o $@ $< $(LDFLAGS) $(LIBS_DIR) $(LIBS) -lxpcom $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB)
  142. +endif
  143. Index: widget/src/xremoteclient/Makefile.in
  144. --- widget/src/xremoteclient/Makefile.in.orig 2004-01-07 14:36:56.000000000 +0100
  145. +++ widget/src/xremoteclient/Makefile.in 2005-04-27 11:32:15.926611978 +0200
  146. @@ -73,6 +73,17 @@
  147. include $(topsrcdir)/config/rules.mk
  148. +# The binutils ld(1) doesn't properly link with Solaris 10 libc(3).
  149. +# Strangely only a few link tasks fail like this one, so selectively
  150. +# override the otherwise correct rules.mk Makefile containing binutils ld(1).
  151. +ifeq ($(OS_ARCH),SunOS)
  152. +OS_LIBS += -lc
  153. +$(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile Makefile.in
  154. + $(LD) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) -lxpcom $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB)
  155. +$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile Makefile.in
  156. + $(LD) -o $@ $< $(LDFLAGS) $(LIBS_DIR) $(LIBS) -lxpcom $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB)
  157. +endif
  158. +
  159. ifeq ($(OS_ARCH), OpenVMS)
  160. DEFINES += -DGENERIC_MOTIF_REDEFINES
  161. endif
  162. Index: js/src/xpconnect/shell/Makefile.in
  163. --- js/src/xpconnect/shell/Makefile.in.orig 2003-11-15 01:11:10.000000000 +0100
  164. +++ js/src/xpconnect/shell/Makefile.in 2005-04-27 12:09:35.762975909 +0200
  165. @@ -60,6 +60,17 @@
  166. include $(topsrcdir)/config/rules.mk
  167. +# The binutils ld(1) doesn't properly link with Solaris 10 libc(3).
  168. +# Strangely only a few link tasks fail like this one, so selectively
  169. +# override the otherwise correct rules.mk Makefile containing binutils ld(1).
  170. +ifeq ($(OS_ARCH),SunOS)
  171. +OS_LIBS += -lc
  172. +$(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile Makefile.in
  173. + $(LD) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB)
  174. +$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile Makefile.in
  175. + $(LD) -o $@ $< $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB)
  176. +endif
  177. +
  178. DEFINES += -DJS_THREADSAFE
  179. #
  180. Index: chrome/tools/chromereg/Makefile.in
  181. --- chrome/tools/chromereg/Makefile.in.orig 2003-12-22 21:45:06.000000000 +0100
  182. +++ chrome/tools/chromereg/Makefile.in 2005-04-27 16:21:14.205900993 +0200
  183. @@ -44,3 +44,14 @@
  184. $(NULL)
  185. include $(topsrcdir)/config/rules.mk
  186. +
  187. +# The binutils ld(1) doesn't properly link with Solaris 10 libc(3).
  188. +# Strangely only a few link tasks fail like this one, so selectively
  189. +# override the otherwise correct rules.mk Makefile containing binutils ld(1).
  190. +ifeq ($(OS_ARCH),SunOS)
  191. +OS_LIBS += -lc
  192. +$(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile Makefile.in
  193. + $(LD) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB)
  194. +$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile Makefile.in
  195. + $(LD) -o $@ $< $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB)
  196. +endif
  197. Index: security/nss/cmd/shlibsign/Makefile
  198. --- security/nss/cmd/shlibsign/Makefile.orig 2003-04-16 00:42:09.000000000 +0200
  199. +++ security/nss/cmd/shlibsign/Makefile 2005-04-27 18:13:37.842242152 +0200
  200. @@ -87,6 +87,17 @@
  201. include $(CORE_DEPTH)/coreconf/rules.mk
  202. +# The binutils ld(1) doesn't properly link with Solaris 10 libc(3).
  203. +# Strangely only a few link tasks fail like this one, so selectively
  204. +# override the otherwise correct rules.mk Makefile containing binutils ld(1).
  205. +ifeq ($(OS_ARCH),SunOS)
  206. +OS_LIBS += -lc
  207. +$(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile
  208. + $(LD) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB)
  209. +$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile
  210. + $(LD) -o $@ $< $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB)
  211. +endif
  212. +
  213. #######################################################################
  214. # (6) Execute "component" rules. (OPTIONAL) #
  215. #######################################################################
  216. @@ -100,8 +110,8 @@
  217. include ../platrules.mk
  218. %.chk: %.$(DLL_SUFFIX)
  219. -ifeq ($(OS_TARGET), OS2)
  220. - @cmd.exe /c sign.cmd $(DIST) $(OBJDIR) $(OS_TARGET) $<
  221. +ifeq ($(OS_TARGET), SunOS)
  222. + touch `echo $< | cut -f1,1 -d.`.chk
  223. else
  224. @sh ./sign.sh $(DIST) $(OBJDIR) $(OS_TARGET) $<
  225. endif
  226. Index: security/nss/cmd/shlibsign/mangle/Makefile
  227. --- security/nss/cmd/shlibsign/mangle/Makefile.orig 2003-02-05 00:16:54.000000000 +0100
  228. +++ security/nss/cmd/shlibsign/mangle/Makefile 2005-04-27 16:51:22.816692955 +0200
  229. @@ -61,6 +61,17 @@
  230. include $(CORE_DEPTH)/coreconf/rules.mk
  231. +# The binutils ld(1) doesn't properly link with Solaris 10 libc(3).
  232. +# Strangely only a few link tasks fail like this one, so selectively
  233. +# override the otherwise correct rules.mk Makefile containing binutils ld(1).
  234. +ifeq ($(OS_ARCH),SunOS)
  235. +OS_LIBS += -lc
  236. +$(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile
  237. + $(LD) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB)
  238. +$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile
  239. + $(LD) -o $@ $< $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB)
  240. +endif
  241. +
  242. #######################################################################
  243. # (6) Execute "component" rules. (OPTIONAL) #
  244. #######################################################################
  245. Index: extensions/xmlterm/tests/Makefile.in
  246. --- extensions/xmlterm/tests/Makefile.in.orig 2001-03-10 04:25:14.000000000 +0100
  247. +++ extensions/xmlterm/tests/Makefile.in 2005-04-27 18:34:43.020625605 +0200
  248. @@ -70,3 +70,14 @@
  249. include $(srcdir)/../config/xmlterm_config.mk
  250. include $(topsrcdir)/config/rules.mk
  251. +
  252. +# The binutils ld(1) doesn't properly link with Solaris 10 libc(3).
  253. +# Strangely only a few link tasks fail like this one, so selectively
  254. +# override the otherwise correct rules.mk Makefile containing binutils ld(1).
  255. +ifeq ($(OS_ARCH),SunOS)
  256. +OS_LIBS += -lc
  257. +$(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile Makefile.in
  258. + $(LD) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB)
  259. +$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile Makefile.in
  260. + $(LD) -o $@ $< $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB)
  261. +endif
  262. Index: browser/app/Makefile.in
  263. --- browser/app/Makefile.in.orig 2004-11-07 01:33:34.000000000 +0100
  264. +++ browser/app/Makefile.in 2005-04-27 19:25:12.843462753 +0200
  265. @@ -158,6 +158,19 @@
  266. include $(topsrcdir)/config/static-rules.mk
  267. endif
  268. +# The binutils ld(1) doesn't properly link with Solaris 10 libc(3).
  269. +# Strangely only a few link tasks fail like this one, so selectively
  270. +# override the otherwise correct rules.mk Makefile containing binutils ld(1).
  271. +ifeq ($(OS_ARCH),SunOS)
  272. +OS_LIBS += -lc
  273. +LDFLAGS += -L@l_gccinst@
  274. +EXTRA_LIBS += -lgcc
  275. +$(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile Makefile.in
  276. + $(LD) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB)
  277. +$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile Makefile.in
  278. + $(LD) -o $@ $< $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB)
  279. +endif
  280. +
  281. APP_VERSION = $(shell cat $(srcdir)/../config/version.txt)
  282. DEFINES += -DAPP_VERSION=\"$(APP_VERSION)\"
  283. Index: embedding/browser/gtk/tests/Makefile.in
  284. --- embedding/browser/gtk/tests/Makefile.in.orig 2003-10-07 04:43:00.000000000 +0200
  285. +++ embedding/browser/gtk/tests/Makefile.in 2005-04-27 19:52:07.615790759 +0200
  286. @@ -114,6 +114,19 @@
  287. include $(topsrcdir)/config/rules.mk
  288. +# The binutils ld(1) doesn't properly link with Solaris 10 libc(3).
  289. +# Strangely only a few link tasks fail like this one, so selectively
  290. +# override the otherwise correct rules.mk Makefile containing binutils ld(1).
  291. +ifeq ($(OS_ARCH),SunOS)
  292. +OS_LIBS += -lc
  293. +LDFLAGS += -L@l_gccinst@
  294. +EXTRA_LIBS += -lgcc
  295. +$(PROGRAM): $(PROGOBJS) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile Makefile.in
  296. + $(LD) -o $@ $(PROGOBJS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB)
  297. +$(SIMPLE_PROGRAMS): %$(BIN_SUFFIX): %.$(OBJ_SUFFIX) $(LIBS_DEPS) $(EXTRA_DEPS) Makefile Makefile.in
  298. + $(LD) -o $@ $< $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(BIN_FLAGS) $(WRAP_MALLOC_LIB)
  299. +endif
  300. +
  301. CXXFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS)
  302. ifdef ENABLE_GNOME
  303. Repair build configuration and replace conflicting identifiers
  304. (like global namespace variable names 'L' or 'R' - a bad idea)
  305. to correct build errors on Solaris x86 and Solaris SPARC.
  306. Index: layout/base/public/nsBidi.h
  307. --- layout/base/public/nsBidi.h.orig 2002-11-23 00:49:26.000000000 +0100
  308. +++ layout/base/public/nsBidi.h 2005-04-27 15:23:33.786839294 +0200
  309. @@ -281,36 +281,36 @@
  310. #define DIRPROP_FLAG_MULTI_RUNS (1UL<<31)
  311. /* are there any characters that are LTR or RTL? */
  312. -#define MASK_LTR (DIRPROP_FLAG(L)|DIRPROP_FLAG(EN)|DIRPROP_FLAG(AN)|DIRPROP_FLAG(LRE)|DIRPROP_FLAG(LRO))
  313. -#define MASK_RTL (DIRPROP_FLAG(R)|DIRPROP_FLAG(AL)|DIRPROP_FLAG(RLE)|DIRPROP_FLAG(RLO))
  314. +#define MASK_LTR (DIRPROP_FLAG(Moz_L)|DIRPROP_FLAG(Moz_EN)|DIRPROP_FLAG(Moz_AN)|DIRPROP_FLAG(Moz_LRE)|DIRPROP_FLAG(Moz_LRO))
  315. +#define MASK_RTL (DIRPROP_FLAG(Moz_R)|DIRPROP_FLAG(Moz_AL)|DIRPROP_FLAG(Moz_RLE)|DIRPROP_FLAG(Moz_RLO))
  316. /* explicit embedding codes */
  317. -#define MASK_LRX (DIRPROP_FLAG(LRE)|DIRPROP_FLAG(LRO))
  318. -#define MASK_RLX (DIRPROP_FLAG(RLE)|DIRPROP_FLAG(RLO))
  319. -#define MASK_OVERRIDE (DIRPROP_FLAG(LRO)|DIRPROP_FLAG(RLO))
  320. +#define MASK_LRX (DIRPROP_FLAG(Moz_LRE)|DIRPROP_FLAG(Moz_LRO))
  321. +#define MASK_RLX (DIRPROP_FLAG(Moz_RLE)|DIRPROP_FLAG(Moz_RLO))
  322. +#define MASK_OVERRIDE (DIRPROP_FLAG(Moz_LRO)|DIRPROP_FLAG(Moz_RLO))
  323. -#define MASK_EXPLICIT (MASK_LRX|MASK_RLX|DIRPROP_FLAG(PDF))
  324. -#define MASK_BN_EXPLICIT (DIRPROP_FLAG(BN)|MASK_EXPLICIT)
  325. +#define MASK_EXPLICIT (MASK_LRX|MASK_RLX|DIRPROP_FLAG(Moz_PDF))
  326. +#define MASK_BN_EXPLICIT (DIRPROP_FLAG(Moz_BN)|MASK_EXPLICIT)
  327. /* paragraph and segment separators */
  328. -#define MASK_B_S (DIRPROP_FLAG(B)|DIRPROP_FLAG(S))
  329. +#define MASK_B_S (DIRPROP_FLAG(Moz_B)|DIRPROP_FLAG(Moz_S))
  330. /* all types that are counted as White Space or Neutral in some steps */
  331. -#define MASK_WS (MASK_B_S|DIRPROP_FLAG(WS)|MASK_BN_EXPLICIT)
  332. -#define MASK_N (DIRPROP_FLAG(O_N)|MASK_WS)
  333. +#define MASK_WS (MASK_B_S|DIRPROP_FLAG(Moz_WS)|MASK_BN_EXPLICIT)
  334. +#define MASK_N (DIRPROP_FLAG(Moz_O_N)|MASK_WS)
  335. /* all types that are included in a sequence of European Terminators for (W5) */
  336. -#define MASK_ET_NSM_BN (DIRPROP_FLAG(ET)|DIRPROP_FLAG(NSM)|MASK_BN_EXPLICIT)
  337. +#define MASK_ET_NSM_BN (DIRPROP_FLAG(Moz_ET)|DIRPROP_FLAG(Moz_NSM)|MASK_BN_EXPLICIT)
  338. /* types that are neutrals or could becomes neutrals in (Wn) */
  339. -#define MASK_POSSIBLE_N (DIRPROP_FLAG(CS)|DIRPROP_FLAG(ES)|DIRPROP_FLAG(ET)|MASK_N)
  340. +#define MASK_POSSIBLE_N (DIRPROP_FLAG(Moz_CS)|DIRPROP_FLAG(Moz_ES)|DIRPROP_FLAG(Moz_ET)|MASK_N)
  341. /*
  342. * These types may be changed to "e",
  343. * the embedding type (L or R) of the run,
  344. * in the Bidi algorithm (N2)
  345. */
  346. -#define MASK_EMBEDDING (DIRPROP_FLAG(NSM)|MASK_POSSIBLE_N)
  347. +#define MASK_EMBEDDING (DIRPROP_FLAG(Moz_NSM)|MASK_POSSIBLE_N)
  348. /* the dirProp's L and R are defined to 0 and 1 values in nsCharType */
  349. #define GET_LR_FROM_LEVEL(level) ((DirProp)((level)&1))
  350. @@ -573,18 +573,18 @@
  351. * the text must be zero-terminated.
  352. *
  353. * @param aParaLevel specifies the default level for the paragraph;
  354. - * it is typically 0 (LTR) or 1 (RTL).
  355. + * it is typically 0 (Moz_LTR) or 1 (Moz_RTL).
  356. * If the function shall determine the paragraph level from the text,
  357. * then <code>aParaLevel</code> can be set to
  358. * either <code>NSBIDI_DEFAULT_LTR</code>
  359. * or <code>NSBIDI_DEFAULT_RTL</code>;
  360. * if there is no strongly typed character, then
  361. - * the desired default is used (0 for LTR or 1 for RTL).
  362. + * the desired default is used (0 for Moz_LTR or 1 for Moz_RTL).
  363. * Any other value between 0 and <code>NSBIDI_MAX_EXPLICIT_LEVEL</code> is also valid,
  364. - * with odd levels indicating RTL.
  365. + * with odd levels indicating Moz_RTL.
  366. *
  367. * @param aEmbeddingLevels (in) may be used to preset the embedding and override levels,
  368. - * ignoring characters like LRE and PDF in the text.
  369. + * ignoring characters like Moz_LRE and Moz_PDF in the text.
  370. * A level overrides the directional property of its corresponding
  371. * (same index) character if the level has the
  372. * <code>NSBIDI_LEVEL_OVERRIDE</code> bit set.<p>
  373. @@ -620,7 +620,7 @@
  374. * It is not necessary if the paragraph is treated as a single line.<p>
  375. *
  376. * After line-breaking, rules (L1) and (L2) for the treatment of
  377. - * trailing WS and for reordering are performed on
  378. + * trailing Moz_WS and for reordering are performed on
  379. * an <code>nsBidi</code> object that represents a line.<p>
  380. *
  381. * <strong>Important:</strong> the line <code>nsBidi</code> object shares data with
  382. @@ -946,7 +946,7 @@
  383. /**
  384. * Give a Unichar
  385. - * return PR_TRUE if the Unichar is a Bidi control character (LRE, RLE, PDF, LRO, RLO, LRM, RLM)
  386. + * return PR_TRUE if the Unichar is a Bidi control character (Moz_LRE, Moz_RLE, Moz_PDF, Moz_LRO, Moz_RLO, Moz_LRM, Moz_RLM)
  387. * return PR_FALSE, otherwise
  388. */
  389. PRBool IsBidiControl(PRUnichar aChar);
  390. @@ -978,7 +978,7 @@
  391. /** the overall paragraph or line directionality - see nsBidiDirection */
  392. nsBidiDirection mDirection;
  393. - /** characters after trailingWSStart are WS and are */
  394. + /** characters after trailingWSStart are Moz_WS and are */
  395. /* implicitly at the paraLevel (rule (L1)) - levels may not reflect that */
  396. PRInt32 mTrailingWSStart;
  397. Index: layout/base/src/nsBidi.cpp
  398. --- layout/base/src/nsBidi.cpp.orig 2005-04-27 14:12:15.099746000 +0200
  399. +++ layout/base/src/nsBidi.cpp 2005-04-27 15:26:21.014728623 +0200
  400. @@ -63,32 +63,32 @@
  401. is easier with the same names for the Bidi types in the code as there.
  402. */
  403. enum {
  404. - L = eCharType_LeftToRight,
  405. - R = eCharType_RightToLeft,
  406. - EN = eCharType_EuropeanNumber,
  407. - ES = eCharType_EuropeanNumberSeparator,
  408. - ET = eCharType_EuropeanNumberTerminator,
  409. - AN = eCharType_ArabicNumber,
  410. - CS = eCharType_CommonNumberSeparator,
  411. - B = eCharType_BlockSeparator,
  412. - S = eCharType_SegmentSeparator,
  413. - WS = eCharType_WhiteSpaceNeutral,
  414. - O_N = eCharType_OtherNeutral,
  415. - LRE = eCharType_LeftToRightEmbedding,
  416. - LRO = eCharType_LeftToRightOverride,
  417. - AL = eCharType_RightToLeftArabic,
  418. - RLE = eCharType_RightToLeftEmbedding,
  419. - RLO = eCharType_RightToLeftOverride,
  420. - PDF = eCharType_PopDirectionalFormat,
  421. - NSM = eCharType_DirNonSpacingMark,
  422. - BN = eCharType_BoundaryNeutral,
  423. + Moz_L = eCharType_LeftToRight,
  424. + Moz_R = eCharType_RightToLeft,
  425. + Moz_EN = eCharType_EuropeanNumber,
  426. + Moz_ES = eCharType_EuropeanNumberSeparator,
  427. + Moz_ET = eCharType_EuropeanNumberTerminator,
  428. + Moz_AN = eCharType_ArabicNumber,
  429. + Moz_CS = eCharType_CommonNumberSeparator,
  430. + Moz_B = eCharType_BlockSeparator,
  431. + Moz_S = eCharType_SegmentSeparator,
  432. + Moz_WS = eCharType_WhiteSpaceNeutral,
  433. + Moz_O_N = eCharType_OtherNeutral,
  434. + Moz_LRE = eCharType_LeftToRightEmbedding,
  435. + Moz_LRO = eCharType_LeftToRightOverride,
  436. + Moz_AL = eCharType_RightToLeftArabic,
  437. + Moz_RLE = eCharType_RightToLeftEmbedding,
  438. + Moz_RLO = eCharType_RightToLeftOverride,
  439. + Moz_PDF = eCharType_PopDirectionalFormat,
  440. + Moz_NSM = eCharType_DirNonSpacingMark,
  441. + Moz_BN = eCharType_BoundaryNeutral,
  442. dirPropCount
  443. };
  444. /* to avoid some conditional statements, use tiny constant arrays */
  445. -static Flags flagLR[2]={ DIRPROP_FLAG(L), DIRPROP_FLAG(R) };
  446. -static Flags flagE[2]={ DIRPROP_FLAG(LRE), DIRPROP_FLAG(RLE) };
  447. -static Flags flagO[2]={ DIRPROP_FLAG(LRO), DIRPROP_FLAG(RLO) };
  448. +static Flags flagLR[2]={ DIRPROP_FLAG(Moz_L), DIRPROP_FLAG(Moz_R) };
  449. +static Flags flagE[2]={ DIRPROP_FLAG(Moz_LRE), DIRPROP_FLAG(Moz_RLE) };
  450. +static Flags flagO[2]={ DIRPROP_FLAG(Moz_LRO), DIRPROP_FLAG(Moz_RLO) };
  451. #define DIRPROP_FLAG_LR(level) flagLR[(level)&1]
  452. #define DIRPROP_FLAG_E(level) flagE[(level)&1]
  453. @@ -348,10 +348,10 @@
  454. mParaLevel&=1;
  455. }
  456. if(aParaLevel&1) {
  457. - mFlags=DIRPROP_FLAG(R);
  458. + mFlags=DIRPROP_FLAG(Moz_R);
  459. mDirection=NSBIDI_RTL;
  460. } else {
  461. - mFlags=DIRPROP_FLAG(L);
  462. + mFlags=DIRPROP_FLAG(Moz_L);
  463. mDirection=NSBIDI_LTR;
  464. }
  465. @@ -509,14 +509,14 @@
  466. flags|=DIRPROP_FLAG(dirProps[i]=dirProp=GetCharType(uchar));
  467. } else {
  468. /* a surrogate pair */
  469. - dirProps[i++]=BN; /* first surrogate in the pair gets the BN type */
  470. - flags|=DIRPROP_FLAG(dirProps[i]=dirProp=GetCharType(GET_UTF_32(uchar, aText[i])))|DIRPROP_FLAG(BN);
  471. + dirProps[i++]=Moz_BN; /* first surrogate in the pair gets the Moz_BN type */
  472. + flags|=DIRPROP_FLAG(dirProps[i]=dirProp=GetCharType(GET_UTF_32(uchar, aText[i])))|DIRPROP_FLAG(Moz_BN);
  473. }
  474. ++i;
  475. - if(dirProp==L) {
  476. + if(dirProp==Moz_L) {
  477. mParaLevel=0;
  478. break;
  479. - } else if(dirProp==R || dirProp==AL) {
  480. + } else if(dirProp==Moz_R || dirProp==Moz_AL) {
  481. mParaLevel=1;
  482. break;
  483. } else if(i==length) {
  484. @@ -539,8 +539,8 @@
  485. flags|=DIRPROP_FLAG(dirProps[i]=GetCharType(uchar));
  486. } else {
  487. /* a surrogate pair */
  488. - dirProps[i++]=BN; /* second surrogate in the pair gets the BN type */
  489. - flags|=DIRPROP_FLAG(dirProps[i]=GetCharType(GET_UTF_32(uchar, aText[i])))|DIRPROP_FLAG(BN);
  490. + dirProps[i++]=Moz_BN; /* second surrogate in the pair gets the Moz_BN type */
  491. + flags|=DIRPROP_FLAG(dirProps[i]=GetCharType(GET_UTF_32(uchar, aText[i])))|DIRPROP_FLAG(Moz_BN);
  492. }
  493. ++i;
  494. }
  495. @@ -590,7 +590,7 @@
  496. * Handling the stack of explicit levels (Xn):
  497. *
  498. * With the Bidi stack of explicit levels,
  499. - * as pushed with each LRE, RLE, LRO, and RLO and popped with each PDF,
  500. + * as pushed with each Moz_LRE, Moz_RLE, Moz_LRO, and Moz_RLO and popped with each Moz_PDF,
  501. * the explicit level must never exceed NSBIDI_MAX_EXPLICIT_LEVEL==61.
  502. *
  503. * In order to have a correct push-pop semantics even in the case of overflows,
  504. @@ -646,15 +646,15 @@
  505. for(i=0; i<length; ++i) {
  506. dirProp=dirProps[i];
  507. switch(dirProp) {
  508. - case LRE:
  509. - case LRO:
  510. + case Moz_LRE:
  511. + case Moz_LRO:
  512. /* (X3, X5) */
  513. newLevel=(embeddingLevel+2)&~(NSBIDI_LEVEL_OVERRIDE|1); /* least greater even level */
  514. if(newLevel<=NSBIDI_MAX_EXPLICIT_LEVEL) {
  515. stack[stackTop]=embeddingLevel;
  516. ++stackTop;
  517. embeddingLevel=newLevel;
  518. - if(dirProp==LRO) {
  519. + if(dirProp==Moz_LRO) {
  520. embeddingLevel|=NSBIDI_LEVEL_OVERRIDE;
  521. } else {
  522. embeddingLevel&=~NSBIDI_LEVEL_OVERRIDE;
  523. @@ -664,17 +664,17 @@
  524. } else /* (embeddingLevel&~NSBIDI_LEVEL_OVERRIDE)==NSBIDI_MAX_EXPLICIT_LEVEL-1 */ {
  525. ++countOver60;
  526. }
  527. - flags|=DIRPROP_FLAG(BN);
  528. + flags|=DIRPROP_FLAG(Moz_BN);
  529. break;
  530. - case RLE:
  531. - case RLO:
  532. + case Moz_RLE:
  533. + case Moz_RLO:
  534. /* (X2, X4) */
  535. newLevel=((embeddingLevel&~NSBIDI_LEVEL_OVERRIDE)+1)|1; /* least greater odd level */
  536. if(newLevel<=NSBIDI_MAX_EXPLICIT_LEVEL) {
  537. stack[stackTop]=embeddingLevel;
  538. ++stackTop;
  539. embeddingLevel=newLevel;
  540. - if(dirProp==RLO) {
  541. + if(dirProp==Moz_RLO) {
  542. embeddingLevel|=NSBIDI_LEVEL_OVERRIDE;
  543. } else {
  544. embeddingLevel&=~NSBIDI_LEVEL_OVERRIDE;
  545. @@ -682,15 +682,15 @@
  546. } else {
  547. ++countOver61;
  548. }
  549. - flags|=DIRPROP_FLAG(BN);
  550. + flags|=DIRPROP_FLAG(Moz_BN);
  551. break;
  552. - case PDF:
  553. + case Moz_PDF:
  554. /* (X7) */
  555. /* handle all the overflow cases first */
  556. if(countOver61>0) {
  557. --countOver61;
  558. } else if(countOver60>0 && (embeddingLevel&~NSBIDI_LEVEL_OVERRIDE)!=NSBIDI_MAX_EXPLICIT_LEVEL) {
  559. - /* handle LRx overflows from level 60 */
  560. + /* handle Moz_LRx overflows from level 60 */
  561. --countOver60;
  562. } else if(stackTop>0) {
  563. /* this is the pop operation; it also pops level 61 while countOver60>0 */
  564. @@ -698,23 +698,23 @@
  565. embeddingLevel=stack[stackTop];
  566. /* } else { (underflow) */
  567. }
  568. - flags|=DIRPROP_FLAG(BN);
  569. + flags|=DIRPROP_FLAG(Moz_BN);
  570. break;
  571. - case B:
  572. + case Moz_B:
  573. /*
  574. - * We do not really expect to see a paragraph separator (B),
  575. + * We do not really expect to see a paragraph separator (Moz_B),
  576. * but we should do something reasonable with it,
  577. * especially at the end of the text.
  578. */
  579. stackTop=0;
  580. countOver60=countOver61=0;
  581. embeddingLevel=level=mParaLevel;
  582. - flags|=DIRPROP_FLAG(B);
  583. + flags|=DIRPROP_FLAG(Moz_B);
  584. break;
  585. - case BN:
  586. - /* BN, LRE, RLE, and PDF are supposed to be removed (X9) */
  587. + case Moz_BN:
  588. + /* Moz_BN, Moz_LRE, Moz_RLE, and Moz_PDF are supposed to be removed (X9) */
  589. /* they will get their levels set correctly in AdjustWSLevels() */
  590. - flags|=DIRPROP_FLAG(BN);
  591. + flags|=DIRPROP_FLAG(Moz_BN);
  592. break;
  593. default:
  594. /* all other types get the "real" level */
  595. @@ -733,7 +733,7 @@
  596. }
  597. /*
  598. - * We need to set reasonable levels even on BN codes and
  599. + * We need to set reasonable levels even on Moz_BN codes and
  600. * explicit codes because we will later look at same-level runs (X10).
  601. */
  602. levels[i]=level;
  603. @@ -742,7 +742,7 @@
  604. flags|=DIRPROP_FLAG_LR(mParaLevel);
  605. }
  606. - /* subsequently, ignore the explicit codes and BN (X9) */
  607. + /* subsequently, ignore the explicit codes and Moz_BN (X9) */
  608. /* again, determine if the text is mixed-directional or single-directional */
  609. mFlags=flags;
  610. @@ -799,8 +799,8 @@
  611. /* determine if the text is mixed-directional or single-directional */
  612. nsBidiDirection nsBidi::DirectionFromFlags(Flags aFlags)
  613. {
  614. - /* if the text contains AN and neutrals, then some neutrals may become RTL */
  615. - if(!(aFlags&MASK_RTL || aFlags&DIRPROP_FLAG(AN) && aFlags&MASK_POSSIBLE_N)) {
  616. + /* if the text contains Moz_AN and neutrals, then some neutrals may become Moz_RTL */
  617. + if(!(aFlags&MASK_RTL || aFlags&DIRPROP_FLAG(Moz_AN) && aFlags&MASK_POSSIBLE_N)) {
  618. return NSBIDI_LTR;
  619. } else if(!(aFlags&MASK_LTR)) {
  620. return NSBIDI_RTL;
  621. @@ -891,73 +891,73 @@
  622. /* (W1..W7) */
  623. switch(dirProp) {
  624. - case L:
  625. - lastStrong=L;
  626. + case Moz_L:
  627. + lastStrong=Moz_L;
  628. break;
  629. - case R:
  630. - lastStrong=R;
  631. + case Moz_R:
  632. + lastStrong=Moz_R;
  633. break;
  634. - case AL:
  635. + case Moz_AL:
  636. /* (W3) */
  637. - lastStrong=AL;
  638. - dirProp=R;
  639. + lastStrong=Moz_AL;
  640. + dirProp=Moz_R;
  641. break;
  642. - case EN:
  643. + case Moz_EN:
  644. /* we have to set historyOfEN correctly */
  645. - if(lastStrong==AL) {
  646. + if(lastStrong==Moz_AL) {
  647. /* (W2) */
  648. - dirProp=AN;
  649. + dirProp=Moz_AN;
  650. } else {
  651. - if(lastStrong==L) {
  652. + if(lastStrong==Moz_L) {
  653. /* (W7) */
  654. - dirProp=L;
  655. + dirProp=Moz_L;
  656. }
  657. - /* this EN stays after (W2) and (W4) - at least before (W7) */
  658. + /* this Moz_EN stays after (W2) and (W4) - at least before (W7) */
  659. historyOfEN|=EN_ALL;
  660. }
  661. break;
  662. - case ES:
  663. - if( historyOfEN&PREV_EN_AFTER_W2 && /* previous was EN before (W4) */
  664. - nextDirProp==EN && lastStrong!=AL /* next is EN and (W2) won't make it AN */
  665. + case Moz_ES:
  666. + if( historyOfEN&PREV_EN_AFTER_W2 && /* previous was Moz_EN before (W4) */
  667. + nextDirProp==Moz_EN && lastStrong!=Moz_AL /* next is EN and (W2) won't make it Moz_AN */
  668. ) {
  669. /* (W4) */
  670. - if(lastStrong!=L) {
  671. - dirProp=EN;
  672. + if(lastStrong!=Moz_L) {
  673. + dirProp=Moz_EN;
  674. } else {
  675. /* (W7) */
  676. - dirProp=L;
  677. + dirProp=Moz_L;
  678. }
  679. historyOfEN|=EN_AFTER_W4;
  680. } else {
  681. /* (W6) */
  682. - dirProp=O_N;
  683. + dirProp=Moz_O_N;
  684. }
  685. break;
  686. - case CS:
  687. - if( historyOfEN&PREV_EN_AFTER_W2 && /* previous was EN before (W4) */
  688. - nextDirProp==EN && lastStrong!=AL /* next is EN and (W2) won't make it AN */
  689. + case Moz_CS:
  690. + if( historyOfEN&PREV_EN_AFTER_W2 && /* previous was Moz_EN before (W4) */
  691. + nextDirProp==Moz_EN && lastStrong!=Moz_AL /* next is Moz_EN and (W2) won't make it Moz_AN */
  692. ) {
  693. /* (W4) */
  694. - if(lastStrong!=L) {
  695. - dirProp=EN;
  696. + if(lastStrong!=Moz_L) {
  697. + dirProp=Moz_EN;
  698. } else {
  699. /* (W7) */
  700. - dirProp=L;
  701. + dirProp=Moz_L;
  702. }
  703. historyOfEN|=EN_AFTER_W4;
  704. - } else if(prevDirProp==AN && /* previous was AN */
  705. - (nextDirProp==AN || /* next is AN */
  706. - nextDirProp==EN && lastStrong==AL) /* or (W2) will make it one */
  707. + } else if(prevDirProp==Moz_AN && /* previous was Moz_AN */
  708. + (nextDirProp==Moz_AN || /* next is Moz_AN */
  709. + nextDirProp==Moz_EN && lastStrong==Moz_AL) /* or (W2) will make it one */
  710. ) {
  711. /* (W4) */
  712. - dirProp=AN;
  713. + dirProp=Moz_AN;
  714. } else {
  715. /* (W6) */
  716. - dirProp=O_N;
  717. + dirProp=Moz_O_N;
  718. }
  719. break;
  720. - case ET:
  721. - /* get sequence of ET; advance only next, not current, previous or historyOfEN */
  722. + case Moz_ET:
  723. + /* get sequence of Moz_ET; advance only next, not current, previous or historyOfEN */
  724. while(next<aLimit && DIRPROP_FLAG(nextDirProp)&MASK_ET_NSM_BN /* (W1), (X9) */) {
  725. if(++next<aLimit) {
  726. nextDirProp=dirProps[next];
  727. @@ -967,31 +967,31 @@
  728. }
  729. }
  730. - if( historyOfEN&PREV_EN_AFTER_W4 || /* previous was EN before (W5) */
  731. - nextDirProp==EN && lastStrong!=AL /* next is EN and (W2) won't make it AN */
  732. + if( historyOfEN&PREV_EN_AFTER_W4 || /* previous was Moz_EN before (W5) */
  733. + nextDirProp==Moz_EN && lastStrong!=Moz_AL /* next is Moz_EN and (W2) won't make it Moz_AN */
  734. ) {
  735. /* (W5) */
  736. - if(lastStrong!=L) {
  737. - dirProp=EN;
  738. + if(lastStrong!=Moz_L) {
  739. + dirProp=Moz_EN;
  740. } else {
  741. /* (W7) */
  742. - dirProp=L;
  743. + dirProp=Moz_L;
  744. }
  745. } else {
  746. /* (W6) */
  747. - dirProp=O_N;
  748. + dirProp=Moz_O_N;
  749. }
  750. /* apply the result of (W1), (W5)..(W7) to the entire sequence of ET */
  751. break;
  752. - case NSM:
  753. + case Moz_NSM:
  754. /* (W1) */
  755. dirProp=prevDirProp;
  756. /* set historyOfEN back to prevDirProp's historyOfEN */
  757. historyOfEN>>=EN_SHIFT;
  758. /*
  759. * Technically, this should be done before the switch() in the form
  760. - * if(nextDirProp==NSM) {
  761. + * if(nextDirProp==Moz_NSM) {
  762. * dirProps[next]=nextDirProp=dirProp;
  763. * }
  764. *
  765. @@ -1004,9 +1004,9 @@
  766. break;
  767. }
  768. - /* here, it is always [prev,this,next]dirProp!=BN; it may be next>i+1 */
  769. + /* here, it is always [prev,this,next]dirProp!=Moz_BN; it may be next>i+1 */
  770. - /* perform (Nn) - here, only L, R, EN, AN, and neutrals are left */
  771. + /* perform (Nn) - here, only Moz_L, Moz_R, Moz_EN, Moz_AN, and neutrals are left */
  772. /* this is one iteration late for the neutrals */
  773. if(DIRPROP_FLAG(dirProp)&MASK_N) {
  774. if(neutralStart<0) {
  775. @@ -1014,7 +1014,7 @@
  776. neutralStart=i;
  777. beforeNeutral=prevDirProp;
  778. }
  779. - } else /* not a neutral, can be only one of { L, R, EN, AN } */ {
  780. + } else /* not a neutral, can be only one of { Moz_L, Moz_R, Moz_EN, Moz_AN } */ {
  781. /*
  782. * Note that all levels[] values are still the same at this
  783. * point because this function is called for an entire
  784. @@ -1026,17 +1026,17 @@
  785. if(neutralStart>=0) {
  786. nsBidiLevel final;
  787. /* end of a sequence of neutrals (dirProp is "afterNeutral") */
  788. - if(beforeNeutral==L) {
  789. - if(dirProp==L) {
  790. - final=0; /* make all neutrals L (N1) */
  791. + if(beforeNeutral==Moz_L) {
  792. + if(dirProp==Moz_L) {
  793. + final=0; /* make all neutrals Moz_L (N1) */
  794. } else {
  795. final=level; /* make all neutrals "e" (N2) */
  796. }
  797. - } else /* beforeNeutral is one of { R, EN, AN } */ {
  798. - if(dirProp==L) {
  799. + } else /* beforeNeutral is one of { Moz_R, Moz_EN, Moz_AN } */ {
  800. + if(dirProp==Moz_L) {
  801. final=level; /* make all neutrals "e" (N2) */
  802. } else {
  803. - final=1; /* make all neutrals R (N1) */
  804. + final=1; /* make all neutrals Moz_R (N1) */
  805. }
  806. }
  807. /* perform (In) on the sequence of neutrals */
  808. @@ -1051,24 +1051,24 @@
  809. /* perform (In) on the non-neutral character */
  810. /*
  811. - * in the cases of (W5), processing a sequence of ET,
  812. - * and of (X9), skipping BN,
  813. + * in the cases of (W5), processing a sequence of Moz_ET,
  814. + * and of (X9), skipping Moz_BN,
  815. * there may be multiple characters from i to <next
  816. * that all get (virtually) the same dirProp and (really) the same level
  817. */
  818. - if(dirProp==L) {
  819. + if(dirProp==Moz_L) {
  820. if(level&1) {
  821. ++level;
  822. } else {
  823. i=next; /* we keep the levels */
  824. }
  825. - } else if(dirProp==R) {
  826. + } else if(dirProp==Moz_R) {
  827. if(!(level&1)) {
  828. ++level;
  829. } else {
  830. i=next; /* we keep the levels */
  831. }
  832. - } else /* EN or AN */ {
  833. + } else /* Moz_EN or Moz_AN */ {
  834. level=(level+2)&~1; /* least greater even level */
  835. }
  836. @@ -1080,7 +1080,7 @@
  837. }
  838. /* perform (Nn) - here,
  839. - the character after the the neutrals is aEOR, which is either L or R */
  840. + the character after the the neutrals is aEOR, which is either Moz_L or Moz_R */
  841. /* this is one iteration late for the neutrals */
  842. if(neutralStart>=0) {
  843. /*
  844. @@ -1092,17 +1092,17 @@
  845. nsBidiLevel level=levels[neutralStart], final;
  846. /* end of a sequence of neutrals (aEOR is "afterNeutral") */
  847. - if(beforeNeutral==L) {
  848. - if(aEOR==L) {
  849. - final=0; /* make all neutrals L (N1) */
  850. + if(beforeNeutral==Moz_L) {
  851. + if(aEOR==Moz_L) {
  852. + final=0; /* make all neutrals Moz_L (N1) */
  853. } else {
  854. final=level; /* make all neutrals "e" (N2) */
  855. }
  856. - } else /* beforeNeutral is one of { R, EN, AN } */ {
  857. - if(aEOR==L) {
  858. + } else /* beforeNeutral is one of { Moz_R, Moz_EN, Moz_AN } */ {
  859. + if(aEOR==Moz_L) {
  860. final=level; /* make all neutrals "e" (N2) */
  861. } else {
  862. - final=1; /* make all neutrals R (N1) */
  863. + final=1; /* make all neutrals Moz_R (N1) */
  864. }
  865. }
  866. /* perform (In) on the sequence of neutrals */
  867. @@ -1140,7 +1140,7 @@
  868. levels[i]=paraLevel;
  869. }
  870. - /* reset BN to the next character's paraLevel until B/S, which restarts above loop */
  871. + /* reset Moz_BN to the next character's paraLevel until B/S, which restarts above loop */
  872. /* here, i+1 is guaranteed to be <length */
  873. while(i>0) {
  874. flag=DIRPROP_FLAG(dirProps[--i]);