summaryrefslogtreecommitdiff
path: root/www/mozilla/patches/patch-aa
blob: 7fc2171b7227871dd7eb4ce630b2e3b1fd61511a (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
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
*** js/src/prmjtime.c.orig	Wed Apr 29 20:54:26 1998
--- js/src/prmjtime.c	Sun May 24 22:04:50 1998
***************
*** 287,293 ****
      PRInt32 diff;
      PRInt64  maxtimet;
      struct tm tm;
! #if defined( XP_PC ) || defined( FREEBSD ) || defined ( HPUX9 )
      struct tm *ptm;
  #endif
      PRMJTime prtm;
--- 287,293 ----
      PRInt32 diff;
      PRInt64  maxtimet;
      struct tm tm;
! #if defined( XP_PC ) || defined( FREEBSD ) || defined ( HPUX9 ) || defined(NETBSD)
      struct tm *ptm;
  #endif
      PRMJTime prtm;
***************
*** 307,313 ****
      }
      LL_L2UI(local,time);
      PRMJ_basetime(time,&prtm);
! #if defined( XP_PC ) || defined( FREEBSD ) || defined ( HPUX9 )
      ptm = localtime(&local);
      if(!ptm){
        return LL_ZERO;
--- 307,313 ----
      }
      LL_L2UI(local,time);
      PRMJ_basetime(time,&prtm);
! #if defined( XP_PC ) || defined( FREEBSD ) || defined ( HPUX9 ) || defined(NETBSD)
      ptm = localtime(&local);
      if(!ptm){
        return LL_ZERO;
*** cmd/xfe/src/HTMLView.cpp.orig	Wed Apr 29 21:16:45 1998
--- cmd/xfe/src/HTMLView.cpp	Sun May 24 22:00:15 1998
***************
*** 345,351 ****
    scroller = fe_MakeScrolledWindow (m_contextData, pane, "scroller");
    XtVaSetValues (CONTEXT_DATA (m_contextData)->scrolled,
  				 XmNborderWidth, 0, 
! #if defined(__FreeBSD__)||defined(BSDI)||defined(LINUX)||defined(IRIX)
  				 // Allow for resolutions > 1000 pixels.
  				 // This causes the vertical scrollbar not to show
  				 // up on Solaris 2.4, bug in Motif (77998).  
--- 345,351 ----
    scroller = fe_MakeScrolledWindow (m_contextData, pane, "scroller");
    XtVaSetValues (CONTEXT_DATA (m_contextData)->scrolled,
  				 XmNborderWidth, 0, 
! #if defined(__FreeBSD__)||defined(BSDI)||defined(LINUX)||defined(IRIX)||defined(__NetBSD__)
  				 // Allow for resolutions > 1000 pixels.
  				 // This causes the vertical scrollbar not to show
  				 // up on Solaris 2.4, bug in Motif (77998).  
*** cmd/xfe/src/context_funcs.cpp.orig	Wed Apr 29 21:16:53 1998
--- cmd/xfe/src/context_funcs.cpp	Sun May 24 22:00:15 1998
***************
*** 67,72 ****
--- 67,74 ----
  #define STATFS statfs
  #elif defined(BSDI)
  #include <sys/mount.h>    /* for statfs() */
+ #elif defined(NETBSD)
+ #include <sys/mount.h>    /* for statfs() */
  #define STATFS statfs
  #else
  #include <sys/statfs.h>  /* for statfs() */
*** cmd/xfe/Microline3.0/XmL/Grid.c.orig	Wed Apr 29 21:15:36 1998
--- cmd/xfe/Microline3.0/XmL/Grid.c	Sun May 24 22:00:15 1998
***************
*** 30,35 ****
--- 30,38 ----
  #include <Xm/Text.h>
  #include <Xm/DrawnB.h>
  #include <Xm/CutPaste.h>
+ #ifndef MOTIF11
+ #include <Xm/DropSMgr.h>
+ #endif
  #include <X11/StringDefs.h>
  #include <X11/cursorfont.h>
  #include <stdio.h>
*** cmd/xfe/Makefile.orig	Wed Apr 29 21:15:29 1998
--- cmd/xfe/Makefile	Sun May 24 22:00:16 1998
***************
*** 488,493 ****
--- 488,507 ----
  endif
  
  ########################################
+ # NetBSD
+ # Work around linker semantics that will never find our own libutil on 1.3.x
+ ifeq ($(OS_ARCH),NetBSD)
+ ifeq ($(OS_MINOR),3)
+ FOOL_GMAKE	= $(EXPORT_LDFLAGS:$(DIST)/lib/lib%.a=-l%)
+ DSO_EX_LIBS	= $(FOOL_GMAKE:-lutil=$(DIST)/lib/libutil.a)
+ endif
+ ifdef LIBRUNPATH
+ OS_LIBS		+= -R$(LIBRUNPATH)
+ endif
+ OTHER_LIBS	= -L/usr/X11R6/lib -lXm -lXt -lXmu -lXext -lX11 -lSM -lICE -lm $(OS_LIBS)
+ endif
+ 
+ ########################################
  # BSDI
  ifeq ($(OS_ARCH),BSD_OS)
  OTHER_LIBS	= $(MOTIF)/libXm.a $(LOC_LIB_DIR)/libXt.a $(X11R6LIBS) $(LOC_LIB_DIR)/libXmu.a \
*** cmd/xfe/mozilla.c.orig	Wed Apr 29 21:15:32 1998
--- cmd/xfe/mozilla.c	Sun May 24 22:05:44 1998
***************
*** 1885,1890 ****
--- 1885,1892 ----
  	strcat (buf, "IRIX");
  #elif defined(__FreeBSD__)
  	strcat (buf, "FreeBSD");
+ #elif defined(__NetBSD__)
+ 	strcat (buf, "NetBSD");
  #elif defined(__386BSD__)
  	strcat (buf, "BSD/386");
  #elif defined(__osf__)
***************
*** 3476,3482 ****
  
  #else  /* !OLD_UNIX_FILES */
  
! #if !defined(__FreeBSD__) && !defined(MKLINUX) && !defined(LINUX_GLIBC_2)
  extern char *sys_errlist[];
  extern int sys_nerr;
  #endif
--- 3478,3484 ----
  
  #else  /* !OLD_UNIX_FILES */
  
! #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(MKLINUX) && !defined(LINUX_GLIBC_2)
  extern char *sys_errlist[];
  extern int sys_nerr;
  #endif
*** cmd/xfe/dialogs.c.orig	Wed Apr 29 21:15:30 1998
--- cmd/xfe/dialogs.c	Sun May 24 22:06:07 1998
***************
*** 239,245 ****
    (void) fe_dialog (parent, "error", message, FALSE, 0, FALSE, FALSE, 0);
  }
  
! #if !defined(__FreeBSD__) && !defined(MKLINUX) && !defined(LINUX_GLIBC_2)
  #include <sys/errno.h>
  extern char *sys_errlist[];
  extern int sys_nerr;
--- 239,245 ----
    (void) fe_dialog (parent, "error", message, FALSE, 0, FALSE, FALSE, 0);
  }
  
! #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(MKLINUX) && !defined(LINUX_GLIBC_2)
  #include <sys/errno.h>
  extern char *sys_errlist[];
  extern int sys_nerr;
*** cmd/xfe/movemail.c.orig	Wed Apr 29 21:15:32 1998
--- cmd/xfe/movemail.c	Sun May 24 22:00:16 1998
***************
*** 40,46 ****
  #include "xfe.h"
  
  #include <sys/errno.h>
! #if !defined(__FreeBSD__) && !defined(LINUX_GLIBC_2)
  extern char *sys_errlist[];
  extern int sys_nerr;
  #endif
--- 40,46 ----
  #include "xfe.h"
  
  #include <sys/errno.h>
! #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(LINUX_GLIBC_2)
  extern char *sys_errlist[];
  extern int sys_nerr;
  #endif
*** cmd/xfe/prefdialogs.c.orig	Wed Apr 29 21:15:32 1998
--- cmd/xfe/prefdialogs.c	Sun May 24 22:00:17 1998
***************
*** 75,81 ****
  
  /* For sys_errlist and sys_nerr */
  #include <sys/errno.h>
! #if !defined(__FreeBSD__) && !defined(LINUX_GLIBC_2)
  extern char *sys_errlist[];
  extern int sys_nerr;
  #endif
--- 75,81 ----
  
  /* For sys_errlist and sys_nerr */
  #include <sys/errno.h>
! #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(LINUX_GLIBC_2)
  extern char *sys_errlist[];
  extern int sys_nerr;
  #endif
*** cmd/stubfe/Makefile.orig	Wed Apr 29 21:15:27 1998
--- cmd/stubfe/Makefile	Sun May 24 22:00:15 1998
***************
*** 542,547 ****
--- 542,553 ----
  endif
  
  ########################################
+ # NetBSD
+ ifeq ($(OS_ARCH),NetBSD)
+ OTHER_LIBS	= -lm $(OS_LIBS)
+ endif
+ 
+ ########################################
  # BSDI
  ifeq ($(OS_ARCH),BSD_OS)
  OTHER_LIBS	= -lm $(OS_LIBS)
*** dbm/include/mcom_db.h.orig	Wed Apr 29 20:59:11 1998
--- dbm/include/mcom_db.h	Sun May 24 22:00:15 1998
***************
*** 200,206 ****
  #define	RET_SUCCESS	 0
  #define	RET_SPECIAL	 1
  
! #if defined(__386BSD__) || defined(SCO)
  #define	__BIT_TYPES_DEFINED__
  #endif
  
--- 200,206 ----
  #define	RET_SUCCESS	 0
  #define	RET_SPECIAL	 1
  
! #if defined(__386BSD__) || defined(SCO) || defined(__NetBSD__)
  #define	__BIT_TYPES_DEFINED__
  #endif
  
*** lib/xp/xp_file.c.orig	Wed Apr 29 20:55:26 1998
--- lib/xp/xp_file.c	Sun May 24 22:00:13 1998
***************
*** 804,810 ****
  	case xpMimeTypes:
  	case xpSocksConfig:
  	case xpMailFolder:
! #ifdef BSDI
  	    /* In bsdi, mkdir fails if the directory name is terminated
  	     * with a '/'. - dp
  	     */
--- 804,810 ----
  	case xpMimeTypes:
  	case xpSocksConfig:
  	case xpMailFolder:
! #if defined(BSDI) || defined(NETBSD)
  	    /* In bsdi, mkdir fails if the directory name is terminated
  	     * with a '/'. - dp
  	     */
*** lib/libnet/mkftp.c.orig	Wed Apr 29 20:55:10 1998
--- lib/libnet/mkftp.c	Sun May 24 22:00:13 1998
***************
*** 53,59 ****
  #endif /* XP_OS2 */
  
  #ifdef XP_UNIX
! #if !defined(__osf__) && !defined(AIXV3) && !defined(_HPUX_SOURCE) && !defined(__386BSD__) && !defined(__linux) && !defined(SCO_SV)
  #include <sys/filio.h>
  #endif
  #endif /* XP_UNIX */ 
--- 53,59 ----
  #endif /* XP_OS2 */
  
  #ifdef XP_UNIX
! #if !defined(__osf__) && !defined(AIXV3) && !defined(_HPUX_SOURCE) && !defined(__386BSD__) && !defined(__linux) && !defined(SCO_SV) || defined(__NetBSD__)
  #include <sys/filio.h>
  #endif
  #endif /* XP_UNIX */ 
*** lib/libnet/mkconect.c.orig	Wed Apr 29 20:55:09 1998
--- lib/libnet/mkconect.c	Sun May 24 22:00:13 1998
***************
*** 77,83 ****
  
  #include <resolv.h>
  
! #if !defined(__osf__) && !defined(AIXV3) && !defined(_HPUX_SOURCE) && !defined(__386BSD__) && !defined(__linux) && !defined(SCO_SV)
  #include <sys/filio.h>
  #endif
  
--- 77,83 ----
  
  #include <resolv.h>
  
! #if !defined(__osf__) && !defined(AIXV3) && !defined(_HPUX_SOURCE) && !defined(__386BSD__) && !defined(__linux) && !defined(SCO_SV) && !defined(__NetBSD__)
  #include <sys/filio.h>
  #endif
  
*** lib/libnet/mksockrw.c.orig	Wed Apr 29 20:55:12 1998
--- lib/libnet/mksockrw.c	Sun May 24 22:00:13 1998
***************
*** 48,54 ****
  
  #include <resolv.h>
  
! #if !defined(__osf__) && !defined(AIXV3) && !defined(_HPUX_SOURCE) && !defined(__386BSD__) && !defined(__linux) && !defined(SCO_SV)
  #include <sys/filio.h>
  #endif
  
--- 48,54 ----
  
  #include <resolv.h>
  
! #if !defined(__osf__) && !defined(AIXV3) && !defined(_HPUX_SOURCE) && !defined(__386BSD__) && !defined(__linux) && !defined(SCO_SV) && !defined(__NetBSD__)
  #include <sys/filio.h>
  #endif
  
*** lib/libnet/prefetch.c.orig	Wed Apr 29 20:55:12 1998
--- lib/libnet/prefetch.c	Sun May 24 22:00:13 1998
***************
*** 177,183 ****
        }
  }
  
