Alexander Pyhalov
2017-05-16 de3ef7fbc585780dd0e0c696f7bdf0d975ad5cb1
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
--- firefox-52.1.0esr/build/moz.configure/init.configure.~1~    2017-04-11 05:13:08.000000000 +0300
+++ firefox-52.1.0esr/build/moz.configure/init.configure    2017-05-04 17:23:44.352904564 +0300
@@ -336,6 +336,9 @@
         canonical_os = canonical_kernel = 'NetBSD'
     elif os.startswith('openbsd'):
         canonical_os = canonical_kernel = 'OpenBSD'
+    elif os.startswith('solaris'):
+        canonical_os = 'Solaris'
+        canonical_kernel = 'SunOS'
     else:
         die('Unknown OS: %s' % os)
 
--- firefox-52.1.0esr/old-configure.in.1    2017-05-04 16:16:14.524641413 +0300
+++ firefox-52.1.0esr/old-configure.in    2017-05-04 16:17:11.041200352 +0300
@@ -967,6 +967,11 @@
     ;;
     esac
     ;;
+*-solaris*)
+    MOZ_FIX_LINK_PATHS=
+    CFLAGS="$CFLAGS -DXP_UNIX -DSOLARIS"
+    CXXFLAGS="$CXXFLAGS -DXP_UNIX -DSOLARIS"
+    ;;
 *-mingw*)
     DSO_CFLAGS=
     DSO_PIC_CFLAGS=
--- firefox-52.1.0esr/js/src/old-configure.in.1    2017-05-04 14:44:33.457504436 +0300
+++ firefox-52.1.0esr/js/src/old-configure.in    2017-05-04 14:59:40.780387937 +0300
@@ -674,6 +674,11 @@
     esac
     ;;
 
+*-solaris*)
+     MOZ_FIX_LINK_PATHS=
+     CFLAGS="$CFLAGS -DXP_UNIX -DSOLARIS"
+     CXXFLAGS="$CXXFLAGS -DXP_UNIX -DSOLARIS"
+     ;;
 *-mingw*)
     DSO_CFLAGS=
     DSO_PIC_CFLAGS=
--- firefox-52.1.0esr/python/mozbuild/mozbuild/configure/constants.py.1    2017-05-04 12:17:35.094918532 +0300
+++ firefox-52.1.0esr/python/mozbuild/mozbuild/configure/constants.py    2017-05-04 12:19:10.931269870 +0300
@@ -24,6 +24,7 @@
     'NetBSD',
     'OpenBSD',
     'OSX',
+    'Solaris',
     'WINNT',
 )
 
@@ -35,6 +36,7 @@
     'Linux',
     'NetBSD',
     'OpenBSD',
+    'SunOS',
     'WINNT',
 )
 
@@ -97,6 +99,7 @@
     'Linux': '__linux__',
     'NetBSD': '__NetBSD__',
     'OpenBSD': '__OpenBSD__',
+    'SunOS': '__sun__',
     'WINNT': '_WIN32 || __CYGWIN__',
 }
 
--- firefox-52.1.0esr/build/moz.configure/memory.configure.1    2017-05-04 12:30:28.447535155 +0300
+++ firefox-52.1.0esr/build/moz.configure/memory.configure    2017-05-04 12:31:31.844538645 +0300
@@ -68,6 +68,8 @@
             return 'MOZ_MEMORY_DARWIN'
         if target.kernel in ('kFreeBSD', 'FreeBSD', 'NetBSD'):
             return 'MOZ_MEMORY_BSD'
+        if target.kernel == 'SunOS':
+            return 'MOZ_MEMORY_SOLARIS'
         die('--enable-jemalloc is not supported on %s', target.kernel)
 
 set_define(jemalloc_os_define, '1')
