This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Increase $Devel::Peek::VERSION to 1.12
[perl5.git] / ext / I18N-Langinfo / Langinfo.xs
1 #define PERL_NO_GET_CONTEXT
2
3 #include "EXTERN.h"
4 #include "perl.h"
5 #include "XSUB.h"
6
7 #ifdef I_LANGINFO
8 #   define __USE_GNU 1 /* Enables YESSTR, otherwise only __YESSTR. */
9 #   include <langinfo.h>
10 #endif
11
12 #include "const-c.inc"
13
14 MODULE = I18N::Langinfo PACKAGE = I18N::Langinfo
15
16 PROTOTYPES: ENABLE
17
18 INCLUDE: const-xs.inc
19
20 SV*
21 langinfo(code)
22         int     code
23   PROTOTYPE: _
24   CODE:
25 #ifdef HAS_NL_LANGINFO
26         RETVAL = newSVpv(nl_langinfo(code), 0);
27 #else
28         croak("nl_langinfo() not implemented on this architecture");
29 #endif
30   OUTPUT:
31         RETVAL