Mercurial > mxe-octave
view src/units-1-fixes.patch @ 3721:933b99febcf1
Expand options to support 3 possible sources of octave
* configure.ac: modify --enable-stable rule to --enable-octave=source (stable,alpha,default)
* Makefile.am: modify OCTAVE_TARGET based on octave build value set in configure.
* index.html: added master-octave information.
* src/default-octave.mk: new file.
* src/default-octave-1-docinstall.patch
* dist-files.mk: add default-octave-1-docinstall.patch default-octave.mk
* binary-dist-rules.mk: use OCTAVE_TARGET to decide on tarball/installer name
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Sun, 19 Oct 2014 22:58:20 -0400 |
parents | e7cb2340feff |
children |
line wrap: on
line source
--- a/units.c.orig 2013-10-21 11:47:34 -0400 +++ b/units.c 2013-10-21 12:18:24 -0400 @@ -1166,23 +1166,23 @@ int setenv(const char *name, const char *val, int overwrite) { - char *environ; + char *environ1; if (!overwrite && getenv(name) != NULL) return 0; - environ = (char *) malloc(strlen(name) + strlen(val) + 2); - if (!environ) + environ1 = (char *) malloc(strlen(name) + strlen(val) + 2); + if (!environ1) return 1; - strcpy(environ, name); - strcat(environ, "="); - strcat(environ, val); + strcpy(environ1, name); + strcat(environ1, "="); + strcat(environ1, val); /* putenv() doesn't copy its argument, so don't free environ */ #if defined _WIN32 && defined _MSC_VER - return _putenv(environ); + return _putenv(environ1); #else - return putenv(environ); + return putenv(environ1); #endif } #endif