gd.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. --- gdkanji.c.dist 2003-07-25 10:05:16.000000000 +0200
  2. +++ gdkanji.c 2003-07-25 10:07:43.000000000 +0200
  3. @@ -27,29 +27,32 @@
  4. #ifndef HAVE_ICONV
  5. #define ICONV_CONST /**/
  6. - iconv_t iconv_open (const char *, const char *);
  7. -size_t iconv (iconv_t, ICONV_CONST char **, size_t *, char **, size_t *);
  8. -int iconv_close (iconv_t);
  9. +static iconv_t my_iconv_open (const char *, const char *);
  10. +static size_t my_iconv (iconv_t, ICONV_CONST char **, size_t *, char **, size_t *);
  11. +static int my_iconv_close (iconv_t);
  12. -iconv_t
  13. -iconv_open (const char *tocode, const char *fromcode)
  14. +static iconv_t
  15. +my_iconv_open (const char *tocode, const char *fromcode)
  16. {
  17. return (iconv_t) (-1);
  18. }
  19. -size_t
  20. -iconv (iconv_t cd, ICONV_CONST char **inbuf, size_t * inbytesleft,
  21. +static size_t
  22. +my_iconv (iconv_t cd, ICONV_CONST char **inbuf, size_t * inbytesleft,
  23. char **outbuf, size_t * outbytesleft)
  24. {
  25. return 0;
  26. }
  27. -int
  28. -iconv_close (iconv_t cd)
  29. +static int
  30. +my_iconv_close (iconv_t cd)
  31. {
  32. return 0;
  33. }
  34. -
  35. +#else
  36. +#define my_iconv_open iconv_open
  37. +#define my_iconv iconv
  38. +#define my_iconv_close iconv_close
  39. #endif /* !HAVE_ICONV */
  40. #define LIBNAME "any2eucjp()"
  41. @@ -377,7 +380,7 @@
  42. iconv_t cd;
  43. size_t from_len, to_len;
  44. - if ((cd = iconv_open (EUCSTR, code)) == (iconv_t) - 1)
  45. + if ((cd = my_iconv_open (EUCSTR, code)) == (iconv_t) - 1)
  46. {
  47. error ("iconv_open() error");
  48. #ifdef HAVE_ERRNO_H
  49. @@ -391,7 +394,7 @@
  50. from_len = strlen ((const char *) from) + 1;
  51. to_len = BUFSIZ;
  52. - if ((int) (iconv (cd, (char **)from_p, &from_len, (char **)to_p, &to_len))
  53. + if ((int) (my_iconv (cd, (char **)from_p, &from_len, (char **)to_p, &to_len))
  54. == -1)
  55. {
  56. #ifdef HAVE_ERRNO_H
  57. @@ -408,7 +411,7 @@
  58. return;
  59. }
  60. - if (iconv_close (cd) != 0)
  61. + if (my_iconv_close (cd) != 0)
  62. {
  63. error ("iconv_close() error");
  64. }
  65. Index: gdhelpers.h
  66. --- gdhelpers.h.orig 2003-12-24 20:23:18.000000000 +0100
  67. +++ gdhelpers.h 2003-12-25 09:55:12.000000000 +0100
  68. @@ -25,7 +25,7 @@
  69. #define gdMutexLock(x) EnterCriticalSection(&x)
  70. #define gdMutexUnlock(x) LeaveCriticalSection(&x)
  71. #else
  72. -#ifdef HAVE_PTHREAD
  73. +#if 0
  74. #include <pthread.h>
  75. #define gdMutexDeclare(x) pthread_mutex_t x
  76. #define gdMutexSetup(x) pthread_mutex_init(&x, 0)