Blame lib/iconv.in.h

Packit Service fdd496
/* A GNU-like <iconv.h>.
Packit Service fdd496
Packit Service fdd496
   Copyright (C) 2007-2017 Free Software Foundation, Inc.
Packit Service fdd496
Packit Service fdd496
   This program is free software; you can redistribute it and/or modify
Packit Service fdd496
   it under the terms of the GNU General Public License as published by
Packit Service fdd496
   the Free Software Foundation; either version 3, or (at your option)
Packit Service fdd496
   any later version.
Packit Service fdd496
Packit Service fdd496
   This program is distributed in the hope that it will be useful,
Packit Service fdd496
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service fdd496
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service fdd496
   GNU General Public License for more details.
Packit Service fdd496
Packit Service fdd496
   You should have received a copy of the GNU General Public License
Packit Service fdd496
   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
Packit Service fdd496
Packit Service fdd496
#ifndef _@GUARD_PREFIX@_ICONV_H
Packit Service fdd496
Packit Service fdd496
#if __GNUC__ >= 3
Packit Service fdd496
@PRAGMA_SYSTEM_HEADER@
Packit Service fdd496
#endif
Packit Service fdd496
@PRAGMA_COLUMNS@
Packit Service fdd496
Packit Service fdd496
/* The include_next requires a split double-inclusion guard.  */
Packit Service fdd496
#@INCLUDE_NEXT@ @NEXT_ICONV_H@
Packit Service fdd496
Packit Service fdd496
#ifndef _@GUARD_PREFIX@_ICONV_H
Packit Service fdd496
#define _@GUARD_PREFIX@_ICONV_H
Packit Service fdd496
Packit Service fdd496
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
Packit Service fdd496
Packit Service fdd496
/* The definition of _GL_ARG_NONNULL is copied here.  */
Packit Service fdd496
Packit Service fdd496
/* The definition of _GL_WARN_ON_USE is copied here.  */
Packit Service fdd496
Packit Service fdd496
Packit Service fdd496
#if @GNULIB_ICONV@
Packit Service fdd496
# if @REPLACE_ICONV_OPEN@
Packit Service fdd496
/* An iconv_open wrapper that supports the IANA standardized encoding names
Packit Service fdd496
   ("ISO-8859-1" etc.) as far as possible.  */
Packit Service fdd496
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service fdd496
#   define iconv_open rpl_iconv_open
Packit Service fdd496
#  endif
Packit Service fdd496
_GL_FUNCDECL_RPL (iconv_open, iconv_t,
Packit Service fdd496
                  (const char *tocode, const char *fromcode)
Packit Service fdd496
                  _GL_ARG_NONNULL ((1, 2)));
Packit Service fdd496
_GL_CXXALIAS_RPL (iconv_open, iconv_t,
Packit Service fdd496
                  (const char *tocode, const char *fromcode));
Packit Service fdd496
# else
Packit Service fdd496
_GL_CXXALIAS_SYS (iconv_open, iconv_t,
Packit Service fdd496
                  (const char *tocode, const char *fromcode));
Packit Service fdd496
# endif
Packit Service fdd496
_GL_CXXALIASWARN (iconv_open);
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#if @REPLACE_ICONV_UTF@
Packit Service fdd496
/* Special constants for supporting UTF-{16,32}{BE,LE} encodings.
Packit Service fdd496
   Not public.  */
Packit Service fdd496
# define _ICONV_UTF8_UTF16BE (iconv_t)(-161)
Packit Service fdd496
# define _ICONV_UTF8_UTF16LE (iconv_t)(-162)
Packit Service fdd496
# define _ICONV_UTF8_UTF32BE (iconv_t)(-163)
Packit Service fdd496
# define _ICONV_UTF8_UTF32LE (iconv_t)(-164)
Packit Service fdd496
# define _ICONV_UTF16BE_UTF8 (iconv_t)(-165)
Packit Service fdd496
# define _ICONV_UTF16LE_UTF8 (iconv_t)(-166)
Packit Service fdd496
# define _ICONV_UTF32BE_UTF8 (iconv_t)(-167)
Packit Service fdd496
# define _ICONV_UTF32LE_UTF8 (iconv_t)(-168)
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#if @GNULIB_ICONV@
Packit Service fdd496
# if @REPLACE_ICONV@
Packit Service fdd496
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service fdd496
#   define iconv rpl_iconv
Packit Service fdd496
#  endif
Packit Service fdd496
_GL_FUNCDECL_RPL (iconv, size_t,
Packit Service fdd496
                  (iconv_t cd,
Packit Service fdd496
                   @ICONV_CONST@ char **inbuf, size_t *inbytesleft,
Packit Service fdd496
                   char **outbuf, size_t *outbytesleft));
Packit Service fdd496
_GL_CXXALIAS_RPL (iconv, size_t,
Packit Service fdd496
                  (iconv_t cd,
Packit Service fdd496
                   @ICONV_CONST@ char **inbuf, size_t *inbytesleft,
Packit Service fdd496
                   char **outbuf, size_t *outbytesleft));
Packit Service fdd496
# else
Packit Service fdd496
_GL_CXXALIAS_SYS (iconv, size_t,
Packit Service fdd496
                  (iconv_t cd,
Packit Service fdd496
                   @ICONV_CONST@ char **inbuf, size_t *inbytesleft,
Packit Service fdd496
                   char **outbuf, size_t *outbytesleft));
Packit Service fdd496
# endif
Packit Service fdd496
_GL_CXXALIASWARN (iconv);
Packit Service fdd496
# ifndef ICONV_CONST
Packit Service fdd496
#  define ICONV_CONST @ICONV_CONST@
Packit Service fdd496
# endif
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
#if @GNULIB_ICONV@
Packit Service fdd496
# if @REPLACE_ICONV@
Packit Service fdd496
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
Packit Service fdd496
#   define iconv_close rpl_iconv_close
Packit Service fdd496
#  endif
Packit Service fdd496
_GL_FUNCDECL_RPL (iconv_close, int, (iconv_t cd));
Packit Service fdd496
_GL_CXXALIAS_RPL (iconv_close, int, (iconv_t cd));
Packit Service fdd496
# else
Packit Service fdd496
_GL_CXXALIAS_SYS (iconv_close, int, (iconv_t cd));
Packit Service fdd496
# endif
Packit Service fdd496
_GL_CXXALIASWARN (iconv_close);
Packit Service fdd496
#endif
Packit Service fdd496
Packit Service fdd496
Packit Service fdd496
#endif /* _@GUARD_PREFIX@_ICONV_H */
Packit Service fdd496
#endif /* _@GUARD_PREFIX@_ICONV_H */