Commit Graph

28 Commits

Author SHA1 Message Date
ligd cdccce48ac libcxx: fix compile error
from ServiceManager.cpp:17:
/home/ligd/platform/dev/apps/external/android/frameworks/native/libs/binder/ndk/include_cpp/android/binder_to_string.h:71:24: error: expected nested-name-specifier before numeric constant
   71 |     template <typename _U>
      |                        ^~
/home/ligd/platform/dev/apps/external/android/frameworks/native/libs/binder/ndk/include_cpp/android/binder_to_string.h:71:24: error: expected ‘>’ before numeric constant
In file included from /home/ligd/platform/dev/apps/external/android/frameworks/native/libs/binder/aidl/android/os/ConnectionInfo.h:3,
                 from /home/ligd/platform/dev/apps/external/android/frameworks/native/libs/binder/aidl/android/os/IServiceManager.h:3,
                 from /home/ligd/platform/dev/apps/external/android/frameworks/native/libs/binder/aidl/android/os/BnServiceManager.h:4:
/home/ligd/platform/dev/apps/external/android/frameworks/native/libs/binder/ndk/include_cpp/android/binder_to_string.h:72:56: error: no matching function for call to ‘declval<1>()’
   72 |     static auto _test(int) -> decltype(std::declval<_U>().toString(), std::true_type());
      |                                        ~~~~~~~~~~~~~~~~^~
In file included from /home/ligd/platform/dev/nuttx/include/libcxx/__type_traits/is_convertible.h:18,

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-23 09:42:57 +08:00
Philippe Leduc 80e578c9aa Fix ctypes.h locale macro 2024-10-08 08:13:42 +08:00
Alin Jerpelea cd2fcf5252 include: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-10-04 08:18:42 +08:00
xuxin19 1bbcbc3440 ctype.h:move locale macro define to lib_ctype file
Macro definitions such as _S in public header files can cause compilation problems under the MSVC compiler.
Move macro definitions that are not used in public locations to the corresponding files

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-30 19:29:34 +08:00
Philippe Leduc 3dc6b4c9bd Add basic support for locales in order to C++ streams to build and work for simple cases (POSIX / C locale).
Fix build with C++ GCC toolchain
2024-04-29 17:34:10 +08:00
dongjiuzhu1 edbeb5cdd9 libs/ctype/toupper_l: Implement function toupper_l instead of macro
toupper_l will be replaced by toupper, resulting in infinite recursion, so implement toupper_l

stack:
0  std::__1::ctype_byname<char>::do_toupper (this=0xf3888120, c=49 '1') at libcxx/src/locale.cpp:1231
1  0x005b8188 in std::__1::ctype<char>::toupper (__c=49 '1', this=0xf3888120) at nuttx/include/libcxx/__locale:667
2  std::__1::ctype_byname<char>::do_toupper (this=0xf3888120, c=49 '1') at libcxx/src/locale.cpp:1231
3  0x005b8188 in std::__1::ctype<char>::toupper (__c=49 '1', this=0xf3888120) at nuttx/include/libcxx/__locale:667
4  std::__1::ctype_byname<char>::do_toupper (this=0xf3888120, c=49 '1') at libcxx/src/locale.cpp:1231
5  0x0064cfc9 in std::__1::ctype<char>::toupper (__c=49 '1', this=0xf3888120) at nuttx/include/libcxx/__locale:667
6  std::__1::__scan_keyword<char*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, std::__1::ctype<char> > (__b=@0xf38871a0: 0xf3887220 "11:55:59 PM",
   __e=0xf388722b "", __kb=0xf2c03990, __ke=0xf2c03a38, __ct=..., __err=@0xf38871b0: 0, __case_sensitive=false) at nuttx/include/libcxx/locale:299
7  0x005cb0ed in std::__1::__time_get_storage<char>::__analyze (this=0xf2c0398c, fmt=114 'r', ct=...) at libcxx/src/locale.cpp:4998
8  0x005cf888 in std::__1::__time_get_storage<char>::init (this=0xf2c0398c, ct=...) at libcxx/src/locale.cpp:5295
9  0x005d4d0f in std::__1::__time_get_storage<char>::__time_get_storage (this=0xf2c0398c, __nm=...) at libcxx/src/locale.cpp:5399
10 0x005b15c8 in std::__1::time_get_byname<char, std::__1::istreambuf_iterator<char, std::__1::char_traits<char> > >::time_get_byname (__refs=0, __nm=..., this=0xf2c03980)
   at nuttx/include/libcxx/locale:2446
