diff --git a/crypto/crypto.c b/crypto/crypto.c index 9b4391b5bb..401417d874 100644 --- a/crypto/crypto.c +++ b/crypto/crypto.c @@ -77,7 +77,7 @@ int up_cryptoinitialize(void) } #endif -#if CONFIG_CRYPTO_ALGTEST +#ifdef CONFIG_CRYPTO_ALGTEST res = crypto_test(); if (res) { diff --git a/drivers/mtd/at24xx.c b/drivers/mtd/at24xx.c index fbb56b7108..32ea3c618e 100644 --- a/drivers/mtd/at24xx.c +++ b/drivers/mtd/at24xx.c @@ -356,7 +356,7 @@ static ssize_t at24c_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t while (blocksleft-- > 0) { -#if AT24XX_ADDRSIZE +#if AT24XX_ADDRSIZE == 2 uint16_t offset = startblock * priv->pagesize; buf[1] = offset & 0xff; buf[0] = (offset >> 8) & 0xff; diff --git a/drivers/net/dm90x0.c b/drivers/net/dm90x0.c index 03e1e44f8d..d9f3644a43 100644 --- a/drivers/net/dm90x0.c +++ b/drivers/net/dm90x0.c @@ -1411,19 +1411,19 @@ static inline void dm9x_phymode(struct dm9x_driver_s *dm9x) uint16_t phyreg0; uint16_t phyreg4; -#if CONFIG_DM9X_MODE_AUTO +#ifdef CONFIG_DM9X_MODE_AUTO phyreg0 = 0x1200; /* Auto-negotiation & Restart Auto-negotiation */ phyreg4 = 0x01e1; /* Default flow control disable*/ -#elif CONFIG_DM9X_MODE_10MHD +#elif defined(CONFIG_DM9X_MODE_10MHD) phyreg4 = 0x21; phyreg0 = 0x1000; -#elif CONFIG_DM9X_MODE_10MFD +#elif defined(CONFIG_DM9X_MODE_10MFD) phyreg4 = 0x41; phyreg0 = 0x1100; -#elif CONFIG_DM9X_MODE_100MHD +#elif defined(CONFIG_DM9X_MODE_100MHD) phyreg4 = 0x81; phyreg0 = 0x3000; -#elif CONFIG_DM9X_MODE_100MFD +#elif defined(CONFIG_DM9X_MODE_100MFD) phyreg4 = 0x101; phyreg0 = 0x3100; #else diff --git a/drivers/pipes/pipe_common.c b/drivers/pipes/pipe_common.c index e2f33aceec..c077ea537f 100644 --- a/drivers/pipes/pipe_common.c +++ b/drivers/pipes/pipe_common.c @@ -55,7 +55,7 @@ #include #include -#if CONFIG_DEBUG +#ifdef CONFIG_DEBUG # include #endif diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index ff4fe55d47..b07f655466 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -954,7 +954,7 @@ int uart_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup) /* Some sanity checking */ -#if CONFIG_DEBUG +#ifdef CONFIG_DEBUG if (!dev || !fds) { return -ENODEV; diff --git a/drivers/usbdev/cdcacm.c b/drivers/usbdev/cdcacm.c index d57eb5aa41..564fbf6229 100644 --- a/drivers/usbdev/cdcacm.c +++ b/drivers/usbdev/cdcacm.c @@ -645,7 +645,7 @@ static int cdcacm_setconfig(FAR struct cdcacm_dev_s *priv, uint8_t config) int i; int ret = 0; -#if CONFIG_DEBUG +#ifdef CONFIG_DEBUG if (priv == NULL) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -1765,7 +1765,7 @@ static int cdcuart_setup(FAR struct uart_dev_s *dev) /* Sanity check */ -#if CONFIG_DEBUG +#ifdef CONFIG_DEBUG if (!dev || !dev->priv) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -1806,7 +1806,7 @@ static void cdcuart_shutdown(FAR struct uart_dev_s *dev) /* Sanity check */ -#if CONFIG_DEBUG +#ifdef CONFIG_DEBUG if (!dev || !dev->priv) { 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 */ -#if CONFIG_DEBUG +#ifdef CONFIG_DEBUG if (!dev || !dev->priv) { 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 */ -#if CONFIG_DEBUG +#ifdef CONFIG_DEBUG if (!dev || !dev->priv) { 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); -#if CONFIG_DEBUG +#ifdef CONFIG_DEBUG if (!priv) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); diff --git a/drivers/usbdev/pl2303.c b/drivers/usbdev/pl2303.c index bb98a717ea..526322cbb4 100644 --- a/drivers/usbdev/pl2303.c +++ b/drivers/usbdev/pl2303.c @@ -1046,7 +1046,7 @@ static int usbclass_setconfig(FAR struct pl2303_dev_s *priv, uint8_t config) int i; int ret = 0; -#if CONFIG_DEBUG +#ifdef CONFIG_DEBUG if (priv == NULL) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -2016,7 +2016,7 @@ static int usbser_setup(FAR struct uart_dev_s *dev) /* Sanity check */ -#if CONFIG_DEBUG +#ifdef CONFIG_DEBUG if (!dev || !dev->priv) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); @@ -2057,7 +2057,7 @@ static void usbser_shutdown(FAR struct uart_dev_s *dev) /* Sanity check */ -#if CONFIG_DEBUG +#ifdef CONFIG_DEBUG if (!dev || !dev->priv) { 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 */ -#if CONFIG_DEBUG +#ifdef CONFIG_DEBUG if (!dev || !dev->priv) { 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 */ -#if CONFIG_DEBUG +#ifdef CONFIG_DEBUG if (!dev || !dev->priv) { 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); -#if CONFIG_DEBUG +#ifdef CONFIG_DEBUG if (!priv) { usbtrace(TRACE_CLSERROR(USBSER_TRACEERR_INVALIDARG), 0); diff --git a/drivers/usbdev/usbmsc.c b/drivers/usbdev/usbmsc.c index 941563494c..6a6d425b04 100644 --- a/drivers/usbdev/usbmsc.c +++ b/drivers/usbdev/usbmsc.c @@ -934,7 +934,7 @@ int usbmsc_setconfig(FAR struct usbmsc_dev_s *priv, uint8_t config) int i; int ret = 0; -#if CONFIG_DEBUG +#ifdef CONFIG_DEBUG if (priv == NULL) { usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_SETCONFIGINVALIDARGS), 0); diff --git a/drivers/video/ov2640.c b/drivers/video/ov2640.c index 7256fbc202..1e736f5e07 100644 --- a/drivers/video/ov2640.c +++ b/drivers/video/ov2640.c @@ -811,7 +811,7 @@ static int ovr2640_chipid(FAR struct i2c_dev_s *i2c) { uint8_t pidl; uint8_t pidh; -#if CONFIG_DEBUG_GRAPHICS +#ifdef CONFIG_DEBUG_GRAPHICS uint8_t midh; uint8_t midl; #endif @@ -829,7 +829,7 @@ static int ovr2640_chipid(FAR struct i2c_dev_s *i2c) pidl = ov2640_getreg(i2c, 0x0a); /* Product ID (MS) */ 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 */ midl = ov2640_getreg(i2c, 0x1d); /* Manufacturer ID (low) = 0xa2 */ #endif diff --git a/graphics/nxbe/nxbe_colormap.c b/graphics/nxbe/nxbe_colormap.c index 536c317541..d5d84e238c 100644 --- a/graphics/nxbe/nxbe_colormap.c +++ b/graphics/nxbe/nxbe_colormap.c @@ -81,7 +81,7 @@ * ****************************************************************************/ -#if CONFIG_FB_CMAP +#ifdef CONFIG_FB_CMAP int nxbe_colormap(FAR NX_DRIVERTYPE *dev) { struct fb_cmap_s cmap; diff --git a/graphics/nxmu/nxmu_server.c b/graphics/nxmu/nxmu_server.c index eb7fbd75ca..1f13dba908 100644 --- a/graphics/nxmu/nxmu_server.c +++ b/graphics/nxmu/nxmu_server.c @@ -192,7 +192,7 @@ static inline int nxmu_setup(FAR const char *mqname, FAR NX_DRIVERTYPE *dev, return ERROR; } -#if CONFIG_FB_CMAP +#ifdef CONFIG_FB_CMAP ret = nxbe_colormap(dev); if (ret < 0) { diff --git a/graphics/nxsu/nx_open.c b/graphics/nxsu/nx_open.c index 5132b36e96..3f4629f90c 100644 --- a/graphics/nxsu/nx_open.c +++ b/graphics/nxsu/nx_open.c @@ -125,7 +125,7 @@ static inline int nxsu_setup(FAR NX_DRIVERTYPE *dev, return ERROR; } -#if CONFIG_FB_CMAP +#ifdef CONFIG_FB_CMAP ret = nxbe_colormap(dev); if (ret < 0) { diff --git a/include/cxx/cmath b/include/cxx/cmath index b30d5548b7..998406c153 100644 --- a/include/cxx/cmath +++ b/include/cxx/cmath @@ -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; diff --git a/include/nuttx/float.h b/include/nuttx/float.h index a8e4aa28b5..a4d8945ee5 100644 --- a/include/nuttx/float.h +++ b/include/nuttx/float.h @@ -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 diff --git a/include/nuttx/math.h b/include/nuttx/math.h index 40990352af..6ee91eab7e 100644 --- a/include/nuttx/math.h +++ b/include/nuttx/math.h @@ -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 diff --git a/include/nuttx/timers/rtc.h b/include/nuttx/timers/rtc.h index d714e040f1..7cbc928d92 100644 --- a/include/nuttx/timers/rtc.h +++ b/include/nuttx/timers/rtc.h @@ -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 diff --git a/libc/stdio/lib_fgetpos.c b/libc/stdio/lib_fgetpos.c index 5727c63ef9..322890613e 100644 --- a/libc/stdio/lib_fgetpos.c +++ b/libc/stdio/lib_fgetpos.c @@ -104,7 +104,7 @@ int fgetpos(FAR FILE *stream, FAR fpos_t *pos) { long position; -#if CONFIG_DEBUG +#ifdef CONFIG_DEBUG if (!stream || !pos) { set_errno(EINVAL); diff --git a/libc/stdio/lib_fsetpos.c b/libc/stdio/lib_fsetpos.c index 6cf1c9eedb..d33fe4ca30 100644 --- a/libc/stdio/lib_fsetpos.c +++ b/libc/stdio/lib_fsetpos.c @@ -104,7 +104,7 @@ int fsetpos(FAR FILE *stream, FAR fpos_t *pos) { -#if CONFIG_DEBUG +#ifdef CONFIG_DEBUG if (!stream || !pos) { set_errno(EINVAL); diff --git a/libxx/libxx_cxa_atexit.cxx b/libxx/libxx_cxa_atexit.cxx index d7a82fe5b7..5e01f99f27 100644 --- a/libxx/libxx_cxa_atexit.cxx +++ b/libxx/libxx_cxa_atexit.cxx @@ -83,7 +83,7 @@ extern "C" // //************************************************************************* -#if CONFIG_SCHED_ONEXIT +#ifdef CONFIG_SCHED_ONEXIT static void __cxa_callback(int exitcode, FAR void *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) { -#if CONFIG_SCHED_ONEXIT +#ifdef CONFIG_SCHED_ONEXIT // Allocate memory to hold the marshaled __cxa_exitfunc_t call // information. diff --git a/net/neighbor/neighbor.h b/net/neighbor/neighbor.h index 087f1a414c..0a2a1c287f 100644 --- a/net/neighbor/neighbor.h +++ b/net/neighbor/neighbor.h @@ -70,7 +70,7 @@ struct neighbor_addr_s { -#if CONFIG_NET_IPv6_NEIGHBOR_ADDRTYPE +#ifdef CONFIG_NET_IPv6_NEIGHBOR_ADDRTYPE CONFIG_NET_IPv6_NEIGHBOR_ADDRTYPE na_addr; #else struct ether_addr na_addr; diff --git a/net/socket/net_sockets.c b/net/socket/net_sockets.c index 6c7e1d1128..83ad061f6e 100644 --- a/net/socket/net_sockets.c +++ b/net/socket/net_sockets.c @@ -217,7 +217,7 @@ int sockfd_allocate(int minsd) void sock_release(FAR struct socket *psock) { -#if CONFIG_DEBUG +#ifdef CONFIG_DEBUG if (psock) #endif { diff --git a/sched/group/group_killchildren.c b/sched/group/group_killchildren.c index a320d50bc5..265b04036b 100644 --- a/sched/group/group_killchildren.c +++ b/sched/group/group_killchildren.c @@ -43,7 +43,7 @@ #include "group/group.h" -#if HAVE_GROUP_MEMBERS +#ifdef HAVE_GROUP_MEMBERS /**************************************************************************** * Private Functions diff --git a/sched/sched/sched_timerexpiration.c b/sched/sched/sched_timerexpiration.c index 7546ec8046..8c223d4cb0 100644 --- a/sched/sched/sched_timerexpiration.c +++ b/sched/sched/sched_timerexpiration.c @@ -317,7 +317,7 @@ static void sched_timer_start(unsigned int ticks) { struct timespec ts; -#if CONFIG_SCHED_TICKLESS_LIMIT_MAX_SLEEP +#ifdef CONFIG_SCHED_TICKLESS_LIMIT_MAX_SLEEP if (ticks > g_oneshot_maxticks) { ticks = g_oneshot_maxticks; diff --git a/sched/task/task_restart.c b/sched/task/task_restart.c index 0d86326968..a81115c173 100644 --- a/sched/task/task_restart.c +++ b/sched/task/task_restart.c @@ -151,7 +151,7 @@ int task_restart(pid_t pid) /* Kill any children of this thread */ -#if HAVE_GROUP_MEMBERS +#ifdef HAVE_GROUP_MEMBERS (void)group_killchildren(tcb); #endif