From: serassio <> Date: Sat, 29 Apr 2006 19:57:39 +0000 (+0000) Subject: Allow the build of ufsdump on Windows X-Git-Tag: SQUID_3_0_PRE4~207 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6af42c275be9e427e3371d6601f18e4b305768c8;p=thirdparty%2Fsquid.git Allow the build of ufsdump on Windows --- diff --git a/src/ufsdump.cc b/src/ufsdump.cc index 36ff98a9f3..daed49b922 100644 --- a/src/ufsdump.cc +++ b/src/ufsdump.cc @@ -1,6 +1,6 @@ /* - * $Id: ufsdump.cc,v 1.4 2006/04/29 13:33:03 serassio Exp $ + * $Id: ufsdump.cc,v 1.5 2006/04/29 13:57:39 serassio Exp $ * * DEBUG: section 0 UFS Store Dump * AUTHOR: Robert Collins @@ -73,13 +73,24 @@ struct DumpStoreMeta : public unary_function } }; +#if USE_WIN32_SERVICE +/* When USE_WIN32_SERVICE is defined, the main function is placed in win32.cc */ +extern "C" void WINAPI + SquidWinSvcMain(int, char **) +{} + +int +SquidMain(int argc, char *argv[]) +#else int main(int argc, char *argv[]) +#endif { int fd = -1; StoreMeta *metadata = NULL; - try { + try + { if (argc != 2) throw std::runtime_error("No filename provided"); @@ -119,7 +130,8 @@ main(int argc, char *argv[]) return 0; - } catch (std::runtime_error error) { + } catch (std::runtime_error error) + { std::cout << "Failed : " << error.what() << std::endl; if (fd >= 0)