diff options
author | dos-reis <gdr@axiomatics.org> | 2008-05-22 01:59:39 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-05-22 01:59:39 +0000 |
commit | d928aee37862094d6e177ece2a3e07bd0498b5c9 (patch) | |
tree | 97e5f50dc53cc10c6840e5d285adf9bd9640360b /src/lib/cfuns-c.c | |
parent | db5b6bc58c7d8307b8874b37793074f789eb626a (diff) | |
download | open-axiom-d928aee37862094d6e177ece2a3e07bd0498b5c9.tar.gz |
Fix build breakage on Win32.
Diffstat (limited to 'src/lib/cfuns-c.c')
-rw-r--r-- | src/lib/cfuns-c.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/cfuns-c.c b/src/lib/cfuns-c.c index bc6e10bd..2620be00 100644 --- a/src/lib/cfuns-c.c +++ b/src/lib/cfuns-c.c @@ -454,7 +454,7 @@ oa_getenv(const char* var) return NULL; } else if (len > BUFSIZE) { - buf = (char*) realloc(len); + buf = (char*) realloc(buf,len); len = GetEnvironmentVariable(var, buf, len); if (len == 0) { free(buf); @@ -474,7 +474,7 @@ oa_getcwd(void) int bufsz = 256; char* buf = (char*) malloc(bufsz); #ifdef __MINGW32__ - int n = GetCurrentDirectory(bufsz, bufsz); + int n = GetCurrentDirectory(bufsz, buf); if (n == 0) { perror("oa_getcwd"); exit(-1); @@ -508,7 +508,7 @@ OPENAXIOM_EXPORT int oa_access_file_for_read(const char* path) { #ifdef __MINGW32__ - GetFileAttributes(path) == INVALID_FILE_ATTRIBUTES ? -1 : 1; + return GetFileAttributes(path) == INVALID_FILE_ATTRIBUTES ? -1 : 1; #else return access(path, R_OK); #endif |