You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/11/27 09:15:48 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #2418: libc: Don't define OK in C++ context like ERROR

xiaoxiang781216 commented on pull request #2418:
URL: https://github.com/apache/incubator-nuttx/pull/2418#issuecomment-734731649


   > why is it conditional on C++?
   
   Because many C++ code define OK as enum like this:
   ```
   enum Code {
     OK = 0,
     ....
   };
   ```
   And it also follow how ERROR definition in NuttX:
   ```
   #if !defined(__cplusplus)
   #  undef  ERROR
   #  define ERROR -1
   #endif
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org