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