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
+1 -1
View File
@@ -77,7 +77,7 @@ int up_cryptoinitialize(void)
} }
#endif #endif
#if CONFIG_CRYPTO_ALGTEST #ifdef CONFIG_CRYPTO_ALGTEST
res = crypto_test(); res = crypto_test();
if (res) if (res)
{ {
+1 -1
View File
@@ -356,7 +356,7 @@ static ssize_t at24c_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t
while (blocksleft-- > 0) while (blocksleft-- > 0)
{ {
#if AT24XX_ADDRSIZE #if AT24XX_ADDRSIZE == 2
uint16_t offset = startblock * priv->pagesize; uint16_t offset = startblock * priv->pagesize;
buf[1] = offset & 0xff; buf[1] = offset & 0xff;
buf[0] = (offset >> 8) & 0xff; buf[0] = (offset >> 8) & 0xff;
+5 -5
View File
@@ -1411,19 +1411,19 @@ static inline void dm9x_phymode(struct dm9x_driver_s *dm9x)
uint16_t phyreg0; uint16_t phyreg0;
uint16_t phyreg4; uint16_t phyreg4;
#if CONFIG_DM9X_MODE_AUTO #ifdef CONFIG_DM9X_MODE_AUTO
phyreg0 = 0x1200; /* Auto-negotiation & Restart Auto-negotiation */ phyreg0 = 0x1200; /* Auto-negotiation & Restart Auto-negotiation */
phyreg4 = 0x01e1; /* Default flow control disable*/ phyreg4 = 0x01e1; /* Default flow control disable*/
#elif CONFIG_DM9X_MODE_10MHD #elif defined(CONFIG_DM9X_MODE_10MHD)
phyreg4 = 0x21; phyreg4 = 0x21;
phyreg0 = 0x1000; phyreg0 = 0x1000;
#elif CONFIG_DM9X_MODE_10MFD #elif defined(CONFIG_DM9X_MODE_10MFD)
phyreg4 = 0x41; phyreg4 = 0x41;
phyreg0 = 0x1100; phyreg0 = 0x1100;
#elif CONFIG_DM9X_MODE_100MHD #elif defined(CONFIG_DM9X_MODE_100MHD)
phyreg4 = 0x81; phyreg4 = 0x81;
phyreg0 = 0x3000; phyreg0 = 0x3000;
#elif CONFIG_DM9X_MODE_100MFD #elif defined(CONFIG_DM9X_MODE_100MFD)
phyreg4 = 0x101; phyreg4 = 0x101;
phyreg0 = 0x3100; phyreg0 = 0x3100;
#else #else
+1 -1
View File
@@ -55,7 +55,7 @@
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
#if CONFIG_DEBUG #ifdef CONFIG_DEBUG
# include <nuttx/arch.h> # include <nuttx/arch.h>
#endif #endif
+1 -1
View File
@@ -954,7 +954,7 @@ int uart_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup)
/* Some sanity checking */ /* Some sanity checking */
#if CONFIG_DEBUG #ifdef CONFIG_DEBUG
if (!dev || !fds) if (!dev || !fds)
{ {
return -ENODEV; return -ENODEV;
+6 -6
View File
@@ -645,7 +645,7 @@ static int cdcacm_setconfig(FAR struct cdcacm_dev_s *priv, uint8_t config)
int i; int i;
int ret = 0; int ret = 0;
#if CONFIG_DEBUG #ifdef CONFIG_DEBUG
if (priv == NULL) if (priv == NULL)
{ {
usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0);
@@ -1765,7 +1765,7 @@ static int cdcuart_setup(FAR struct uart_dev_s *dev)
/* Sanity check */ /* Sanity check */
#if CONFIG_DEBUG #ifdef CONFIG_DEBUG
if (!dev || !dev->priv) if (!dev || !dev->priv)
{ {
usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0);
@@ -1806,7 +1806,7 @@ static void cdcuart_shutdown(FAR struct uart_dev_s *dev)
/* Sanity check */ /* Sanity check */
#if CONFIG_DEBUG #ifdef CONFIG_DEBUG
if (!dev || !dev->priv) if (!dev || !dev->priv)
{ {
usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0);
@@ -2065,7 +2065,7 @@ static void cdcuart_rxint(FAR struct uart_dev_s *dev, bool enable)
/* Sanity check */ /* Sanity check */
#if CONFIG_DEBUG #ifdef CONFIG_DEBUG
if (!dev || !dev->priv) if (!dev || !dev->priv)
{ {
usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0);
@@ -2194,7 +2194,7 @@ static void cdcuart_txint(FAR struct uart_dev_s *dev, bool enable)
/* Sanity checks */ /* Sanity checks */
#if CONFIG_DEBUG #ifdef CONFIG_DEBUG
if (!dev || !dev->priv) if (!dev || !dev->priv)
{ {
usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0);
@@ -2237,7 +2237,7 @@ static bool cdcuart_txempty(FAR struct uart_dev_s *dev)
usbtrace(CDCACM_CLASSAPI_TXEMPTY, 0); usbtrace(CDCACM_CLASSAPI_TXEMPTY, 0);
#if CONFIG_DEBUG #ifdef CONFIG_DEBUG
if (!priv) if (!priv)
{ {
usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0);
+6 -6
View File
@@ -1046,7 +1046,7 @@ static int usbclass_setconfig(FAR struct pl2303_dev_s *priv, uint8_t config)
int i; int i;
int ret = 0; int ret = 0;
#if CONFIG_DEBUG #ifdef CONFIG_DEBUG
if (priv == NULL) if (priv == NULL)
{ {
usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0);
@@ -2016,7 +2016,7 @@ static int usbser_setup(FAR struct uart_dev_s *dev)
/* Sanity check */ /* Sanity check */
#if CONFIG_DEBUG #ifdef CONFIG_DEBUG
if (!dev || !dev->priv) if (!dev || !dev->priv)
{ {
usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0);
@@ -2057,7 +2057,7 @@ static void usbser_shutdown(FAR struct uart_dev_s *dev)
/* Sanity check */ /* Sanity check */
#if CONFIG_DEBUG #ifdef CONFIG_DEBUG
if (!dev || !dev->priv) if (!dev || !dev->priv)
{ {
usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0);
@@ -2119,7 +2119,7 @@ static void usbser_rxint(FAR struct uart_dev_s *dev, bool enable)
/* Sanity check */ /* Sanity check */
#if CONFIG_DEBUG #ifdef CONFIG_DEBUG
if (!dev || !dev->priv) if (!dev || !dev->priv)
{ {
usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0);
@@ -2210,7 +2210,7 @@ static void usbser_txint(FAR struct uart_dev_s *dev, bool enable)
/* Sanity checks */ /* Sanity checks */
#if CONFIG_DEBUG #ifdef CONFIG_DEBUG
if (!dev || !dev->priv) if (!dev || !dev->priv)
{ {
usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0);
@@ -2253,7 +2253,7 @@ static bool usbser_txempty(FAR struct uart_dev_s *dev)
usbtrace(PL2303_CLASSAPI_TXEMPTY, 0); usbtrace(PL2303_CLASSAPI_TXEMPTY, 0);
#if CONFIG_DEBUG #ifdef CONFIG_DEBUG
if (!priv) if (!priv)
{ {
usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0);
+1 -1
View File
@@ -934,7 +934,7 @@ int usbmsc_setconfig(FAR struct usbmsc_dev_s *priv, uint8_t config)
int i; int i;
int ret = 0; int ret = 0;
#if CONFIG_DEBUG #ifdef CONFIG_DEBUG
if (priv == NULL) if (priv == NULL)
{ {
usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_SETCONFIGINVALIDARGS), 0); usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_SETCONFIGINVALIDARGS), 0);
+2 -2
View File
@@ -811,7 +811,7 @@ static int ovr2640_chipid(FAR struct i2c_dev_s *i2c)
{ {
uint8_t pidl; uint8_t pidl;
uint8_t pidh; uint8_t pidh;
#if CONFIG_DEBUG_GRAPHICS #ifdef CONFIG_DEBUG_GRAPHICS
uint8_t midh; uint8_t midh;
uint8_t midl; uint8_t midl;
#endif #endif
@@ -829,7 +829,7 @@ static int ovr2640_chipid(FAR struct i2c_dev_s *i2c)
pidl = ov2640_getreg(i2c, 0x0a); /* Product ID (MS) */ pidl = ov2640_getreg(i2c, 0x0a); /* Product ID (MS) */
pidh = ov2640_getreg(i2c, 0x0b); /* Product ID (LS) */ pidh = ov2640_getreg(i2c, 0x0b); /* Product ID (LS) */
#if CONFIG_DEBUG_GRAPHICS #ifdef CONFIG_DEBUG_GRAPHICS
midh = ov2640_getreg(i2c, 0x1c); /* Manufacturer ID (high) = 0x7f */ midh = ov2640_getreg(i2c, 0x1c); /* Manufacturer ID (high) = 0x7f */
midl = ov2640_getreg(i2c, 0x1d); /* Manufacturer ID (low) = 0xa2 */ midl = ov2640_getreg(i2c, 0x1d); /* Manufacturer ID (low) = 0xa2 */
#endif #endif
+1 -1
View File
@@ -81,7 +81,7 @@
* *
****************************************************************************/ ****************************************************************************/
#if CONFIG_FB_CMAP #ifdef CONFIG_FB_CMAP
int nxbe_colormap(FAR NX_DRIVERTYPE *dev) int nxbe_colormap(FAR NX_DRIVERTYPE *dev)
{ {
struct fb_cmap_s cmap; struct fb_cmap_s cmap;
+1 -1
View File
@@ -192,7 +192,7 @@ static inline int nxmu_setup(FAR const char *mqname, FAR NX_DRIVERTYPE *dev,
return ERROR; return ERROR;
} }
#if CONFIG_FB_CMAP #ifdef CONFIG_FB_CMAP
ret = nxbe_colormap(dev); ret = nxbe_colormap(dev);
if (ret < 0) if (ret < 0)
{ {
+1 -1
View File
@@ -125,7 +125,7 @@ static inline int nxsu_setup(FAR NX_DRIVERTYPE *dev,
return ERROR; return ERROR;
} }
#if CONFIG_FB_CMAP #ifdef CONFIG_FB_CMAP
ret = nxbe_colormap(dev); ret = nxbe_colormap(dev);
if (ret < 0) if (ret < 0)
{ {
+2 -2
View File
@@ -51,7 +51,7 @@
namespace std namespace std
{ {
#if CONFIG_HAVE_FLOAT #ifdef CONFIG_HAVE_FLOAT
using ::acosf; using ::acosf;
using ::asinf; using ::asinf;
using ::atanf; using ::atanf;
@@ -78,7 +78,7 @@ namespace std
using ::tanhf; using ::tanhf;
#endif #endif
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
using ::acos; using ::acos;
using ::asin; using ::asin;
using ::atan; using ::atan;
+9 -9
View File
@@ -61,7 +61,7 @@
#define FLT_MANT_DIG 24 #define FLT_MANT_DIG 24
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
# define DBL_MANT_DIG 53 # define DBL_MANT_DIG 53
#else #else
# define DBL_MANT_DIG FLT_MANT_DIG # define DBL_MANT_DIG FLT_MANT_DIG
@@ -88,7 +88,7 @@
#define FLT_DIG 6 #define FLT_DIG 6
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
# define DBL_DIG 15 /* 10 */ # define DBL_DIG 15 /* 10 */
#else #else
# define DBL_DIG FLT_DIG # define DBL_DIG FLT_DIG
@@ -106,7 +106,7 @@
#define FLT_MIN_EXP (-125) #define FLT_MIN_EXP (-125)
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
# define DBL_MIN_EXP (-1021) # define DBL_MIN_EXP (-1021)
#else #else
# define DBL_MIN_EXP FLT_MIN_EXP # define DBL_MIN_EXP FLT_MIN_EXP
@@ -124,7 +124,7 @@
#define FLT_MIN_10_EXP (-37) #define FLT_MIN_10_EXP (-37)
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
# define DBL_MIN_10_EXP (-307) /* -37 */ # define DBL_MIN_10_EXP (-307) /* -37 */
#else #else
# define DBL_MIN_10_EXP FLT_MIN_10_EXP # define DBL_MIN_10_EXP FLT_MIN_10_EXP
@@ -142,7 +142,7 @@
#define FLT_MAX_EXP 128 #define FLT_MAX_EXP 128
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
# define DBL_MAX_EXP 1024 # define DBL_MAX_EXP 1024
#else #else
# define DBL_MAX_EXP FLT_MAX_EXP # define DBL_MAX_EXP FLT_MAX_EXP
@@ -160,7 +160,7 @@
#define FLT_MAX_10_EXP 38 /* 37 */ #define FLT_MAX_10_EXP 38 /* 37 */
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
# define DBL_MAX_10_EXP 308 /* 37 */ # define DBL_MAX_10_EXP 308 /* 37 */
#else #else
# define DBL_MAX_10_EXP FLT_MAX_10_EXP # define DBL_MAX_10_EXP FLT_MAX_10_EXP
@@ -176,7 +176,7 @@
#define FLT_MAX 3.40282347e+38F /* 1E+37 */ #define FLT_MAX 3.40282347e+38F /* 1E+37 */
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
# define DBL_MAX 1.7976931348623157e+308 /* 1E+37 */ # define DBL_MAX 1.7976931348623157e+308 /* 1E+37 */
#else #else
# define DBL_MAX FLT_MAX # define DBL_MAX FLT_MAX
@@ -194,7 +194,7 @@
#define FLT_EPSILON 1.1920929e-07F /* 1E-5 */ #define FLT_EPSILON 1.1920929e-07F /* 1E-5 */
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
# define DBL_EPSILON 2.2204460492503131e-16 /* 1E-9 */ # define DBL_EPSILON 2.2204460492503131e-16 /* 1E-9 */
#else #else
# define DBL_EPSILON FLT_EPSILON # define DBL_EPSILON FLT_EPSILON
@@ -210,7 +210,7 @@
#define FLT_MIN 1.17549435e-38F /* 1E-37 */ #define FLT_MIN 1.17549435e-38F /* 1E-37 */
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
#define DBL_MIN 2.2250738585072014e-308 /* 1E-37 */ #define DBL_MIN 2.2250738585072014e-308 /* 1E-37 */
#else #else
# define DBL_MIN FLT_MIN # define DBL_MIN FLT_MIN
+31 -31
View File
@@ -128,7 +128,7 @@ extern "C"
/* General Functions ********************************************************/ /* General Functions ********************************************************/
float ceilf (float x); float ceilf (float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double ceil (double x); double ceil (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -136,7 +136,7 @@ long double ceill (long double x);
#endif #endif
float floorf(float x); float floorf(float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double floor (double x); double floor (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -144,7 +144,7 @@ long double floorl(long double x);
#endif #endif
float roundf(float x); float roundf(float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double round (double x); double round (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -152,7 +152,7 @@ long double roundl(long double x);
#endif #endif
float rintf(float x); /* Not implemented */ float rintf(float x); /* Not implemented */
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double rint(double x); double rint(double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -160,7 +160,7 @@ long double rintl(long double x); /* Not implemented */
#endif #endif
float fabsf (float x); float fabsf (float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double fabs (double x); double fabs (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -168,7 +168,7 @@ long double fabsl (long double x);
#endif #endif
float modff (float x, float *iptr); float modff (float x, float *iptr);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double modf (double x, double *iptr); double modf (double x, double *iptr);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -176,7 +176,7 @@ long double modfl (long double x, long double *iptr);
#endif #endif
float fmodf (float x, float div); float fmodf (float x, float div);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double fmod (double x, double div); double fmod (double x, double div);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -186,7 +186,7 @@ long double fmodl (long double x, long double div);
/* Exponential and Logarithmic Functions ************************************/ /* Exponential and Logarithmic Functions ************************************/
float powf (float b, float e); float powf (float b, float e);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double pow (double b, double e); double pow (double b, double e);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -195,7 +195,7 @@ long double powl (long double b, long double e);
float expf (float x); float expf (float x);
#define expm1f(x) (expf(x) - 1.0) #define expm1f(x) (expf(x) - 1.0)
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double exp (double x); double exp (double x);
#define expm1(x) (exp(x) - 1.0) #define expm1(x) (exp(x) - 1.0)
#endif #endif
@@ -205,7 +205,7 @@ long double expl (long double x);
#endif #endif
float logf (float x); float logf (float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double log (double x); double log (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -213,7 +213,7 @@ long double logl (long double x);
#endif #endif
float log10f(float x); float log10f(float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double log10 (double x); double log10 (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -221,7 +221,7 @@ long double log10l(long double x);
#endif #endif
float log2f (float x); float log2f (float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double log2 (double x); double log2 (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -229,7 +229,7 @@ long double log2l (long double x);
#endif #endif
float sqrtf (float x); float sqrtf (float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double sqrt (double x); double sqrt (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -237,7 +237,7 @@ long double sqrtl (long double x);
#endif #endif
float ldexpf(float x, int n); float ldexpf(float x, int n);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double ldexp (double x, int n); double ldexp (double x, int n);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -245,7 +245,7 @@ long double ldexpl(long double x, int n);
#endif #endif
float frexpf(float x, int *exp); float frexpf(float x, int *exp);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double frexp (double x, int *exp); double frexp (double x, int *exp);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -255,7 +255,7 @@ long double frexpl(long double x, int *exp);
/* Trigonometric Functions **************************************************/ /* Trigonometric Functions **************************************************/
float sinf (float x); float sinf (float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double sin (double x); double sin (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -263,7 +263,7 @@ long double sinl (long double x);
#endif #endif
float cosf (float x); float cosf (float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double cos (double x); double cos (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -271,7 +271,7 @@ long double cosl (long double x);
#endif #endif
float tanf (float x); float tanf (float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double tan (double x); double tan (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -279,7 +279,7 @@ long double tanl (long double x);
#endif #endif
float asinf (float x); float asinf (float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double asin (double x); double asin (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -287,7 +287,7 @@ long double asinl (long double x);
#endif #endif
float acosf (float x); float acosf (float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double acos (double x); double acos (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -295,7 +295,7 @@ long double acosl (long double x);
#endif #endif
float atanf (float x); float atanf (float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double atan (double x); double atan (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -303,7 +303,7 @@ long double atanl (long double x);
#endif #endif
float atan2f(float y, float x); float atan2f(float y, float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double atan2 (double y, double x); double atan2 (double y, double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -311,7 +311,7 @@ long double atan2l(long double y, long double x);
#endif #endif
float sinhf (float x); float sinhf (float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double sinh (double x); double sinh (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -319,7 +319,7 @@ long double sinhl (long double x);
#endif #endif
float coshf (float x); float coshf (float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double cosh (double x); double cosh (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -327,7 +327,7 @@ long double coshl (long double x);
#endif #endif
float tanhf (float x); float tanhf (float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double tanh (double x); double tanh (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -335,7 +335,7 @@ long double tanhl (long double x);
#endif #endif
float asinhf (float x); float asinhf (float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double asinh (double x); double asinh (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -343,7 +343,7 @@ long double asinhl (long double x);
#endif #endif
float acoshf (float x); float acoshf (float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double acosh (double x); double acosh (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -351,7 +351,7 @@ long double acoshl (long double x);
#endif #endif
float atanhf (float x); float atanhf (float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double atanh (double x); double atanh (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -360,7 +360,7 @@ long double atanhl (long double x);
float erff (float x); float erff (float x);
#define erfcf(x) (1 - erff(x)) #define erfcf(x) (1 - erff(x))
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double erf (double x); double erf (double x);
#define erfc(x) (1 - erf(x)) #define erfc(x) (1 - erf(x))
#endif #endif
@@ -370,7 +370,7 @@ long double erfl (long double x);
#endif #endif
float copysignf (float x, float y); float copysignf (float x, float y);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double copysign (double x, double y); double copysign (double x, double y);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
@@ -378,7 +378,7 @@ long double copysignl (long double x, long double y);
#endif #endif
float truncf (float x); float truncf (float x);
#if CONFIG_HAVE_DOUBLE #ifdef CONFIG_HAVE_DOUBLE
double trunc (double x); double trunc (double x);
#endif #endif
#ifdef CONFIG_HAVE_LONG_DOUBLE #ifdef CONFIG_HAVE_LONG_DOUBLE
+1 -1
View File
@@ -111,7 +111,7 @@
* RTC upper half driver is built. * RTC upper half driver is built.
*/ */
#if CONFIG_RTC_DRIVER #ifdef CONFIG_RTC_DRIVER
/* IOCTL Commands ***********************************************************/ /* IOCTL Commands ***********************************************************/
/* RTC driver IOCTL commands. These are Linux compatible command names, not /* RTC driver IOCTL commands. These are Linux compatible command names, not
+1 -1
View File
@@ -104,7 +104,7 @@ int fgetpos(FAR FILE *stream, FAR fpos_t *pos)
{ {
long position; long position;
#if CONFIG_DEBUG #ifdef CONFIG_DEBUG
if (!stream || !pos) if (!stream || !pos)
{ {
set_errno(EINVAL); set_errno(EINVAL);
+1 -1
View File
@@ -104,7 +104,7 @@
int fsetpos(FAR FILE *stream, FAR fpos_t *pos) int fsetpos(FAR FILE *stream, FAR fpos_t *pos)
{ {
#if CONFIG_DEBUG #ifdef CONFIG_DEBUG
if (!stream || !pos) if (!stream || !pos)
{ {
set_errno(EINVAL); set_errno(EINVAL);
+2 -2
View File
@@ -83,7 +83,7 @@ extern "C"
// //
//************************************************************************* //*************************************************************************
#if CONFIG_SCHED_ONEXIT #ifdef CONFIG_SCHED_ONEXIT
static void __cxa_callback(int exitcode, FAR void *arg) static void __cxa_callback(int exitcode, FAR void *arg)
{ {
FAR struct __cxa_atexit_s *alloc = (FAR struct __cxa_atexit_s *)arg; FAR struct __cxa_atexit_s *alloc = (FAR struct __cxa_atexit_s *)arg;
@@ -118,7 +118,7 @@ extern "C"
int __cxa_atexit(__cxa_exitfunc_t func, FAR void *arg, FAR void *dso_handle) int __cxa_atexit(__cxa_exitfunc_t func, FAR void *arg, FAR void *dso_handle)
{ {
#if CONFIG_SCHED_ONEXIT #ifdef CONFIG_SCHED_ONEXIT
// Allocate memory to hold the marshaled __cxa_exitfunc_t call // Allocate memory to hold the marshaled __cxa_exitfunc_t call
// information. // information.
+1 -1
View File
@@ -70,7 +70,7 @@
struct neighbor_addr_s struct neighbor_addr_s
{ {
#if CONFIG_NET_IPv6_NEIGHBOR_ADDRTYPE #ifdef CONFIG_NET_IPv6_NEIGHBOR_ADDRTYPE
CONFIG_NET_IPv6_NEIGHBOR_ADDRTYPE na_addr; CONFIG_NET_IPv6_NEIGHBOR_ADDRTYPE na_addr;
#else #else
struct ether_addr na_addr; struct ether_addr na_addr;
+1 -1
View File
@@ -217,7 +217,7 @@ int sockfd_allocate(int minsd)
void sock_release(FAR struct socket *psock) void sock_release(FAR struct socket *psock)
{ {
#if CONFIG_DEBUG #ifdef CONFIG_DEBUG
if (psock) if (psock)
#endif #endif
{ {
+1 -1
View File
@@ -43,7 +43,7 @@
#include "group/group.h" #include "group/group.h"
#if HAVE_GROUP_MEMBERS #ifdef HAVE_GROUP_MEMBERS
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions
+1 -1
View File
@@ -317,7 +317,7 @@ static void sched_timer_start(unsigned int ticks)
{ {
struct timespec ts; struct timespec ts;
#if CONFIG_SCHED_TICKLESS_LIMIT_MAX_SLEEP #ifdef CONFIG_SCHED_TICKLESS_LIMIT_MAX_SLEEP
if (ticks > g_oneshot_maxticks) if (ticks > g_oneshot_maxticks)
{ {
ticks = g_oneshot_maxticks; ticks = g_oneshot_maxticks;
+1 -1
View File
@@ -151,7 +151,7 @@ int task_restart(pid_t pid)
/* Kill any children of this thread */ /* Kill any children of this thread */
#if HAVE_GROUP_MEMBERS #ifdef HAVE_GROUP_MEMBERS
(void)group_killchildren(tcb); (void)group_killchildren(tcb);
#endif #endif