/*
 * This file was generated automatically by ExtUtils::ParseXS version 3.34 from the
 * contents of gettext_xs.xs. Do not edit this file, edit gettext_xs.xs instead.
 *
 *    ANY CHANGES MADE HERE WILL BE LOST!
 *
 */

#line 1 "gettext_xs.xs"
/* -*- C -*- */
/*
# Perl binding for Uniforum message translation.
# Copyright (C) 2002-2017 Guido Flohr <guido.flohr@cantanea.com>,
# all rights reserved.

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include <string.h>
#include <locale.h>
#include <libintl.h>
/* Handle the case that we link against GNU libintl but include a non
 * GNU libintl.h.  */
#ifndef __USE_GNU_GETTEXT
# error "<libintl.h> is not GNU gettext.  Maybe you have to adjust your include path."
#endif

#line 42 "gettext_xs.c"
#ifndef PERL_UNUSED_VAR
#  define PERL_UNUSED_VAR(var) if (0) var = var
#endif

#ifndef dVAR
#  define dVAR		dNOOP
#endif


/* This stuff is not part of the API! You have been warned. */
#ifndef PERL_VERSION_DECIMAL
#  define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s)
#endif
#ifndef PERL_DECIMAL_VERSION
#  define PERL_DECIMAL_VERSION \
	  PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION)
#endif
#ifndef PERL_VERSION_GE
#  define PERL_VERSION_GE(r,v,s) \
	  (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s))
#endif
#ifndef PERL_VERSION_LE
#  define PERL_VERSION_LE(r,v,s) \
	  (PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s))
#endif

/* XS_INTERNAL is the explicit static-linkage variant of the default
 * XS macro.
 *
 * XS_EXTERNAL is the same as XS_INTERNAL except it does not include
 * "STATIC", ie. it exports XSUB symbols. You probably don't want that
 * for anything but the BOOT XSUB.
 *
 * See XSUB.h in core!
 */


/* TODO: This might be compatible further back than 5.10.0. */
#if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1)
#  undef XS_EXTERNAL
#  undef XS_INTERNAL
#  if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
#    define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name)
#    define XS_INTERNAL(name) STATIC XSPROTO(name)
#  endif
#  if defined(__SYMBIAN32__)
#    define XS_EXTERNAL(name) EXPORT_C XSPROTO(name)
#    define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name)
#  endif
#  ifndef XS_EXTERNAL
#    if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
#      define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__)
#      define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__)
#    else
#      ifdef __cplusplus
#        define XS_EXTERNAL(name) extern "C" XSPROTO(name)
#        define XS_INTERNAL(name) static XSPROTO(name)
#      else
#        define XS_EXTERNAL(name) XSPROTO(name)
#        define XS_INTERNAL(name) STATIC XSPROTO(name)
#      endif
#    endif
#  endif
#endif

/* perl >= 5.10.0 && perl <= 5.15.1 */


/* The XS_EXTERNAL macro is used for functions that must not be static
 * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL
 * macro defined, the best we can do is assume XS is the same.
 * Dito for XS_INTERNAL.
 */
#ifndef XS_EXTERNAL
#  define XS_EXTERNAL(name) XS(name)
#endif
#ifndef XS_INTERNAL
#  define XS_INTERNAL(name) XS(name)
#endif

/* Now, finally, after all this mess, we want an ExtUtils::ParseXS
 * internal macro that we're free to redefine for varying linkage due
 * to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use
 * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to!
 */

#undef XS_EUPXS
#if defined(PERL_EUPXS_ALWAYS_EXPORT)
#  define XS_EUPXS(name) XS_EXTERNAL(name)
#else
   /* default to internal */
#  define XS_EUPXS(name) XS_INTERNAL(name)
#endif

#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)

/* prototype to pass -Wmissing-prototypes */
STATIC void
S_croak_xs_usage(const CV *const cv, const char *const params);

