compat: add a mkstemps() compatibility function

mkstemps() is a BSD extension so provide an implementation
for cross-platform use.

Signed-off-by: David Aguilar <davvid@gmail.com>
Tested-by: Johannes Sixt <j6t@kdbg.org> (Windows)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
David Aguilar
2009-05-31 01:35:50 -07:00
committed by Junio C Hamano
parent 33fd7169ed
commit 0620b39b3b
5 changed files with 102 additions and 0 deletions

View File

@ -677,6 +677,13 @@ GIT_CHECK_FUNC(mkdtemp,
[NO_MKDTEMP=YesPlease])
AC_SUBST(NO_MKDTEMP)
#
# Define NO_MKSTEMPS if you don't have mkstemps in the C library.
GIT_CHECK_FUNC(mkstemps,
[NO_MKSTEMPS=],
[NO_MKSTEMPS=YesPlease])
AC_SUBST(NO_MKSTEMPS)
#
#
# Define NO_MMAP if you want to avoid mmap.
#
# Define NO_ICONV if your libc does not properly support iconv.