binutils-gdb/gdb/gnulib/import
Simon Marchi e8d8cce69b Import mkdtemp gnulib module, fix mingw build
Building with mingw currently fails:

  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)
                    ^
Commit

    e418a61a67 ("Move mkdir_recursive to common/filestuff.c")

moved this code, but also removed the HAVE_MKDTEMP guard which prevented
the mkdtemp call to be compiled on mingw.

We can either put back the HAVE_MKDTEMP ifdef, or import the gnulib
mkdtemp module, which provides the function for mingw.  Since the
mkdir_recursive is susceptible to be used on mingw at some point, I
think it would be nice to have it tested on mingw, so I did the latter.

Once built, I tested it on Windows (copied the resulting gdb.exe on a
Windows machine, ran it, and ran "maint selftest mkdir_recursive").  It
failed, because the temporary directory is hardcoded to "/tmp/...".  I
therefore added and used a new get_standard_temp_dir function, which
returns an appropriate temporary directory for the host platform.

gdb/ChangeLog:

	* common/pathstuff.c (get_standard_temp_dir): New.
	* common/pathstuff.h (get_standard_temp_dir): New.
	* config.in: Re-generate.
	* configure: Re-generate.
	* configure.ac: Don't check for mkdtemp.
	* gnulib/aclocal-m4-deps.mk: Re-generate.
	* gnulib/aclocal.m4: Re-generate.
	* gnulib/config.in: Re-generate.
	* gnulib/configure: Re-generate.
	* gnulib/import/Makefile.am: Re-generate.
	* gnulib/import/Makefile.in: Re-generate.
	* gnulib/import/m4/gnulib-cache.m4: Re-generate.
	* gnulib/import/m4/gnulib-comp.m4: Re-generate.
	* gnulib/import/m4/mkdtemp.m4: New file.
	* gnulib/import/mkdtemp.c: New file.
	* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
	Add mkdtemp module.
	* unittests/mkdir-recursive-selftests.c (test): Use
	get_standard_temp_dir.
	(_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
	ifdef.
	* compile/compile.c (get_compile_file_tempdir): Likewise.
2018-11-01 15:41:43 -04:00
..
extra Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
m4 Import mkdtemp gnulib module, fix mingw build 2018-11-01 15:41:43 -04:00
Makefile.am Import mkdtemp gnulib module, fix mingw build 2018-11-01 15:41:43 -04:00
Makefile.in Import mkdtemp gnulib module, fix mingw build 2018-11-01 15:41:43 -04:00
alloca.c
alloca.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
arpa_inet.in.h Import gnulib's inet_ntop module. 2018-09-18 14:05:47 -07:00
assure.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
at-func.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
basename-lgpl.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
canonicalize-lgpl.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
chdir-long.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
chdir-long.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
cloexec.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
cloexec.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
close.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
closedir.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
config.charset Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dirent-private.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dirent.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dirfd.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dirname-lgpl.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dirname.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dosname.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dup-safer.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dup.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dup2.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
errno.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
error.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
error.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
exitfail.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
exitfail.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fchdir.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fcntl.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fcntl.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fd-hook.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fd-hook.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fd-safer.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fdopendir.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
filename.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
filenamecat-lgpl.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
filenamecat.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
flexmember.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
float+.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
float.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
float.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fnmatch.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fnmatch.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fnmatch_loop.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fpucw.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
frexp.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
frexpl.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fstat.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fstatat.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
getcwd-lgpl.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
getcwd.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
getdtablesize.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
getlogin_r.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
getprogname.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
getprogname.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
gettext.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
gettimeofday.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
glob-libc.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
glob.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
glob.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
hard-locale.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
hard-locale.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
inet_ntop.c Import gnulib's inet_ntop module. 2018-09-18 14:05:47 -07:00
intprops.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
inttypes.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
isnan.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
isnand-nolibm.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
isnand.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
isnanl-nolibm.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
isnanl.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
itold.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
limits.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
localcharset.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
localcharset.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
lstat.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
malloc.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
malloca.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
malloca.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
malloca.valgrind Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
math.c
math.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mbrtowc.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mbsinit.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mbsrtowcs-impl.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mbsrtowcs-state.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mbsrtowcs.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
memchr.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
memchr.valgrind
memmem.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mempcpy.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
memrchr.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mkdir.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mkdtemp.c Import mkdtemp gnulib module, fix mingw build 2018-11-01 15:41:43 -04:00
mkostemp.c Use mkostemp, not mkstemp 2018-10-27 11:58:41 -06:00
msvc-inval.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
msvc-inval.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
msvc-nothrow.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
msvc-nothrow.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
netinet_in.in.h Import gnulib's inet_ntop module. 2018-09-18 14:05:47 -07:00
open.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
openat-die.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
openat-priv.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
openat-proc.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
openat.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
openat.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
opendir.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
pathmax.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
pipe-safer.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
rawmemchr.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
rawmemchr.valgrind
readdir.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
readlink.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
realloc.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
ref-add.sin Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
ref-del.sin Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
rename.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
rewinddir.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
rmdir.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
same-inode.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
save-cwd.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
save-cwd.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
secure_getenv.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
setenv.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
signal.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
stat.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
stdalign.in.h Import gnulib's inet_ntop module. 2018-09-18 14:05:47 -07:00
stdbool.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
stddef.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
stdint.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
stdio.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
stdlib.in.h Use mkostemp, not mkstemp 2018-10-27 11:58:41 -06:00
str-two-way.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strchrnul.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strchrnul.valgrind
strdup.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
streq.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strerror-override.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strerror-override.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strerror.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
string.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
stripslash.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strnlen1.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strnlen1.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strstr.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strtok_r.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
sys_socket.c Import gnulib's inet_ntop module. 2018-09-18 14:05:47 -07:00
sys_socket.in.h Import gnulib's inet_ntop module. 2018-09-18 14:05:47 -07:00
sys_stat.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
sys_time.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
sys_types.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
sys_uio.in.h Import gnulib's inet_ntop module. 2018-09-18 14:05:47 -07:00
tempname.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
tempname.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
time.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
unistd--.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
unistd-safer.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
unistd.c
unistd.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
unsetenv.c Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
verify.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
wchar.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
wctype-h.c
wctype.in.h Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00