binutils-gdb/gdb/gnulib/import/m4
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
..
00gnulib.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
absolute-header.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
alloca.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
arpa_inet_h.m4 Import gnulib's inet_ntop module. 2018-09-18 14:05:47 -07:00
canonicalize.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
chdir-long.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
close.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
closedir.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
codeset.m4
configmake.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
d-ino.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
d-type.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dirent_h.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dirfd.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dirname.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
double-slash-root.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dup2.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
dup.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
eealloc.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
environ.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
errno_h.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
error.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
exponentd.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
exponentl.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
extensions.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
extern-inline.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fchdir.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fcntl_h.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fcntl-o.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fcntl.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fdopendir.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
filenamecat.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
flexmember.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
float_h.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fnmatch.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fpieee.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
frexp.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
frexpl.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fstat.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
fstatat.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
getcwd-abort-bug.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
getcwd-path-max.m4 Fix PR gdb/23558: Use system's 'getcwd' when cross-compiling GDB 2018-09-10 13:52:24 -04:00
getcwd.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
getdtablesize.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
getlogin_r.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
getprogname.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
gettimeofday.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
glibc21.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
glob.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
gnulib-cache.m4 Import mkdtemp gnulib module, fix mingw build 2018-11-01 15:41:43 -04:00
gnulib-common.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
gnulib-comp.m4 Import mkdtemp gnulib module, fix mingw build 2018-11-01 15:41:43 -04:00
gnulib-tool.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
hard-locale.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
include_next.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
inet_ntop.m4 Import gnulib's inet_ntop module. 2018-09-18 14:05:47 -07:00
inttypes-pri.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
inttypes.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
isnand.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
isnanl.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
largefile.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
limits-h.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
localcharset.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
locale-fr.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
locale-ja.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
locale-zh.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
longlong.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
lstat.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
malloc.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
malloca.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
math_h.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mbrtowc.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mbsinit.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mbsrtowcs.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mbstate_t.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
memchr.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
memmem.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mempcpy.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
memrchr.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mkdir.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mkdtemp.m4 Import mkdtemp gnulib module, fix mingw build 2018-11-01 15:41:43 -04:00
mkostemp.m4 Use mkostemp, not mkstemp 2018-10-27 11:58:41 -06:00
mmap-anon.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
mode_t.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
msvc-inval.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
msvc-nothrow.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
multiarch.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
netinet_in_h.m4 Import gnulib's inet_ntop module. 2018-09-18 14:05:47 -07:00
nocrash.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
off_t.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
onceonly.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
open.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
openat.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
opendir.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
pathmax.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
rawmemchr.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
readdir.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
readlink.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
realloc.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
rename.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
rewinddir.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
rmdir.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
save-cwd.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
secure_getenv.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
setenv.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
signal_h.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
socklen.m4 Import gnulib's inet_ntop module. 2018-09-18 14:05:47 -07:00
sockpfaf.m4 Import gnulib's inet_ntop module. 2018-09-18 14:05:47 -07:00
ssize_t.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
stat.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
stdalign.m4 Import gnulib's inet_ntop module. 2018-09-18 14:05:47 -07:00
stdbool.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
stddef_h.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
stdint.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
stdio_h.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
stdlib_h.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strchrnul.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strdup.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strerror.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
string_h.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strstr.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
strtok_r.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
sys_socket_h.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
sys_stat_h.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
sys_time_h.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
sys_types_h.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
sys_uio_h.m4 Import gnulib's inet_ntop module. 2018-09-18 14:05:47 -07:00
tempname.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
time_h.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
unistd_h.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
unistd-safer.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
warn-on-use.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
wchar_h.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
wchar_t.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
wctype_h.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00
wint_t.m4 Revert "Update gnulib to current upstream master" 2018-09-10 13:52:24 -04:00