STATIC void
S_croak_xs_usage(const CV *const cv, const char *const params)
{
    const GV *const gv = CvGV(cv);

    PERL_ARGS_ASSERT_CROAK_XS_USAGE;

    if (gv) {
        const char *const gvname = GvNAME(gv);
        const HV *const stash = GvSTASH(gv);
        const char *const hvname = stash ? HvNAME(stash) : NULL;

        if (hvname)
	    Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params);
        else
	    Perl_croak_nocontext("Usage: %s(%s)", gvname, params);
    } else {
        /* Pants. I don't think that it should be possible to get here. */
	Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params);
    }
}
#undef  PERL_ARGS_ASSERT_CROAK_XS_USAGE

#define croak_xs_usage        S_croak_xs_usage

#endif

/* NOTE: the prototype of newXSproto() is different in versions of perls,
 * so we define a portable version of newXSproto()
 */
#ifdef newXS_flags
#define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0)
#else
#define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
#endif /* !defined(newXS_flags) */

#if PERL_VERSION_LE(5, 21, 5)
#  define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file)
#else
#  define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b)
#endif

#line 186 "gettext_xs.c"

XS_EUPXS(XS_Locale__gettext_xs___gettext_xs_version); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs___gettext_xs_version)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	char *	RETVAL;
	dXSTARG;
#line 39 "gettext_xs.xs"
	  RETVAL = (VERSION);
#line 199 "gettext_xs.c"
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Locale__gettext_xs_LC_CTYPE); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs_LC_CTYPE)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	double	RETVAL;
	dXSTARG;
#line 46 "gettext_xs.xs"
          RETVAL = (double) LC_CTYPE;
#line 217 "gettext_xs.c"
	XSprePUSH; PUSHn((double)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Locale__gettext_xs_LC_NUMERIC); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs_LC_NUMERIC)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	double	RETVAL;
	dXSTARG;
#line 53 "gettext_xs.xs"
          RETVAL = (double) LC_NUMERIC;
#line 235 "gettext_xs.c"
	XSprePUSH; PUSHn((double)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Locale__gettext_xs_LC_TIME); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs_LC_TIME)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	double	RETVAL;
	dXSTARG;
#line 60 "gettext_xs.xs"
          RETVAL = (double) LC_TIME;
#line 253 "gettext_xs.c"
	XSprePUSH; PUSHn((double)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Locale__gettext_xs_LC_COLLATE); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs_LC_COLLATE)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	double	RETVAL;
	dXSTARG;
#line 67 "gettext_xs.xs"
          RETVAL = (double) LC_COLLATE;
#line 271 "gettext_xs.c"
	XSprePUSH; PUSHn((double)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Locale__gettext_xs_LC_MONETARY); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs_LC_MONETARY)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	double	RETVAL;
	dXSTARG;
#line 74 "gettext_xs.xs"
          RETVAL = (double) LC_MONETARY;
#line 289 "gettext_xs.c"
	XSprePUSH; PUSHn((double)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Locale__gettext_xs_LC_MESSAGES); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs_LC_MESSAGES)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	double	RETVAL;
	dXSTARG;
#line 81 "gettext_xs.xs"
          RETVAL = (double) LC_MESSAGES;
#line 307 "gettext_xs.c"
	XSprePUSH; PUSHn((double)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Locale__gettext_xs_LC_ALL); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs_LC_ALL)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	double	RETVAL;
	dXSTARG;
#line 88 "gettext_xs.xs"
          RETVAL = (double) LC_ALL;
