Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perl_langinfo.h: Fix to work on Android #22650

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 45 additions & 43 deletions perl_langinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,68 +252,70 @@ typedef int nl_item; /* Substitute 'int' for emulated nl_langinfo() */
* 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 */
#if ! defined(HAS_NL_LANGINFO) || ! defined(LC_ADDRESS)
# define _NL_ADDRESS_POSTAL_FMT -58
* glibc values are not (so far) negative.
*
* Android is special in that it doesn't define any of these, but has the
* corresponding category */
#if defined(__ANDROID__) || ! defined(HAS_NL_LANGINFO) || ! defined(LC_ADDRESS)
# define _NL_ADDRESS_POSTAL_FMT -58
# define _NL_ADDRESS_COUNTRY_NAME -59
# define _NL_ADDRESS_COUNTRY_POST -60
# define _NL_ADDRESS_COUNTRY_AB2 -61
# define _NL_ADDRESS_COUNTRY_AB3 -62
# define _NL_ADDRESS_COUNTRY_CAR -63
# define _NL_ADDRESS_COUNTRY_NUM -64
# define _NL_ADDRESS_COUNTRY_AB2 -61
# define _NL_ADDRESS_COUNTRY_AB3 -62
# define _NL_ADDRESS_COUNTRY_CAR -63
# define _NL_ADDRESS_COUNTRY_NUM -64
# define _NL_ADDRESS_COUNTRY_ISBN -65
# define _NL_ADDRESS_LANG_NAME -66
# define _NL_ADDRESS_LANG_AB -67
# define _NL_ADDRESS_LANG_TERM -68
# define _NL_ADDRESS_LANG_LIB -69
# define _NL_ADDRESS_LANG_NAME -66
# define _NL_ADDRESS_LANG_AB -67
# define _NL_ADDRESS_LANG_TERM -68
# define _NL_ADDRESS_LANG_LIB -69

# define HAS_MISSING_LANGINFO_ITEM_
#endif
#if ! defined(HAS_NL_LANGINFO) || ! defined(LC_IDENTIFICATION)
# define _NL_IDENTIFICATION_TITLE -70
# define _NL_IDENTIFICATION_SOURCE -71
# define _NL_IDENTIFICATION_ADDRESS -72
# define _NL_IDENTIFICATION_CONTACT -73
# define _NL_IDENTIFICATION_EMAIL -74
# define _NL_IDENTIFICATION_TEL -75
# define _NL_IDENTIFICATION_FAX -76
# define _NL_IDENTIFICATION_LANGUAGE -77
# define _NL_IDENTIFICATION_TERRITORY -78
# define _NL_IDENTIFICATION_AUDIENCE -79
# define _NL_IDENTIFICATION_APPLICATION -80
#if defined(__ANDROID__) || ! defined(HAS_NL_LANGINFO) || ! defined(LC_IDENTIFICATION)
# define _NL_IDENTIFICATION_TITLE -70
# define _NL_IDENTIFICATION_SOURCE -71
# define _NL_IDENTIFICATION_ADDRESS -72
# define _NL_IDENTIFICATION_CONTACT -73
# define _NL_IDENTIFICATION_EMAIL -74
# define _NL_IDENTIFICATION_TEL -75
# define _NL_IDENTIFICATION_FAX -76
# define _NL_IDENTIFICATION_LANGUAGE -77
# define _NL_IDENTIFICATION_TERRITORY -78
# define _NL_IDENTIFICATION_AUDIENCE -79
# define _NL_IDENTIFICATION_APPLICATION -80
# define _NL_IDENTIFICATION_ABBREVIATION -81
# define _NL_IDENTIFICATION_REVISION -82
# define _NL_IDENTIFICATION_DATE -83
# define _NL_IDENTIFICATION_CATEGORY -84
# define _NL_IDENTIFICATION_REVISION -82
# define _NL_IDENTIFICATION_DATE -83
# define _NL_IDENTIFICATION_CATEGORY -84

# define HAS_MISSING_LANGINFO_ITEM_
#endif
#if ! defined(HAS_NL_LANGINFO) || ! defined(LC_MEASUREMENT)
#if defined(__ANDROID__) || ! defined(HAS_NL_LANGINFO) || ! defined(LC_MEASUREMENT)
# define _NL_MEASUREMENT_MEASUREMENT -85

# define HAS_MISSING_LANGINFO_ITEM_
#endif
#if ! defined(HAS_NL_LANGINFO) || ! defined(LC_NAME)
# define _NL_NAME_NAME_FMT -86
# define _NL_NAME_NAME_GEN -87
# define _NL_NAME_NAME_MR -88
# define _NL_NAME_NAME_MRS -89
# define _NL_NAME_NAME_MISS -90
# define _NL_NAME_NAME_MS -91
#if defined(__ANDROID__) || ! defined(HAS_NL_LANGINFO) || ! defined(LC_NAME)
# define _NL_NAME_NAME_FMT -86
# define _NL_NAME_NAME_GEN -87
# define _NL_NAME_NAME_MR -88
# define _NL_NAME_NAME_MRS -89
# define _NL_NAME_NAME_MISS -90
# define _NL_NAME_NAME_MS -91

# define HAS_MISSING_LANGINFO_ITEM_
#endif
#if ! defined(HAS_NL_LANGINFO) || ! defined(LC_PAPER)
# define _NL_PAPER_HEIGHT -92
# define _NL_PAPER_WIDTH -93
#if defined(__ANDROID__) || ! defined(HAS_NL_LANGINFO) || ! defined(LC_PAPER)
# define _NL_PAPER_HEIGHT -92
# define _NL_PAPER_WIDTH -93

# define HAS_MISSING_LANGINFO_ITEM_
#endif
#if ! defined(HAS_NL_LANGINFO) || ! defined(LC_TELEPHONE)
# define _NL_TELEPHONE_TEL_INT_FMT -94
# define _NL_TELEPHONE_TEL_DOM_FMT -95
# define _NL_TELEPHONE_INT_SELECT -96
# define _NL_TELEPHONE_INT_PREFIX -97
#if defined(__ANDROID__) || ! defined(HAS_NL_LANGINFO) || ! defined(LC_TELEPHONE)
# define _NL_TELEPHONE_TEL_INT_FMT -94
# define _NL_TELEPHONE_TEL_DOM_FMT -95
# define _NL_TELEPHONE_INT_SELECT -96
# define _NL_TELEPHONE_INT_PREFIX -97

# define HAS_MISSING_LANGINFO_ITEM_
#endif
Expand Down
Loading