Blame gettext-runtime/gnulib-lib/iconv_close.c

Packit Bot 06c835
/* Character set conversion.
Packit Bot 06c835
   Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc.
Packit Bot 06c835
Packit Bot 06c835
   This program is free software; you can redistribute it and/or modify
Packit Bot 06c835
   it under the terms of the GNU General Public License as published by
Packit Bot 06c835
   the Free Software Foundation; either version 3, or (at your option)
Packit Bot 06c835
   any later version.
Packit Bot 06c835
Packit Bot 06c835
   This program is distributed in the hope that it will be useful,
Packit Bot 06c835
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Bot 06c835
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Bot 06c835
   GNU General Public License for more details.
Packit Bot 06c835
Packit Bot 06c835
   You should have received a copy of the GNU General Public License along
Packit Bot 06c835
   with this program; if not, see <http://www.gnu.org/licenses/>.  */
Packit Bot 06c835
Packit Bot 06c835
#include <config.h>
Packit Bot 06c835
Packit Bot 06c835
/* Specification.  */
Packit Bot 06c835
#include <iconv.h>
Packit Bot 06c835
Packit Bot 06c835
#include <stdint.h>
Packit Bot 06c835
#ifndef uintptr_t
Packit Bot 06c835
# define uintptr_t unsigned long
Packit Bot 06c835
#endif
Packit Bot 06c835
Packit Bot 06c835
int
Packit Bot 06c835
rpl_iconv_close (iconv_t cd)
Packit Bot 06c835
#undef iconv_close
Packit Bot 06c835
{
Packit Bot 06c835
#if REPLACE_ICONV_UTF
Packit Bot 06c835
  switch ((uintptr_t) cd)
Packit Bot 06c835
    {
Packit Bot 06c835
    case (uintptr_t) _ICONV_UTF8_UTF16BE:
Packit Bot 06c835
    case (uintptr_t) _ICONV_UTF8_UTF16LE:
Packit Bot 06c835
    case (uintptr_t) _ICONV_UTF8_UTF32BE:
Packit Bot 06c835
    case (uintptr_t) _ICONV_UTF8_UTF32LE:
Packit Bot 06c835
    case (uintptr_t) _ICONV_UTF16BE_UTF8:
Packit Bot 06c835
    case (uintptr_t) _ICONV_UTF16LE_UTF8:
Packit Bot 06c835
    case (uintptr_t) _ICONV_UTF32BE_UTF8:
Packit Bot 06c835
    case (uintptr_t) _ICONV_UTF32LE_UTF8:
Packit Bot 06c835
      return 0;
Packit Bot 06c835
    }
Packit Bot 06c835
#endif
Packit Bot 06c835
  return iconv_close (cd);
Packit Bot 06c835
}