summaryrefslogtreecommitdiff
path: root/gzlib.c
diff options
context:
space:
mode:
authorhansr <hk-git@circlestorm.org>2014-10-12 12:38:06 +0200
committerhansr <hk-git@circlestorm.org>2014-10-12 12:38:06 +0200
commitf7e1e0130fb198fa2d4d62b8990d2ab205985b3f (patch)
tree56b60d978ce22cea80c52be7962d6be5e8c0fef9 /gzlib.c
parentf5c5de68590f559ceee1f26bca0eb2f4b26a21cd (diff)
Remove workarounds for non-ANSI-C compatible compilers (Part 1)
Diffstat (limited to 'gzlib.c')
-rw-r--r--gzlib.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/gzlib.c b/gzlib.c
index fae202e..68ed4a6 100644
--- a/gzlib.c
+++ b/gzlib.c
@@ -210,11 +210,7 @@ local gzFile gz_open(path, fd, mode)
*(state->path) = 0;
else
#endif
-#if !defined(NO_snprintf) && !defined(NO_vsnprintf)
snprintf(state->path, len + 1, "%s", (const char *)path);
-#else
- strcpy(state->path, path);
-#endif
/* compute the flags for open() */
oflag =
@@ -290,11 +286,7 @@ gzFile ZEXPORT gzdopen(fd, mode)
if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL)
return NULL;
-#if !defined(NO_snprintf) && !defined(NO_vsnprintf)
snprintf(path, 7 + 3 * sizeof(int), "<fd:%d>", fd); /* for debugging */
-#else
- sprintf(path, "<fd:%d>", fd); /* for debugging */
-#endif
gz = gz_open(path, fd, mode);
free(path);
return gz;
@@ -603,14 +595,8 @@ void ZLIB_INTERNAL gz_error(state, err, msg)
state->err = Z_MEM_ERROR;
return;
}
-#if !defined(NO_snprintf) && !defined(NO_vsnprintf)
snprintf(state->msg, strlen(state->path) + strlen(msg) + 3,
"%s%s%s", state->path, ": ", msg);
-#else
- strcpy(state->msg, state->path);
- strcat(state->msg, ": ");
- strcat(state->msg, msg);
-#endif
return;
}