Blame lib/iconv_close.c

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