From fnaumann@mail.cs.uni-magdeburg.de Tue Aug 3 00:06:26 2004 Date: Mon, 2 Aug 2004 23:58:48 +0200 (CEST) From: Frank Naumann X-X-Sender: fnaumann@wh58-508.st.uni-magdeburg.de To: Mint List Subject: Re: [MiNT] Freemint sys/params.h In-Reply-To: <1091482952.4487.21.camel@localhost> Message-ID: References: <1091482952.4487.21.camel@localhost> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Score: -4.9 (----) X-Spam-Report: ---- Start SpamAssassin results -4.9 points, 5.0 required; -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] ---- End of SpamAssassin results X-Scan-Signature: aeb1bf24453fd2ce5f83c798bddebb8f 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: fnaumann@cs.uni-magdeburg.de Precedence: bulk List-help: List-unsubscribe: List-ID: X-List-ID: 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, Yes, it's ok. The MiNTLib version tries to be typesafe in some way with gcc extensions. Which gcc do you use? > and 2, I don't know what MAX does here. It just return the maximum number of a and b. Regards, Frank -- ATARI FALCON 060 // MILAN 060 ----------------------------------------- http://www.cs.uni-magdeburg.de/~fnaumann/ e-Mail: fnaumann@freemint.de