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
m4 Import mkdtemp gnulib module, fix mingw build 2018-11-01 15:41:43 -04:00
alloca.c
alloca.in.h
arpa_inet.in.h Import gnulib's inet_ntop module. 2018-09-18 14:05:47 -07:00
assure.h
at-func.c
basename-lgpl.c
canonicalize-lgpl.c
chdir-long.c
chdir-long.h
cloexec.c
cloexec.h
close.c
closedir.c
config.charset
dirent-private.h
dirent.in.h
dirfd.c
dirname-lgpl.c
dirname.h
dosname.h
dup2.c
dup-safer.c
dup.c
errno.in.h
error.c
error.h
exitfail.c
exitfail.h
fchdir.c
fcntl.c
fcntl.in.h
fd-hook.c
fd-hook.h
fd-safer.c
fdopendir.c
filename.h
filenamecat-lgpl.c
filenamecat.h
flexmember.h
float.c
float.in.h
float+.h
fnmatch_loop.c
fnmatch.c
fnmatch.in.h
fpucw.h
frexp.c
frexpl.c
fstat.c
fstatat.c
getcwd-lgpl.c
getcwd.c
getdtablesize.c
getlogin_r.c
getprogname.c
getprogname.h
gettext.h
gettimeofday.c
glob-libc.h
glob.c
glob.in.h
hard-locale.c
hard-locale.h
inet_ntop.c Import gnulib's inet_ntop module. 2018-09-18 14:05:47 -07:00
intprops.h
inttypes.in.h
isnan.c
isnand-nolibm.h
isnand.c
isnanl-nolibm.h
isnanl.c
itold.c
limits.in.h
localcharset.c
localcharset.h
lstat.c
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
malloc.c
malloca.c
malloca.h
malloca.valgrind
math.c
math.in.h
mbrtowc.c
mbsinit.c
mbsrtowcs-impl.h
mbsrtowcs-state.c
mbsrtowcs.c
memchr.c
memchr.valgrind
memmem.c
mempcpy.c
memrchr.c
mkdir.c
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
msvc-inval.h
msvc-nothrow.c
msvc-nothrow.h
netinet_in.in.h Import gnulib's inet_ntop module. 2018-09-18 14:05:47 -07:00
open.c
openat-die.c
openat-priv.h
openat-proc.c
openat.c
openat.h
opendir.c
pathmax.h
pipe-safer.c
rawmemchr.c
rawmemchr.valgrind
readdir.c
readlink.c
realloc.c
ref-add.sin
ref-del.sin
rename.c
rewinddir.c
rmdir.c
same-inode.h
save-cwd.c
save-cwd.h
secure_getenv.c
setenv.c
signal.in.h
stat.c
stdalign.in.h Import gnulib's inet_ntop module. 2018-09-18 14:05:47 -07:00
stdbool.in.h
stddef.in.h
stdint.in.h
stdio.in.h
stdlib.in.h Use mkostemp, not mkstemp 2018-10-27 11:58:41 -06:00
str-two-way.h
strchrnul.c
strchrnul.valgrind
strdup.c
streq.h
strerror-override.c
strerror-override.h
strerror.c
string.in.h
stripslash.c
strnlen1.c
strnlen1.h
strstr.c
strtok_r.c
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
sys_time.in.h
sys_types.in.h
sys_uio.in.h Import gnulib's inet_ntop module. 2018-09-18 14:05:47 -07:00
tempname.c
tempname.h
time.in.h
unistd--.h
unistd-safer.h
unistd.c
unistd.in.h
unsetenv.c
verify.h
wchar.in.h
wctype-h.c
wctype.in.h