summaryrefslogtreecommitdiff
path: root/nsprpub/pr/src
diff options
context:
space:
mode:
Diffstat (limited to 'nsprpub/pr/src')
-rw-r--r--nsprpub/pr/src/.cvsignore2
-rw-r--r--nsprpub/pr/src/bthreads/.cvsignore1
-rw-r--r--nsprpub/pr/src/cplus/.cvsignore1
-rw-r--r--nsprpub/pr/src/cplus/tests/.cvsignore1
-rw-r--r--nsprpub/pr/src/io/.cvsignore1
-rw-r--r--nsprpub/pr/src/linking/.cvsignore1
-rw-r--r--nsprpub/pr/src/malloc/.cvsignore1
-rw-r--r--nsprpub/pr/src/md/.cvsignore1
-rw-r--r--nsprpub/pr/src/md/beos/.cvsignore1
-rw-r--r--nsprpub/pr/src/md/os2/.cvsignore1
-rw-r--r--nsprpub/pr/src/md/unix/.cvsignore1
-rw-r--r--nsprpub/pr/src/md/unix/unix.c19
-rw-r--r--nsprpub/pr/src/md/windows/.cvsignore1
-rw-r--r--nsprpub/pr/src/memory/.cvsignore1
-rw-r--r--nsprpub/pr/src/misc/.cvsignore1
-rw-r--r--nsprpub/pr/src/pthreads/.cvsignore1
-rw-r--r--nsprpub/pr/src/pthreads/ptthread.c16
-rw-r--r--nsprpub/pr/src/threads/.cvsignore1
-rw-r--r--nsprpub/pr/src/threads/combined/.cvsignore1
19 files changed, 49 insertions, 4 deletions
diff --git a/nsprpub/pr/src/.cvsignore b/nsprpub/pr/src/.cvsignore
new file mode 100644
index 0000000000..41a1bd2b78
--- /dev/null
+++ b/nsprpub/pr/src/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+_pr_bld.h
diff --git a/nsprpub/pr/src/bthreads/.cvsignore b/nsprpub/pr/src/bthreads/.cvsignore
new file mode 100644
index 0000000000..f3c7a7c5da
--- /dev/null
+++ b/nsprpub/pr/src/bthreads/.cvsignore
@@ -0,0 +1 @@
+Makefile
diff --git a/nsprpub/pr/src/cplus/.cvsignore b/nsprpub/pr/src/cplus/.cvsignore
new file mode 100644
index 0000000000..f3c7a7c5da
--- /dev/null
+++ b/nsprpub/pr/src/cplus/.cvsignore
@@ -0,0 +1 @@
+Makefile
diff --git a/nsprpub/pr/src/cplus/tests/.cvsignore b/nsprpub/pr/src/cplus/tests/.cvsignore
new file mode 100644
index 0000000000..f3c7a7c5da
--- /dev/null
+++ b/nsprpub/pr/src/cplus/tests/.cvsignore
@@ -0,0 +1 @@
+Makefile
diff --git a/nsprpub/pr/src/io/.cvsignore b/nsprpub/pr/src/io/.cvsignore
new file mode 100644
index 0000000000..f3c7a7c5da
--- /dev/null
+++ b/nsprpub/pr/src/io/.cvsignore
@@ -0,0 +1 @@
+Makefile
diff --git a/nsprpub/pr/src/linking/.cvsignore b/nsprpub/pr/src/linking/.cvsignore
new file mode 100644
index 0000000000..f3c7a7c5da
--- /dev/null
+++ b/nsprpub/pr/src/linking/.cvsignore
@@ -0,0 +1 @@
+Makefile
diff --git a/nsprpub/pr/src/malloc/.cvsignore b/nsprpub/pr/src/malloc/.cvsignore
new file mode 100644
index 0000000000..f3c7a7c5da
--- /dev/null
+++ b/nsprpub/pr/src/malloc/.cvsignore
@@ -0,0 +1 @@
+Makefile
diff --git a/nsprpub/pr/src/md/.cvsignore b/nsprpub/pr/src/md/.cvsignore
new file mode 100644
index 0000000000..f3c7a7c5da
--- /dev/null
+++ b/nsprpub/pr/src/md/.cvsignore
@@ -0,0 +1 @@
+Makefile
diff --git a/nsprpub/pr/src/md/beos/.cvsignore b/nsprpub/pr/src/md/beos/.cvsignore
new file mode 100644
index 0000000000..f3c7a7c5da
--- /dev/null
+++ b/nsprpub/pr/src/md/beos/.cvsignore
@@ -0,0 +1 @@
+Makefile
diff --git a/nsprpub/pr/src/md/os2/.cvsignore b/nsprpub/pr/src/md/os2/.cvsignore
new file mode 100644
index 0000000000..f3c7a7c5da
--- /dev/null
+++ b/nsprpub/pr/src/md/os2/.cvsignore
@@ -0,0 +1 @@
+Makefile
diff --git a/nsprpub/pr/src/md/unix/.cvsignore b/nsprpub/pr/src/md/unix/.cvsignore
new file mode 100644
index 0000000000..f3c7a7c5da
--- /dev/null
+++ b/nsprpub/pr/src/md/unix/.cvsignore
@@ -0,0 +1 @@
+Makefile
diff --git a/nsprpub/pr/src/md/unix/unix.c b/nsprpub/pr/src/md/unix/unix.c
index 29e24e5745..7c90b5075b 100644
--- a/nsprpub/pr/src/md/unix/unix.c
+++ b/nsprpub/pr/src/md/unix/unix.c
@@ -2713,8 +2713,13 @@ static void* _MD_Unix_mmap64(
} /* _MD_Unix_mmap64 */
#endif /* defined(_PR_NO_LARGE_FILES) || defined(SOLARIS2_5) */
-/* Android <= 19 doesn't have mmap64. */
-#if defined(ANDROID) && __ANDROID_API__ <= 19
+/* NDK non-unified headers for API < 21 don't have mmap64. However,
+ * NDK unified headers do provide mmap64 for all API versions when building
+ * with clang. Therefore, we should provide mmap64 here for API < 21 if we're
+ * not using clang or if we're using non-unified headers. We check for
+ * non-unified headers by the lack of __ANDROID_API_L__ macro. */
+#if defined(ANDROID) && __ANDROID_API__ < 21 && \
+ (!defined(__clang__) || !defined(__ANDROID_API_L__))
PR_IMPORT(void) *__mmap2(void *, size_t, int, int, int, size_t);
#define ANDROID_PAGE_SIZE 4096
@@ -2784,9 +2789,9 @@ static void _PR_InitIOV(void)
_md_iovector._stat64 = stat;
_md_iovector._lseek64 = _MD_Unix_lseek64;
#elif defined(_PR_HAVE_OFF64_T)
-#if defined(IRIX5_3) || defined(ANDROID)
+#if defined(IRIX5_3) || (defined(ANDROID) && __ANDROID_API__ < 21)
/*
- * Android doesn't have open64. We pass the O_LARGEFILE flag to open
+ * Android < 21 doesn't have open64. We pass the O_LARGEFILE flag to open
* in _MD_open.
*/
_md_iovector._open64 = open;
@@ -2794,8 +2799,14 @@ static void _PR_InitIOV(void)
_md_iovector._open64 = open64;
#endif
_md_iovector._mmap64 = mmap64;
+#if (defined(ANDROID) && __ANDROID_API__ < 21)
+ /* Same as the open64 case for Android. */
+ _md_iovector._fstat64 = fstat;
+ _md_iovector._stat64 = stat;
+#else
_md_iovector._fstat64 = fstat64;
_md_iovector._stat64 = stat64;
+#endif
_md_iovector._lseek64 = lseek64;
#elif defined(_PR_HAVE_LARGE_OFF_T)
_md_iovector._open64 = open;
diff --git a/nsprpub/pr/src/md/windows/.cvsignore b/nsprpub/pr/src/md/windows/.cvsignore
new file mode 100644
index 0000000000..f3c7a7c5da
--- /dev/null
+++ b/nsprpub/pr/src/md/windows/.cvsignore
@@ -0,0 +1 @@
+Makefile
diff --git a/nsprpub/pr/src/memory/.cvsignore b/nsprpub/pr/src/memory/.cvsignore
new file mode 100644
index 0000000000..f3c7a7c5da
--- /dev/null
+++ b/nsprpub/pr/src/memory/.cvsignore
@@ -0,0 +1 @@
+Makefile
diff --git a/nsprpub/pr/src/misc/.cvsignore b/nsprpub/pr/src/misc/.cvsignore
new file mode 100644
index 0000000000..f3c7a7c5da
--- /dev/null
+++ b/nsprpub/pr/src/misc/.cvsignore
@@ -0,0 +1 @@
+Makefile
diff --git a/nsprpub/pr/src/pthreads/.cvsignore b/nsprpub/pr/src/pthreads/.cvsignore
new file mode 100644
index 0000000000..f3c7a7c5da
--- /dev/null
+++ b/nsprpub/pr/src/pthreads/.cvsignore
@@ -0,0 +1 @@
+Makefile
diff --git a/nsprpub/pr/src/pthreads/ptthread.c b/nsprpub/pr/src/pthreads/ptthread.c
index 6046d5d8d2..e61a4cbde0 100644
--- a/nsprpub/pr/src/pthreads/ptthread.c
+++ b/nsprpub/pr/src/pthreads/ptthread.c
@@ -978,7 +978,23 @@ void _PR_InitThreads(
* GCC supports the constructor and destructor attributes as of
* version 2.5.
*/
+#if defined(DARWIN)
+/*
+ * The dynamic linker on OSX doesn't execute __attribute__((destructor))
+ * destructors in the right order wrt non-__attribute((destructor)) destructors
+ * in other libraries. So use atexit() instead, which does.
+ * See https://bugzilla.mozilla.org/show_bug.cgi?id=1399746#c99
+ */
+static void _PR_Fini(void);
+
+__attribute__ ((constructor))
+static void _register_PR_Fini() {
+ atexit(_PR_Fini);
+}
+#else
static void _PR_Fini(void) __attribute__ ((destructor));
+#endif
+
#elif defined(__SUNPRO_C)
/*
* Sun Studio compiler
diff --git a/nsprpub/pr/src/threads/.cvsignore b/nsprpub/pr/src/threads/.cvsignore
new file mode 100644
index 0000000000..f3c7a7c5da
--- /dev/null
+++ b/nsprpub/pr/src/threads/.cvsignore
@@ -0,0 +1 @@
+Makefile
diff --git a/nsprpub/pr/src/threads/combined/.cvsignore b/nsprpub/pr/src/threads/combined/.cvsignore
new file mode 100644
index 0000000000..f3c7a7c5da
--- /dev/null
+++ b/nsprpub/pr/src/threads/combined/.cvsignore
@@ -0,0 +1 @@
+Makefile