Skip to content

Commit a014e50

Browse files
committed
Remove HAVE_ERRNO_H from libgd
The check for errno.h has been removed via 50b9ef8 Upstream libgd library is also patched via libgd/libgd@1e7f939
1 parent 45ab573 commit a014e50

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

ext/gd/libgd/gdkanji.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@
1111
#include <stdarg.h>
1212
#if defined(HAVE_ICONV_H) || defined(HAVE_ICONV)
1313
#include <iconv.h>
14-
#ifdef HAVE_ERRNO_H
1514
#include <errno.h>
1615
#endif
17-
#endif
1816

1917
#if defined(HAVE_ICONV_H) && !defined(HAVE_ICONV)
2018
#define HAVE_ICONV 1
@@ -349,11 +347,9 @@ do_convert (unsigned char *to, unsigned char *from, const char *code)
349347
if ((cd = iconv_open (EUCSTR, code)) == (iconv_t) - 1)
350348
{
351349
error ("iconv_open() error");
352-
#ifdef HAVE_ERRNO_H
353350
if (errno == EINVAL)
354351
error ("invalid code specification: \"%s\" or \"%s\"",
355352
EUCSTR, code);
356-
#endif
357353
strcpy ((char *) to, (const char *) from);
358354
return;
359355
}
@@ -363,15 +359,13 @@ do_convert (unsigned char *to, unsigned char *from, const char *code)
363359

364360
if ((int) iconv(cd, (char **) &from, &from_len, (char **) &to, &to_len) == -1)
365361
{
366-
#ifdef HAVE_ERRNO_H
367362
if (errno == EINVAL)
368363
error ("invalid end of input string");
369364
else if (errno == EILSEQ)
370365
error ("invalid code in input string");
371366
else if (errno == E2BIG)
372367
error ("output buffer overflow at do_convert()");
373368
else
374-
#endif
375369
error ("something happen");
376370
strcpy ((char *) to, (const char *) from);
377371
return;

0 commit comments

Comments
 (0)