#line 325 "gettext_xs.c"
	XSprePUSH; PUSHn((double)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Locale__gettext_xs_gettext); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs_gettext)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "msgid");
    {
	char*	msgid = (char *)SvPV_nolen(ST(0))
;
	char *	RETVAL;
	dXSTARG;
#line 97 "gettext_xs.xs"
    	  RETVAL = (char*) gettext (msgid);
#line 345 "gettext_xs.c"
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Locale__gettext_xs_dgettext); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs_dgettext)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "domainname, msgid");
    {
	char*	domainname = (char *)SvPV_nolen(ST(0))
;
	char*	msgid = (char *)SvPV_nolen(ST(1))
;
	char *	RETVAL;
	dXSTARG;
#line 107 "gettext_xs.xs"
	RETVAL = (char*) dgettext (domainname, msgid);
#line 367 "gettext_xs.c"
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Locale__gettext_xs_dcgettext); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs_dcgettext)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "domainname, msgid, category");
    {
	char*	domainname = (char *)SvPV_nolen(ST(0))
;
	char*	msgid = (char *)SvPV_nolen(ST(1))
;
	int	category = (int)SvIV(ST(2))
;
	char *	RETVAL;
	dXSTARG;
#line 118 "gettext_xs.xs"
	RETVAL = (char*) dcgettext (domainname, msgid, category);
#line 391 "gettext_xs.c"
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Locale__gettext_xs_ngettext); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs_ngettext)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "msgid1, msgid2, n");
    {
	char*	msgid1 = (char *)SvPV_nolen(ST(0))
;
	char*	msgid2 = (char *)SvPV_nolen(ST(1))
;
	unsigned long	n = (unsigned long)SvUV(ST(2))
;
	char *	RETVAL;
	dXSTARG;
#line 129 "gettext_xs.xs"
	RETVAL = (char*) ngettext (msgid1, msgid2, n);
#line 415 "gettext_xs.c"
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Locale__gettext_xs_dngettext); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs_dngettext)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "domainname, msgid1, msgid2, n");
    {
	char*	domainname = (char *)SvPV_nolen(ST(0))
;
	char*	msgid1 = (char *)SvPV_nolen(ST(1))
;
	char*	msgid2 = (char *)SvPV_nolen(ST(2))
;
	unsigned long	n = (unsigned long)SvUV(ST(3))
;
	char *	RETVAL;
	dXSTARG;
#line 141 "gettext_xs.xs"
	RETVAL = (char*) dngettext (domainname, msgid1, msgid2, n);
#line 441 "gettext_xs.c"
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Locale__gettext_xs_dcngettext); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs_dcngettext)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "domainname, msgid1, msgid2, n, category");
    {
	char*	domainname = (char *)SvPV_nolen(ST(0))
;
	char*	msgid1 = (char *)SvPV_nolen(ST(1))
;
	char*	msgid2 = (char *)SvPV_nolen(ST(2))
;
	unsigned long	n = (unsigned long)SvUV(ST(3))
;
	int	category = (int)SvIV(ST(4))
;
	char *	RETVAL;
	dXSTARG;
#line 154 "gettext_xs.xs"
	RETVAL = (char*) dcngettext (domainname, msgid1, msgid2, n, category);
#line 469 "gettext_xs.c"
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Locale__gettext_xs__pgettext_aux); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs__pgettext_aux)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "domain, msg_ctxt_id, msgid, category");
    {
	char*	domain = (char *)SvPV_nolen(ST(0))
;
	char*	msg_ctxt_id = (char *)SvPV_nolen(ST(1))
;
	char*	msgid = (char *)SvPV_nolen(ST(2))
;
	int	category = (int)SvIV(ST(3))
;
#line 166 "gettext_xs.xs"
    char* translation;
#line 493 "gettext_xs.c"
	char *	RETVAL;
	dXSTARG;
#line 168 "gettext_xs.xs"
    /* Treat empty or undefined strings as NULL. */
    if (!domain || domain[0] == '\000')
        domain = NULL;
    /* Treat -1 as null, and default to LC_MESSAGES */
    if (category == -1)
        category = LC_MESSAGES;
    /* reimplemented from gettext-0.17 */
    translation = (char*) dcgettext (domain, msg_ctxt_id, category);
    if (translation == msg_ctxt_id)
        RETVAL = msgid;
    else
        RETVAL = translation;
#line 509 "gettext_xs.c"
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Locale__gettext_xs__npgettext_aux); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs__npgettext_aux)
{
    dVAR; dXSARGS;
    if (items != 6)
       croak_xs_usage(cv,  "domain, msg_ctxt_id, msgid1, msgid2, n, category");
    {
	char*	domain = (char *)SvPV_nolen(ST(0))
;
	char*	msg_ctxt_id = (char *)SvPV_nolen(ST(1))
;
	char*	msgid1 = (char *)SvPV_nolen(ST(2))
;
	char*	msgid2 = (char *)SvPV_nolen(ST(3))
;
	unsigned long	n = (unsigned long)SvUV(ST(4))
;
	int	category = (int)SvIV(ST(5))
;
#line 193 "gettext_xs.xs"
    char* translation;
#line 537 "gettext_xs.c"
	char *	RETVAL;
	dXSTARG;
#line 195 "gettext_xs.xs"
    /* Treat empty or undefined strings as NULL. */
    if (!domain || domain[0] == '\000')
        domain = NULL;
    /* Treat -1 as null, and default to LC_MESSAGES */
    if (category == -1)
        category = LC_MESSAGES;
    translation = (char*) dcngettext (domain, msg_ctxt_id, msgid2, n, category);
    if (translation == msg_ctxt_id || translation == msgid2)
        RETVAL = (n == 1 ? msgid1 : msgid2);
    else
        RETVAL = translation;
#line 552 "gettext_xs.c"
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Locale__gettext_xs__textdomain); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs__textdomain)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "domain");
    {
	char*	domain = (char *)SvPV_nolen(ST(0))
;
	char *	RETVAL;
	dXSTARG;
#line 216 "gettext_xs.xs"
	/* Treat empty or undefined strings as NULL.  */
	if (!domain || domain[0] == '\000')
		domain = NULL;
	RETVAL = (char*) textdomain (domain);
	if (!RETVAL || RETVAL[0] == '\000') {
		XSRETURN_UNDEF;
	}
#line 578 "gettext_xs.c"
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Locale__gettext_xs__nl_putenv); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs__nl_putenv)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "str");
    {
	char*	str = (char *)SvPV_nolen(ST(0))
;
	int	RETVAL;
	dXSTARG;
#line 233 "gettext_xs.xs"
#if defined (WIN32)
        RETVAL = _putenv (str);
#else
        RETVAL = 0;
#endif
#line 602 "gettext_xs.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Locale__gettext_xs__bindtextdomain); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs__bindtextdomain)
{
    dVAR; dXSARGS;
    if (items < 0 || items > 2)
       croak_xs_usage(cv,  "domain = NULL, dirname = NULL");
    {
	char*	domain;
	char*	dirname;
	char *	RETVAL;
	dXSTARG;

	if (items < 1)
	    domain = NULL;
	else {
	    domain = (char *)SvPV_nolen(ST(0))
;
	}

	if (items < 2)
	    dirname = NULL;
	else {
	    dirname = (char *)SvPV_nolen(ST(1))
;
	}
#line 247 "gettext_xs.xs"
	/* Treat empty or undefined strings as NULL.  */
	if (!domain || domain[0] == '\000')
		XSRETURN_UNDEF;
	if (!dirname || dirname[0] == '\000')
		dirname = NULL;
	RETVAL = (char*) bindtextdomain (domain, dirname);
	if (!RETVAL || RETVAL[0] == '\000') {
		XSRETURN_UNDEF;
	}

#line 645 "gettext_xs.c"
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Locale__gettext_xs_bind_textdomain_codeset); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs_bind_textdomain_codeset)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "domainname, codeset");
    {
	char*	domainname = (char *)SvPV_nolen(ST(0))
;
	char*	codeset = (char *)SvPV_nolen(ST(1))
;
	char *	RETVAL;
	dXSTARG;
#line 267 "gettext_xs.xs"
	/* Treat empty or undefined strings as NULL.  */
	if (!domainname || domainname[0] == '\000')
		domainname = NULL;
	if (!codeset || codeset[0] == '\000')
		codeset = NULL;
	RETVAL = (char*) bind_textdomain_codeset (domainname, codeset);
	if (!RETVAL || RETVAL[0] == '\000') {
		XSRETURN_UNDEF;
	}

#line 676 "gettext_xs.c"
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Locale__gettext_xs_setlocale); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Locale__gettext_xs_setlocale)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "category, locale = NULL");
    {
	int	category = (int)SvIV(ST(0))
;
	char *	locale;
	char *	RETVAL;
	dXSTARG;

	if (items < 2)
	    locale = NULL;
	else {
	    locale = (char *)SvPV_nolen(ST(1))
;
	}
#line 285 "gettext_xs.xs"
    	  RETVAL = (char*) setlocale (category, locale);
#line 704 "gettext_xs.c"
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}

