Unverified Commit f1e9c99f authored by norvell's avatar norvell
Browse files

Add definitions of max/min when stdlib.h is not present

parent 2c13b0cc
Loading
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -49,6 +49,14 @@
#endif
#include "wmc_auto.h"

#ifndef min
#define min( x, y ) ( ( x ) < ( y ) ? ( x ) : ( y ) )
#endif

#ifndef max
#define max( x, y ) ( ( x ) > ( y ) ? ( x ) : ( y ) )
#endif

/*---------------------------------------------------------------------*
 * Local structs
 *---------------------------------------------------------------------*/
+10 −0
Original line number Diff line number Diff line
@@ -35,6 +35,16 @@
#include <string.h>
#include <stdbool.h>

#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION
#ifndef min
#define min( x, y ) ( ( x ) < ( y ) ? ( x ) : ( y ) )
#endif

#ifndef max
#define max( x, y ) ( ( x ) > ( y ) ? ( x ) : ( y ) )
#endif
#endif


struct RotFileReader
{