Merge github.com:cisco/ChezScheme

original commit: c5d71168eb4315f7e8ec9c0acf615fa0b9a2fc88
This commit is contained in:
Matthew Flatt 2019-07-26 04:29:00 -06:00
commit ce9df2f827
9 changed files with 31 additions and 19 deletions

12
LOG
View File

@ -1419,10 +1419,20 @@
BUILDING, c/vs.bat, wininstall/locate-vcredist.bat
- fixed open-string-input-port on immutable strings
cpnanopass.ss, io.ms, release_notes.stex
- use setenv rather than putenv on non WIN32 environments
prim5.c, system.stex
- restore {Free,Open,Net}BSD build, support Windows cross-compile
via MinGW, add configuration options, and add helper makefile targets
expenditor.c, thread.c, stats.c, statics.c, scheme.c, main.c, types.h,
externs.h, globals.h, nocurses.h, version.h, system.h, segment.h,
a6ob.def, ta6ob.def, a6nb.def, ta6nb.def, i3nt.def, ti3nt.def,
c/Mf-*, build.bat, makefiles/Makefile.in, makefiles/Mf-install.in,
misc.ms, s/update-revision, BUILDING
s/update-revision, BUILDING
- export `ee-backward-delete-sexp` binding in the expression-editor module.
expeditor.ss
- fix ee_read_char to handle ^@ properly
expeditor.c
- prevent access before start of array
scheme.c
- remove dead stores in files
compress-io.c, new-io.c

View File

@ -329,7 +329,7 @@ INT S_glzclose(glzFile glz) {
#ifdef EINTR
if (r < 0 && errno == EINTR) continue;
#endif
if (r == 0) { r = Z_ERRNO; saved_errno = errno; }
if (r == 0) { saved_errno = errno; }
break;
}
(void)LZ4F_freeDecompressionContext(lz4->dctx);

View File

@ -691,6 +691,9 @@ static ptr s_ee_read_char(IBOOL blockp) {
#endif /* PTHREADS */
if (n == 1) {
if (buf[0] == '\0') {
return Schar('\0');
} else {
old_locale = uselocale(term_locale);
sz = mbrtowc(&wch, buf, 1, &term_out_mbs);
uselocale(old_locale);
@ -698,6 +701,7 @@ static ptr s_ee_read_char(IBOOL blockp) {
return Schar(wch);
}
}
}
} while ((n < 0 && errno == EINTR) || (n == 1 && sz == (size_t)-2));

View File

@ -842,8 +842,6 @@ ptr S_bytevector_compress(ptr dest_bv, iptr d_start, iptr d_count,
if (!is_valid_lz4_length(s_count))
return Sstring("source bytevector ~s is too large");
destLen = (int)d_count;
destLen = LZ4_compress_default((char *)&BVIT(src_bv, s_start), (char *)&BVIT(dest_bv, d_start), (int)s_count, (int)d_count);
if (destLen > 0)

View File

@ -1372,11 +1372,7 @@ static void s_putenv(name, value) char *name, *value; {
if (rc == 0)
S_error1("putenv", "environment extension failed: ~a", S_LastErrorString());
#else /* WIN32 */
iptr n; char *s;
n = strlen(name) + strlen(value) + 2;
if ((s = malloc(n)) == (char *)NULL
|| snprintf(s, n, "%s=%s", name, value) < 0
|| putenv(s) != 0) {
if (setenv(name, value, 1) != 0) {
ptr msg = S_strerror(errno);
if (msg != Sfalse)

View File

@ -534,7 +534,7 @@ static IBOOL next_path(path, name, ext, sp, dsp) char *path; const char *name, *
/* unless entry was null, append name and ext onto path and return true with
* updated path, sp, and possibly dsp */
if (s != *sp) {
if (!DIRMARKERP(*(p - 1))) { setp(PATHSEP); }
if ((p > path) && !DIRMARKERP(*(p - 1))) { setp(PATHSEP); }
t = name;
while (*t != 0) setp(*t++);
t = ext;

View File

@ -5329,8 +5329,6 @@ is associated with \var{key}.
environment of the process,
where it is available to the current process (e.g., via \var{getenv})
and any spawned processes.
The key and value are copied into storage allocated outside of
the Scheme heap; this space is never reclaimed on non-Windows systems.
\schemedisplay
(putenv "SCHEME" "rocks!")

View File

@ -1749,6 +1749,12 @@ in fasl files does not generally make sense.
%-----------------------------------------------------------------------------
\section{Bug Fixes}\label{section:bugfixes}
\subsection{\protect\code{putenv} memory leak (9.5.3)}
\scheme{putenv} now calls the host system's \scheme{setenv} instead of
\scheme{putenv} on non-Windows hosts and avoids allocating memory that
is never freed, although \scheme{setenv} might do so.
\subsection{String ports from immutable strings (9.5.4)}
A bug that miscalculated the buffer size for

View File

@ -82,8 +82,8 @@
ee-beginning-of-entry ee-end-of-entry
ee-delete-to-eol ee-delete-line
ee-delete-between-point-and-mark ee-set-mark
ee-delete-entry ee-reset-entry ee-delete-sexp ee-redisplay
ee-yank-kill-buffer ee-yank-selection
ee-delete-entry ee-reset-entry ee-delete-sexp ee-backward-delete-sexp
ee-redisplay ee-yank-kill-buffer ee-yank-selection
ee-string-macro ee-eof ee-delete-char ee-eof/delete-char
ee-backward-delete-char ee-insert-paren
ee-flash-matching-delimiter ee-goto-matching-delimiter