#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_Locale__gettext_xs); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_Locale__gettext_xs)
{
#if PERL_VERSION_LE(5, 21, 5)
    dVAR; dXSARGS;
#else
    dVAR; dXSBOOTARGSXSAPIVERCHK;
#endif
#if (PERL_REVISION == 5 && PERL_VERSION < 9)
    char* file = __FILE__;
#else
    const char* file = __FILE__;
#endif

    PERL_UNUSED_VAR(file);

    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(items); /* -W */
#if PERL_VERSION_LE(5, 21, 5)
    XS_VERSION_BOOTCHECK;
#  ifdef XS_APIVERSION_BOOTCHECK
    XS_APIVERSION_BOOTCHECK;
#  endif
#endif

        (void)newXSproto_portable("Locale::gettext_xs::__gettext_xs_version", XS_Locale__gettext_xs___gettext_xs_version, file, "");
        (void)newXSproto_portable("Locale::gettext_xs::LC_CTYPE", XS_Locale__gettext_xs_LC_CTYPE, file, "");
        (void)newXSproto_portable("Locale::gettext_xs::LC_NUMERIC", XS_Locale__gettext_xs_LC_NUMERIC, file, "");
        (void)newXSproto_portable("Locale::gettext_xs::LC_TIME", XS_Locale__gettext_xs_LC_TIME, file, "");
        (void)newXSproto_portable("Locale::gettext_xs::LC_COLLATE", XS_Locale__gettext_xs_LC_COLLATE, file, "");
        (void)newXSproto_portable("Locale::gettext_xs::LC_MONETARY", XS_Locale__gettext_xs_LC_MONETARY, file, "");
        (void)newXSproto_portable("Locale::gettext_xs::LC_MESSAGES", XS_Locale__gettext_xs_LC_MESSAGES, file, "");
        (void)newXSproto_portable("Locale::gettext_xs::LC_ALL", XS_Locale__gettext_xs_LC_ALL, file, "");
        (void)newXSproto_portable("Locale::gettext_xs::gettext", XS_Locale__gettext_xs_gettext, file, "$");
        (void)newXSproto_portable("Locale::gettext_xs::dgettext", XS_Locale__gettext_xs_dgettext, file, "$$");
        (void)newXSproto_portable("Locale::gettext_xs::dcgettext", XS_Locale__gettext_xs_dcgettext, file, "$$$");
        (void)newXSproto_portable("Locale::gettext_xs::ngettext", XS_Locale__gettext_xs_ngettext, file, "$$$");
        (void)newXSproto_portable("Locale::gettext_xs::dngettext", XS_Locale__gettext_xs_dngettext, file, "$$$$");
        (void)newXSproto_portable("Locale::gettext_xs::dcngettext", XS_Locale__gettext_xs_dcngettext, file, "$$$$$");
        (void)newXSproto_portable("Locale::gettext_xs::_pgettext_aux", XS_Locale__gettext_xs__pgettext_aux, file, "$$$$");
        (void)newXSproto_portable("Locale::gettext_xs::_npgettext_aux", XS_Locale__gettext_xs__npgettext_aux, file, "$$$$$$");
        (void)newXSproto_portable("Locale::gettext_xs::_textdomain", XS_Locale__gettext_xs__textdomain, file, "$");
        (void)newXSproto_portable("Locale::gettext_xs::_nl_putenv", XS_Locale__gettext_xs__nl_putenv, file, "$");
        (void)newXSproto_portable("Locale::gettext_xs::_bindtextdomain", XS_Locale__gettext_xs__bindtextdomain, file, "$;$");
        (void)newXSproto_portable("Locale::gettext_xs::bind_textdomain_codeset", XS_Locale__gettext_xs_bind_textdomain_codeset, file, "$;$");
        (void)newXSproto_portable("Locale::gettext_xs::setlocale", XS_Locale__gettext_xs_setlocale, file, "$;$");
#if PERL_VERSION_LE(5, 21, 5)
#  if PERL_VERSION_GE(5, 9, 0)
    if (PL_unitcheckav)
        call_list(PL_scopestack_ix, PL_unitcheckav);
#  endif
    XSRETURN_YES;
#else
    Perl_xs_boot_epilog(aTHX_ ax);
#endif
}

