Move mkdir_recursive to common/filestuff.c
authorTom Tromey <tom@tromey.com>
Mon, 17 Sep 2018 16:48:20 +0000 (10:48 -0600)
committerTom Tromey <tom@tromey.com>
Sat, 27 Oct 2018 17:58:41 +0000 (11:58 -0600)
commite418a61a67a3476826259163383e5deb661042cc
tree44214b56d20367f0979c8c00e469edcb290171a6
parent29be4d9dee1263b36e33421dd8ea69b9b7308391
Move mkdir_recursive to common/filestuff.c

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-27  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.
gdb/ChangeLog
gdb/Makefile.in
gdb/common/filestuff.c
gdb/common/filestuff.h
gdb/dwarf-index-cache.c
gdb/unittests/mkdir-recursive-selftests.c [new file with mode: 0644]