From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23103 invoked by alias); 16 Dec 2014 03:37:34 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 23089 invoked by uid 89); 16 Dec 2014 03:37:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mtaout29.012.net.il Received: from mtaout29.012.net.il (HELO mtaout29.012.net.il) (80.179.55.185) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 16 Dec 2014 03:37:30 +0000 Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NGN00700OE5YG00@mtaout29.012.net.il> for gdb-patches@sourceware.org; Tue, 16 Dec 2014 05:34:57 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NGN002YVOM9A850@mtaout29.012.net.il>; Tue, 16 Dec 2014 05:34:57 +0200 (IST) Date: Tue, 16 Dec 2014 03:37:00 -0000 From: Eli Zaretskii Subject: Re: [patch] compile: Fix MinGW build [Re: [mingw rfc] Add mkdtemp to gdb/gnulib/] In-reply-to: <20141215222801.GA28138@host2.jankratochvil.net> To: Jan Kratochvil Cc: brobecker@adacore.com, yao@codesourcery.com, gdb-patches@sourceware.org, ktietz@redhat.com Reply-to: Eli Zaretskii Message-id: <83vblcw9hw.fsf@gnu.org> References: <87egs2vcfu.fsf@codesourcery.com> <20141214182341.GA2908@host2.jankratochvil.net> <87a92pvc0w.fsf@codesourcery.com> <20141215124358.GU5457@adacore.com> <20141215171225.GA19674@host2.jankratochvil.net> <20141215181449.GA5457@adacore.com> <20141215182057.GA22226@host2.jankratochvil.net> <20141215183554.GB5457@adacore.com> <20141215184014.GA22610@host2.jankratochvil.net> <83y4q8wxk7.fsf@gnu.org> <20141215222801.GA28138@host2.jankratochvil.net> X-IsSubscribed: yes X-SW-Source: 2014-12/txt/msg00437.txt.bz2 > Date: Mon, 15 Dec 2014 23:28:01 +0100 > From: Jan Kratochvil > Cc: brobecker@adacore.com, yao@codesourcery.com, gdb-patches@sourceware.org, > ktietz@redhat.com > > Even if it managed to load libcc1.so (it needs host-dependent name libcc1.dll) > then it would soon end up at least on: > > default_infcall_mmap: > error (_("This target does not support inferior memory allocation by mmap.")); > > As currently there is only: > > linux-tdep.c: > set_gdbarch_infcall_mmap (gdbarch, linux_infcall_mmap); Why is mmap needed here? > OK for check-in? > > > Thanks, > Jan > gdb/ChangeLog > 2014-12-15 Jan Kratochvil > > Fix MinGW compilation. > * compile/compile.c (get_compile_file_tempdir): Call error on _WIN32. > > --- ./gdb/compile/compile.c 2014-12-14 02:48:38.000000000 +0100 > +++ ./gdb/compile/compile.c 2014-12-15 23:21:28.788716340 +0100 > @@ -191,7 +191,11 @@ get_compile_file_tempdir (void) > > strcpy (tname, TEMPLATE); > #undef TEMPLATE > +#ifdef _WIN32 > + error (_("mkdtemp needs to be implemented for MS-Windows hosts")); > +#else > tempdir_name = mkdtemp (tname); > +#endif > if (tempdir_name == NULL) > perror_with_name (_("Could not make temporary directory")); I think _WIN32 will catch Cygwin as well, which is not what you want. Why not just check HAVE_MKDTEMP?