Bump version to 5.0-14
[LibreOffice.git] / external / nss / nspr-4.9-build.patch.3
blob6f80f802356968144b3f20e6a19b5363a309f4e0
1 ---  a/a/a/nspr/config/autoconf.mk.in   2011-08-29 19:02:51.000000000 +0200
2 +++  a/a/a/nspr/config/autoconf.mk.in   2012-03-22 11:24:22.137097336 +0100
3 @@ -27,6 +27,7 @@
4  OBJ_SUFFIX     = $(error config/config.mk needs to be included before using OBJ_SUFFIX)
5  _OBJ_SUFFIX    = @OBJ_SUFFIX@
6  LIB_SUFFIX     = @LIB_SUFFIX@
7 +IMPORT_LIB_SUFFIX = @IMPORT_LIB_SUFFIX@
8  DLL_SUFFIX     = @DLL_SUFFIX@
9  ASM_SUFFIX     = @ASM_SUFFIX@
10  MOD_NAME       = @NSPR_MODNAME@
11 ---  a/a/a/nspr/config/rules.mk 2011-08-29 19:02:51.000000000 +0200
12 +++  a/a/a/nspr/config/rules.mk 2012-03-22 11:24:22.138097311 +0100
13 @@ -115,21 +115,21 @@
14  #
16  ifdef LIBRARY_NAME
17 -ifeq (,$(filter-out WINNT WINCE OS2,$(OS_ARCH)))
18 +ifeq (,$(filter-out Linux WIN95 WINNT WINCE OS2,$(OS_ARCH)))
20  #
21  # Win95 and OS/2 require library names conforming to the 8.3 rule.
22  # other platforms do not.
23  #
24 -ifeq (,$(filter-out WIN95 WINCE WINMO OS2,$(OS_TARGET)))
25 +ifeq (,$(filter-out WIN95 WINCE WINMO WINNT OS2,$(OS_TARGET)))
26  LIBRARY                = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
27  SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
28 -IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
29 +IMPORT_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
30  SHARED_LIB_PDB = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).pdb
31  else
32  LIBRARY                = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
33  SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
34 -IMPORT_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
35 +IMPORT_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
36  SHARED_LIB_PDB = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).pdb
37  endif
39 ---  a/a/a/nspr/configure       2012-02-14 20:06:00.000000000 +0100
40 +++  a/a/a/nspr/configure       2012-03-22 11:24:22.139097286 +0100
41 @@ -3034,6 +3034,7 @@
43  OBJ_SUFFIX=o
44  LIB_SUFFIX=a
45 +IMPORT_LIB_SUFFIX=$IMPORT_LIB_SUFFIX
46  DLL_SUFFIX=so
47  ASM_SUFFIX=s
48  MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
49 @@ -4536,6 +4537,7 @@
50          CC="$CC -mwindows"
51          CXX="$CXX -mwindows"
52          DLL_SUFFIX=dll
53 +       IMPORT_LIB_SUFFIX=dll.a
54          MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
55          RC=$WINDRES
56          # Use temp file for windres (bug 213281)
57 @@ -4552,6 +4554,7 @@
58          GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
59          OBJ_SUFFIX=obj
60          LIB_SUFFIX=lib
61 +        IMPORT_LIB_SUFFIX=lib
62          DLL_SUFFIX=dll
64          # Determine compiler version
65 @@ -4661,11 +4664,11 @@
66          
67          if test "$OS_TARGET" = "WINNT"; then
68              CFLAGS="$CFLAGS -GT"
69 -            LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
70 -            LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
71 +            LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
72 +            LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
73          else
74 -            LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
75 -            LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
76 +            LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
77 +            LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
78          fi
79      fi # GNU_CC
81 @@ -4775,6 +4778,7 @@
83      OBJ_SUFFIX=obj
84      LIB_SUFFIX=lib
85 +    IMPORT_LIB_SUFFIX=lib
86      DLL_SUFFIX=dll
87      MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
89 @@ -4782,8 +4786,8 @@
90      RESOLVE_LINK_SYMBOLS=1
92      MDCPUCFG_H=_win95.cfg
93 -    LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
94 -    LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
95 +    LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
96 +    LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
98      DLLFLAGS='-OUT:"$@"'
99      if test -n "$MOZ_DEBUG_SYMBOLS"; then
100 @@ -5584,6 +5588,7 @@
102      USE_PTHREADS=1
103      LIB_SUFFIX=lib
104 +    IMPORT_LIB_SUFFIX=lib
105      DLL_SUFFIX=dll
106      MKSHLIB=
107      DSO_LDOPTS=
108 @@ -5668,6 +5673,7 @@
109  EOF
111      LIB_SUFFIX=lib
112 +    IMPORT_LIB_SUFFIX=lib
113      DLL_SUFFIX=dll
114      RC=rc.exe
115      PR_MD_ARCH_DIR=os2
116 @@ -6966,6 +6972,7 @@
117  s%@CPU_ARCH@%$CPU_ARCH%g
118  s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
119  s%@LIB_SUFFIX@%$LIB_SUFFIX%g
120 +s%@IMPORT_LIB_SUFFIX@%$IMPORT_LIB_SUFFIX%g
121  s%@DLL_SUFFIX@%$DLL_SUFFIX%g
122  s%@ASM_SUFFIX@%$ASM_SUFFIX%g
123  s%@WRAP_LDFLAGS@%$WRAP_LDFLAGS%g
124 ---  a/a/a/nspr/configure.in    2012-02-14 20:06:00.000000000 +0100
125 +++  a/a/a/nspr/configure.in    2012-03-22 11:24:22.139097286 +0100
126 @@ -834,6 +834,7 @@
127  dnl ========================================================
128  OBJ_SUFFIX=o
129  LIB_SUFFIX=a
130 +IMPORT_LIB_SUFFIX=$(IMPORT_LIB_SUFFIX)
131  DLL_SUFFIX=so
132  ASM_SUFFIX=s
133  MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
134 @@ -1901,6 +1902,7 @@
135          CC="$CC -mwindows"
136          CXX="$CXX -mwindows"
137          DLL_SUFFIX=dll
138 +       IMPORT_LIB_SUFFIX=dll.a
139          MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
140          RC=$WINDRES
141          # Use temp file for windres (bug 213281)
142 @@ -1917,6 +1919,7 @@
143          GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
144          OBJ_SUFFIX=obj
145          LIB_SUFFIX=lib
146 +        IMPORT_LIB_SUFFIX=lib
147          DLL_SUFFIX=dll
149          # Determine compiler version
150 @@ -2014,11 +2017,11 @@
151          
152          if test "$OS_TARGET" = "WINNT"; then
153              CFLAGS="$CFLAGS -GT"
154 -            LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
155 -            LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
156 +            LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
157 +            LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
158          else
159 -            LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
160 -            LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
161 +            LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
162 +            LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
163          fi
164      fi # GNU_CC
166 @@ -2089,6 +2092,7 @@
168      OBJ_SUFFIX=obj
169      LIB_SUFFIX=lib
170 +    IMPORT_LIB_SUFFIX=lib
171      DLL_SUFFIX=dll
172      MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
174 @@ -2096,8 +2100,8 @@
175      RESOLVE_LINK_SYMBOLS=1
177      MDCPUCFG_H=_win95.cfg
178 -    LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
179 -    LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
180 +    LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
181 +    LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
183      DLLFLAGS='-OUT:"$@"'
184      if test -n "$MOZ_DEBUG_SYMBOLS"; then
185 @@ -2576,6 +2580,7 @@
186      AC_DEFINE(HAVE_SOCKLEN_T)
187      USE_PTHREADS=1
188      LIB_SUFFIX=lib
189 +    IMPORT_LIB_SUFFIX=lib
190      DLL_SUFFIX=dll
191      MKSHLIB=
192      DSO_LDOPTS=
193 @@ -2630,6 +2635,7 @@
194      AC_DEFINE(BSD_SELECT)
195      AC_DEFINE(TCPV40HDRS)
196      LIB_SUFFIX=lib
197 +    IMPORT_LIB_SUFFIX=lib
198      DLL_SUFFIX=dll
199      RC=rc.exe
200      PR_MD_ARCH_DIR=os2
201 @@ -3291,6 +3297,7 @@
203  AC_SUBST(OBJ_SUFFIX)
204  AC_SUBST(LIB_SUFFIX)
205 +AC_SUBST(IMPORT_LIB_SUFFIX)
206  AC_SUBST(DLL_SUFFIX)
207  AC_SUBST(ASM_SUFFIX)
208  AC_SUBST(WRAP_LDFLAGS)
209 ---  a/a/a/nspr/pr/include/md/_win95.cfg        2010-01-27 03:45:49.000000000 +0100
210 +++  a/a/a/nspr/pr/include/md/_win95.cfg        2012-03-22 11:24:22.139097286 +0100
211 @@ -106,7 +106,7 @@
212  #define PR_BYTES_PER_WORD_LOG2 2
213  #define PR_BYTES_PER_DWORD_LOG2        3
215 -#elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)
216 +#elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_) || defined (_WIN64)
218  #define IS_LITTLE_ENDIAN 1
219  #undef  IS_BIG_ENDIAN
220 ---  a/a/a/nspr/pr/include/md/_winnt.cfg        2010-01-27 03:45:49.000000000 +0100
221 +++  a/a/a/nspr/pr/include/md/_winnt.cfg        2012-03-22 11:24:22.140097261 +0100
222 @@ -100,7 +100,7 @@
223  #define PR_BYTES_PER_WORD_LOG2 2
224  #define PR_BYTES_PER_DWORD_LOG2        2
226 -#elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)
227 +#elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_) || defined (_WIN64)
229  #define IS_LITTLE_ENDIAN 1
230  #undef  IS_BIG_ENDIAN
231 ---  a/a/a/nspr/pr/src/Makefile.in      2011-09-22 17:21:06.000000000 +0200
232 +++  a/a/a/nspr/pr/src/Makefile.in      2012-03-22 11:24:22.140097261 +0100
233 @@ -9,6 +9,9 @@
234  topsrcdir      = @top_srcdir@
235  srcdir         = @srcdir@
236  VPATH          = @srcdir@
238 +LIBRARY_NAME = nspr
239 +LIBRARY_VERSION = $(MOD_MAJOR_VERSION)
241  include $(MOD_DEPTH)/config/autoconf.mk
243 @@ -200,9 +200,9 @@
245  ifeq ($(OS_ARCH),WINNT)
246  ifdef NS_USE_GCC
247 -OS_LIBS                = -ladvapi32 -lwsock32 -lwinmm
248 +OS_LIBS                = -ladvapi32 -lws2_32 -lmswsock -lwinmm
249  else
250 -OS_LIBS                = advapi32.lib wsock32.lib winmm.lib
251 +OS_LIBS                = advapi32.lib ws2_32.lib mswsock.lib winmm.lib
252  endif
253  endif
255 @@ -291,8 +291,6 @@
256  include $(srcdir)/bthreads/objs.mk
257  endif
259 -LIBRARY_NAME = nspr
260 -LIBRARY_VERSION = $(MOD_MAJOR_VERSION)
262  RELEASE_LIBS = $(TARGETS)
264 ---  a/a/a/nspr/pr/src/md/windows/ntgc.c        2010-11-30 00:26:19.000000000 +0100
265 +++  a/a/a/nspr/pr/src/md/windows/ntgc.c        2012-03-22 11:24:22.140097261 +0100
266 @@ -44,7 +44,7 @@
268  PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np) 
270 -#if defined(_X86_)
271 +#if defined(_X86_) && (!defined(_AMD64_))
272      CONTEXT context;
273      context.ContextFlags = CONTEXT_INTEGER;
275 ---  a/a/a/nspr/tools/Makefile.in       2008-05-04 00:28:44.000000000 +0200
276 +++  a/a/a/nspr/tools/Makefile.in       2012-03-22 11:24:22.140097261 +0100
277 @@ -219,7 +219,7 @@
278         echo winsock.lib     >>w16link
279         wlink @w16link.
280  else
281 -       link $(LDOPTS) $< $(LIBPR) $(LIBPLC) wsock32.lib -out:$@
282 +       link $(LDOPTS) $< $(LIBPR) $(LIBPLC) ws2_32.lib mswsock.lib -out:$@
283  endif
284  else
285  ifeq ($(OS_ARCH),OS2)