mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Fixed conflicts with isnan() and isinf() macros (fixes #752)
				
					
				
			This commit is contained in:
		| @@ -105,7 +105,7 @@ matrix: | ||||
|       compiler: clang | ||||
|       env: SCRIPT=cmake SANITIZE=address | ||||
|     - env: SCRIPT=arduino VERSION=1.6.7 BOARD=arduino:avr:uno | ||||
|     - env: SCRIPT=arduino VERSION=1.8.2 BOARD=arduino:avr:uno | ||||
|     - env: SCRIPT=arduino VERSION=1.8.2 BOARD=arduino:samd:mkr1000 | ||||
|     - env: SCRIPT=platformio BOARD=uno | ||||
|     - env: SCRIPT=platformio BOARD=esp01 | ||||
|     - compiler: clang | ||||
|   | ||||
| @@ -1,6 +1,11 @@ | ||||
| ArduinoJson: change log | ||||
| ======================= | ||||
|  | ||||
| HEAD | ||||
| ---- | ||||
|  | ||||
| * Fixed conflicts with `isnan()` and `isinf()` macros (issue #752) | ||||
|  | ||||
| v6.0.0-beta | ||||
| ----------- | ||||
|  | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| #!/bin/sh -eux | ||||
| #!/bin/bash -eux | ||||
|  | ||||
| /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16 | ||||
| sleep 3 | ||||
| @@ -6,9 +6,13 @@ export DISPLAY=:1.0 | ||||
|  | ||||
| mkdir -p /tmp/arduino | ||||
| curl -sS http://downloads.arduino.cc/arduino-$VERSION-linux64.tar.xz | tar xJ -C /tmp/arduino --strip 1 || | ||||
| curl -sS http://downloads.arduino.cc/arduino-$VERSION-linux64.tgz | tar xz -C /tmp/arduino --strip 1  | ||||
| curl -sS http://downloads.arduino.cc/arduino-$VERSION-linux64.tgz | tar xz -C /tmp/arduino --strip 1 | ||||
| export PATH=$PATH:/tmp/arduino/ | ||||
|    | ||||
|  | ||||
| if [[ "$BOARD" =~ "arduino:samd:" ]]; then | ||||
|   arduino --install-boards arduino:samd | ||||
| fi | ||||
|  | ||||
| ln -s $PWD /tmp/arduino/libraries/ArduinoJson | ||||
|  | ||||
| for EXAMPLE in $PWD/examples/*/*.ino; do | ||||
|   | ||||
| @@ -6,14 +6,22 @@ | ||||
|  | ||||
| namespace ArduinoJson { | ||||
| namespace Internals { | ||||
|  | ||||
| // Some libraries #define isnan() and isinf() so we need to check before | ||||
| // using this name | ||||
|  | ||||
| #ifndef isnan | ||||
| template <typename T> | ||||
| bool isnan(T x) { | ||||
|   return x != x; | ||||
| } | ||||
| #endif | ||||
|  | ||||
| #ifndef isinf | ||||
| template <typename T> | ||||
| bool isinf(T x) { | ||||
|   return x != 0.0 && x * 2 == x; | ||||
| } | ||||
| #endif | ||||
| }  // namespace Internals | ||||
| }  // namespace ArduinoJson | ||||
|   | ||||
		Reference in New Issue
	
	Block a user