Revert "[lldb][test] Remove compiler version check and use regex" (#124101)
[llvm-project.git] / libc / src / locale / localeconv.cpp
blobe4d7536bf1ffb7f7cb8d264e49a2188081697d89
1 //===-- Implementation of localeconv --------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "src/locale/localeconv.h"
11 #include "src/__support/CPP/limits.h"
12 #include "src/__support/common.h"
13 #include "src/__support/macros/config.h"
15 namespace LIBC_NAMESPACE_DECL {
17 static char DOT_STRING[] = ".";
18 static char EMPTY_STRING[] = "";
20 static struct lconv C_LCONV = {
21 .decimal_point = DOT_STRING,
22 .thousands_sep = EMPTY_STRING,
23 .grouping = EMPTY_STRING,
24 .mon_decimal_point = EMPTY_STRING,
25 .mon_thousands_sep = EMPTY_STRING,
26 .mon_grouping = EMPTY_STRING,
27 .positive_sign = EMPTY_STRING,
28 .negative_sign = EMPTY_STRING,
29 .currency_symbol = EMPTY_STRING,
30 .frac_digits = CHAR_MAX,
31 .p_cs_precedes = CHAR_MAX,
32 .n_cs_precedes = CHAR_MAX,
33 .p_sep_by_space = CHAR_MAX,
34 .n_sep_by_space = CHAR_MAX,
35 .p_sign_posn = CHAR_MAX,
36 .n_sign_posn = CHAR_MAX,
37 .int_curr_symbol = EMPTY_STRING,
38 .int_frac_digits = CHAR_MAX,
39 .int_p_cs_precedes = CHAR_MAX,
40 .int_n_cs_precedes = CHAR_MAX,
41 .int_p_sep_by_space = CHAR_MAX,
42 .int_n_sep_by_space = CHAR_MAX,
43 .int_p_sign_posn = CHAR_MAX,
44 .int_n_sign_posn = CHAR_MAX,
47 LLVM_LIBC_FUNCTION(struct lconv *, localeconv, ()) { return &C_LCONV; }
49 } // namespace LIBC_NAMESPACE_DECL