public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@ericsson.com>
To: Tom Tromey <tom@tromey.com>,
	"gdb-patches@sourceware.org"	<gdb-patches@sourceware.org>
Subject: Re: [PATCH v2 3/6] Move mkdir_recursive to common/filestuff.c
Date: Mon, 29 Oct 2018 16:01:00 -0000	[thread overview]
Message-ID: <e334bc95-f650-c4c1-1817-7256636eb2f1@ericsson.com> (raw)
In-Reply-To: <20181018223100.20693-4-tom@tromey.com>

On 2018-10-18 6:30 p.m., Tom Tromey wrote:
> This moves mkdir_recursive from dwarf-index-cache.c to
> common/filestuff.c, and also changes it to return a boolean that says
> whether or not it worked.
> 
> gdb/ChangeLog
> 2018-10-18  Tom Tromey  <tom@tromey.com>
> 
> 	* unittests/mkdir-recursive-selftests.c: New file.
> 	* Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
> 	unittests/mkdir-recursive-selftests.c.
> 	* dwarf-index-cache.c (mkdir_recursive): Move to
> 	common/filestuff.c.
> 	(index_cache::store): Check return value of mkdir_recursive.
> 	(create_dir_and_check, test_mkdir_recursive): Move to new file.
> 	(_initialize_index_cache): Don't register test.
> 	* common/filestuff.h (mkdir_recursive): Declare.
> 	* common/filestuff.c (mkdir_recursive): Move from
> 	dwarf-index-cache.c.  Return bool.

I just stumbled on a build failure caused by this patch, when building for mingw:

  CXX    unittests/mkdir-recursive-selftests.o
/home/emaisin/src/binutils-gdb/gdb/unittests/mkdir-recursive-selftests.c: In function ‘void selftests::mkdir_recursive::test()’:
/home/emaisin/src/binutils-gdb/gdb/unittests/mkdir-recursive-selftests.c:49:20: error: ‘mkdtemp’ was not declared in this scope
   if (mkdtemp (base) == NULL)
                    ^

The function in the original code was guarded by HAVE_MKDTEMP (the register_test
call still is).  So I guess the function should be put back in an ifdef, or we
should import the mkdtemp gnulib module (I don't remember why I chose not to do
that).

Simon

  reply	other threads:[~2018-10-29 16:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-18 22:31 [PATCH v2 0/6] A different approach to startup-with-shell on macOS Tom Tromey
2018-10-18 22:31 ` [PATCH v2 6/6] Cache a copy of the user's shell " Tom Tromey
2018-10-20  2:35   ` Simon Marchi
2018-10-27 17:43     ` Tom Tromey
2018-10-18 22:31 ` [PATCH v2 4/6] Use mkostemp, not mkstemp Tom Tromey
2018-10-18 22:31 ` [PATCH v2 2/6] Move make_temp_filename to common/pathstuff.c Tom Tromey
2018-10-18 22:31 ` [PATCH v2 5/6] Do not reopen temporary files Tom Tromey
2018-10-18 22:31 ` [PATCH v2 1/6] Unify shell-finding logic Tom Tromey
2018-10-19 23:27   ` Sergio Durigan Junior
2018-10-27 17:41     ` Tom Tromey
2018-10-18 22:31 ` [PATCH v2 3/6] Move mkdir_recursive to common/filestuff.c Tom Tromey
2018-10-29 16:01   ` Simon Marchi [this message]
2018-10-29 22:16     ` Simon Marchi
2018-10-30 20:55       ` Tom Tromey
2018-10-30 21:04         ` Simon Marchi
2018-10-31 15:03           ` Tom Tromey
2018-11-01 19:44             ` Simon Marchi
2018-10-19 23:41 ` [PATCH v2 0/6] A different approach to startup-with-shell on macOS Sergio Durigan Junior
2018-10-27 17:58   ` Tom Tromey
  -- strict thread matches above, loose matches on Subject: below --
2018-10-03 21:02 [PATCH 2 0/6] A different approach to starutp-with-shell " Tom Tromey
2018-10-03 21:02 ` [PATCH v2 3/6] Move mkdir_recursive to common/filestuff.c Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e334bc95-f650-c4c1-1817-7256636eb2f1@ericsson.com \
    --to=simon.marchi@ericsson.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).