--- firefox-52.1.0esr/config/external/nspr/prcpucfg.h.1    2017-05-04 13:25:37.455450019 +0300
+++ firefox-52.1.0esr/config/external/nspr/prcpucfg.h    2017-05-04 13:26:17.202155986 +0300
@@ -20,6 +20,8 @@
 #include "md/_netbsd.cfg"
 #elif defined(__OpenBSD__)
 #include "md/_openbsd.cfg"
+#elif defined(__sun__)
+#include "md/_solaris.cfg"
 #elif defined(__linux__)
 #include "md/_linux.cfg"
 #else
--- firefox-52.1.0esr/config/external/nspr/pr/moz.build.~1~    2017-04-11 05:13:09.000000000 +0300
+++ firefox-52.1.0esr/config/external/nspr/pr/moz.build    2017-05-05 14:05:10.629150996 +0300
@@ -29,6 +29,18 @@
         SOURCES += ['/nsprpub/pr/src/md/unix/os_Linux_x86.s']
     elif CONFIG['CPU_ARCH'] == 'ppc':
         SOURCES += ['/nsprpub/pr/src/md/unix/os_Linux_ppc.s']
+elif CONFIG['OS_TARGET'] == 'Solaris':
+    DEFINES.update(
+        HAVE_BSD_FLOCK=True,
+        HAVE_SOCKLEN_T=True,
+    )
+    DEFINES[CONFIG['OS_TARGET'].upper()] = True
+    SOURCES += ['/nsprpub/pr/src/md/unix/%s.c' % CONFIG['OS_TARGET'].lower()]
+    if CONFIG['CPU_ARCH'] == 'x86_64':
+        SOURCES += ['/nsprpub/pr/src/md/unix/os_SunOS_x86_64.s']
+    elif CONFIG['CPU_ARCH'] == 'x86':
+        DEFINES['i386'] = True
+        SOURCES += ['/nsprpub/pr/src/md/unix/os_SunOS_x86.s']
 elif CONFIG['OS_TARGET'] in ('FreeBSD', 'OpenBSD', 'NetBSD'):
     DEFINES.update(
         HAVE_BSD_FLOCK=True,
@@ -222,6 +234,7 @@
     '/nsprpub/pr/include/md/_linux.cfg',
     '/nsprpub/pr/include/md/_netbsd.cfg',
     '/nsprpub/pr/include/md/_openbsd.cfg',
+    '/nsprpub/pr/include/md/_solaris.cfg',
     '/nsprpub/pr/include/md/_win95.cfg',
 ]
 
--- firefox-52.1.0esr/nsprpub/pr/include/md/_solaris.h.1    2017-05-05 08:39:19.932519990 +0300
+++ firefox-52.1.0esr/nsprpub/pr/include/md/_solaris.h    2017-05-05 08:41:08.321777162 +0300
@@ -52,6 +52,12 @@
 #define _PR_HAVE_ATOMIC_OPS
 #endif
 
+/* Earlier these settings were detected by nsprpub configure, now it doesn't run */
+#define HAVE_FCNTL_FILE_LOCKING
+#define _PR_HAVE_OFF64_T
+#define _PR_INET6
+/* End of configure-detected settings */
+
 #define _PR_POLL_AVAILABLE
 #define _PR_USE_POLL
 #define _PR_STAT_HAS_ST_ATIM
--- firefox-52.1.1esr/toolkit/components/osfile/modules/osfile_unix_back.jsm.1    2017-05-11 18:03:44.588486859 +0300
+++ firefox-52.1.1esr/toolkit/components/osfile/modules/osfile_unix_back.jsm    2017-05-11 18:04:26.827442725 +0300
@@ -585,7 +585,7 @@
        } else if (Const._STAT_VER != undefined) {
          const ver = Const._STAT_VER;
          let xstat_name, lxstat_name, fxstat_name;
-         if (OS.Constants.Sys.Name == "SunOS") {
+         if (OS.Constants.Sys.Name == "SunOS" || OS.Constants.Sys.Name == "Solaris") {
            // Solaris
            xstat_name = "_xstat";
            lxstat_name = "_lxstat";