! PRIVATE void
  pre_Finished(URL_Struct* url_struct, int status, MWContext* context)
  {
  	/* this should change to update the colors of 
--- 177,183 ----
        }
  }
  
! MODULE_PRIVATE void
  pre_Finished(URL_Struct* url_struct, int status, MWContext* context)
  {
  	/* this should change to update the colors of 
*** nsprpub/pr/src/md/unix/Makefile.orig	Wed Apr 29 20:58:18 1998
--- nsprpub/pr/src/md/unix/Makefile	Sun May 24 22:00:14 1998
***************
*** 57,62 ****
--- 57,66 ----
  	freebsd.c \
  	$(NULL)
  
+ NETBSD_CSRCS = \
+ 	netbsd.c \
+ 	$(NULL)
+ 
  BSDI_CSRCS = \
  	bsdi.c \
  	$(NULL)
***************
*** 118,123 ****
--- 122,130 ----
  endif
  ifeq ($(OS_ARCH),FreeBSD)
  CSRCS += $(FREEBSD_CSRCS)
+ endif
+ ifeq ($(OS_ARCH),NetBSD)
+ CSRCS += $(NETBSD_CSRCS)
  endif
  ifeq ($(OS_ARCH),BSD_OS)
  CSRCS += $(BSDI_CSRCS)
*** nsprpub/pr/src/md/unix/objs.mk.orig	Wed Apr 29 20:58:18 1998
--- nsprpub/pr/src/md/unix/objs.mk	Sun May 24 22:00:14 1998
***************
*** 49,54 ****
--- 49,58 ----
  	freebsd.c \
  	$(NULL)
  
+ NETBSD_CSRCS = \
+ 	netbsd.c \
+ 	$(NULL)
+ 
  BSDI_CSRCS = \
  	bsdi.c \
  	$(NULL)
***************
*** 111,116 ****
--- 115,123 ----
  endif
  ifeq ($(OS_ARCH),FreeBSD)
  CSRCS += $(FREEBSD_CSRCS)
+ endif
+ ifeq ($(OS_ARCH),NetBSD)
+ CSRCS += $(NETBSD_CSRCS)
  endif
  ifeq ($(OS_ARCH),BSD_OS)
  CSRCS += $(BSDI_CSRCS)
*** nsprpub/pr/src/md/unix/unix.c.orig	Wed Apr 29 20:58:19 1998
--- nsprpub/pr/src/md/unix/unix.c	Sun May 24 22:00:14 1998
***************
*** 48,54 ****
      || defined(SUNOS4) || defined(NCR)
  #define _PRSockLen_t int
  #elif (defined(AIX) && !defined(AIX4_1)) || defined(FREEBSD) \
!     || defined(UNIXWARE)
  #define _PRSockLen_t size_t
  #else
  #error "Cannot determine architecture"
--- 48,54 ----
      || defined(SUNOS4) || defined(NCR)
  #define _PRSockLen_t int
  #elif (defined(AIX) && !defined(AIX4_1)) || defined(FREEBSD) \
!     || defined(UNIXWARE) || defined(NETBSD)
  #define _PRSockLen_t size_t
  #else
  #error "Cannot determine architecture"
*** nsprpub/pr/src/md/unix/unix_errors.c.orig	Wed Apr 29 20:58:19 1998
--- nsprpub/pr/src/md/unix/unix_errors.c	Sun May 24 22:00:14 1998
***************
*** 160,166 ****
  		case EROFS:
  			PR_SetError(PR_READ_ONLY_FILESYSTEM_ERROR, err);
  			break;
! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI)
  		case EMULTIHOP:
  		case ENOLINK:
  			PR_SetError(PR_REMOTE_FILE_ERROR, err);
--- 160,166 ----
  		case EROFS:
  			PR_SetError(PR_READ_ONLY_FILESYSTEM_ERROR, err);
  			break;
! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) && !defined(NETBSD)
  		case EMULTIHOP:
  		case ENOLINK:
  			PR_SetError(PR_REMOTE_FILE_ERROR, err);
***************
*** 185,191 ****
  			PR_SetError(PR_PENDING_INTERRUPT_ERROR, err);
  			break;
  		case ETIMEDOUT:
! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI)
  		case EMULTIHOP:
  		case ENOLINK:
  #endif
--- 185,191 ----
  			PR_SetError(PR_PENDING_INTERRUPT_ERROR, err);
  			break;
  		case ETIMEDOUT:
! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) && !defined(NETBSD)
  		case EMULTIHOP:
  		case ENOLINK:
  #endif
***************
*** 278,284 ****
  		case ELOOP:
  			PR_SetError(PR_LOOP_ERROR, err);
  			break;
! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI)
  		case EMULTIHOP:
  		case ENOLINK:
  			PR_SetError(PR_REMOTE_FILE_ERROR, err);
--- 278,284 ----
  		case ELOOP:
  			PR_SetError(PR_LOOP_ERROR, err);
  			break;
! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) && !defined(NETBSD)
  		case EMULTIHOP:
  		case ENOLINK:
  			PR_SetError(PR_REMOTE_FILE_ERROR, err);
***************
*** 329,335 ****
  		case ELOOP:
  			PR_SetError(PR_LOOP_ERROR, err);
  			break;
! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI)
  		case EMULTIHOP:
  		case ENOLINK:
  #endif
--- 329,335 ----
  		case ELOOP:
  			PR_SetError(PR_LOOP_ERROR, err);
  			break;
! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) && !defined(NETBSD)
  		case EMULTIHOP:
  		case ENOLINK:
  #endif
***************
*** 395,401 ****
  		case EIO:
  			PR_SetError(PR_IO_ERROR, err);
  			break;
! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI)
  		case EMULTIHOP:
  		case ENOLINK:
  			PR_SetError(PR_REMOTE_FILE_ERROR, err);
--- 395,401 ----
  		case EIO:
  			PR_SetError(PR_IO_ERROR, err);
  			break;
! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) && !defined(NETBSD)
  		case EMULTIHOP:
  		case ENOLINK:
  			PR_SetError(PR_REMOTE_FILE_ERROR, err);
***************
*** 432,438 ****
  		case ELOOP:
  			PR_SetError(PR_LOOP_ERROR, err);
  			break;
! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI)
  		case EMULTIHOP:
  		case ENOLINK:
  #endif
--- 432,438 ----
  		case ELOOP:
  			PR_SetError(PR_LOOP_ERROR, err);
  			break;
! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) && !defined(NETBSD)
  		case EMULTIHOP:
  		case ENOLINK:
  #endif
***************
*** 1345,1351 ****
  			PR_SetError(PR_NO_ACCESS_RIGHTS_ERROR, err);
  			break;
  		case ETIMEDOUT:
! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI)
  		case EMULTIHOP:
  		case ENOLINK:
  #endif
--- 1345,1351 ----
  			PR_SetError(PR_NO_ACCESS_RIGHTS_ERROR, err);
  			break;
  		case ETIMEDOUT:
! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) && !defined(NETBSD)
  		case EMULTIHOP:
  		case ENOLINK:
  #endif
*** nsprpub/pr/src/md/unix/uxwrap.c.orig	Wed Apr 29 20:58:19 1998
--- nsprpub/pr/src/md/unix/uxwrap.c	Sun May 24 22:00:14 1998
***************
*** 324,329 ****
--- 324,331 ----
  int poll(struct pollfd filedes[], unsigned int nfds, int timeout)
  #elif defined(HPUX9)
  int poll(struct pollfd filedes[], int nfds, int timeout)
+ #elif defined(NETBSD)
+ int poll(struct pollfd *filedes, nfds_t nfds, int timeout)
  #else
  int poll(struct pollfd *filedes, unsigned long nfds, int timeout)
  #endif
*** nsprpub/pr/src/md/unix/netbsd.c.orig	Sun May 24 22:00:14 1998
--- nsprpub/pr/src/md/unix/netbsd.c	Sun May 24 22:00:14 1998
***************
*** 0 ****
--- 1,102 ----
+ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+ /*
+  * The contents of this file are subject to the Netscape Public License
+  * Version 1.0 (the "NPL"); you may not use this file except in
+  * compliance with the NPL.  You may obtain a copy of the NPL at
+  * http://www.mozilla.org/NPL/
+  * 
+  * Software distributed under the NPL is distributed on an "AS IS" basis,
+  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+  * for the specific language governing rights and limitations under the
+  * NPL.
+  * 
+  * The Initial Developer of this code under the NPL is Netscape
+  * Communications Corporation.  Portions created by Netscape are
+  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+  * Reserved.
+  */
+ 
+ #include "primpl.h"
+ 
+ #include <signal.h>
+ #include <poll.h>
+ #include <sys/syscall.h>
+ 
+ void _MD_EarlyInit(void)
+ {
+     /*
+      * Ignore FPE because coercion of a NaN to an int causes SIGFPE
+      * to be raised.
+      */
+     struct sigaction act;
+ 
+     act.sa_handler = SIG_IGN;
+     sigemptyset(&act.sa_mask);
+     act.sa_flags = SA_RESTART;
+     sigaction(SIGFPE, &act, 0);
+ }
+ 
+ PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)
+ {
+ #ifndef _PR_PTHREADS
+     if (isCurrent) {
+ 	(void) sigsetjmp(CONTEXT(t), 1);
+     }
+     *np = sizeof(CONTEXT(t)) / sizeof(PRWord);
+     return (PRWord *) CONTEXT(t);
+ #else
+ 	*np = 0;
+ 	return NULL;
+ #endif
+ }
+ 
+ #ifndef _PR_PTHREADS
+ void
+ _MD_SET_PRIORITY(_MDThread *thread, PRUintn newPri)
+ {
+     return;
+ }
+ 
+ PRStatus
+ _MD_InitializeThread(PRThread *thread)
+ {
+ 	return PR_SUCCESS;
+ }
+ 
+ PRStatus
+ _MD_WAIT(PRThread *thread, PRIntervalTime ticks)
+ {
+     PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE));
+     _PR_MD_SWITCH_CONTEXT(thread);
+     return PR_SUCCESS;
+ }
+ 
+ PRStatus
+ _MD_WAKEUP_WAITER(PRThread *thread)
+ {
+     if (thread) {
+ 	PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE));
+     }
+     return PR_SUCCESS;
+ }
+ 
+ /* These functions should not be called for OSF1 */
+ void
+ _MD_YIELD(void)
+ {
+     PR_NOT_REACHED("_MD_YIELD should not be called for OSF1.");
+ }
+ 
+ PRStatus
+ _MD_CREATE_THREAD(
+     PRThread *thread,
+     void (*start) (void *),
+     PRThreadPriority priority,
+     PRThreadScope scope,
+     PRThreadState state,
+     PRUint32 stackSize)
+ {
+     PR_NOT_REACHED("_MD_CREATE_THREAD should not be called for OSF1.");
+ 	return PR_FAILURE;
+ }
+ #endif /* ! _PR_PTHREADS */
*** nsprpub/pr/src/md/prosdep.c.orig	Wed Apr 29 20:58:15 1998
--- nsprpub/pr/src/md/prosdep.c	Sun May 24 22:00:14 1998
***************
*** 42,48 ****
      /* Get page size */
  #ifdef XP_UNIX
  #if defined SUNOS4 || defined LINUX || defined BSDI || defined AIX \
