summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2010-07-16 21:55:56 +0200
committerPaolo Bonzini <bonzini@gnu.org>2010-08-17 02:00:04 +0200
commitf38d4c196a455c81dbae1ef220697cb1148144fe (patch)
treeac9bcbbf9eac323f211d7ebffade9f5b9d8ed2a4
parentef5fa3958d8df09161d40098ee8a275f755bb6c6 (diff)
downloadsed-f38d4c196a455c81dbae1ef220697cb1148144fe.tar.gz
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.
-rw-r--r--.gitignore1
-rw-r--r--ChangeLog9
-rw-r--r--autoboot.conf2
-rwxr-xr-xbootstrap.sh.in2
-rw-r--r--build-aux/.gitignore4
m---------gnulib0
-rw-r--r--lib/.gitignore21
-rw-r--r--m4/.gitignore17
-rw-r--r--sed/utils.c6
9 files changed, 56 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index b2edf48..642f261 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,5 @@ config.sub
config_h.in
configure
depcomp
-m4
mdate-sh
missing
diff --git a/ChangeLog b/ChangeLog
index 6625490..b87e45c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/autoboot.conf b/autoboot.conf
index 1cffa14..0c34ce3 100644
--- a/autoboot.conf
+++ b/autoboot.conf
@@ -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"
diff --git a/bootstrap.sh.in b/bootstrap.sh.in
index 26f9e5a..a2f3b78 100755
--- a/bootstrap.sh.in
+++ b/bootstrap.sh.in
@@ -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
diff --git a/build-aux/.gitignore b/build-aux/.gitignore
index 37fc209..718a580 100644
--- a/build-aux/.gitignore
+++ b/build-aux/.gitignore
@@ -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
diff --git a/gnulib b/gnulib
-Subproject b653eda3ac4864de205419d9f41eec267cb89ee
+Subproject afc6cbe4fe4892c5ee4166cab87fede6f294a27
diff --git a/lib/.gitignore b/lib/.gitignore
index c2b1224..1f40f01 100644
--- a/lib/.gitignore
+++ b/lib/.gitignore
@@ -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
diff --git a/m4/.gitignore b/m4/.gitignore
index d710638..05c953f 100644
--- a/m4/.gitignore
+++ b/m4/.gitignore
@@ -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
diff --git a/sed/utils.c b/sed/utils.c
index 241ef1d..226089a 100644
--- a/sed/utils.c
+++ b/sed/utils.c
@@ -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));