Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
michael@0 | 2 | /* vim: set ts=8 sts=4 et sw=4 tw=99: */ |
michael@0 | 3 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | /* XPConnect JavaScript interactive shell. */ |
michael@0 | 8 | |
michael@0 | 9 | #include <stdio.h> |
michael@0 | 10 | |
michael@0 | 11 | #include "mozilla/WindowsDllBlocklist.h" |
michael@0 | 12 | |
michael@0 | 13 | #include "nsXULAppAPI.h" |
michael@0 | 14 | #ifdef XP_MACOSX |
michael@0 | 15 | #include "xpcshellMacUtils.h" |
michael@0 | 16 | #endif |
michael@0 | 17 | #ifdef XP_WIN |
michael@0 | 18 | #include <windows.h> |
michael@0 | 19 | #include <shlobj.h> |
michael@0 | 20 | |
michael@0 | 21 | // we want a wmain entry point |
michael@0 | 22 | #define XRE_DONT_PROTECT_DLL_LOAD |
michael@0 | 23 | #define XRE_WANT_ENVIRON |
michael@0 | 24 | #include "nsWindowsWMain.cpp" |
michael@0 | 25 | #endif |
michael@0 | 26 | |
michael@0 | 27 | int |
michael@0 | 28 | main(int argc, char** argv, char** envp) |
michael@0 | 29 | { |
michael@0 | 30 | #ifdef XP_MACOSX |
michael@0 | 31 | InitAutoreleasePool(); |
michael@0 | 32 | #endif |
michael@0 | 33 | |
michael@0 | 34 | // unbuffer stdout so that output is in the correct order; note that stderr |
michael@0 | 35 | // is unbuffered by default |
michael@0 | 36 | setbuf(stdout, 0); |
michael@0 | 37 | |
michael@0 | 38 | #ifdef HAS_DLL_BLOCKLIST |
michael@0 | 39 | DllBlocklist_Initialize(); |
michael@0 | 40 | #endif |
michael@0 | 41 | |
michael@0 | 42 | int result = XRE_XPCShellMain(argc, argv, envp); |
michael@0 | 43 | |
michael@0 | 44 | #ifdef XP_MACOSX |
michael@0 | 45 | FinishAutoreleasePool(); |
michael@0 | 46 | #endif |
michael@0 | 47 | |
michael@0 | 48 | return result; |
michael@0 | 49 | } |