Commit | Line | Data |
---|---|---|
810ec442 NC |
1 | #define PERL_NO_GET_CONTEXT |
2 | ||
4bbcc6e8 JH |
3 | #include "EXTERN.h" |
4 | #include "perl.h" | |
5 | #include "XSUB.h" | |
6 | ||
7 | #ifdef I_LANGINFO | |
f53b541b | 8 | # define __USE_GNU 1 /* Enables YESSTR, otherwise only __YESSTR. */ |
4bbcc6e8 JH |
9 | # include <langinfo.h> |
10 | #endif | |
11 | ||
1cb0fb50 | 12 | #include "const-c.inc" |
4bbcc6e8 JH |
13 | |
14 | MODULE = I18N::Langinfo PACKAGE = I18N::Langinfo | |
15 | ||
16 | PROTOTYPES: ENABLE | |
17 | ||
1cb0fb50 | 18 | INCLUDE: const-xs.inc |
4bbcc6e8 JH |
19 | |
20 | SV* | |
d16d4b10 | 21 | langinfo(code) |
4bbcc6e8 | 22 | int code |
d16d4b10 | 23 | PROTOTYPE: _ |
4bbcc6e8 | 24 | CODE: |
8b26484b | 25 | #ifdef HAS_NL_LANGINFO |
7e203150 | 26 | RETVAL = newSVpv(nl_langinfo(code), 0); |
8b26484b JH |
27 | #else |
28 | croak("nl_langinfo() not implemented on this architecture"); | |
29 | #endif | |
4bbcc6e8 JH |
30 | OUTPUT: |
31 | RETVAL |