michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* vim: set ts=8 sts=4 et sw=4 tw=99: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* XPConnect JavaScript interactive shell. */ michael@0: michael@0: #include michael@0: michael@0: #include "mozilla/WindowsDllBlocklist.h" michael@0: michael@0: #include "nsXULAppAPI.h" michael@0: #ifdef XP_MACOSX michael@0: #include "xpcshellMacUtils.h" michael@0: #endif michael@0: #ifdef XP_WIN michael@0: #include michael@0: #include michael@0: michael@0: // we want a wmain entry point michael@0: #define XRE_DONT_PROTECT_DLL_LOAD michael@0: #define XRE_WANT_ENVIRON michael@0: #include "nsWindowsWMain.cpp" michael@0: #endif michael@0: michael@0: int michael@0: main(int argc, char** argv, char** envp) michael@0: { michael@0: #ifdef XP_MACOSX michael@0: InitAutoreleasePool(); michael@0: #endif michael@0: michael@0: // unbuffer stdout so that output is in the correct order; note that stderr michael@0: // is unbuffered by default michael@0: setbuf(stdout, 0); michael@0: michael@0: #ifdef HAS_DLL_BLOCKLIST michael@0: DllBlocklist_Initialize(); michael@0: #endif michael@0: michael@0: int result = XRE_XPCShellMain(argc, argv, envp); michael@0: michael@0: #ifdef XP_MACOSX michael@0: FinishAutoreleasePool(); michael@0: #endif michael@0: michael@0: return result; michael@0: }