! 	|| defined FREEBSD
      _pr_pageSize = getpagesize();
  #elif defined(HPUX)
      /* I have no idea. Don't get me started. --Rob */
--- 42,48 ----
      /* Get page size */
  #ifdef XP_UNIX
  #if defined SUNOS4 || defined LINUX || defined BSDI || defined AIX \
! 	|| defined FREEBSD || defined NETBSD
      _pr_pageSize = getpagesize();
  #elif defined(HPUX)
      /* I have no idea. Don't get me started. --Rob */
*** nsprpub/pr/src/pthreads/ptio.c.orig	Wed Apr 29 20:58:25 1998
--- nsprpub/pr/src/pthreads/ptio.c	Sun May 24 22:00:14 1998
***************
*** 75,81 ****
  #elif defined(IRIX) || (defined(AIX) && !defined(AIX4_1)) \
      || defined(OSF1) || defined(SOLARIS) \
      || defined(HPUX10_30) || defined(HPUX11) || defined(LINUX) \
!     || defined(FREEBSD)
  #define _PRSelectFdSetArg_t fd_set *
  #else
  #error "Cannot determine architecture"
--- 75,81 ----
  #elif defined(IRIX) || (defined(AIX) && !defined(AIX4_1)) \
      || defined(OSF1) || defined(SOLARIS) \
      || defined(HPUX10_30) || defined(HPUX11) || defined(LINUX) \
!     || defined(FREEBSD) || defined(NETBSD)
  #define _PRSelectFdSetArg_t fd_set *
  #else
  #error "Cannot determine architecture"
***************
*** 2506,2512 ****
  #endif
  
  #if defined(HPUX) || defined(OSF1) || defined(SOLARIS) || defined (IRIX) \
!     || defined(AIX) || defined(LINUX) || defined(FREEBSD)
  #define _PR_FCNTL_FLAGS O_NONBLOCK
  #else
  #error "Can't determine architecture"
