From commits-return-3205-apmail-stdcxx-commits-archive=stdcxx.apache.org@stdcxx.apache.org Thu Jul 03 08:00:42 2008 Return-Path: Delivered-To: apmail-stdcxx-commits-archive@www.apache.org Received: (qmail 99672 invoked from network); 3 Jul 2008 08:00:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jul 2008 08:00:42 -0000 Received: (qmail 50323 invoked by uid 500); 3 Jul 2008 08:00:43 -0000 Delivered-To: apmail-stdcxx-commits-archive@stdcxx.apache.org Received: (qmail 50309 invoked by uid 500); 3 Jul 2008 08:00:43 -0000 Mailing-List: contact commits-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list commits@stdcxx.apache.org Received: (qmail 50300 invoked by uid 99); 3 Jul 2008 08:00:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jul 2008 01:00:43 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jul 2008 08:00:00 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CD55B2388A4C; Thu, 3 Jul 2008 01:00:21 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r673604 - /stdcxx/branches/4.2.x/util/gencat.cpp Date: Thu, 03 Jul 2008 08:00:21 -0000 To: commits@stdcxx.apache.org From: faridz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080703080021.CD55B2388A4C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: faridz Date: Thu Jul 3 01:00:21 2008 New Revision: 673604 URL: http://svn.apache.org/viewvc?rev=673604&view=rev Log: 2008-07-03 Farid Zaripov * util/gencat.cpp (main): Added code for generating message catalogs on MinGW. Modified: stdcxx/branches/4.2.x/util/gencat.cpp Modified: stdcxx/branches/4.2.x/util/gencat.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/util/gencat.cpp?rev=673604&r1=673603&r2=673604&view=diff ============================================================================== --- stdcxx/branches/4.2.x/util/gencat.cpp (original) +++ stdcxx/branches/4.2.x/util/gencat.cpp Thu Jul 3 01:00:21 2008 @@ -114,11 +114,7 @@ #ifdef _WIN32 -# ifndef _WIN64 -# define PLATFORM "X86" -# else // _WIN64 -# define PLATFORM "X64" -# endif // _WIN64 +# ifndef __MINGW32__ const char* const env_vars [] = { "VS90COMNTOOLS", "VS80COMNTOOLS", @@ -138,14 +134,35 @@ cmd.push_back ('\"'); } + if (!cmd.empty ()) + cmd += " && "; + +# endif // !__MINGW32__ + const char* const dll_name = argv [0]; const char* const rc_name = argv [1]; std::string res_name (rc_name); change_ext (res_name, ".res"); - if (!cmd.empty ()) - cmd += " && "; +# ifdef __MINGW32__ + + cmd += "windres -O coff -i "; + cmd += rc_name; + cmd += " -o "; + cmd += res_name; + cmd += " && gcc -shared -o "; + cmd += dll_name; + cmd += ' '; + cmd += res_name; + +# else + +# ifndef _WIN64 +# define PLATFORM "X86" +# else // _WIN64 +# define PLATFORM "X64" +# endif // _WIN64 cmd += "rc "; cmd += rc_name; @@ -154,6 +171,8 @@ cmd += ' '; cmd += res_name; +# endif // __MINGW32__ + const int ret = std::system (cmd.c_str ()); std::remove (res_name.c_str ());