diff --git a/examples/ajoystick/ajoy_main.c b/examples/ajoystick/ajoy_main.c index c421328a4..cf63fe872 100644 --- a/examples/ajoystick/ajoy_main.c +++ b/examples/ajoystick/ajoy_main.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -54,16 +55,6 @@ #define FULL_RANGE 16 -/* Helpers ******************************************************************/ - -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - -#ifndef MAX -# define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - /**************************************************************************** * Private Function Prototypes ****************************************************************************/ diff --git a/examples/djoystick/djoy_main.c b/examples/djoystick/djoy_main.c index 54d72d9e1..41f938a7e 100644 --- a/examples/djoystick/djoy_main.c +++ b/examples/djoystick/djoy_main.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -51,16 +52,6 @@ # define CONFIG_EXAMPLES_DJOYSTICK_SIGNO 13 #endif -/* Helpers ******************************************************************/ - -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - -#ifndef MAX -# define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - /**************************************************************************** * Private Function Prototypes ****************************************************************************/ diff --git a/examples/module/drivers/chardev/chardev.c b/examples/module/drivers/chardev/chardev.c index 02d3e7b33..7681df454 100644 --- a/examples/module/drivers/chardev/chardev.c +++ b/examples/module/drivers/chardev/chardev.c @@ -24,6 +24,7 @@ #include +#include #include #include #include @@ -35,14 +36,6 @@ #include #include -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - /**************************************************************************** * Private data ****************************************************************************/ diff --git a/examples/nunchuck/nunchuck_main.c b/examples/nunchuck/nunchuck_main.c index c0e1a2059..cbef064a1 100644 --- a/examples/nunchuck/nunchuck_main.c +++ b/examples/nunchuck/nunchuck_main.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -50,16 +51,6 @@ #define FULL_RANGE 16 -/* Helpers ******************************************************************/ - -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - -#ifndef MAX -# define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - /**************************************************************************** * Private Function Prototypes ****************************************************************************/ diff --git a/examples/nxdemo/nxdemo_bkgd.c b/examples/nxdemo/nxdemo_bkgd.c index f94ed1e67..8693c9832 100644 --- a/examples/nxdemo/nxdemo_bkgd.c +++ b/examples/nxdemo/nxdemo_bkgd.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -66,13 +67,6 @@ # error "Unsupported CONFIG_EXAMPLES_NXDEMO_BPP" #endif -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif -#ifndef MAX -# define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - /**************************************************************************** * Private Function Prototypes ****************************************************************************/ diff --git a/examples/nxlines/nxlines_bkgd.c b/examples/nxlines/nxlines_bkgd.c index be21106a4..03be1d0d7 100644 --- a/examples/nxlines/nxlines_bkgd.c +++ b/examples/nxlines/nxlines_bkgd.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -52,10 +53,6 @@ # define CLEAR_WIDTH CONFIG_EXAMPLES_NXLINES_LINEWIDTH #endif -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ diff --git a/examples/pwlines/pwlines_internal.h b/examples/pwlines/pwlines_internal.h index 6db7face1..ffc23ec87 100644 --- a/examples/pwlines/pwlines_internal.h +++ b/examples/pwlines/pwlines_internal.h @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -151,15 +152,6 @@ # endif #endif -/* Helpers */ - -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif -#ifndef MAX -# define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - /**************************************************************************** * Public Types ****************************************************************************/ diff --git a/examples/pwlines/pwlines_update.c b/examples/pwlines/pwlines_update.c index c89fae823..54f7eefdf 100644 --- a/examples/pwlines/pwlines_update.c +++ b/examples/pwlines/pwlines_update.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -52,10 +53,6 @@ # define CLEAR_WIDTH CONFIG_EXAMPLES_PWLINES_LINEWIDTH #endif -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/examples/udpblaster/udpblaster.h b/examples/udpblaster/udpblaster.h index 08ce3d7a3..2f7c4a484 100644 --- a/examples/udpblaster/udpblaster.h +++ b/examples/udpblaster/udpblaster.h @@ -27,6 +27,8 @@ #include "config.h" +#include + #include /**************************************************************************** @@ -102,10 +104,6 @@ # error "Additional link layer definitions needed" #endif -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - #define UDPBLASTER_SENDSIZE MIN(UDPBLASTER_MSS, g_udpblaster_strlen) /**************************************************************************** diff --git a/examples/zerocross/zerocross_main.c b/examples/zerocross/zerocross_main.c index c96f8b24b..416fa7a99 100644 --- a/examples/zerocross/zerocross_main.c +++ b/examples/zerocross/zerocross_main.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -51,16 +52,6 @@ # define CONFIG_EXAMPLES_ZEROCROSS_SIGNO 13 #endif -/* Helpers ******************************************************************/ - -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - -#ifndef MAX -# define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/graphics/nxwidgets/UnitTests/CGlyphButton/cglyphbuttontest.hxx b/graphics/nxwidgets/UnitTests/CGlyphButton/cglyphbuttontest.hxx index 3686b9810..9960277e4 100644 --- a/graphics/nxwidgets/UnitTests/CGlyphButton/cglyphbuttontest.hxx +++ b/graphics/nxwidgets/UnitTests/CGlyphButton/cglyphbuttontest.hxx @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -61,12 +62,6 @@ # define CONFIG_CGLYPHBUTTONTEST_FONTCOLOR CONFIG_NXWIDGETS_DEFAULT_FONTCOLOR #endif -// Helper macros - -#ifndef MAX -# define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - ///////////////////////////////////////////////////////////////////////////// // Public Classes ///////////////////////////////////////////////////////////////////////////// diff --git a/graphics/twm4nx/src/cresize.cxx b/graphics/twm4nx/src/cresize.cxx index 16d6981df..93d18be72 100644 --- a/graphics/twm4nx/src/cresize.cxx +++ b/graphics/twm4nx/src/cresize.cxx @@ -37,6 +37,7 @@ #include #include +#include #include @@ -64,10 +65,6 @@ #define makemult(a,b) ((b == 1) ? (a) : (((int)((a) / (b))) * (b))) -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - ///////////////////////////////////////////////////////////////////////////// // Class Implementations ///////////////////////////////////////////////////////////////////////////// diff --git a/netutils/thttpd/fdwatch.c b/netutils/thttpd/fdwatch.c index 364f6433e..a58b012b6 100644 --- a/netutils/thttpd/fdwatch.c +++ b/netutils/thttpd/fdwatch.c @@ -42,6 +42,7 @@ #include #include +#include #include #include #include @@ -68,10 +69,6 @@ # define fwinfo _none #endif -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - /**************************************************************************** * Private Data ****************************************************************************/ diff --git a/netutils/thttpd/libhttpd.h b/netutils/thttpd/libhttpd.h index a4e7f38b6..e5c348671 100644 --- a/netutils/thttpd/libhttpd.h +++ b/netutils/thttpd/libhttpd.h @@ -44,6 +44,7 @@ #include +#include #include #include #include @@ -62,16 +63,6 @@ * Pre-processor Definitions ****************************************************************************/ -/* A few convenient defines. */ - -#ifndef MAX -# define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - /* Enable special instrumentation to track down "400 Bad Request" problems */ #undef CONFIG_THTTPD_BADREQUEST /* Define to enable "Bad Request" instrumentation */ diff --git a/netutils/thttpd/thttpd_alloc.c b/netutils/thttpd/thttpd_alloc.c index 7a411f8c4..15640575f 100644 --- a/netutils/thttpd/thttpd_alloc.c +++ b/netutils/thttpd/thttpd_alloc.c @@ -24,6 +24,7 @@ #include +#include #include #include #include @@ -35,18 +36,6 @@ #ifdef CONFIG_THTTPD -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#ifndef MAX -# define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - /**************************************************************************** * Private Data ****************************************************************************/ diff --git a/nshlib/nsh_netcmds.c b/nshlib/nsh_netcmds.c index 5d0810e9d..abd8f434a 100644 --- a/nshlib/nsh_netcmds.c +++ b/nshlib/nsh_netcmds.c @@ -28,6 +28,7 @@ #include +#include #include /* Needed for open */ #include #include @@ -116,12 +117,6 @@ # endif #endif -/* Get the larger value */ - -#ifndef MAX -# define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ diff --git a/system/input/input.c b/system/input/input.c index 8f39cacb3..ecb64127d 100644 --- a/system/input/input.c +++ b/system/input/input.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -39,10 +40,6 @@ #define DELAY_MS(ms) usleep((ms) * 1000) #define ABS(a) ((a) > 0 ? (a) : -(a)) -#ifndef MAX -# define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - /**************************************************************************** * Private Types ****************************************************************************/ diff --git a/system/nxcamera/nxcamera.c b/system/nxcamera/nxcamera.c index 5cb9c1341..0875d462b 100644 --- a/system/nxcamera/nxcamera.c +++ b/system/nxcamera/nxcamera.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -58,10 +59,6 @@ #define NXCAMERA_STATE_LOOPING 2 #define NXCAMERA_STATE_PAUSED 3 -#ifndef MIN -# define MIN(a, b) (((a) < (b)) ? (a) : (b)) -#endif - #define convert_frame ConvertToARGB /**************************************************************************** diff --git a/system/nxlooper/nxlooper.c b/system/nxlooper/nxlooper.c index 3e03afea4..6694b9966 100644 --- a/system/nxlooper/nxlooper.c +++ b/system/nxlooper/nxlooper.c @@ -24,6 +24,7 @@ #include +#include #include #include @@ -55,10 +56,6 @@ #define AUDIO_APB_RECORD (1 << 4) #define AUDIO_APB_PLAY (1 << 5) -#ifndef MIN -# define MIN(a, b) (((a) < (b)) ? (a) : (b)) -#endif - /**************************************************************************** * Private Functions ****************************************************************************/ diff --git a/testing/ostest/sporadic.c b/testing/ostest/sporadic.c index 20649b27b..efe4c2d11 100644 --- a/testing/ostest/sporadic.c +++ b/testing/ostest/sporadic.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -48,10 +49,6 @@ #define sched_lock() #define sched_unlock() -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - /**************************************************************************** * Private Data ****************************************************************************/ diff --git a/testing/ostest/sporadic2.c b/testing/ostest/sporadic2.c index d9cc5c505..bcfa6da97 100644 --- a/testing/ostest/sporadic2.c +++ b/testing/ostest/sporadic2.c @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -49,13 +50,6 @@ #define PRIO_HI_NDX 0 #define PRIO_LO_NDX 1 -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif -#ifndef MAX -# define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - /**************************************************************************** * Private Data ****************************************************************************/ diff --git a/wireless/gs2200m/gs2200m_main.c b/wireless/gs2200m/gs2200m_main.c index f678050e9..20afec3e7 100644 --- a/wireless/gs2200m/gs2200m_main.c +++ b/wireless/gs2200m/gs2200m_main.c @@ -36,6 +36,7 @@ #include #include +#include #include #include #include @@ -58,10 +59,6 @@ # define gs2200m_printf(v, ...) #endif -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - #define SOCKET_BASE 10000 #define SOCKET_COUNT 16