[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: fix frozen file reader on Windows [m4--devo--1.0--patch-8]
From: |
Gary V. Vaughan |
Subject: |
FYI: fix frozen file reader on Windows [m4--devo--1.0--patch-8] |
Date: |
Wed, 4 May 2005 23:56:31 +0100 (BST) |
User-agent: |
mailnotify/0.6 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Applied to HEAD.
* looking for address@hidden/m4--devo--1.0--patch-7 to compare with
* comparing to address@hidden/m4--devo--1.0--patch-7
M ChangeLog
M src/freeze.c
M src/m4.h
* modified files
Index: Changelog
from Gary V. Vaughan <address@hidden>
* src/m4.h (__CYGWIN__, WIN32): Canonicalise Windows and Cygwin
recognition macros.
* src/freeze.c (produce_frozen_state): Use \n line-endings even
on Windows, so that the frozen file reader will work.
Reported by Josef T. Burger <address@hidden>
--- orig/src/freeze.c
+++ mod/src/freeze.c
@@ -193,7 +193,13 @@
{
FILE *file;
- if (file = fopen (name, "w"), !file)
+#ifdef WIN32
+# define FROZEN_WRITE "wb"
+#else
+# define FROZEN_WRITE "w"
+#endif
+
+ if (file = fopen (name, FROZEN_WRITE), !file)
{
M4ERROR ((m4_get_warning_status_opt (context), errno, name));
return;
--- orig/src/m4.h
+++ mod/src/m4.h
@@ -24,6 +24,14 @@
# include <config.h>
#endif
+/* Canonicalise Windows and Cygwin recognition macros. */
+#if defined(__CYGWIN32__) && !defined(__CYGWIN__)
+# define __CYGWIN__ __CYGWIN32__
+#endif
+#if defined(_WIN32) && !defined(WIN32)
+# define WIN32 _WIN32
+#endif
+
#include <sys/types.h>
#include <stdio.h>
#include <ctype.h>
- --
Gary V. Vaughan ())_. address@hidden,gnu.org}
Research Scientist ( '/ http://tkd.kicks-ass.net
GNU Hacker / )= http://www.gnu.org/software/libtool
Technical Author `(_~)_ http://sources.redhat.com/autobook
_________________________________________________________
This patch notification generated by tlaapply version 0.9
http://tkd.kicks-ass.net/arch/address@hidden/cvs-utils--tla--1.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iD8DBQFCeVMeFRMICSmD1gYRAkrzAJ9Gu9Elo3arO5l1zk75FZfKJx3GQwCdEhT0
q73JL6OIqYXrlOQx0469j1Q=
=ffJd
-----END PGP SIGNATURE-----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: fix frozen file reader on Windows [m4--devo--1.0--patch-8],
Gary V. Vaughan <=