build: Don't include <config.h> in native programs when cross-compiling.
[bpt/guile.git] / libguile / objcodes.c
index a8515a7..e315f3e 100644 (file)
@@ -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);