iconv_close.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* Character set conversion.
  2. Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU Lesser General Public License as published by
  5. the Free Software Foundation; either version 2, or (at your option)
  6. any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public License along
  12. with this program; if not, write to the Free Software Foundation,
  13. Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
  14. #include <config.h>
  15. /* Specification. */
  16. #include <iconv.h>
  17. #include <stdint.h>
  18. #ifndef uintptr_t
  19. # define uintptr_t unsigned long
  20. #endif
  21. int
  22. rpl_iconv_close (iconv_t cd)
  23. #undef iconv_close
  24. {
  25. #if REPLACE_ICONV_UTF
  26. switch ((uintptr_t) cd)
  27. {
  28. case (uintptr_t) _ICONV_UTF8_UTF16BE:
  29. case (uintptr_t) _ICONV_UTF8_UTF16LE:
  30. case (uintptr_t) _ICONV_UTF8_UTF32BE:
  31. case (uintptr_t) _ICONV_UTF8_UTF32LE:
  32. case (uintptr_t) _ICONV_UTF16BE_UTF8:
  33. case (uintptr_t) _ICONV_UTF16LE_UTF8:
  34. case (uintptr_t) _ICONV_UTF32BE_UTF8:
  35. case (uintptr_t) _ICONV_UTF32LE_UTF8:
  36. return 0;
  37. }
  38. #endif
  39. return iconv_close (cd);
  40. }