Skip to content

Commit

Permalink
Add stdbool.h detection for C++ to cc.h
Browse files Browse the repository at this point in the history
  • Loading branch information
j123b567 committed Jan 16, 2023
1 parent 224f7ce commit 9abae50
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion libscpi/inc/scpi/cc.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ extern "C" {
# endif
#endif

#if defined(__cplusplus)
# if (__cplusplus >= 199711)
# define CXX98
# endif
#endif

#if (defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 200809L) || \
(defined _XOPEN_SOURCE && _XOPEN_SOURCE >= 700)
#define HAVE_STRNDUP 1
Expand Down Expand Up @@ -104,7 +110,7 @@ extern "C" {
#define HAVE_STRTOF 1
#endif

#if (defined _ISOC99_SOURCE && _ISOC99_SOURCE) || C99
#if (defined _ISOC99_SOURCE && _ISOC99_SOURCE) || C99 || CXX98
#define HAVE_STDBOOL 1
#endif

Expand Down

0 comments on commit 9abae50

Please sign in to comment.