[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] Freemint sys/params.h



Hello,

In sys/params.h, MAX macro is defined as:

#define MAX(a,b) \
    ({__typeof__ (a) _a = (a); __typeof__ (b) _b = (b);  \
              _a > _b ? _a : _b; })

On linux, glibc, and other systems, MAX is defined similarly, but more
simply as:

#define MAX(a, b)  (((a) > (b)) ? (a) : (b))

If I undefine max as part of compiling coreutils, and define it with the
linux style, the program then compiles and the resulting binary works. 
The problem here is 1. I don't know if it's okay to make that
substitution, and 2, I don't know what MAX does here.  Not smart enough
I guess ;-)  It looks very similar/identical to the MAX() used in VDI
work.

PS: RPM and some other programs are having problems with our old
fileutils, textutils and stuff.  I wanted to get up to date and sub all
packages with coreutils so I'm doing big testing on my end.  We wouldn't
want a broken "ls" out there ;-)  Most things work perfectly so far.

Thanks,
Mark