summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2019-06-28 00:58:26 +0200
committerPeter Kokot <peterkokot@gmail.com>2019-06-28 20:02:11 +0200
commita014e50513599a59a0001ef0c0e4a187d97db9ff (patch)
tree08bc8337f71c0c5d16797382f34c84b9a47368d7
parent45ab57339e4142953f3daf8615d9443c31dcdfa5 (diff)
downloadphp-git-a014e50513599a59a0001ef0c0e4a187d97db9ff.tar.gz
Remove HAVE_ERRNO_H from libgd
The check for errno.h has been removed via 50b9ef8d9435d23be40cea7fb484a02e99fdb617 Upstream libgd library is also patched via https://github.com/libgd/libgd/commit/1e7f93922fb3adf9f131d7e94aa13386062ffe11
-rw-r--r--ext/gd/libgd/gdkanji.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/ext/gd/libgd/gdkanji.c b/ext/gd/libgd/gdkanji.c
index 3158e077c3..8389ec7081 100644
--- a/ext/gd/libgd/gdkanji.c
+++ b/ext/gd/libgd/gdkanji.c
@@ -11,10 +11,8 @@
#include <stdarg.h>
#if defined(HAVE_ICONV_H) || defined(HAVE_ICONV)
#include <iconv.h>
-#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
-#endif
#if defined(HAVE_ICONV_H) && !defined(HAVE_ICONV)
#define HAVE_ICONV 1
@@ -349,11 +347,9 @@ do_convert (unsigned char *to, unsigned char *from, const char *code)
if ((cd = iconv_open (EUCSTR, code)) == (iconv_t) - 1)
{
error ("iconv_open() error");
-#ifdef HAVE_ERRNO_H
if (errno == EINVAL)
error ("invalid code specification: \"%s\" or \"%s\"",
EUCSTR, code);
-#endif
strcpy ((char *) to, (const char *) from);
return;
}
@@ -363,7 +359,6 @@ do_convert (unsigned char *to, unsigned char *from, const char *code)
if ((int) iconv(cd, (char **) &from, &from_len, (char **) &to, &to_len) == -1)
{
-#ifdef HAVE_ERRNO_H
if (errno == EINVAL)
error ("invalid end of input string");
else if (errno == EILSEQ)
@@ -371,7 +366,6 @@ do_convert (unsigned char *to, unsigned char *from, const char *code)
else if (errno == E2BIG)
error ("output buffer overflow at do_convert()");
else
-#endif
error ("something happen");
strcpy ((char *) to, (const char *) from);
return;