Skip to content

Commit

Permalink
FIX: don't redefine MIN/MAX
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Jan 14, 2023
1 parent 5eb72ed commit 41a8288
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/include/reb-c.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,15 @@ typedef void(*CFUNC)(void *);
#define CLR_FLAG(v,f) ((v) &= ~(1<<(f)))
#define CLR_FLAGS(v,f,g) ((v) &= ~((1<<(f)) | (1<<(g))))

#ifndef MIN
#ifdef min
#define MIN(a,b) min(a,b)
#define MAX(a,b) max(a,b)
#else
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#endif
#endif

// Memory related functions:
#define MAKE_MEM(n) malloc(n)
Expand Down

0 comments on commit 41a8288

Please sign in to comment.