Skip to content

Commit aae52f8

Browse files
committed
Make sure GCC_VERSION is defined in SPPClient.h
Also updated comment
1 parent 18f3ace commit aae52f8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

SPPClient.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
#define L2CAP_RFCOMM_CONFIG_REQUEST 6
4242
#define L2CAP_RFCOMM_CONFIG_RESPONSE 7
4343

44+
#ifndef GCC_VERSION
45+
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
46+
#endif
47+
4448
/**
4549
* This BluetoothService class a Serial Port Protocol (SPP) client.
4650
* It inherits the Arduino Stream class. This allows it to use all the standard Arduino print functions.
@@ -57,7 +61,7 @@ class SPPClient : public SPPBase {
5761
*/
5862
SPPClient(BTD *p, const char *name = "Arduino", const char *pin = "0000", bool pair = false, uint8_t *addr = NULL);
5963

60-
#if GCC_VERSION > 40700 // Test for GCC > 4.7.0
64+
#if GCC_VERSION > 40700 // Test for GCC > 4.7.0 - then C++11 should be supported
6165
SPPClient(BTD *p, bool pair = false, uint8_t *addr = NULL) : SPPClient(p, "Arduino", "0000", pair, addr) {}; // Use a delegating constructor
6266
#endif
6367

0 commit comments

Comments
 (0)