This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new cdccce48ac libcxx: fix compile error
cdccce48ac is described below

commit cdccce48ac5fb0a2a519f3b3941e7d7a81b577b6
Author: ligd <[email protected]>
AuthorDate: Thu Oct 17 21:54:47 2024 +0800

    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 <[email protected]>
---
 include/ctype.h             | 2 +-
 libs/libc/ctype/lib_ctype.c | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/include/ctype.h b/include/ctype.h
index 554ece9553..2282bd09db 100644
--- a/include/ctype.h
+++ b/include/ctype.h
@@ -35,7 +35,7 @@
 #include <nuttx/compiler.h>
 #include <langinfo.h>
 
-#ifndef _MSC_VER
+#ifdef CONFIG_LIBCXXTOOLCHAIN
 
 /* GNU libstdc++ is expecting ctype.h to define a few macros for
  * locale related functions like C++ streams.
diff --git a/libs/libc/ctype/lib_ctype.c b/libs/libc/ctype/lib_ctype.c
index b97076cc97..d369a33f31 100644
--- a/libs/libc/ctype/lib_ctype.c
+++ b/libs/libc/ctype/lib_ctype.c
@@ -32,7 +32,7 @@
  * Macro Definitions
  ****************************************************************************/
 
-#if defined(_MSC_VER)
+#ifndef CONFIG_LIBCXXTOOLCHAIN
 
 /* MSVC seems to conflict with theses macro if defined in the public area.
  * As such, they are defined in the private section to let NuttX build
@@ -47,7 +47,7 @@
 #define _X  0100
 #define _B  0200
 
-#endif
+#else
 
 /****************************************************************************
  * Private Types
@@ -98,3 +98,6 @@ const char _ctype_[] =
 /****************************************************************************
  * Private Functions
  ****************************************************************************/
+
+#endif
+

Reply via email to