/* Replaces , and allows our code to work on systems that don't * have that. */ #ifndef PERL_LANGINFO_H #define PERL_LANGINFO_H 1 #include "config.h" /* * Copyright (C) 2016 The Android Open Source Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #define CODESET 1 #define D_T_FMT 2 #define D_FMT 3 #define T_FMT 4 #define T_FMT_AMPM 5 #define AM_STR 6 #define PM_STR 7 #define DAY_1 8 #define DAY_2 9 #define DAY_3 10 #define DAY_4 11 #define DAY_5 12 #define DAY_6 13 #define DAY_7 14 #define ABDAY_1 15 #define ABDAY_2 16 #define ABDAY_3 17 #define ABDAY_4 18 #define ABDAY_5 19 #define ABDAY_6 20 #define ABDAY_7 21 #define MON_1 22 #define MON_2 23 #define MON_3 24 #define MON_4 25 #define MON_5 26 #define MON_6 27 #define MON_7 28 #define MON_8 29 #define MON_9 30 #define MON_10 31 #define MON_11 32 #define MON_12 33 #define ABMON_1 34 #define ABMON_2 35 #define ABMON_3 36 #define ABMON_4 37 #define ABMON_5 38 #define ABMON_6 39 #define ABMON_7 40 #define ABMON_8 41 #define ABMON_9 42 #define ABMON_10 43 #define ABMON_11 44 #define ABMON_12 45 #define ERA 46 #define ERA_D_FMT 47 #define ERA_D_T_FMT 48 #define ERA_T_FMT 49 #define ALT_DIGITS 50 #define RADIXCHAR 51 #define THOUSEP 52 #define YESEXPR 53 #define NOEXPR 54 #define CRNCYSTR 55 typedef int nl_item; /* Substitute 'int' for emulated nl_langinfo() */ char *nl_langinfo(nl_item item); /* NOTE that this file is parsed by ext/XS-APItest/t/locale.t, so be careful * with changes */ /* If foo doesn't exist define it to a negative number. */ #ifndef CODESET # define CODESET -1 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef D_T_FMT # define D_T_FMT -2 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef D_FMT # define D_FMT -3 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef T_FMT # define T_FMT -4 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef T_FMT_AMPM # define T_FMT_AMPM -5 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef AM_STR # define AM_STR -6 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef PM_STR # define PM_STR -7 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef DAY_1 # define DAY_1 -8 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef DAY_2 # define DAY_2 -9 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef DAY_3 # define DAY_3 -10 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef DAY_4 # define DAY_4 -11 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef DAY_5 # define DAY_5 -12 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef DAY_6 # define DAY_6 -13 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef DAY_7 # define DAY_7 -14 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ABDAY_1 # define ABDAY_1 -15 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ABDAY_2 # define ABDAY_2 -16 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ABDAY_3 # define ABDAY_3 -17 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ABDAY_4 # define ABDAY_4 -18 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ABDAY_5 # define ABDAY_5 -19 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ABDAY_6 # define ABDAY_6 -20 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ABDAY_7 # define ABDAY_7 -21 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef MON_1 # define MON_1 -22 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef MON_2 # define MON_2 -23 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef MON_3 # define MON_3 -24 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef MON_4 # define MON_4 -25 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef MON_5 # define MON_5 -26 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef MON_6 # define MON_6 -27 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef MON_7 # define MON_7 -28 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef MON_8 # define MON_8 -29 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef MON_9 # define MON_9 -30 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef MON_10 # define MON_10 -31 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef MON_11 # define MON_11 -32 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef MON_12 # define MON_12 -33 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ABMON_1 # define ABMON_1 -34 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ABMON_2 # define ABMON_2 -35 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ABMON_3 # define ABMON_3 -36 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ABMON_4 # define ABMON_4 -37 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ABMON_5 # define ABMON_5 -38 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ABMON_6 # define ABMON_6 -39 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ABMON_7 # define ABMON_7 -40 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ABMON_8 # define ABMON_8 -41 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ABMON_9 # define ABMON_9 -42 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ABMON_10 # define ABMON_10 -43 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ABMON_11 # define ABMON_11 -44 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ABMON_12 # define ABMON_12 -45 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ERA # define ERA -46 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ERA_D_FMT # define ERA_D_FMT -47 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ERA_D_T_FMT # define ERA_D_T_FMT -48 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ERA_T_FMT # define ERA_T_FMT -49 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef ALT_DIGITS # define ALT_DIGITS -50 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef RADIXCHAR # define RADIXCHAR -51 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef THOUSEP # define THOUSEP -52 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef YESEXPR # define YESEXPR -53 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef YESSTR # define YESSTR -54 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef NOEXPR # define NOEXPR -55 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef NOSTR # define NOSTR -56 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef CRNCYSTR # define CRNCYSTR -57 # define HAS_MISSING_LANGINFO_ITEM_ #endif /* The rest of the items are gnu extensions, and are not #defined by its * langinfo.h. There is a slight possibility that one of these numbers could * conflict with some other value, in which case after much gnashing of teeth * you will find this comment, and end up having to adjust the numbers. But * glibc values are not (so far) negative */ #ifndef _NL_ADDRESS_POSTAL_FMT # define _NL_ADDRESS_POSTAL_FMT -58 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_ADDRESS_COUNTRY_NAME # define _NL_ADDRESS_COUNTRY_NAME -59 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_ADDRESS_COUNTRY_POST # define _NL_ADDRESS_COUNTRY_POST -60 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_ADDRESS_COUNTRY_AB2 # define _NL_ADDRESS_COUNTRY_AB2 -61 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_ADDRESS_COUNTRY_AB3 # define _NL_ADDRESS_COUNTRY_AB3 -62 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_ADDRESS_COUNTRY_CAR # define _NL_ADDRESS_COUNTRY_CAR -63 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_ADDRESS_COUNTRY_NUM # define _NL_ADDRESS_COUNTRY_NUM -64 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_ADDRESS_COUNTRY_ISBN # define _NL_ADDRESS_COUNTRY_ISBN -65 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_ADDRESS_LANG_NAME # define _NL_ADDRESS_LANG_NAME -66 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_ADDRESS_LANG_AB # define _NL_ADDRESS_LANG_AB -67 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_ADDRESS_LANG_TERM # define _NL_ADDRESS_LANG_TERM -68 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_ADDRESS_LANG_LIB # define _NL_ADDRESS_LANG_LIB -69 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_IDENTIFICATION_TITLE # define _NL_IDENTIFICATION_TITLE -70 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_IDENTIFICATION_SOURCE # define _NL_IDENTIFICATION_SOURCE -71 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_IDENTIFICATION_ADDRESS # define _NL_IDENTIFICATION_ADDRESS -72 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_IDENTIFICATION_CONTACT # define _NL_IDENTIFICATION_CONTACT -73 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_IDENTIFICATION_EMAIL # define _NL_IDENTIFICATION_EMAIL -74 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_IDENTIFICATION_TEL # define _NL_IDENTIFICATION_TEL -75 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_IDENTIFICATION_FAX # define _NL_IDENTIFICATION_FAX -76 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_IDENTIFICATION_LANGUAGE # define _NL_IDENTIFICATION_LANGUAGE -77 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_IDENTIFICATION_TERRITORY # define _NL_IDENTIFICATION_TERRITORY -78 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_IDENTIFICATION_AUDIENCE # define _NL_IDENTIFICATION_AUDIENCE -79 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_IDENTIFICATION_APPLICATION # define _NL_IDENTIFICATION_APPLICATION -80 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_IDENTIFICATION_ABBREVIATION # define _NL_IDENTIFICATION_ABBREVIATION -81 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_IDENTIFICATION_REVISION # define _NL_IDENTIFICATION_REVISION -82 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_IDENTIFICATION_DATE # define _NL_IDENTIFICATION_DATE -83 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_IDENTIFICATION_CATEGORY # define _NL_IDENTIFICATION_CATEGORY -84 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_MEASUREMENT_MEASUREMENT # define _NL_MEASUREMENT_MEASUREMENT -85 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_NAME_NAME_FMT # define _NL_NAME_NAME_FMT -86 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_NAME_NAME_GEN # define _NL_NAME_NAME_GEN -87 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_NAME_NAME_MR # define _NL_NAME_NAME_MR -88 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_NAME_NAME_MRS # define _NL_NAME_NAME_MRS -89 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_NAME_NAME_MISS # define _NL_NAME_NAME_MISS -90 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_NAME_NAME_MS # define _NL_NAME_NAME_MS -91 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_PAPER_HEIGHT # define _NL_PAPER_HEIGHT -92 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_PAPER_WIDTH # define _NL_PAPER_WIDTH -93 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_TELEPHONE_TEL_INT_FMT # define _NL_TELEPHONE_TEL_INT_FMT -94 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_TELEPHONE_TEL_DOM_FMT # define _NL_TELEPHONE_TEL_DOM_FMT -95 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_TELEPHONE_INT_SELECT # define _NL_TELEPHONE_INT_SELECT -96 # define HAS_MISSING_LANGINFO_ITEM_ #endif #ifndef _NL_TELEPHONE_INT_PREFIX # define _NL_TELEPHONE_INT_PREFIX -97 #endif /* All these categories have to be emulated if not available on the platform */ #if ! LC_CTYPE_AVAIL_ \ || ! LC_MESSAGES_AVAIL_ \ || ! LC_MONETARY_AVAIL_ \ || ! LC_NUMERIC_AVAIL_ \ || ! LC_TIME_AVAIL_ \ || ! LC_ADDRESS_AVAIL_ \ || ! LC_IDENTIFICATION_AVAIL_ \ || ! LC_MEASUREMENT_AVAIL_ \ || ! LC_NAME_AVAIL_ \ || ! LC_PAPER_AVAIL_ \ || ! LC_TELEPHONE_AVAIL_ # define HAS_MISSING_LANGINFO_ITEM_ #endif #endif /* PERL_LANGINFO_H */