firefox.patch 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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:");