diff --git a/extensions/gio/nsGIOProtocolHandler.cpp b/extensions/gio/nsGIOProtocolHandler.cpp index 8d74d9a674b7..f2484c025ec0 100644 --- a/extensions/gio/nsGIOProtocolHandler.cpp +++ b/extensions/gio/nsGIOProtocolHandler.cpp @@ -7,6 +7,7 @@ * This code is based on original Mozilla gnome-vfs extension. It implements * input stream provided by GVFS/GIO. */ +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "mozilla/ModuleUtils.h" #include "nsIPrefService.h" #include "nsIPrefBranch.h" diff --git a/modules/libjar/nsJARInputStream.cpp b/modules/libjar/nsJARInputStream.cpp index bf954160b24c..989af4889737 100644 --- a/modules/libjar/nsJARInputStream.cpp +++ b/modules/libjar/nsJARInputStream.cpp @@ -5,6 +5,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "nsJARInputStream.h" #include "zipstruct.h" // defines ZIP compression codes #include "nsZipArchive.h" diff --git a/netwerk/base/src/nsDirectoryIndexStream.cpp b/netwerk/base/src/nsDirectoryIndexStream.cpp index 6863f181e086..2cc9dbada633 100644 --- a/netwerk/base/src/nsDirectoryIndexStream.cpp +++ b/netwerk/base/src/nsDirectoryIndexStream.cpp @@ -14,6 +14,7 @@ */ +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "nsEscape.h" #include "nsDirectoryIndexStream.h" #include "nsXPIDLString.h" diff --git a/netwerk/cookie/nsCookieService.cpp b/netwerk/cookie/nsCookieService.cpp index 58e472ef71cb..19c3e7b42b95 100644 --- a/netwerk/cookie/nsCookieService.cpp +++ b/netwerk/cookie/nsCookieService.cpp @@ -10,6 +10,7 @@ #define FORCE_PR_LOG // Allow logging in the release build #endif +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "mozilla/net/CookieServiceChild.h" #include "mozilla/net/NeckoCommon.h" diff --git a/netwerk/protocol/about/nsAboutBloat.cpp b/netwerk/protocol/about/nsAboutBloat.cpp index 568cb9563e73..a55fe99aad14 100644 --- a/netwerk/protocol/about/nsAboutBloat.cpp +++ b/netwerk/protocol/about/nsAboutBloat.cpp @@ -3,6 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "nsTraceRefcntImpl.h" // if NS_BUILD_REFCNT_LOGGING isn't defined, don't try to build diff --git a/netwerk/protocol/about/nsAboutCache.cpp b/netwerk/protocol/about/nsAboutCache.cpp index 73e27694e9af..784b624239a8 100644 --- a/netwerk/protocol/about/nsAboutCache.cpp +++ b/netwerk/protocol/about/nsAboutCache.cpp @@ -3,6 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "nsAboutCache.h" #include "nsIIOService.h" #include "nsIServiceManager.h" diff --git a/netwerk/protocol/about/nsAboutCacheEntry.cpp b/netwerk/protocol/about/nsAboutCacheEntry.cpp index 645a6f902f0f..7f87b3f142d8 100644 --- a/netwerk/protocol/about/nsAboutCacheEntry.cpp +++ b/netwerk/protocol/about/nsAboutCacheEntry.cpp @@ -5,6 +5,7 @@ #include +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "nsAboutCacheEntry.h" #include "nsICacheService.h" #include "nsICacheSession.h" diff --git a/netwerk/streamconv/converters/nsFTPDirListingConv.cpp b/netwerk/streamconv/converters/nsFTPDirListingConv.cpp index 88ae748fbab9..98fca4cd5bed 100644 --- a/netwerk/streamconv/converters/nsFTPDirListingConv.cpp +++ b/netwerk/streamconv/converters/nsFTPDirListingConv.cpp @@ -3,6 +3,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "nsFTPDirListingConv.h" #include "nsMemory.h" #include "plstr.h" diff --git a/netwerk/test/TestProtocols.cpp b/netwerk/test/TestProtocols.cpp index 9bfe9e262d55..5314bc48ae41 100644 --- a/netwerk/test/TestProtocols.cpp +++ b/netwerk/test/TestProtocols.cpp @@ -12,6 +12,7 @@ -Gagan Saksena 04/29/99 */ +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "TestCommon.h" #define FORCE_PR_LOG diff --git a/rdf/base/src/rdfutil.cpp b/rdf/base/src/rdfutil.cpp index 982174ccc0a5..d7c58d3d2281 100644 --- a/rdf/base/src/rdfutil.cpp +++ b/rdf/base/src/rdfutil.cpp @@ -19,6 +19,7 @@ */ +#include "NSPRFormatTime.h" // must be before anything that includes prtime.h #include "nsCOMPtr.h" #include "nsIRDFDataSource.h" #include "nsIRDFNode.h" diff --git a/toolkit/xre/nsConsoleWriter.cpp b/toolkit/xre/nsConsoleWriter.cpp index bfccd0727897..b747dcd6952f 100644 --- a/toolkit/xre/nsConsoleWriter.cpp +++ b/toolkit/xre/nsConsoleWriter.cpp @@ -2,6 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "NSPRFormatTime.h" // must include before any headers that include prtime.h #include "nsAppRunner.h" #include "prio.h" diff --git a/xpcom/base/Makefile.in b/xpcom/base/Makefile.in index 56730585c290..f8e7de550459 100644 --- a/xpcom/base/Makefile.in +++ b/xpcom/base/Makefile.in @@ -68,6 +68,7 @@ EXPORTS = \ nsWeakPtr.h \ nsInterfaceRequestorAgg.h \ nsGZFileWriter.h \ + NSPRFormatTime.h \ $(NULL) EXPORTS_NAMESPACES = mozilla diff --git a/xpcom/base/NSPRFormatTime.h b/xpcom/base/NSPRFormatTime.h new file mode 100644 index 000000000000..004370ff1ccd --- /dev/null +++ b/xpcom/base/NSPRFormatTime.h @@ -0,0 +1,12 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// Temporarily undefine to build successfully with NO_NSPR_10_SUPPORT +#ifdef prtime_h___ +#error NSPRFormatTime.h must be included before any header that includes prtime.h +#endif +#undef NO_NSPR_10_SUPPORT +#include "prtime.h" +#define NO_NSPR_10_SUPPORT