From fnaumann@mail.cs.uni-magdeburg.de  Mon Aug  2 23:47:45 2004
Subject: [MiNT] Freemint sys/params.h
From: Mark Duckworth <mduckworth@atari-source.com>
To: Mint List <mint@fishpool.com>
Content-Type: text/plain
Organization: Atari-source.com
Message-Id: <1091482952.4487.21.camel@localhost>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.6 
Date: Mon, 02 Aug 2004 17:42:32 -0400
Content-Transfer-Encoding: 7bit
Delivered-To: mint@fishpool.com
Delivered-To: mint@lists.fishpool.fi
X-ecartis-version: Ecartis v1.0.0
Sender: mint-bounce@lists.fishpool.fi
Errors-to: mint-bounce@lists.fishpool.fi
X-original-sender: mduckworth@atari-source.com
Precedence: bulk
List-help: <mailto:ecartis@lists.fishpool.fi?Subject=help>
List-unsubscribe: <mailto:mint-request@lists.fishpool.fi?Subject=unsubscribe>
List-ID: <mint.lists.fishpool.fi>
X-List-ID: <mint.lists.fishpool.fi>
X-Milter: ClamAV 0.70/0.70kjel
X-Milter: milter-regex 1.5jel
X-Milter: ClamAV 0.70/0.70kjel
X-Milter: milter-regex 1.5jel

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