11 std::__1::locale::__imp::__imp (this=0xf2803970, name=..., refs=0) at libcxx/src/locale.cpp:268
12 0x005b333e in std::__1::locale::locale (this=0xf3888f00, name=0x6ca340 "C") at libcxx/src/locale.cpp:562
13 0x0058313b in helloxx_main (argc=1, argv=0xf3878810) at helloxx_main.cxx:112
14 0x0048471a in nxtask_startup (entrypt=0x5830a0 <helloxx_main(int, char**)>, argc=1, argv=0xf3878810) at sched/task_startup.c:70
15 0x00431bcd in nxtask_start () at task/task_start.c:134
16 0x0048f643 in pre_start () at sim/sim_initialstate.c:52
17 0x00000000 in ?? ()

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-08-22 00:07:16 +08:00
Xiang Xiao cdc781bdfd libc: Implement local_t related functions
since local_t isn't really implemented on NuttX,
we can simply redirect to the non-locale version.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-30 09:43:26 -03:00
Alin Jerpelea 9b9be7e1f0 include: Author: Gregory Nutt: update licenses to Apache 2.0
Update files from Gregory Nutt to Apache 2.0 license.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-04 03:33:58 -08:00
chao.an c8784faf3c ctype/iscntrl: correct the control character function
all the characters placed before the space on the ASCII table
and the 0x7F character (DEL) are control characters.

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-05 01:34:36 -06:00
Xiang Xiao 297c294c0f libc: Change ctype macro to normal function
to avoid the argument evaluation more than once

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ib59c9bc8d259731bc6e7ff542379b74ba22d6e33
2020-08-21 16:56:00 +08:00
Xiang Xiao 60fe0a0f96 libc: Refine the inline handling
1.Remove CONFIG_HAVE_INLINE macro
2.Change the ANSI C function to normal function
3.Other simple non ANSI function to macro

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-04 11:10:29 +09:00
Xiang Xiao a7174cee30 libc: Unify the selection of inline or macro
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I44a26550ff856af07d2d96a6f0a6066f988d6da3
2020-06-02 09:32:25 -06:00
Gregory Nutt 1dabbd8489 Costmetic changes 2016-10-24 16:18:30 -06:00
Gregory Nutt aac8634de2 ctype.h: Correct some dangling garbage from the last change 2016-10-22 10:12:10 -06:00
Gregory Nutt c08cb7ddea Implement ctype.h functions as inline if possible. cctype can then properly select namespace. 2016-10-22 08:18:00 -06:00
Alan Carvalho de Assis 53700fc71f Add isblank() macro to ctype.h 2016-10-19 07:22:13 -06:00
Gregory Nutt b578c98fa9 Clean up and review of header files for conformance to standards 2015-06-12 19:26:01 -06:00
Gregory Nutt 006a430029 ctypes.h: Fix typo in macro name iscontrol->iscntrl 2014-01-18 13:22:20 -06:00
patacongo 43356a28a1 Fix bad AVR C++ include paths; remove stray typo from ctypes.h
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5024 42af7a65-404d-4744-a932-0658087f49c3
2012-08-13 14:02:06 +00:00
patacongo 8e5733ae3f Header file clean-up
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4948 42af7a65-404d-4744-a932-0658087f49c3
2012-07-17 03:58:11 +00:00
patacongo 45f3419063 header file and file header clean-up
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3434 42af7a65-404d-4744-a932-0658087f49c3
2011-03-28 21:21:11 +00:00
patacongo eeec4073a9 Switching to C99 stdint.h types
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2340 42af7a65-404d-4744-a932-0658087f49c3
2009-12-14 23:32:23 +00:00
patacongo 85911f6a9d cosmetic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1256 42af7a65-404d-4744-a932-0658087f49c3
2008-11-16 16:36:30 +00:00
patacongo 2e86454b82 fix isupper()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@228 42af7a65-404d-4744-a932-0658087f49c3
2007-05-19 00:21:22 +00:00
patacongo 3f1b80218e Restructure header files for POSIX compliance; eliminate compile warnings
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@107 42af7a65-404d-4744-a932-0658087f49c3
2007-03-20 16:51:12 +00:00
patacongo 435fe50ea6 Fix IRQ-related bugs, fix serial read logic, add fgets
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@51 42af7a65-404d-4744-a932-0658087f49c3
2007-03-10 00:17:29 +00:00
patacongo 3c0e634aee Eliminating GCC dependencies
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@14 42af7a65-404d-4744-a932-0658087f49c3
2007-02-20 22:39:56 +00:00
patacongo b08a86171f NuttX RTOS
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3 42af7a65-404d-4744-a932-0658087f49c3
2007-02-17 23:21:28 +00:00