b-000528
ldmud-3.2.9/src/done/b-000528 · 1.7 KB
From the archive ldmud-329.tar.gz
Download the archive « Back to the archive contents
Short: illegal format on restore with newest Cygwin
Date: 2000-05-28
From: Casey
Type: Bug
State: Fixed in 3.2.8-dev.210
Cygwin on Windows can't read its savefiles ('invalid format (value string)').
The step 190 -> 191 did not break it - with the new cygwin it fails on 190 as
well.
------------------------------------------------------------------------
From: "Bastian Hoyer" <bastian.hoyer@uni-essen.de>
To: "Lars Duening" <lars@bearnip.com>
Subject: probleme mit neuem cygwin
Date sent: Sat, 24 Jun 2000 23:52:09 +0200
Hallo Lars,
ich baue ja fuer unsere Windows-Wizards immer noch einen aktuellen Driver
unter Windows.
Bisher hab ich da immer auf eine aeltere cygwin-version zurückgegriffen, und
nach dem
updaten auf die neue hatte ich auch prompt Probleme.
Das liegt daran das save_object() files im dos-format speichert wenn man das
O_TEXT Flag
benutzt. Bisher ging wohl die Einstellung in der Registry vor, jetzt wohl
nicht mehr.
Anbei hab ich noch einen kleinen Patch der das ganze fixt :)
Bastian
[mud@ff cvs]$ diff -C 3 ldmud-dist/src/object.c ldmud-dist2/src/object.c
*** ldmud-dist/src/object.c Mon Jun 19 17:17:27 2000
--- ldmud-dist2/src/object.c Sat Jun 24 23:42:40 2000
***************
*** 1652,1658 ****
--- 1652,1664 ----
/* Open the file */
+ #ifdef __CYGWIN32__
+ /* We have to use O_BINARY with cygwin to be sure we have no CRs
in
+ the file. See cygwin-faq for more information. */
+ f = ixopen3(tmp_name, O_CREAT|O_TRUNC|O_WRONLY|O_BINARY, 0640);
+ #else
f = ixopen3(tmp_name, O_CREAT|O_TRUNC|O_WRONLY|O_TEXT, 0640);
+ #endif
if (f < 0) {
error("Could not open %s for a save.\n", tmp_name);
/* NOTREACHED */