Correct #if to #ifdef when the macro can be undefined. Fix bug in AT24XX driver: it should compare AT24XX_ADDRSIZE to 2.

This commit is contained in:
Paul A. Patience
2015-09-01 09:04:09 -04:00
parent bb385c242f
commit 3b89eabd50
24 changed files with 79 additions and 79 deletions
+2 -2
View File
@@ -51,7 +51,7 @@
namespace std
{
#if CONFIG_HAVE_FLOAT
#ifdef CONFIG_HAVE_FLOAT
using ::acosf;
using ::asinf;
using ::atanf;
@@ -78,7 +78,7 @@ namespace std
using ::tanhf;
#endif
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
using ::acos;
using ::asin;
using ::atan;
+9 -9
View File
@@ -61,7 +61,7 @@
#define FLT_MANT_DIG 24
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
# define DBL_MANT_DIG 53
#else
# define DBL_MANT_DIG FLT_MANT_DIG
@@ -88,7 +88,7 @@
#define FLT_DIG 6
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
# define DBL_DIG 15 /* 10 */
#else
# define DBL_DIG FLT_DIG
@@ -106,7 +106,7 @@
#define FLT_MIN_EXP (-125)
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
# define DBL_MIN_EXP (-1021)
#else
# define DBL_MIN_EXP FLT_MIN_EXP
@@ -124,7 +124,7 @@
#define FLT_MIN_10_EXP (-37)
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
# define DBL_MIN_10_EXP (-307) /* -37 */
#else
# define DBL_MIN_10_EXP FLT_MIN_10_EXP
@@ -142,7 +142,7 @@
#define FLT_MAX_EXP 128
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
# define DBL_MAX_EXP 1024
#else
# define DBL_MAX_EXP FLT_MAX_EXP
@@ -160,7 +160,7 @@
#define FLT_MAX_10_EXP 38 /* 37 */
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
# define DBL_MAX_10_EXP 308 /* 37 */
#else
# define DBL_MAX_10_EXP FLT_MAX_10_EXP
@@ -176,7 +176,7 @@
#define FLT_MAX 3.40282347e+38F /* 1E+37 */
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
# define DBL_MAX 1.7976931348623157e+308 /* 1E+37 */
#else
# define DBL_MAX FLT_MAX
@@ -194,7 +194,7 @@
#define FLT_EPSILON 1.1920929e-07F /* 1E-5 */
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
# define DBL_EPSILON 2.2204460492503131e-16 /* 1E-9 */
#else
# define DBL_EPSILON FLT_EPSILON
@@ -210,7 +210,7 @@
#define FLT_MIN 1.17549435e-38F /* 1E-37 */
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
#define DBL_MIN 2.2250738585072014e-308 /* 1E-37 */
#else
# define DBL_MIN FLT_MIN
+31 -31
View File
@@ -128,7 +128,7 @@ extern "C"
/* General Functions ********************************************************/
float ceilf (float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double ceil (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -136,7 +136,7 @@ long double ceill (long double x);
#endif
float floorf(float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double floor (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -144,7 +144,7 @@ long double floorl(long double x);
#endif
float roundf(float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double round (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -152,7 +152,7 @@ long double roundl(long double x);
#endif
float rintf(float x); /* Not implemented */
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double rint(double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -160,7 +160,7 @@ long double rintl(long double x); /* Not implemented */
#endif
float fabsf (float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double fabs (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -168,7 +168,7 @@ long double fabsl (long double x);
#endif
float modff (float x, float *iptr);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double modf (double x, double *iptr);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -176,7 +176,7 @@ long double modfl (long double x, long double *iptr);
#endif
float fmodf (float x, float div);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double fmod (double x, double div);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -186,7 +186,7 @@ long double fmodl (long double x, long double div);
/* Exponential and Logarithmic Functions ************************************/
float powf (float b, float e);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double pow (double b, double e);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -195,7 +195,7 @@ long double powl (long double b, long double e);
float expf (float x);
#define expm1f(x) (expf(x) - 1.0)
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double exp (double x);
#define expm1(x) (exp(x) - 1.0)
#endif
@@ -205,7 +205,7 @@ long double expl (long double x);
#endif
float logf (float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double log (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -213,7 +213,7 @@ long double logl (long double x);
#endif
float log10f(float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double log10 (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -221,7 +221,7 @@ long double log10l(long double x);
#endif
float log2f (float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double log2 (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -229,7 +229,7 @@ long double log2l (long double x);
#endif
float sqrtf (float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double sqrt (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -237,7 +237,7 @@ long double sqrtl (long double x);
#endif
float ldexpf(float x, int n);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double ldexp (double x, int n);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -245,7 +245,7 @@ long double ldexpl(long double x, int n);
#endif
float frexpf(float x, int *exp);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double frexp (double x, int *exp);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -255,7 +255,7 @@ long double frexpl(long double x, int *exp);
/* Trigonometric Functions **************************************************/
float sinf (float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double sin (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -263,7 +263,7 @@ long double sinl (long double x);
#endif
float cosf (float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double cos (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -271,7 +271,7 @@ long double cosl (long double x);
#endif
float tanf (float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double tan (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -279,7 +279,7 @@ long double tanl (long double x);
#endif
float asinf (float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double asin (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -287,7 +287,7 @@ long double asinl (long double x);
#endif
float acosf (float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double acos (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -295,7 +295,7 @@ long double acosl (long double x);
#endif
float atanf (float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double atan (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -303,7 +303,7 @@ long double atanl (long double x);
#endif
float atan2f(float y, float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double atan2 (double y, double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -311,7 +311,7 @@ long double atan2l(long double y, long double x);
#endif
float sinhf (float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double sinh (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -319,7 +319,7 @@ long double sinhl (long double x);
#endif
float coshf (float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double cosh (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -327,7 +327,7 @@ long double coshl (long double x);
#endif
float tanhf (float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double tanh (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -335,7 +335,7 @@ long double tanhl (long double x);
#endif
float asinhf (float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double asinh (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -343,7 +343,7 @@ long double asinhl (long double x);
#endif
float acoshf (float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double acosh (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -351,7 +351,7 @@ long double acoshl (long double x);
#endif
float atanhf (float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double atanh (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -360,7 +360,7 @@ long double atanhl (long double x);
float erff (float x);
#define erfcf(x) (1 - erff(x))
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double erf (double x);
#define erfc(x) (1 - erf(x))
#endif
@@ -370,7 +370,7 @@ long double erfl (long double x);
#endif
float copysignf (float x, float y);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double copysign (double x, double y);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -378,7 +378,7 @@ long double copysignl (long double x, long double y);
#endif
float truncf (float x);
#if CONFIG_HAVE_DOUBLE
#ifdef CONFIG_HAVE_DOUBLE
double trunc (double x);
#endif
#ifdef CONFIG_HAVE_LONG_DOUBLE
+1 -1
View File
@@ -111,7 +111,7 @@
* RTC upper half driver is built.
*/
#if CONFIG_RTC_DRIVER
#ifdef CONFIG_RTC_DRIVER
/* IOCTL Commands ***********************************************************/
/* RTC driver IOCTL commands. These are Linux compatible command names, not