Message ID | A78C989F6D9628469189715575E55B236964A45F@IRSMSX104.ger.corp.intel.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 61574 invoked by alias); 20 Feb 2018 10:46:10 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 61560 invoked by uid 89); 20 Feb 2018 10:46:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, MIME_BASE64_BLANKS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:2291 X-HELO: mga05.intel.com Received: from mga05.intel.com (HELO mga05.intel.com) (192.55.52.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 20 Feb 2018 10:46:08 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Feb 2018 02:46:06 -0800 X-ExtLoop1: 1 Received: from irsmsx108.ger.corp.intel.com ([163.33.3.3]) by orsmga004.jf.intel.com with ESMTP; 20 Feb 2018 02:46:05 -0800 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.101]) by IRSMSX108.ger.corp.intel.com ([169.254.11.9]) with mapi id 14.03.0319.002; Tue, 20 Feb 2018 10:46:04 +0000 From: "Metzger, Markus T" <markus.t.metzger@intel.com> To: Yao Qi <qiyaoltc@gmail.com>, "Eli Zaretskii (eliz@gnu.org)" <eliz@gnu.org> CC: GDB Patches <gdb-patches@sourceware.org> Subject: RE: [PATCH v2 1/7] common: add scoped_fd Date: Tue, 20 Feb 2018 10:46:04 +0000 Message-ID: <A78C989F6D9628469189715575E55B236964A45F@IRSMSX104.ger.corp.intel.com> References: <1516976072-19282-1-git-send-email-markus.t.metzger@intel.com> <1516976072-19282-2-git-send-email-markus.t.metzger@intel.com> <CAH=s-PMr4qeZ3JodCAtQy_Xh53pwHLEkf-7u2t8wWgj8NnU0Ag@mail.gmail.com> <A78C989F6D9628469189715575E55B2369647D3E@IRSMSX104.ger.corp.intel.com> <CAH=s-PNtuXjnRF3sa7gEbwnkJdyS-cexRX9KvDB59PDkiJ_LXQ@mail.gmail.com> <A78C989F6D9628469189715575E55B23696484A5@IRSMSX104.ger.corp.intel.com> <A78C989F6D9628469189715575E55B2369649F90@IRSMSX104.ger.corp.intel.com> <CAH=s-PMaMfBHvK9YziOOzjZgY_r_XGb61-KQW-M_Go8=Gk3C1g@mail.gmail.com> In-Reply-To: <CAH=s-PMaMfBHvK9YziOOzjZgY_r_XGb61-KQW-M_Go8=Gk3C1g@mail.gmail.com> x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2ExZDQ1NjQtY2M5NC00MGI5LWExY2YtNTRkNWQ0MjI4OTllIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJ3djF0Q2oxRHF0UUxFYkcrUHBZMHVkVW5WNmxvUzB5QkdkNjg2Znd3RkMxYkhNN0hOeFRtQVZEQVZtQmZ2SjhaIn0= dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-IsSubscribed: yes |
Commit Message
Metzger, Markus T
Feb. 20, 2018, 10:46 a.m. UTC
Hello Yao, Eli, > > How about checking for mkstemp and, if not available, falling back to tmpnam. > > Can we unconditionally use tmpnam+open which are more portable? I know it is > racy, but mkstemp is only used in a test case. It is overkill to me to do the configure > check or import gnulib module. > > If we use mkstemp in gdb source (not test case) one day in the future, I prefer > importing gnulib module. What do you think? I'd rather not use tmpnam. This is really only a fallback for old systems. I added mkstemp to update-gnulib.sh ... --- --- ... cloned gnulib, updated my automake, ran that script, and ended up with: # modified: gdb/gnulib/aclocal.m4 # modified: gdb/gnulib/config.in # modified: gdb/gnulib/configure # modified: gdb/gnulib/import/Makefile.am # modified: gdb/gnulib/import/Makefile.in # modified: gdb/gnulib/import/m4/gnulib-cache.m4 # modified: gdb/gnulib/import/m4/gnulib-comp.m4 # new file: gdb/gnulib/import/m4/mkstemp.m4 # new file: gdb/gnulib/import/m4/secure_getenv.m4 # new file: gdb/gnulib/import/m4/tempname.m4 # new file: gdb/gnulib/import/mkstemp.c # new file: gdb/gnulib/import/secure_getenv.c # new file: gdb/gnulib/import/tempname.c # new file: gdb/gnulib/import/tempname.h # modified: gdb/gnulib/update-gnulib.sh If I did everything correctly, it looks like gnulib would only provide mkstemp as a fall-back. On my system, it would still use the glibc version. Good. I wouldn't want to replace a standard glibc function. I have not tried building GDB with mingw cross tools, yet. Would you be able to test whether this solves your build problem, Yao? thanks, Markus. Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Christian Lamprechter Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928
Comments
On Tue, Feb 20, 2018 at 10:46 AM, Metzger, Markus T <markus.t.metzger@intel.com> wrote: > --- > diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh > index 55cd6e0..d026536 100755 > --- a/gdb/gnulib/update-gnulib.sh > +++ b/gdb/gnulib/update-gnulib.sh > @@ -59,6 +59,7 @@ IMPORTED_GNULIB_MODULES="\ > update-copyright \ > wchar \ > wctype-h \ > + mkstemp \ > " > We should keep IMPORTED_GNULIB_MODULES in alphabetical order. Otherwise, patch is good to me. > > I have not tried building GDB with mingw cross tools, yet. Would you be able to test whether > this solves your build problem, Yao? > Yes, it fixed my build problem.
> -----Original Message----- > From: Yao Qi [mailto:qiyaoltc@gmail.com] > Sent: 20 February 2018 12:10 > To: Metzger, Markus T <markus.t.metzger@intel.com> > Cc: Eli Zaretskii (eliz@gnu.org) <eliz@gnu.org>; GDB Patches <gdb- > patches@sourceware.org> > Subject: Re: [PATCH v2 1/7] common: add scoped_fd > > On Tue, Feb 20, 2018 at 10:46 AM, Metzger, Markus T > <markus.t.metzger@intel.com> wrote: > > --- > > diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh > > index 55cd6e0..d026536 100755 > > --- a/gdb/gnulib/update-gnulib.sh > > +++ b/gdb/gnulib/update-gnulib.sh > > @@ -59,6 +59,7 @@ IMPORTED_GNULIB_MODULES="\ > > update-copyright \ > > wchar \ > > wctype-h \ > > + mkstemp \ > > " > > > > We should keep IMPORTED_GNULIB_MODULES in alphabetical order. > Otherwise, patch is good to me. Pushed. Thanks, Markus. Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Christian Lamprechter Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928
diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh index 55cd6e0..d026536 100755 --- a/gdb/gnulib/update-gnulib.sh +++ b/gdb/gnulib/update-gnulib.sh @@ -59,6 +59,7 @@ IMPORTED_GNULIB_MODULES="\ update-copyright \ wchar \ wctype-h \ + mkstemp \ " # The gnulib commit ID to use for the update.