| OLD | NEW |
| 1 diff --git a/pr/include/prtypes.h b/pr/include/prtypes.h | 1 diff --git a/nspr/pr/include/prtypes.h b/nspr/pr/include/prtypes.h |
| 2 index 52b3ab0..d78f580 100644 | 2 index 52b3ab0..d78f580 100644 |
| 3 --- a/pr/include/prtypes.h | 3 --- a/nspr/pr/include/prtypes.h |
| 4 +++ b/pr/include/prtypes.h | 4 +++ b/nspr/pr/include/prtypes.h |
| 5 @@ -48,7 +48,23 @@ | 5 @@ -48,7 +48,23 @@ |
| 6 ** | 6 ** |
| 7 ** | 7 ** |
| 8 ***********************************************************************/ | 8 ***********************************************************************/ |
| 9 -#if defined(WIN32) | 9 -#if defined(WIN32) |
| 10 +#if defined(NSPR_STATIC) | 10 +#if defined(NSPR_STATIC) |
| 11 + | 11 + |
| 12 +#define PR_EXPORT(__type) extern __type | 12 +#define PR_EXPORT(__type) extern __type |
| 13 +#define PR_EXPORT_DATA(__type) extern __type | 13 +#define PR_EXPORT_DATA(__type) extern __type |
| 14 +#define PR_IMPORT(__type) extern __type | 14 +#define PR_IMPORT(__type) extern __type |
| 15 +#define PR_IMPORT_DATA(__type) extern __type | 15 +#define PR_IMPORT_DATA(__type) extern __type |
| 16 + | 16 + |
| 17 +#define PR_EXTERN(__type) extern __type | 17 +#define PR_EXTERN(__type) extern __type |
| 18 +#define PR_IMPLEMENT(__type) __type | 18 +#define PR_IMPLEMENT(__type) __type |
| 19 +#define PR_EXTERN_DATA(__type) extern __type | 19 +#define PR_EXTERN_DATA(__type) extern __type |
| 20 +#define PR_IMPLEMENT_DATA(__type) __type | 20 +#define PR_IMPLEMENT_DATA(__type) __type |
| 21 + | 21 + |
| 22 +#define PR_CALLBACK | 22 +#define PR_CALLBACK |
| 23 +#define PR_CALLBACK_DECL | 23 +#define PR_CALLBACK_DECL |
| 24 +#define PR_STATIC_CALLBACK(__x) static __x | 24 +#define PR_STATIC_CALLBACK(__x) static __x |
| 25 + | 25 + |
| 26 +#elif defined(WIN32) | 26 +#elif defined(WIN32) |
| 27 | 27 |
| 28 #define PR_EXPORT(__type) extern __declspec(dllexport) __type | 28 #define PR_EXPORT(__type) extern __declspec(dllexport) __type |
| 29 #define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type | 29 #define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type |
| 30 diff --git a/pr/src/md/windows/w95dllmain.c b/pr/src/md/windows/w95dllmain.c | 30 diff --git a/nspr/pr/src/md/windows/w95dllmain.c b/nspr/pr/src/md/windows/w95dll
main.c |
| 31 index 73707a6..90957c1 100644 | 31 index 73707a6..90957c1 100644 |
| 32 --- a/pr/src/md/windows/w95dllmain.c | 32 --- a/nspr/pr/src/md/windows/w95dllmain.c |
| 33 +++ b/pr/src/md/windows/w95dllmain.c | 33 +++ b/nspr/pr/src/md/windows/w95dllmain.c |
| 34 @@ -3,6 +3,8 @@ | 34 @@ -3,6 +3,8 @@ |
| 35 * License, v. 2.0. If a copy of the MPL was not distributed with this | 35 * License, v. 2.0. If a copy of the MPL was not distributed with this |
| 36 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 36 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
| 37 | 37 |
| 38 +#ifndef NSPR_STATIC /* See the end of w95thred.c. */ | 38 +#ifndef NSPR_STATIC /* See the end of w95thred.c. */ |
| 39 + | 39 + |
| 40 /* | 40 /* |
| 41 * The DLL entry point (DllMain) for NSPR. | 41 * The DLL entry point (DllMain) for NSPR. |
| 42 * | 42 * |
| 43 @@ -37,3 +39,5 @@ PRThread *me; | 43 @@ -37,3 +39,5 @@ PRThread *me; |
| 44 } | 44 } |
| 45 return TRUE; | 45 return TRUE; |
| 46 } | 46 } |
| 47 + | 47 + |
| 48 +#endif | 48 +#endif |
| 49 diff --git a/pr/src/md/windows/w95thred.c b/pr/src/md/windows/w95thred.c | 49 diff --git a/nspr/pr/src/md/windows/w95thred.c b/nspr/pr/src/md/windows/w95thred
.c |
| 50 index 932c50c..f5c7703 100644 | 50 index c27d982..52bfb02 100644 |
| 51 --- a/pr/src/md/windows/w95thred.c | 51 --- a/nspr/pr/src/md/windows/w95thred.c |
| 52 +++ b/pr/src/md/windows/w95thred.c | 52 +++ b/nspr/pr/src/md/windows/w95thred.c |
| 53 @@ -318,3 +318,120 @@ PRThread *thread; | 53 @@ -323,3 +323,120 @@ PRThread *thread; |
| 54 PR_ASSERT(thread != NULL); | 54 PR_ASSERT(thread != NULL); |
| 55 return thread; | 55 return thread; |
| 56 } | 56 } |
| 57 + | 57 + |
| 58 +#ifdef NSPR_STATIC | 58 +#ifdef NSPR_STATIC |
| 59 + | 59 + |
| 60 +// The following code is from Chromium src/base/thread_local_storage_win.cc, | 60 +// The following code is from Chromium src/base/thread_local_storage_win.cc, |
| 61 +// r11329. | 61 +// r11329. |
| 62 + | 62 + |
| 63 +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 63 +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 + | 164 + |
| 165 +#pragma data_seg(".CRT$XLB") | 165 +#pragma data_seg(".CRT$XLB") |
| 166 +PIMAGE_TLS_CALLBACK p_thread_callback_nspr = PR_OnThreadExit; | 166 +PIMAGE_TLS_CALLBACK p_thread_callback_nspr = PR_OnThreadExit; |
| 167 + | 167 + |
| 168 +// Reset the default section. | 168 +// Reset the default section. |
| 169 +#pragma data_seg() | 169 +#pragma data_seg() |
| 170 + | 170 + |
| 171 +#endif // _WIN64 | 171 +#endif // _WIN64 |
| 172 + | 172 + |
| 173 +#endif // NSPR_STATIC | 173 +#endif // NSPR_STATIC |
| OLD | NEW |