--- 2506,2512 ----
  #endif
  
  #if defined(HPUX) || defined(OSF1) || defined(SOLARIS) || defined (IRIX) \
!     || defined(AIX) || defined(LINUX) || defined(FREEBSD) || defined(NETBSD)
  #define _PR_FCNTL_FLAGS O_NONBLOCK
  #else
  #error "Can't determine architecture"
*** nsprpub/pr/src/pthreads/ptthread.c.orig	Wed Apr 29 20:58:25 1998
--- nsprpub/pr/src/pthreads/ptthread.c	Sun May 24 22:07:22 1998
***************
*** 194,204 ****
  
      if (EPERM != pt_schedpriv)
      {
! #if !defined(_PR_DCETHREADS) && !defined(FREEBSD)
          struct sched_param schedule;
  #endif
  
! #if !defined(FREEBSD)
          rv = pthread_attr_setinheritsched(&tattr, PTHREAD_EXPLICIT_SCHED);
          PR_ASSERT(0 == rv);
  #endif
--- 194,204 ----
  
      if (EPERM != pt_schedpriv)
      {
! #if !defined(_PR_DCETHREADS) && !defined(FREEBSD) && !defined(NETBSD)
          struct sched_param schedule;
  #endif
  
! #if !defined(FREEBSD) && !defined(NETBSD)
          rv = pthread_attr_setinheritsched(&tattr, PTHREAD_EXPLICIT_SCHED);
          PR_ASSERT(0 == rv);
  #endif
***************
*** 208,214 ****
  #if defined(_PR_DCETHREADS)
          rv = pthread_attr_setprio(&tattr, pt_PriorityMap(priority));
          PR_ASSERT(0 == rv);
! #elif !defined(FREEBSD)
          rv = pthread_attr_getschedparam(&tattr, &schedule);
          PR_ASSERT(0 == rv);
          schedule.sched_priority = pt_PriorityMap(priority);
--- 208,214 ----
  #if defined(_PR_DCETHREADS)
          rv = pthread_attr_setprio(&tattr, pt_PriorityMap(priority));
          PR_ASSERT(0 == rv);
! #elif !defined(FREEBSD) && !defined(NETBSD)
          rv = pthread_attr_getschedparam(&tattr, &schedule);
          PR_ASSERT(0 == rv);
          schedule.sched_priority = pt_PriorityMap(priority);
***************
*** 550,556 ****
      rv = pthread_setprio(thred->id, pt_PriorityMap(newPri));
      /* pthread_setprio returns the old priority */
      PR_ASSERT(-1 != rv);
! #elif !defined(FREEBSD)
      if (EPERM != pt_schedpriv)
      {
          int policy;
--- 550,556 ----
      rv = pthread_setprio(thred->id, pt_PriorityMap(newPri));
      /* pthread_setprio returns the old priority */
      PR_ASSERT(-1 != rv);
! #elif !defined(FREEBSD) && !defined(NETBSD)
      if (EPERM != pt_schedpriv)
      {
          int policy;
***************
*** 751,757 ****
       * conflict with the use of these two signals in our GC support.
       * So we don't know how to support GC on Linux pthreads.
       */
! #if !defined(LINUX) && !defined(FREEBSD)
  	init_pthread_gc_support();
  #endif
  
--- 751,757 ----
       * conflict with the use of these two signals in our GC support.
       * So we don't know how to support GC on Linux pthreads.
       */
! #if !defined(LINUX) && !defined(FREEBSD) && !defined(NETBSD)
  	init_pthread_gc_support();
  #endif
  
***************
*** 1036,1042 ****
  	pthread_cond_signal(&me->suspendResumeCV);
  	while (me->suspend & PT_THREAD_SUSPENDED)
  	{
! #if !defined(FREEBSD)  /*XXX*/
          PRIntn rv;
  	    sigwait(&sigwait_set, &rv);
  #endif
--- 1036,1042 ----
  	pthread_cond_signal(&me->suspendResumeCV);
  	while (me->suspend & PT_THREAD_SUSPENDED)
  	{
! #if !defined(FREEBSD) && !defined(NETBSD) /*XXX*/
          PRIntn rv;
  	    sigwait(&sigwait_set, &rv);
  #endif
*** nsprpub/pr/src/linking/prlink.c.orig	Wed Apr 29 20:58:08 1998
--- nsprpub/pr/src/linking/prlink.c	Sun May 24 22:00:14 1998
***************
*** 75,81 ****
  
  /************************************************************************/
  
! #if ( !defined(USE_DLFCN) && !defined(HAVE_STRERROR) ) || defined(HPUX) || defined(BSDI) || defined(LINUX)
  static char* errStrBuf = NULL;
  #define ERR_STR_BUF_LENGTH	20
  static char* errno_string(PRIntn oserr)
--- 75,81 ----
  
  /************************************************************************/
  
! #if ( !defined(USE_DLFCN) && !defined(HAVE_STRERROR) ) || defined(HPUX) || defined(BSDI) || defined(LINUX) || defined(NETBSD)
  static char* errStrBuf = NULL;
  #define ERR_STR_BUF_LENGTH	20
  static char* errno_string(PRIntn oserr)
*** nsprpub/pr/include/md/_pth.h.orig	Wed Apr 29 20:58:01 1998
--- nsprpub/pr/include/md/_pth.h	Sun May 24 22:07:59 1998
***************
*** 69,75 ****
  	(!memcmp(&(t), &pt_zero_tid, sizeof(pthread_t)))
  #define PTHREAD_COPY_THR_HANDLE(st, dt)   (dt) = (st)
  #elif defined(IRIX) || defined(OSF1) || defined(AIX) || defined(SOLARIS) \
! 	|| defined(HPUX) || defined(LINUX) || defined(FREEBSD)
  #define PTHREAD_ZERO_THR_HANDLE(t)        (t) = 0
  #define PTHREAD_THR_HANDLE_IS_ZERO(t)     (t) == 0
  #define PTHREAD_COPY_THR_HANDLE(st, dt)   (dt) = (st)
--- 69,76 ----
  	(!memcmp(&(t), &pt_zero_tid, sizeof(pthread_t)))
  #define PTHREAD_COPY_THR_HANDLE(st, dt)   (dt) = (st)
  #elif defined(IRIX) || defined(OSF1) || defined(AIX) || defined(SOLARIS) \
! 	|| defined(HPUX) || defined(LINUX) || defined(FREEBSD) \
! 	|| defined(NETBSD)
  #define PTHREAD_ZERO_THR_HANDLE(t)        (t) = 0
  #define PTHREAD_THR_HANDLE_IS_ZERO(t)     (t) == 0
  #define PTHREAD_COPY_THR_HANDLE(st, dt)   (dt) = (st)
***************
*** 134,140 ****
   * These platforms don't have pthread_atfork()
   */
  #if defined(_PR_DCETHREADS) || defined(FREEBSD) \
! 	|| (defined(LINUX) && defined(__alpha))
  #define PT_NO_ATFORK
  #endif
  
--- 135,142 ----
   * These platforms don't have pthread_atfork()
   */
  #if defined(_PR_DCETHREADS) || defined(FREEBSD) \
! 	|| (defined(LINUX) && defined(__alpha)) \
! 	|| defined(NETBSD)
  #define PT_NO_ATFORK
  #endif
  
***************
*** 142,148 ****
   * These platforms don't have sigtimedwait()
   */
  #if (defined(AIX) && !defined(AIX4_3)) || defined(LINUX) \
! 	|| defined(FREEBSD)
  #define PT_NO_SIGTIMEDWAIT
  #endif
  
--- 144,150 ----
   * These platforms don't have sigtimedwait()
   */
  #if (defined(AIX) && !defined(AIX4_3)) || defined(LINUX) \
! 	|| defined(FREEBSD) || defined(NETBSD)
  #define PT_NO_SIGTIMEDWAIT
  #endif
  
***************
*** 184,190 ****
   */
  #define PT_PRIO_MIN            1
  #define PT_PRIO_MAX            127
! #elif defined(FREEBSD) /* XXX */
  #define PT_PRIO_MIN            0
  #define PT_PRIO_MAX            126
  #else
--- 186,192 ----
   */
  #define PT_PRIO_MIN            1
  #define PT_PRIO_MAX            127
! #elif defined(FREEBSD) || defined(NETBSD)/* XXX */
  #define PT_PRIO_MIN            0
  #define PT_PRIO_MAX            126
  #else
***************
*** 213,219 ****
  #define PTHREAD_YIELD()             sched_yield()
  #elif defined(LINUX)
  #define PTHREAD_YIELD()            	sched_yield()
! #elif defined(FREEBSD)
  #define PTHREAD_YIELD()                 pthread_yield()
  #else
  #error "Need to define PTHREAD_YIELD for this platform"
--- 215,221 ----
  #define PTHREAD_YIELD()             sched_yield()
  #elif defined(LINUX)
  #define PTHREAD_YIELD()            	sched_yield()
! #elif defined(FREEBSD) || defined(NETBSD)
  #define PTHREAD_YIELD()                 pthread_yield()
  #else
  #error "Need to define PTHREAD_YIELD for this platform"
*** nsprpub/pr/include/md/prosdep.h.orig	Wed Apr 29 20:58:01 1998
--- nsprpub/pr/include/md/prosdep.h	Sun May 24 22:00:13 1998
***************
*** 59,64 ****
--- 59,67 ----
  #elif defined(FREEBSD)
  #include "md/_freebsd.h"
  
+ #elif defined(NETBSD)
+ #include "md/_netbsd.h"
+ 
  #elif defined(BSDI)
  #include "md/_bsdi.h"
  
*** nsprpub/pr/include/md/_netbsd.cfg.orig	Sun May 24 23:32:44 1998
--- nsprpub/pr/include/md/_netbsd.cfg	Sun May 24 22:00:41 1998
***************
*** 0 ****
--- 1,262 ----
+ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+ /*
+  * The contents of this file are subject to the Netscape Public License
+  * Version 1.0 (the "NPL"); you may not use this file except in
+  * compliance with the NPL.  You may obtain a copy of the NPL at
+  * http://www.mozilla.org/NPL/
+  * 
+  * Software distributed under the NPL is distributed on an "AS IS" basis,
+  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+  * for the specific language governing rights and limitations under the
+  * NPL.
+  * 
+  * The Initial Developer of this code under the NPL is Netscape
+  * Communications Corporation.  Portions created by Netscape are
+  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+  * Reserved.
+  */
+ 
+ #ifndef nspr_cpucfg___
+ #define nspr_cpucfg___
+ 
+ #ifndef XP_UNIX
+ #define XP_UNIX
+ #endif
+ 
+ #ifndef NETBSD
+ #define NETBSD
+ #endif
+ 
+ #if defined(__i386__) || defined(__arm32__)
+ 
+ #define IS_LITTLE_ENDIAN 1
+ #undef  IS_BIG_ENDIAN
+ #define	HAVE_LONG_LONG
+ #undef	HAVE_ALIGNED_DOUBLES
+ #undef	HAVE_ALIGNED_LONGLONGS
+ 
+ #define PR_BYTES_PER_BYTE   1
+ #define PR_BYTES_PER_SHORT  2
+ #define PR_BYTES_PER_INT    4
+ #define PR_BYTES_PER_INT64  8
+ #define PR_BYTES_PER_LONG   4
+ #define PR_BYTES_PER_FLOAT  4
+ #define PR_BYTES_PER_DOUBLE 8
+ #define PR_BYTES_PER_WORD   4
+ #define PR_BYTES_PER_DWORD  8
+ #define PR_BYTES_PER_WORD_LOG2   2
+ #define PR_BYTES_PER_DWORD_LOG2  3
+ 
+ #define PR_BITS_PER_BYTE    8
+ #define PR_BITS_PER_SHORT   16
+ #define PR_BITS_PER_INT     32
+ #define PR_BITS_PER_INT64   64
+ #define PR_BITS_PER_LONG    32
+ #define PR_BITS_PER_FLOAT   32
+ #define PR_BITS_PER_DOUBLE  64
+ #define PR_BITS_PER_WORD    32
+ 
+ #define PR_BITS_PER_BYTE_LOG2   3
+ #define PR_BITS_PER_SHORT_LOG2  4
+ #define PR_BITS_PER_INT_LOG2    5
+ #define PR_BITS_PER_INT64_LOG2  6
+ #define PR_BITS_PER_LONG_LOG2   5
+ #define PR_BITS_PER_FLOAT_LOG2  5
+ #define PR_BITS_PER_DOUBLE_LOG2 6
+ #define PR_BITS_PER_WORD_LOG2   5
+ 
+ #define PR_ALIGN_OF_SHORT   2
+ #define PR_ALIGN_OF_INT     4
+ #define PR_ALIGN_OF_LONG    4
+ #define PR_ALIGN_OF_INT64   4
+ #define PR_ALIGN_OF_FLOAT   4
+ #define PR_ALIGN_OF_DOUBLE  4
+ #define PR_ALIGN_OF_POINTER 4
+ 
+ #elif defined(__sparc__)
+ 
+ #undef IS_LITTLE_ENDIAN 1
+ #define  IS_BIG_ENDIAN 1
+ #define HAVE_LONG_LONG
+ #define  HAVE_ALIGNED_DOUBLES
+ #define  HAVE_ALIGNED_LONGLONGS
+ 
+ #define PR_BYTES_PER_BYTE   1
+ #define PR_BYTES_PER_SHORT  2
+ #define PR_BYTES_PER_INT    4
+ #define PR_BYTES_PER_INT64  8
+ #define PR_BYTES_PER_LONG   4
+ #define PR_BYTES_PER_FLOAT  4
+ #define PR_BYTES_PER_DOUBLE 8
+ #define PR_BYTES_PER_WORD   4
+ #define PR_BYTES_PER_DWORD  8
+ #define PR_BYTES_PER_WORD_LOG2   2
+ #define PR_BYTES_PER_DWORD_LOG2  3
+ 
+ #define PR_BITS_PER_BYTE    8
+ #define PR_BITS_PER_SHORT   16
+ #define PR_BITS_PER_INT     32
+ #define PR_BITS_PER_INT64   64
+ #define PR_BITS_PER_LONG    32
+ #define PR_BITS_PER_FLOAT   32
+ #define PR_BITS_PER_DOUBLE  64
+ #define PR_BITS_PER_WORD    32
+ 
+ #define PR_BITS_PER_BYTE_LOG2   3
+ #define PR_BITS_PER_SHORT_LOG2  4
+ #define PR_BITS_PER_INT_LOG2    5
+ #define PR_BITS_PER_INT64_LOG2  6
+ #define PR_BITS_PER_LONG_LOG2   5
+ #define PR_BITS_PER_FLOAT_LOG2  5
+ #define PR_BITS_PER_DOUBLE_LOG2 6
+ #define PR_BITS_PER_WORD_LOG2   5
+ 
+ #define PR_ALIGN_OF_SHORT   2
+ #define PR_ALIGN_OF_INT     4
+ #define PR_ALIGN_OF_LONG    4
+ #define PR_ALIGN_OF_INT64   8
+ #define PR_ALIGN_OF_FLOAT   4
+ #define PR_ALIGN_OF_DOUBLE  8
+ #define PR_ALIGN_OF_POINTER 4
+ 
+ #elif defined(__alpha__)
+ #define IS_LITTLE_ENDIAN 1
+ #undef  IS_BIG_ENDIAN
+ #define IS_64
+ 
+ #define PR_BYTES_PER_BYTE   1
+ #define PR_BYTES_PER_SHORT  2
+ #define PR_BYTES_PER_INT    4
+ #define PR_BYTES_PER_INT64  8
+ #define PR_BYTES_PER_LONG   8
+ #define PR_BYTES_PER_FLOAT  4
+ #define PR_BYTES_PER_DOUBLE 8
+ #define PR_BYTES_PER_WORD   8
+ #define PR_BYTES_PER_DWORD  8
+ 
+ #define PR_BITS_PER_BYTE    8
+ #define PR_BITS_PER_SHORT   16
+ #define PR_BITS_PER_INT     32
+ #define PR_BITS_PER_INT64   64
+ #define PR_BITS_PER_LONG    64
+ #define PR_BITS_PER_FLOAT   32
+ #define PR_BITS_PER_DOUBLE  64
+ #define PR_BITS_PER_WORD    64
+ 
+ #define PR_BITS_PER_BYTE_LOG2   3
+ #define PR_BITS_PER_SHORT_LOG2  4
+ #define PR_BITS_PER_INT_LOG2    5
+ #define PR_BITS_PER_INT64_LOG2  6
+ #define PR_BITS_PER_LONG_LOG2   6
+ #define PR_BITS_PER_FLOAT_LOG2  5
+ #define PR_BITS_PER_DOUBLE_LOG2 6
+ #define PR_BITS_PER_WORD_LOG2   6
+ 
+ #define PR_ALIGN_OF_SHORT   2
+ #define PR_ALIGN_OF_INT     4
+ #define PR_ALIGN_OF_LONG    8
+ #define PR_ALIGN_OF_INT64   8
+ #define PR_ALIGN_OF_FLOAT   4
+ #define PR_ALIGN_OF_DOUBLE  8
+ #define PR_ALIGN_OF_POINTER 8
+ 
+ #define PR_BYTES_PER_WORD_LOG2  3
+ #define PR_BYTES_PER_DWORD_LOG2 3
+ 
+ #elif defined(__powerpc__) || defined(__m68k__)
+ 
+ #undef  IS_LITTLE_ENDIAN
+ #define IS_BIG_ENDIAN    1
+ 
+ #define PR_BYTES_PER_BYTE   1
+ #define PR_BYTES_PER_SHORT  2
+ #define PR_BYTES_PER_INT    4
+ #define PR_BYTES_PER_INT64  8
+ #define PR_BYTES_PER_LONG   4
+ #define PR_BYTES_PER_FLOAT  4
+ #define PR_BYTES_PER_DOUBLE 8
+ #define PR_BYTES_PER_WORD   4
+ #define PR_BYTES_PER_DWORD  8
+ 
+ #define PR_BITS_PER_BYTE    8
+ #define PR_BITS_PER_SHORT   16
+ #define PR_BITS_PER_INT     32
+ #define PR_BITS_PER_INT64   64
+ #define PR_BITS_PER_LONG    32
+ #define PR_BITS_PER_FLOAT   32
+ #define PR_BITS_PER_DOUBLE  64
+ #define PR_BITS_PER_WORD    32
+ 
+ #define PR_BITS_PER_BYTE_LOG2   3
+ #define PR_BITS_PER_SHORT_LOG2  4
+ #define PR_BITS_PER_INT_LOG2    5
+ #define PR_BITS_PER_INT64_LOG2  6
+ #define PR_BITS_PER_LONG_LOG2   5
+ #define PR_BITS_PER_FLOAT_LOG2  5
+ #define PR_BITS_PER_DOUBLE_LOG2 6
+ #define PR_BITS_PER_WORD_LOG2   5
+ 
+ #define PR_ALIGN_OF_SHORT   2
+ #define PR_ALIGN_OF_INT     4
+ #define PR_ALIGN_OF_LONG    4
+ #define PR_ALIGN_OF_INT64   4
+ #define PR_ALIGN_OF_FLOAT   4
+ #define PR_ALIGN_OF_DOUBLE  4
+ #define PR_ALIGN_OF_POINTER 4
+ 
+ #define PR_BYTES_PER_WORD_LOG2   2
+ #define PR_BYTES_PER_DWORD_LOG2  3
+ 
+ #else
+ 
+ #error Must define constants for type sizes here.
+ 
+ #endif
+ 
+ 
+ #ifndef NO_NSPR_10_SUPPORT
+ 
+ #define BYTES_PER_BYTE		PR_BYTES_PER_BYTE
+ #define BYTES_PER_SHORT 	PR_BYTES_PER_SHORT
+ #define BYTES_PER_INT 		PR_BYTES_PER_INT
+ #define BYTES_PER_INT64		PR_BYTES_PER_INT64
+ #define BYTES_PER_LONG		PR_BYTES_PER_LONG
+ #define BYTES_PER_FLOAT		PR_BYTES_PER_FLOAT
+ #define BYTES_PER_DOUBLE	PR_BYTES_PER_DOUBLE
+ #define BYTES_PER_WORD		PR_BYTES_PER_WORD
+ #define BYTES_PER_DWORD		PR_BYTES_PER_DWORD
+ 
+ #define BITS_PER_BYTE		PR_BITS_PER_BYTE
+ #define BITS_PER_SHORT		PR_BITS_PER_SHORT
+ #define BITS_PER_INT		PR_BITS_PER_INT
+ #define BITS_PER_INT64		PR_BITS_PER_INT64
+ #define BITS_PER_LONG		PR_BITS_PER_LONG
+ #define BITS_PER_FLOAT		PR_BITS_PER_FLOAT
+ #define BITS_PER_DOUBLE		PR_BITS_PER_DOUBLE
+ #define BITS_PER_WORD		PR_BITS_PER_WORD
+ 
+ #define BITS_PER_BYTE_LOG2	PR_BITS_PER_BYTE_LOG2
+ #define BITS_PER_SHORT_LOG2	PR_BITS_PER_SHORT_LOG2
+ #define BITS_PER_INT_LOG2	PR_BITS_PER_INT_LOG2
+ #define BITS_PER_INT64_LOG2	PR_BITS_PER_INT64_LOG2
+ #define BITS_PER_LONG_LOG2	PR_BITS_PER_LONG_LOG2
+ #define BITS_PER_FLOAT_LOG2	PR_BITS_PER_FLOAT_LOG2
+ #define BITS_PER_DOUBLE_LOG2 	PR_BITS_PER_DOUBLE_LOG2
+ #define BITS_PER_WORD_LOG2	PR_BITS_PER_WORD_LOG2
+ 
+ #define ALIGN_OF_SHORT		PR_ALIGN_OF_SHORT
+ #define ALIGN_OF_INT		PR_ALIGN_OF_INT
+ #define ALIGN_OF_LONG		PR_ALIGN_OF_LONG
+ #define ALIGN_OF_INT64		PR_ALIGN_OF_INT64
+ #define ALIGN_OF_FLOAT		PR_ALIGN_OF_FLOAT
+ #define ALIGN_OF_DOUBLE		PR_ALIGN_OF_DOUBLE
+ #define ALIGN_OF_POINTER	PR_ALIGN_OF_POINTER
+ #define ALIGN_OF_WORD		PR_ALIGN_OF_WORD
+ 
+ #define BYTES_PER_WORD_LOG2	PR_BYTES_PER_WORD_LOG2
+ #define BYTES_PER_DWORD_LOG2	PR_BYTES_PER_DWORD_LOG2
+ #define WORDS_PER_DWORD_LOG2	PR_WORDS_PER_DWORD_LOG2
+ 
+ #endif /* NO_NSPR_10_SUPPORT */
+ 
+ #endif /* nspr_cpucfg___ */
*** nsprpub/pr/include/md/_netbsd.h.orig	Sun May 24 23:32:50 1998
--- nsprpub/pr/include/md/_netbsd.h	Sun May 24 22:00:41 1998
***************
*** 0 ****
--- 1,169 ----
+ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+ /*
+  * The contents of this file are subject to the Netscape Public License
+  * Version 1.0 (the "NPL"); you may not use this file except in
+  * compliance with the NPL.  You may obtain a copy of the NPL at
+  * http://www.mozilla.org/NPL/
+  * 
+  * Software distributed under the NPL is distributed on an "AS IS" basis,
+  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+  * for the specific language governing rights and limitations under the
+  * NPL.
+  * 
+  * The Initial Developer of this code under the NPL is Netscape
+  * Communications Corporation.  Portions created by Netscape are
+  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+  * Reserved.
+  */
+ 
+ #ifndef nspr_netbsd_defs_h___
+ #define nspr_netbsd_defs_h___
+ 
+ #include <sys/syscall.h>
+ 
+ #define PR_LINKER_ARCH	"netbsd"
+ #define _PR_SI_SYSNAME  "NetBSD"
+ #if defined(__i386)
+ #define _PR_SI_ARCHITECTURE "x86"
+ #elif defined(__alpha__)
+ #define _PR_SI_ARCHITECTURE "alpha"
+ #elif defined(__m68k__)
+ #define _PR_SI_ARCHITECTURE "m68k"
+ #elif defined(__powerpc__)
+ #define _PR_SI_ARCHITECTURE "powerpc"
+ #elif defined(__sparc__)
+ #define _PR_SI_ARCHITECTURE "sparc"
+ #elif defined(__arm32__)
+ #define _PR_SI_ARCHITECTURE "arm32"
+ #endif
+ 
+ #define PR_DLL_SUFFIX		".so.1.0"
+ 
+ #define _PR_VMBASE              0x30000000
+ #define _PR_STACK_VMBASE	0x50000000
+ #define _MD_DEFAULT_STACK_SIZE	65536L
+ #define _MD_MMAP_FLAGS          MAP_PRIVATE
+ 
+ #undef  HAVE_STACK_GROWING_UP
+ #define HAVE_DLL
+ #define USE_DLFCN
+ 
+ #define USE_SETJMP
+ 
+ #ifndef _PR_PTHREADS
+ #include <setjmp.h>
+ 
+ #define PR_CONTEXT_TYPE	sigjmp_buf
+ 
+ #define CONTEXT(_th) ((_th)->md.context)
+ 
+ #if defined(__i386) || defined(__sparc__) || defined(__m68k__)
+ #define JB_SP_INDEX 2
+ #elif defined(__alpha__)
+ #define JB_SP_INDEX 34
+ #elif defined(__arm32__)
+ #define JB_SP_INDEX JMPBUF_REG_R13
+ #else
+ #error "Need to define SP index in jmp_buf here"
+ #endif
+ 
+ #define _MD_GET_SP(_th)    (_th)->md.context[JB_SP_INDEX]
+ 
+ #define PR_NUM_GCREGS	_JBLEN
+ 
+ /*
+ ** Initialize a thread context to run "_main()" when started
+ */
+ #define _MD_INIT_CONTEXT(_thread, _sp, _main, status)  \
+ {  \
+     *status = PR_TRUE;  \
+     if (sigsetjmp(CONTEXT(_thread), 1)) {  \
+         _main();  \
+     }  \
+     _MD_GET_SP(_thread) = (unsigned char*) ((_sp) - 64); \
+ }
+ 
+ #define _MD_SWITCH_CONTEXT(_thread)  \
+     if (!sigsetjmp(CONTEXT(_thread), 1)) {  \
+ 	(_thread)->md.errcode = errno;  \
+ 	_PR_Schedule();  \
+     }
+ 
+ /*
+ ** Restore a thread context, saved by _MD_SWITCH_CONTEXT
+ */
+ #define _MD_RESTORE_CONTEXT(_thread) \
+ {   \
+     errno = (_thread)->md.errcode;  \
+     _MD_SET_CURRENT_THREAD(_thread);  \
+     siglongjmp(CONTEXT(_thread), 1);  \
+ }
+ 
+ /* Machine-dependent (MD) data structures */
+ 
+ struct _MDThread {
+     PR_CONTEXT_TYPE context;
+     int id;
+     int errcode;
+ };
+ 
+ struct _MDThreadStack {
+     PRInt8 notused;
+ };
+ 
+ struct _MDLock {
+     PRInt8 notused;
+ };
+ 
+ struct _MDSemaphore {
+     PRInt8 notused;
+ };
+ 
+ struct _MDCVar {
+     PRInt8 notused;
+ };
+ 
+ struct _MDSegment {
+     PRInt8 notused;
+ };
+ 
+ struct _MDCPU {
+ 	struct _MDCPU_Unix md_unix;
+ };
+ 
+ #define _MD_INIT_LOCKS()
+ #define _MD_NEW_LOCK(lock) PR_SUCCESS
+ #define _MD_FREE_LOCK(lock)
+ #define _MD_LOCK(lock)
+ #define _MD_UNLOCK(lock)
+ #define _MD_INIT_IO()
+ #define _MD_IOQ_LOCK()
+ #define _MD_IOQ_UNLOCK()
+ 
+ #define _MD_INIT_RUNNING_CPU(cpu)       _MD_unix_init_running_cpu(cpu)
+ #define _MD_INIT_THREAD                 _MD_InitializeThread
+ #define _MD_EXIT_THREAD(thread)
+ #define _MD_SUSPEND_THREAD(thread)      _MD_suspend_thread
+ #define _MD_RESUME_THREAD(thread)       _MD_resume_thread
+ #define _MD_CLEAN_THREAD(_thread)
+ 
+ #endif /* ! _PR_PTHREADS */
+ 
+ #define _MD_EARLY_INIT                  _MD_EarlyInit
+ #define _MD_FINAL_INIT			_PR_UnixInit
+ #define _MD_GET_INTERVAL                  _PR_UNIX_GetInterval
+ #define _MD_INTERVAL_PER_SEC              _PR_UNIX_TicksPerSecond
+ 
+ /*
+  * We wrapped the select() call.  _MD_SELECT refers to the built-in,
+  * unwrapped version.
+  */
+ #define _MD_SELECT(nfds,r,w,e,tv) syscall(SYS_select,nfds,r,w,e,tv)
+ #define _MD_POLL(fds,nfds,timeout) syscall(SYS_poll,fds,nfds,timeout)
+ 
+ #if defined(NetBSD1_3) && NetBSD1_3 == 1
+ typedef unsigned int nfds_t;
+ #define O_SYNC O_FSYNC
+ #endif
+ 
+ #endif /* nspr_netbsd_defs_h___ */
*** nsprpub/pr/include/md/Makefile.orig	Wed Apr 29 20:58:01 1998
--- nsprpub/pr/include/md/Makefile	Sun May 24 22:00:13 1998
***************
*** 55,60 ****
--- 55,64 ----
  MDCPUCFG_H = _freebsd.cfg
  endif
  
+ ifeq ($(OS_ARCH),NetBSD)
+ MDCPUCFG_H = _netbsd.cfg
+ endif
+ 
  ifeq ($(OS_ARCH),HP-UX)
  MDCPUCFG_H = _hpux.cfg
  endif
*** nsprpub/pr/include/md/_unixos.h.orig	Wed Apr 29 20:58:01 1998
--- nsprpub/pr/include/md/_unixos.h	Sun May 24 22:00:13 1998
***************
*** 49,55 ****
          || defined(UNIXWARE) || defined(NCR) || defined(SNI) || defined(NEC) \
          || defined(BSDI) || defined(SONY)
  #include <sys/select.h>
! #elif defined(SUNOS4) || defined(SCO) || defined(FREEBSD)
  #include <sys/types.h>
  #elif defined(LINUX)
  #include <sys/time.h>
--- 49,55 ----
          || defined(UNIXWARE) || defined(NCR) || defined(SNI) || defined(NEC) \
          || defined(BSDI) || defined(SONY)
  #include <sys/select.h>
! #elif defined(SUNOS4) || defined(SCO) || defined(FREEBSD) || defined(NETBSD)
  #include <sys/types.h>
  #elif defined(LINUX)
  #include <sys/time.h>
*** nsprpub/config/UNIX.mk.orig	Wed Apr 29 20:57:38 1998
--- nsprpub/config/UNIX.mk	Sun May 24 23:11:32 1998
***************
*** 32,38 ****
  endif
  
  # Name of the binary code directories
! OBJDIR_NAME	= $(OS_CONFIG)$(CPU_ARCH_TAG)$(COMPILER_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
  
  MKDEPEND_DIR    = $(DEPTH)/config/mkdepend
  MKDEPEND 	= $(MKDEPEND_DIR)/$(OBJDIR_NAME)/mkdepend
--- 32,38 ----
  endif
  
  # Name of the binary code directories
! OBJDIR_NAME	= NetBSD1.3E_OPT.OBJ
  
  MKDEPEND_DIR    = $(DEPTH)/config/mkdepend
  MKDEPEND 	= $(MKDEPEND_DIR)/$(OBJDIR_NAME)/mkdepend
*** nsprpub/config/NetBSD.mk.orig	Sun May 24 22:00:13 1998
--- nsprpub/config/NetBSD.mk	Sun May 24 22:00:13 1998
***************
*** 0 ****
--- 1,58 ----
+ #
+ # The contents of this file are subject to the Netscape Public License
+ # Version 1.0 (the "NPL"); you may not use this file except in
+ # compliance with the NPL.  You may obtain a copy of the NPL at
+ # http://www.mozilla.org/NPL/
+ # 
+ # Software distributed under the NPL is distributed on an "AS IS" basis,
+ # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+ # for the specific language governing rights and limitations under the
+ # NPL.
+ # 
+ # The Initial Developer of this code under the NPL is Netscape
+ # Communications Corporation.  Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+ # Reserved.
+ #
+ 
+ #
+ # Config stuff for NetBSD 1.x
+ #
+ 
+ include $(MOD_DEPTH)/config/UNIX.mk
+ 
+ CC			= gcc
+ CCC			= g++
+ RANLIB			= ranlib
+ 
+ OS_REL_CFLAGS		=
+ #CPU_ARCH		= x86
+ 
+ OS_CFLAGS		= $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe -DNETBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
+ 
+ ifeq ($(USE_PTHREADS),1)
+ OS_LIBS			= -lc_r
+ # XXX probably should define _THREAD_SAFE too.
+ else
+ OS_LIBS			= -lc
+ DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
+ endif
+ 
+ ARCH			= netbsd
+ 
+ DSO_CFLAGS		= -fPIC
+ DSO_LDFLAGS		=
+ DSO_LDOPTS		= -Bshareable
+ ifeq ($(OS_TEST),alpha)
+ DSO_LDOPTS		= -shared
+ endif
+ ifeq ($(OS_TEST),mips)
+ DSO_LDOPTS		= -shared
+ endif
+ ifeq ($(OS_TEST),pmax)  
+ DSO_LDOPTS		= -shared
+ endif
+ 
+ MKSHLIB			= $(LD) $(DSO_LDOPTS)
+ 
+ G++INCLUDES		= -I/usr/include/g++
*** include/mcom_db.h.orig	Wed Apr 29 20:53:35 1998
--- include/mcom_db.h	Sun May 24 22:00:12 1998
***************
*** 224,230 ****
  #define	RET_SUCCESS	 0
  #define	RET_SPECIAL	 1
  
! #if defined(__386BSD__) || defined(SCO)
  #define	__BIT_TYPES_DEFINED__
  #endif
  
--- 224,230 ----
  #define	RET_SUCCESS	 0
  #define	RET_SPECIAL	 1
  
! #if defined(__386BSD__) || defined(SCO) || defined(__NetBSD__)
  #define	__BIT_TYPES_DEFINED__
  #endif
  
*** modules/schedulr/src/Makefile.orig	Wed Apr 29 20:56:51 1998
--- modules/schedulr/src/Makefile	Sun May 24 22:00:13 1998
***************
*** 17,24 ****
  
  DEPTH		= ../../..
  
! MODULE		= schedulr 
! LIBRARY_NAME	= sched 
  
  REQUIRES	= nspr util
  
--- 17,24 ----
  
  DEPTH		= ../../..
  
! MODULE		= schedulr
! LIBRARY_NAME	= sched
  
  REQUIRES	= nspr util
  
*** modules/libreg/src/vr_stubs.h.orig	Wed Apr 29 20:56:24 1998
--- modules/libreg/src/vr_stubs.h	Sun May 24 22:00:13 1998
***************
*** 29,35 ****
  #ifdef XP_MAC
  #include <stat.h>
  #else
! #if defined(BSDI) && !defined(BSDI_2)
  #include <sys/types.h>
  #endif
  #include <sys/stat.h>
--- 29,35 ----
  #ifdef XP_MAC
  #include <stat.h>
  #else
! #if (defined(BSDI) && !defined(BSDI_2)) || defined(NETBSD)
  #include <sys/types.h>
  #endif
  #include <sys/stat.h>
*** sun-java/stubs/include/typedefs_md.h.orig	Wed Apr 29 21:03:22 1998
--- sun-java/stubs/include/typedefs_md.h	Sun May 24 22:11:50 1998
***************
*** 38,44 ****
  
  typedef prword_t uintVP_t; /* unsigned that is same size as a void pointer */
  
! #if !defined(BSDI) && !defined(IRIX6_2) && !defined(IRIX6_3) && !defined(LINUX2_0) && !defined(MKLINUX) && !defined(SOLARIS2_6) && !defined(HPUX10_20) && !defined(HPUX10_30) && !defined(HPUX11)
  typedef int64 int64_t;
  #else
  /*
--- 38,44 ----
  
  typedef prword_t uintVP_t; /* unsigned that is same size as a void pointer */
  
! #if !defined(BSDI) && !defined(IRIX6_2) && !defined(IRIX6_3) && !defined(LINUX2_0) && !defined(MKLINUX) && !defined(SOLARIS2_6) && !defined(HPUX10_20) && !defined(HPUX10_30) && !defined(HPUX11) && !defined(NETBSD)
  typedef int64 int64_t;
  #else
  /*
*** config/NetBSD.mk.orig	Sun May 24 23:33:28 1998
--- config/NetBSD.mk	Sun May 24 22:00:51 1998
***************
*** 0 ****
--- 1,107 ----
+ #
+ # The contents of this file are subject to the Netscape Public License
+ # Version 1.0 (the "NPL"); you may not use this file except in
+ # compliance with the NPL.  You may obtain a copy of the NPL at
+ # http://www.mozilla.org/NPL/
+ #
+ # Software distributed under the NPL is distributed on an "AS IS" basis,
+ # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+ # for the specific language governing rights and limitations under the
+ # NPL.
+ #
+ # The Initial Developer of this code under the NPL is Netscape
+ # Communications Corporation.  Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+ # Reserved.
+ #
+ 
+ ######################################################################
+ # Config stuff for FreeBSD
+ ######################################################################
+ #
+ ######################################################################
+ # Version-independent
+ ######################################################################
+ 
+ ARCH			:= netbsd
+ ifeq (86,$(findstring 86,$(OS_TEST)))
+ CPU_ARCH                := x86
+ else
+ CPU_ARCH                := $(OS_TEST)
+ endif
+ GFX_ARCH		:= x
+ 
+ OS_INCLUDES		= -I/usr/X11R6/include
+ G++INCLUDES		= -I/usr/include/g++
+ LOC_LIB_DIR		=
+ MOTIF			=
+ MOTIFLIB		=
+ OS_LIBS			=
+ 
+ OS_MINOR		= $(shell echo $(OS_VERSION) | cut -f2 -d.)
+ 
+ # Don't define BSD, because it's already defined in /usr/include/sys/param.h.
+ PLATFORM_FLAGS		= -DNETBSD $(DSO_CFLAGS)
+ MOVEMAIL_FLAGS		= -DHAVE_STRERROR
+ PORT_FLAGS		= -DSW_THREADS -DNEED_UINT -DHAVE_LCHOWN -DNTOHL_ENDIAN_H -DHAVE_FILIO_H -DNEED_SYS_TIME_H -DNEED_UINT_T -DHAVE_BSD_FLOCK
+ PDJAVA_FLAGS		= -mx128m
+ OS_GPROF_FLAGS		= -pg
+ LD_FLAGS		= -L/usr/X11R6/lib -lXm
+ 
+ OS_CFLAGS		= $(PLATFORM_FLAGS) $(PORT_FLAGS) $(MOVEMAIL_FLAGS)
+ 
+ LOCALE_MAP		= $(DEPTH)/cmd/xfe/intl/bsd386.lm
+ EN_LOCALE		= C
+ DE_LOCALE		= de_DE.ISO8859-1
+ FR_LOCALE		= fr_FR.ISO8859-1
+ JP_LOCALE		= ja
+ SJIS_LOCALE		= ja_JP.SJIS
+ KR_LOCALE		= ko_KR.EUC
+ CN_LOCALE		= zh
+ TW_LOCALE		= zh
+ I2_LOCALE		= i2
+ 
+ ######################################################################
+ # Version-specific stuff
+ ######################################################################
+ 
+ ######################################################################
+ # Overrides for defaults in config.mk (or wherever)
+ ######################################################################
+ 
+ DLL_SUFFIX		= so.1.0
+ EMACS			= /usr/bin/true
+ JAVA_PROG		= $(JAVA_BIN)java
+ RANLIB			= /usr/bin/ranlib
+ 
+ ######################################################################
+ # Other
+ ######################################################################
+ 
+ ifeq ($(USE_PTHREADS),1)
+ OS_LIBS			= -lc_r
+ PORT_FLAGS		+= -D_PR_NEED_FAKE_POLL
+ else
+ OS_LIBS			= -lc
+ PORT_FLAGS		+= -D_PR_LOCAL_THREADS_ONLY
+ endif
+ 
+ BUILD_UNIX_PLUGINS	= 1
+ 
+ MKSHLIB			= $(LD) $(DSO_LDOPTS)
+ 
+ #
+ # For NetBSD > 1.3, this can all be -shared.
+ #
+ DSO_CFLAGS		= -fPIC
+ DSO_LDFLAGS		=
+ DSO_LDOPTS		= -Bshareable
+ ifeq ($(OS_TEST),alpha)
+ DSO_LDOPTS		= -shared
+ endif
+ ifeq ($(OS_TEST),mips)
+ DSO_LDOPTS		= -shared
+ endif
+ ifeq ($(OS_TEST),pmax)
+ DSO_LDOPTS		= -shared
+ endif
*** config/rules.mk.orig	Wed Apr 29 21:02:19 1998
--- config/rules.mk	Sun May 24 22:00:17 1998
***************
*** 102,107 ****
--- 102,110 ----
  ifeq ($(OS_ARCH),FreeBSD)
  SHARED_LIBRARY		:= $(LIBRARY:.a=.so.1.0)
  else
+ ifeq ($(OS_ARCH),NetBSD)
+ SHARED_LIBRARY		:= $(LIBRARY:.a=.so.1.0)
+ else
  ifeq ($(OS_ARCH)$(OS_RELEASE),SunOS4.1)
  SHARED_LIBRARY		:= $(LIBRARY:.a=.so.1.0)
  else
***************
*** 109,114 ****
--- 112,118 ----
  SHARED_LIBRARY		:= $(LIBRARY:.a=)_shr.a
  else
  SHARED_LIBRARY		:= $(LIBRARY:.a=.so)
+ endif
  endif
  endif
  endif
*** config/config.mk.orig	Wed Apr 29 21:02:18 1998
--- config/config.mk	Sun May 24 22:00:17 1998
***************
*** 83,89 ****
  # but save the version to allow multiple versions of the same base
  # platform to be built in the same tree.
  #
! ifneq (,$(filter FreeBSD HP-UX IRIX Linux OSF1 SunOS,$(OS_ARCH)))
  OS_VERS		:= $(suffix $(OS_RELEASE))
  OS_RELEASE	:= $(basename $(OS_RELEASE))
  OS_VERSION	:= $(shell echo $(OS_VERS) | sed 's/-.*//')
--- 83,89 ----
  # but save the version to allow multiple versions of the same base
  # platform to be built in the same tree.
  #
! ifneq (,$(filter FreeBSD HP-UX IRIX Linux OSF1 SunOS NetBSD,$(OS_ARCH)))
  OS_VERS		:= $(suffix $(OS_RELEASE))
  OS_RELEASE	:= $(basename $(OS_RELEASE))
  OS_VERSION	:= $(shell echo $(OS_VERS) | sed 's/-.*//')