use mkostemp(template, 0) instead of mkstemp to work around Cygwin oddity
2010-07-16 Paolo Bonzini <bonzini@gnu.org> * autoboot.conf (gnulib_modules): Replace mkstemp with mkostemp. * bootstrap.sh.in: Compile mkostemp.c instead of mkstemp.c. * gnulib: Update. * NEWS: Mention change. * sed/utils.c (ck_mkstemp): Use mkostemp to work around Cygwin oddity. Reported by Stepan Kasal.
This commit is contained in:
1 parent
ef5fa3958d
commit
f38d4c196a
9 files changed
+57
-7
No files matched your search
@@ -11,6 +11,5 @@ config.sub
|
||||
config_h.in
|
||||
configure
|
||||
depcomp
|
||||
m4
|
||||
mdate-sh
|
||||
missing
|
||||
@@ -1,3 +1,12 @@
|
||||
2010-07-16 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* autoboot.conf (gnulib_modules): Replace mkstemp with mkostemp.
|
||||
* bootstrap.sh.in: Compile mkostemp.c instead of mkstemp.c.
|
||||
* gnulib: Update.
|
||||
* NEWS: Mention change.
|
||||
* sed/utils.c (ck_mkstemp): Use mkostemp to work around Cygwin
|
||||
oddity. Reported by Stepan Kasal.
|
||||
|
||||
2009-11-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* doc/sed.texi (Extended Commands): Document F command.
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
# gnulib modules used by this package.
|
||||
gnulib_modules="
|
||||
acl alloca btowc extensions getline getopt gettext localcharset
|
||||
mbrlen mbrtowc memchr mbsinit mkstemp obstack pathmax rename
|
||||
mbrlen mbrtowc memchr mbsinit mkostemp obstack pathmax rename
|
||||
selinux-h snprintf stdbool stat-macros strerror strverscmp ssize_t
|
||||
unlocked-io vasnprintf verify wcrtomb wctob"
|
||||
|
||||
|
||||
+1
-1
@@ -138,7 +138,7 @@ ${CC} -DHAVE_CONFIG_H -I.. -I. -c getline.c || exit 1
|
||||
${CC} -DHAVE_CONFIG_H -I.. -I. -c getopt.c || exit 1
|
||||
${CC} -DHAVE_CONFIG_H -I.. -I. -c getopt1.c || exit 1
|
||||
${CC} -DHAVE_CONFIG_H -I.. -I. -c malloc.c || exit 1
|
||||
${CC} -DHAVE_CONFIG_H -I.. -I. -c mkstemp.c || exit 1
|
||||
${CC} -DHAVE_CONFIG_H -I.. -I. -c mkostemp.c || exit 1
|
||||
${CC} -DHAVE_CONFIG_H -I.. -I. -c obstack.c || exit 1
|
||||
${CC} -DHAVE_CONFIG_H -I.. -I. -c quote.c || exit 1
|
||||
${CC} -DHAVE_CONFIG_H -I.. -I. -c quotearg.c || exit 1
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
arg-nonnull.h
|
||||
c++defs.h
|
||||
config.rpath
|
||||
install-sh
|
||||
link-warning.h
|
||||
texinfo.tex
|
||||
unused-parameter.h
|
||||
warn-on-use.h
|
||||
+1
-1
Submodule gnulib updated: b653eda3ac...afc6cbe4fe.
+20
-1
@@ -5,12 +5,15 @@ alloca.c
|
||||
alloca.h
|
||||
alloca.in.h
|
||||
asnprintf.c
|
||||
basename-lgpl.c
|
||||
basename.c
|
||||
btowc.c
|
||||
c-ctype.c
|
||||
c-ctype.h
|
||||
canonicalize-lgpl.c
|
||||
config.charset
|
||||
copy-acl.c
|
||||
dirname-lgpl.c
|
||||
dirname.c
|
||||
dirname.h
|
||||
errno.h
|
||||
@@ -24,6 +27,7 @@ float+.h
|
||||
float.h
|
||||
float.in.h
|
||||
getdelim.c
|
||||
getfilecon.c
|
||||
getline.c
|
||||
getopt.c
|
||||
getopt.h
|
||||
@@ -35,16 +39,23 @@ gettext.h
|
||||
gettimeofday.c
|
||||
gnulib.mk
|
||||
intprops.h
|
||||
langinfo.h
|
||||
langinfo.in.h
|
||||
localcharset.c
|
||||
localcharset.h
|
||||
lstat.c
|
||||
malloc.c
|
||||
malloca.c
|
||||
malloca.h
|
||||
malloca.valgrind
|
||||
mbrlen.c
|
||||
mbrtowc.c
|
||||
mbsinit.c
|
||||
memchr.c
|
||||
memcmp.c
|
||||
memmove.c
|
||||
mkstemp.c
|
||||
mkostemp.c
|
||||
nl_langinfo.c
|
||||
obstack.c
|
||||
obstack.h
|
||||
pathmax.h
|
||||
@@ -56,6 +67,7 @@ quote.c
|
||||
quote.h
|
||||
quotearg.c
|
||||
quotearg.h
|
||||
readlink.c
|
||||
realloc.c
|
||||
ref-add.sed
|
||||
ref-add.sin
|
||||
@@ -68,6 +80,8 @@ regex_internal.c
|
||||
regex_internal.h
|
||||
regexec.c
|
||||
rename.c
|
||||
rmdir.c
|
||||
same-inode.h
|
||||
se-context.h
|
||||
se-context.in.h
|
||||
se-selinux.h
|
||||
@@ -76,8 +90,11 @@ set-mode-acl.c
|
||||
size_max.h
|
||||
snprintf.c
|
||||
stat-macros.h
|
||||
stat.c
|
||||
stdbool.h
|
||||
stdbool.in.h
|
||||
stddef.h
|
||||
stddef.in.h
|
||||
stdint.h
|
||||
stdint.in.h
|
||||
stdio-write.c
|
||||
@@ -100,6 +117,8 @@ sys_time.h
|
||||
sys_time.in.h
|
||||
tempname.c
|
||||
tempname.h
|
||||
time.h
|
||||
time.in.h
|
||||
unistd.h
|
||||
unistd.in.h
|
||||
unlocked-io.h
|
||||
|
||||
@@ -2,16 +2,20 @@
|
||||
00gnulib.m4
|
||||
acl.m4
|
||||
alloca.m4
|
||||
asm-underscore.m4
|
||||
btowc.m4
|
||||
canonicalize.m4
|
||||
codeset.m4
|
||||
dirname.m4
|
||||
dos.m4
|
||||
double-slash-root.m4
|
||||
eealloc.m4
|
||||
errno_h.m4
|
||||
error.m4
|
||||
exitfail.m4
|
||||
extensions.m4
|
||||
float_h.m4
|
||||
fcntl-o.m4
|
||||
getdelim.m4
|
||||
getline.m4
|
||||
getopt.m4
|
||||
@@ -36,6 +40,7 @@ intmax_t.m4
|
||||
inttypes-h.m4
|
||||
inttypes-pri.m4
|
||||
inttypes_h.m4
|
||||
langinfo_h.m4
|
||||
lcmessage.m4
|
||||
lib-ld.m4
|
||||
lib-link.m4
|
||||
@@ -49,6 +54,7 @@ longdouble.m4
|
||||
longlong.m4
|
||||
lstat.m4
|
||||
malloc.m4
|
||||
malloca.m4
|
||||
mbrlen.m4
|
||||
mbrtowc.m4
|
||||
mbsinit.m4
|
||||
@@ -56,9 +62,11 @@ mbstate_t.m4
|
||||
memchr.m4
|
||||
memcmp.m4
|
||||
memmove.m4
|
||||
mkostemp.m4
|
||||
mkstemp.m4
|
||||
mmap-anon.m4
|
||||
multiarch.m4
|
||||
nl_langinfo.m4
|
||||
nls.m4
|
||||
pathmax.m4
|
||||
po.m4
|
||||
@@ -67,15 +75,20 @@ printf.m4
|
||||
progtest.m4
|
||||
quote.m4
|
||||
quotearg.m4
|
||||
readlink.m4
|
||||
realloc.m4
|
||||
regex.m4
|
||||
rename.m4
|
||||
rmdir.m4
|
||||
selinux-context-h.m4
|
||||
selinux-selinux-h.m4
|
||||
signed.m4
|
||||
size_max.m4
|
||||
snprintf.m4
|
||||
ssize_t.m4
|
||||
stat.m4
|
||||
stdbool.m4
|
||||
stddef_h.m4
|
||||
stdint.m4
|
||||
stdint_h.m4
|
||||
stdio_h.m4
|
||||
@@ -89,17 +102,21 @@ sys_stat_h.m4
|
||||
sys_time_h.m4
|
||||
tempname.m4
|
||||
threadlib.m4
|
||||
time_h.m4
|
||||
uintmax_t.m4
|
||||
ulonglong.m4
|
||||
unistd_h.m4
|
||||
unlocked-io.m4
|
||||
vasnprintf.m4
|
||||
visibility.m4
|
||||
warn-on-use.m4
|
||||
wchar.m4
|
||||
wchar_h.m4
|
||||
wchar_t.m4
|
||||
wcrtomb.m4
|
||||
wctob.m4
|
||||
wctype.m4
|
||||
wctype_h.m4
|
||||
wint_t.m4
|
||||
xalloc.m4
|
||||
xsize.m4
|
||||
|
||||
+4
-2
@@ -211,9 +211,11 @@ ck_mkstemp (p_filename, tmpdir, base)
|
||||
sprintf (template, "%s/%sXXXXXX", tmpdir, base);
|
||||
|
||||
/* The ownership might change, so omit some permissions at first
|
||||
so unauthorized users cannot nip in before the file is ready. */
|
||||
so unauthorized users cannot nip in before the file is ready.
|
||||
|
||||
mkstemp forces O_BINARY on cygwin, so use mkostemp instead. */
|
||||
save_umask = umask (0700);
|
||||
fd = mkstemp (template);
|
||||
fd = mkostemp (template, 0);
|
||||
umask (save_umask);
|
||||
if (fd == -1)
|
||||
panic(_("couldn't open temporary file %s: %s"), template, strerror(errno));
|
||||
|
||||
Reference in new issue
Block a user