| OLD | NEW |
| 1 Index: mozilla/nsprpub/pr/include/prtypes.h | 1 diff --git a/pr/include/prtypes.h b/pr/include/prtypes.h |
| 2 =================================================================== | 2 index 52b3ab0..d78f580 100644 |
| 3 RCS file: /cvsroot/mozilla/nsprpub/pr/include/prtypes.h,v | 3 --- a/pr/include/prtypes.h |
| 4 retrieving revision 3.52 | 4 +++ b/pr/include/prtypes.h |
| 5 diff -p -u -8 -r3.52 prtypes.h | 5 @@ -48,7 +48,23 @@ |
| 6 --- mozilla/nsprpub/pr/include/prtypes.h» 7 Dec 2012 21:13:41 -0000»
3.52 | |
| 7 +++ mozilla/nsprpub/pr/include/prtypes.h» 29 Jan 2013 01:15:02 -0000 | |
| 8 @@ -43,17 +43,33 @@ | |
| 9 ** Example: | |
| 10 ** in dowhim.h | |
| 11 ** PR_EXTERN( void ) DoWhatIMean( void ); | |
| 12 ** in dowhim.c | |
| 13 ** PR_IMPLEMENT( void ) DoWhatIMean( void ) { return; } | |
| 14 ** | 6 ** |
| 15 ** | 7 ** |
| 16 ***********************************************************************/ | 8 ***********************************************************************/ |
| 17 -#if defined(WIN32) | 9 -#if defined(WIN32) |
| 18 +#if defined(NSPR_STATIC) | 10 +#if defined(NSPR_STATIC) |
| 19 + | 11 + |
| 20 +#define PR_EXPORT(__type) extern __type | 12 +#define PR_EXPORT(__type) extern __type |
| 21 +#define PR_EXPORT_DATA(__type) extern __type | 13 +#define PR_EXPORT_DATA(__type) extern __type |
| 22 +#define PR_IMPORT(__type) extern __type | 14 +#define PR_IMPORT(__type) extern __type |
| 23 +#define PR_IMPORT_DATA(__type) extern __type | 15 +#define PR_IMPORT_DATA(__type) extern __type |
| 24 + | 16 + |
| 25 +#define PR_EXTERN(__type) extern __type | 17 +#define PR_EXTERN(__type) extern __type |
| 26 +#define PR_IMPLEMENT(__type) __type | 18 +#define PR_IMPLEMENT(__type) __type |
| 27 +#define PR_EXTERN_DATA(__type) extern __type | 19 +#define PR_EXTERN_DATA(__type) extern __type |
| 28 +#define PR_IMPLEMENT_DATA(__type) __type | 20 +#define PR_IMPLEMENT_DATA(__type) __type |
| 29 + | 21 + |
| 30 +#define PR_CALLBACK | 22 +#define PR_CALLBACK |
| 31 +#define PR_CALLBACK_DECL | 23 +#define PR_CALLBACK_DECL |
| 32 +#define PR_STATIC_CALLBACK(__x) static __x | 24 +#define PR_STATIC_CALLBACK(__x) static __x |
| 33 + | 25 + |
| 34 +#elif defined(WIN32) | 26 +#elif defined(WIN32) |
| 35 | 27 |
| 36 #define PR_EXPORT(__type) extern __declspec(dllexport) __type | 28 #define PR_EXPORT(__type) extern __declspec(dllexport) __type |
| 37 #define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type | 29 #define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type |
| 38 #define PR_IMPORT(__type) __declspec(dllimport) __type | 30 diff --git a/pr/src/md/windows/w95dllmain.c b/pr/src/md/windows/w95dllmain.c |
| 39 #define PR_IMPORT_DATA(__type) __declspec(dllimport) __type | 31 index 73707a6..90957c1 100644 |
| 40 | 32 --- a/pr/src/md/windows/w95dllmain.c |
| 41 #define PR_EXTERN(__type) extern __declspec(dllexport) __type | 33 +++ b/pr/src/md/windows/w95dllmain.c |
| 42 #define PR_IMPLEMENT(__type) __declspec(dllexport) __type | 34 @@ -3,6 +3,8 @@ |
| 43 Index: mozilla/nsprpub/pr/src/md/windows/w95dllmain.c | |
| 44 =================================================================== | |
| 45 RCS file: /cvsroot/mozilla/nsprpub/pr/src/md/windows/w95dllmain.c,v | |
| 46 retrieving revision 3.9 | |
| 47 diff -p -u -8 -r3.9 w95dllmain.c | |
| 48 --- mozilla/nsprpub/pr/src/md/windows/w95dllmain.c» 6 Mar 2012 13:14:17 -000
0» 3.9 | |
| 49 +++ mozilla/nsprpub/pr/src/md/windows/w95dllmain.c» 29 Jan 2013 01:15:02 -00
00 | |
| 50 @@ -1,13 +1,15 @@ | |
| 51 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | |
| 52 /* This Source Code Form is subject to the terms of the Mozilla Public | |
| 53 * 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 |
| 54 * 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/. */ |
| 55 | 37 |
| 56 +#ifndef NSPR_STATIC /* See the end of w95thred.c. */ | 38 +#ifndef NSPR_STATIC /* See the end of w95thred.c. */ |
| 57 + | 39 + |
| 58 /* | 40 /* |
| 59 * The DLL entry point (DllMain) for NSPR. | 41 * The DLL entry point (DllMain) for NSPR. |
| 60 * | 42 * |
| 61 * This is used to detach threads that were automatically attached by | 43 @@ -37,3 +39,5 @@ PRThread *me; |
| 62 * nspr. | |
| 63 */ | |
| 64 | |
| 65 #include <windows.h> | |
| 66 @@ -32,8 +34,10 @@ PRThread *me; | |
| 67 _PRI_DetachThread(); | |
| 68 } | |
| 69 break; | |
| 70 case DLL_PROCESS_DETACH: | |
| 71 break; | |
| 72 } | 44 } |
| 73 return TRUE; | 45 return TRUE; |
| 74 } | 46 } |
| 75 + | 47 + |
| 76 +#endif | 48 +#endif |
| 77 Index: mozilla/nsprpub/pr/src/md/windows/w95thred.c | 49 diff --git a/pr/src/md/windows/w95thred.c b/pr/src/md/windows/w95thred.c |
| 78 =================================================================== | 50 index 932c50c..f5c7703 100644 |
| 79 RCS file: /cvsroot/mozilla/nsprpub/pr/src/md/windows/w95thred.c,v | 51 --- a/pr/src/md/windows/w95thred.c |
| 80 retrieving revision 3.22 | 52 +++ b/pr/src/md/windows/w95thred.c |
| 81 diff -p -u -8 -r3.22 w95thred.c | 53 @@ -318,3 +318,120 @@ PRThread *thread; |
| 82 --- mozilla/nsprpub/pr/src/md/windows/w95thred.c» 13 Jun 2012 02:17:05 -00
00» 3.22 | |
| 83 +++ mozilla/nsprpub/pr/src/md/windows/w95thred.c» 29 Jan 2013 01:15:02 -00
00 | |
| 84 @@ -313,8 +313,125 @@ PRThread *thread; | |
| 85 | |
| 86 » if (NULL == thread) { | |
| 87 » » thread = _PRI_AttachThread( | |
| 88 PR_USER_THREAD, PR_PRIORITY_NORMAL, NULL, 0); | |
| 89 » } | |
| 90 PR_ASSERT(thread != NULL); | 54 PR_ASSERT(thread != NULL); |
| 91 return thread; | 55 return thread; |
| 92 } | 56 } |
| 93 + | 57 + |
| 94 +#ifdef NSPR_STATIC | 58 +#ifdef NSPR_STATIC |
| 95 + | 59 + |
| 96 +// 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, |
| 97 +// r11329. | 61 +// r11329. |
| 98 + | 62 + |
| 99 +// 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... |
| 200 + | 164 + |
| 201 +#pragma data_seg(".CRT$XLB") | 165 +#pragma data_seg(".CRT$XLB") |
| 202 +PIMAGE_TLS_CALLBACK p_thread_callback_nspr = PR_OnThreadExit; | 166 +PIMAGE_TLS_CALLBACK p_thread_callback_nspr = PR_OnThreadExit; |
| 203 + | 167 + |
| 204 +// Reset the default section. | 168 +// Reset the default section. |
| 205 +#pragma data_seg() | 169 +#pragma data_seg() |
| 206 + | 170 + |
| 207 +#endif // _WIN64 | 171 +#endif // _WIN64 |
| 208 + | 172 + |
| 209 +#endif // NSPR_STATIC | 173 +#endif // NSPR_STATIC |
| OLD | NEW |