Re: [HACKERS] "24" < INT_MIN returns TRUE ???

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>, Jan Wieck <jwieck(at)debis(dot)com>, PostgreSQL HACKERS <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] "24" < INT_MIN returns TRUE ???
Date: 1999-07-09 15:02:12
Message-ID: 2462.931532532@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I said:
> Do you have <limits.h>, and if so how does it define INT_MIN?

Actually, looking closer, it doesn't matter whether you have <limits.h>,
because there is yet a *third* bug in numutils.c:

#ifdef HAVE_LIMITS
#include <limits.h>
#endif

should be

#ifdef HAVE_LIMITS_H
...

because that is how configure and config.h spell the configuration
symbol. Thus, <limits.h> is never included on *any* platform,
and our broken default INT_MIN is always used.

Whoever wrote this code was not having a good day...

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Louis Bertrand 1999-07-09 15:14:41 Re: [HACKERS] Hashing passwords (was Updated TODO list)
Previous Message Tom Lane 1999-07-09 14:49:36 Re: [HACKERS] "24" < INT_MIN returns TRUE ???