tmpdir: Use a good default directory on native Windows.
authorBruno Haible <bruno@clisp.org>
Tue, 23 Aug 2011 06:40:27 +0000 (08:40 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Aug 2011 06:40:27 +0000 (08:40 +0200)
commit68dd9ac979d5c3afd72f3d2fb0d6dcda32b3c384
tree22691a5a7ae03aad4f3cc5e37ab258dc5cf07e64
parent372ef2a0e94ec6ee85b5fc4bab763154ec11420d
tmpdir: Use a good default directory on native Windows.

* lib/tmpdir.c: Include <windows.h>, pathmax.h.
(P_tmpdir): Default to _P_tmpdir on native Windows.
(path_search): On native Windows, try the value returned by GetTempPath
before trying P_tmpdir.
* modules/tmpdir (Depends-on): Add pathmax.
Suggested by John Darrington <john@darrington.wattle.id.au>.
ChangeLog
lib/tmpdir.c
modules/tmpdir