X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/80fea873648ca2ab2e592999a336c59cf054ab55..584e96c65f12aca9414450b656504af6e3f7a399:/src/src/os.c diff --git a/src/src/os.c b/src/src/os.c index 689ebfb1b..47af038f7 100644 --- a/src/src/os.c +++ b/src/src/os.c @@ -844,9 +844,9 @@ os_get_dns_resolver_res(void) #if !defined(OS_UNSETENV) int -os_unsetenv(const char *name) +os_unsetenv(const unsigned char * name) { - return unsetenv(name); +return unsetenv((char *)name); } #endif @@ -862,24 +862,24 @@ may not even do this. If the OS supports getcwd(NULL, 0) we'll use this, for all other systems we provide our own getcwd() */ #if !defined(OS_GETCWD) -char * -os_getcwd(char *buffer, size_t size) +unsigned char * +os_getcwd(unsigned char * buffer, size_t size) { -return getcwd(buffer, size); +return (unsigned char *) getcwd((char *)buffer, size); } #else #ifndef PATH_MAX # define PATH_MAX 4096 #endif -char * -os_getcwd(char *buffer, size_t size) +unsigned char * +os_getcwd(unsigned char * buffer, size_t size) { -void *rc; +char * b = (char *)buffer; if (!size) size = PATH_MAX; -if (!buffer && !(buffer = (char*) malloc(size))) return NULL; -if (!(buffer = getcwd(buffer, size))) return NULL; -return realloc(buffer, strlen(buffer) + 1); +if (!b && !(b = malloc(size))) return NULL; +if (!(b = getcwd(b, size))) return NULL; +return realloc(b, strlen(b) + 1); } #endif