[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-109-ge716f
From: |
Andy Wingo |
Subject: |
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-109-ge716f44 |
Date: |
Tue, 19 Feb 2013 22:03:26 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=e716f4410fb3f6c614def5a9b33a39185f637002
The branch, stable-2.0 has been updated
via e716f4410fb3f6c614def5a9b33a39185f637002 (commit)
via 5a4a4454c5302ed511eafde5a7759ebf00fbee17 (commit)
from 854ada4f1af8d72859b77e8764729f3cca45460a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e716f4410fb3f6c614def5a9b33a39185f637002
Author: Andy Wingo <address@hidden>
Date: Tue Feb 19 23:03:19 2013 +0100
fix an error message loading invalid bytecode
* libguile/objcodes.c (make_objcode_from_file): Add correct error
message if full_read failed without an errno.
commit 5a4a4454c5302ed511eafde5a7759ebf00fbee17
Author: Andy Wingo <address@hidden>
Date: Tue Feb 19 22:36:22 2013 +0100
copy-file and load-objcode use O_BINARY
* libguile/filesys.c (scm_copy_file):
* libguile/objcodes.c (scm_load_objcode): Use O_BINARY. Thanks to Eli
Zaretskii for the patch.
-----------------------------------------------------------------------
Summary of changes:
libguile/filesys.c | 2 +-
libguile/objcodes.c | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/libguile/filesys.c b/libguile/filesys.c
index 94d824e..2c4168e 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -1095,7 +1095,7 @@ SCM_DEFINE (scm_copy_file, "copy-file", 2, 0, 0,
c_newfile = scm_to_locale_string (newfile);
scm_dynwind_free (c_newfile);
- oldfd = open_or_open64 (c_oldfile, O_RDONLY);
+ oldfd = open_or_open64 (c_oldfile, O_RDONLY | O_BINARY);
if (oldfd == -1)
SCM_SYSERROR;
diff --git a/libguile/objcodes.c b/libguile/objcodes.c
index 004dd61..e315f3e 100644
--- a/libguile/objcodes.c
+++ b/libguile/objcodes.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2009, 2010, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2009, 2010, 2011, 2013 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -220,7 +220,9 @@ make_objcode_from_file (int fd)
int errno_save = errno;
(void) close (fd);
errno = errno_save;
- SCM_SYSERROR;
+ if (errno)
+ SCM_SYSERROR;
+ scm_misc_error (FUNC_NAME, "file truncated while reading", SCM_EOL);
}
(void) close (fd);
@@ -363,7 +365,7 @@ SCM_DEFINE (scm_load_objcode, "load-objcode", 1, 0, 0,
SCM_VALIDATE_STRING (1, file);
c_file = scm_to_locale_string (file);
- fd = open (c_file, O_RDONLY | O_CLOEXEC);
+ fd = open (c_file, O_RDONLY | O_BINARY | O_CLOEXEC);
free (c_file);
if (fd < 0) SCM_SYSERROR;
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-109-ge716f44,
Andy Wingo <=