tim-balloon / TIMflight

Flight MCP repo
0 stars 0 forks source link

Resolve multiple definition of a MAX macro #26

Open evanmayer opened 2 years ago

evanmayer commented 2 years ago

@mxk62 said:

It's out of the scope of this ticket, but we may want to have a dedicated place for such generic macros. Now MAX(a, b) it is being defined in multiple places:

$ grep -inr '#define MAX(.*)' .
./common/include/FIFO.h:39:#define MAX(a, b) ((a) > (b) ? (a) : (b))
./common/include/bitserver.h:55:#define MAX(a, b) ((a) > (b) ? (a) : (b))
./common/include/blast.h:173:#define max(a, b) ((a) >= (b) ? (a) : (b))
./common/logger.c:41:#define MAX(a, b) ((a) > (b) ? (a) : (b))
./external_libs/socat/mytypes.h:20:#define Max(x,y) ((x)>=(y)?(x):(y))
./groundhog/blast/groundhog.h:19:#define MAX(a, b) ((a) > (b) ? (a):(b))
./liblinklist/linklist_connect.h:71:#define MAX(a,b) ((a) > (b) ? (a) : (b))
./mcp/motors/cryovalves.c:39:#define MAX(a, b) ((a) > (b) ? (a) : (b))

_Originally posted by @mxk62 in https://github.com/tim-balloon/TIMflight/pull/25#discussion_r951841483_

ianlowe13 commented 2 months ago

Has this been finished by nick @evanmayer