Remove WITH_CXX ifdefs, always compiles as C++

This commit is contained in:
Aadi Desai 2023-05-12 17:28:23 +01:00
parent 8cd576fe6b
commit b7d2f6079f
No known key found for this signature in database

View file

@ -86,7 +86,6 @@ static void help(void) {
#endif #endif
puts("donut - Spinning Donut demo"); puts("donut - Spinning Donut demo");
puts("helloc - Hello C"); puts("helloc - Hello C");
#ifdef WITH_CXX
puts("hellocpp - Hello C++"); puts("hellocpp - Hello C++");
#ifdef CSR_LEDS_BASE #ifdef CSR_LEDS_BASE
puts("leds - Led set demo"); puts("leds - Led set demo");
@ -94,7 +93,6 @@ static void help(void) {
#ifdef CSR_AUDIO_BASE #ifdef CSR_AUDIO_BASE
puts("audio - Sawtooth Audio demo"); puts("audio - Sawtooth Audio demo");
#endif #endif
#endif
} }
/*-----------------------------------------------------------------------*/ /*-----------------------------------------------------------------------*/
@ -145,7 +143,6 @@ static void led_cmd(void) {
} }
#endif #endif
#ifdef WITH_CXX
#ifdef CSR_LEDS_BASE #ifdef CSR_LEDS_BASE
extern void leds(int); extern void leds(int);
@ -164,7 +161,6 @@ static void audio_cmd(char **val) {
audio(value); audio(value);
} }
#endif #endif
#endif
extern void donut(void); extern void donut(void);
@ -180,14 +176,12 @@ static void helloc_cmd(void) {
helloc(); helloc();
} }
#ifdef WITH_CXX
extern void hellocpp(void); extern void hellocpp(void);
static void hellocpp_cmd(void) { static void hellocpp_cmd(void) {
printf("Hello C++ demo...\n"); printf("Hello C++ demo...\n");
hellocpp(); hellocpp();
} }
#endif
/*-----------------------------------------------------------------------*/ /*-----------------------------------------------------------------------*/
/* Console service / Main */ /* Console service / Main */
@ -213,7 +207,6 @@ static void console_service(void) {
donut_cmd(); donut_cmd();
else if (strcmp(token, "helloc") == 0) else if (strcmp(token, "helloc") == 0)
helloc_cmd(); helloc_cmd();
#ifdef WITH_CXX
else if (strcmp(token, "hellocpp") == 0) else if (strcmp(token, "hellocpp") == 0)
hellocpp_cmd(); hellocpp_cmd();
#ifdef CSR_LEDS_BASE #ifdef CSR_LEDS_BASE
@ -223,7 +216,6 @@ static void console_service(void) {
#ifdef CSR_AUDIO_BASE #ifdef CSR_AUDIO_BASE
else if (strcmp(token, "audio") == 0) else if (strcmp(token, "audio") == 0)
audio_cmd(&str); audio_cmd(&str);
#endif
#endif #endif
prompt(); prompt();
} }