[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
frozen files on cygwin
From: |
Eric Blake |
Subject: |
frozen files on cygwin |
Date: |
Thu, 06 Jul 2006 21:36:43 -0600 |
User-agent: |
Thunderbird 1.5.0.4 (Windows/20060516) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This patch, advertised in NEWS for 1.4.3:
http://lists.gnu.org/archive/html/bug-m4/2005-02/msg00001.html
actually did not fix anything on cygwin (since cygwin intentionally does
not fall under the category of WIN32). So I've updated that NEWS entry,
and fixed it for real in the upcoming 1.4.5 (17 months later):
2006-07-06 Eric Blake <address@hidden>
* m4/gnulib-cache.m4: Augment with gnulib-tool --import
binary-io.
* src/m4.h (includes): Add binary-io.h for O_BINARY.
* src/freeze.c (produce_frozen_state): Use O_BINARY to remove
#ifdef. Fixes patch from 2005-02-03 for cygwin.
* NEWS: Mention this fix.
- --
Life is short - so eat dessert first!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFErdbL84KuGfSFAYARAhkQAKCqo8uhiZsFs6nf2iQO1IlaU4kY/wCeKFx6
Nv747VJwYl71qMAKFU07RVQ=
=IQ4g
-----END PGP SIGNATURE-----
Index: NEWS
===================================================================
RCS file: /sources/m4/m4/NEWS,v
retrieving revision 1.1.1.1.2.29
diff -u -p -r1.1.1.1.2.29 NEWS
--- NEWS 30 Jun 2006 18:58:11 -0000 1.1.1.1.2.29
+++ NEWS 7 Jul 2006 03:13:53 -0000
@@ -27,6 +27,8 @@ Version 1.4.5 - ?? 2006, by ??? (CVS ve
* On Windows builds, the macro __windows__ is provided instead of
__unix__. This allows input files to determine when syscmd might behave
differently.
+* Fix bug in 1.4.3 patch to use \n line-endings that did not work for
+ cygwin.
Version 1.4.4b - 17 June 2006, by Eric Blake (CVS version 1.4.4a)
@@ -59,7 +61,7 @@ Version 1.4.3 - March 2005, by Gary V. V
* DESTDIR installs now work correctly.
* Don't segfault with uncompilable regexps to changeword().
-* Always use \n line-endings for frozen files (fixes a cygwin bug).
+* Always use \n line-endings for frozen files (fixes a Windows bug).
* Portability fix for systems lacking mkstemp(3).
* Approximately 20% speed up in the common case of usage with autoconf.
* Supported on QNX 6.3.
Index: m4/gnulib-cache.m4
===================================================================
RCS file: /sources/m4/m4/m4/Attic/gnulib-cache.m4,v
retrieving revision 1.1.2.3
diff -u -p -r1.1.2.3 gnulib-cache.m4
--- m4/gnulib-cache.m4 30 Jun 2006 03:38:49 -0000 1.1.2.3
+++ m4/gnulib-cache.m4 7 Jul 2006 03:13:53 -0000
@@ -15,10 +15,10 @@
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --lib=libm4 --source-base=lib --m4-base=m4
--aux-dir=. --macro-prefix=M4 alloca error getopt mkstemp obstack regex strtol
xalloc xvasprintf
+# gnulib-tool --import --dir=. --lib=libm4 --source-base=lib --m4-base=m4
--aux-dir=. --macro-prefix=M4 alloca binary-io error getopt mkstemp obstack
regex strtol xalloc xvasprintf
# Specification in the form of a few gnulib-tool.m4 macro invocations:
-gl_MODULES([alloca error getopt mkstemp obstack regex strtol xalloc
xvasprintf])
+gl_MODULES([alloca binary-io error getopt mkstemp obstack regex strtol xalloc
xvasprintf])
gl_AVOID([])
gl_SOURCE_BASE([lib])
gl_M4_BASE([m4])
Index: src/freeze.c
===================================================================
RCS file: /sources/m4/m4/src/freeze.c,v
retrieving revision 1.1.1.1.2.8
diff -u -p -r1.1.1.1.2.8 freeze.c
--- src/freeze.c 30 Jun 2006 15:06:54 -0000 1.1.1.1.2.8
+++ src/freeze.c 7 Jul 2006 03:13:53 -0000
@@ -56,13 +56,7 @@ produce_frozen_state (const char *name)
symbol *sym;
const builtin *bp;
-#ifdef W32_NATIVE
-# define FROZEN_WRITE "wb"
-#else
-# define FROZEN_WRITE "w"
-#endif
-
- if (file = fopen (name, FROZEN_WRITE), !file)
+ if (file = fopen (name, O_BINARY ? "wb" : "w"), !file)
{
M4ERROR ((warning_status, errno, name));
return;
Index: src/m4.h
===================================================================
RCS file: /sources/m4/m4/src/m4.h,v
retrieving revision 1.1.1.1.2.13
diff -u -p -r1.1.1.1.2.13 m4.h
--- src/m4.h 30 Jun 2006 15:06:54 -0000 1.1.1.1.2.13
+++ src/m4.h 7 Jul 2006 03:13:53 -0000
@@ -52,6 +52,7 @@
#include <stdio.h>
#include <ctype.h>
+#include "binary-io.h"
#include "obstack.h"
/* An ANSI string.h and pre-ANSI memory.h might conflict. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- frozen files on cygwin,
Eric Blake <=