From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Neil Conway <neilc(at)samurai(dot)com> |
Cc: | pgsql-committers(at)postgresql(dot)org |
Subject: | Re: pgsql: Clarify coding of .exe patch |
Date: | 2004-11-01 05:04:13 |
Message-ID: | 200411010504.iA154DE15933@candle.pha.pa.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Neil Conway wrote:
> On Mon, 2004-11-01 at 15:47, Bruce Momjian wrote:
> > Oh, I didn't realize they had the dot in there. Let me add "-1".
> > Thanks. Attached.
>
> I wonder if it wouldn't be cleaner to #define SIZE_OF_EXE or similar
> that includes the "-1". Alternatively, we could just use strlen(): I
> believe a decent compiler should be able to evaluate strlen("str") at
> compile-time.
I prefer strlen() myself but Tom prefers sizeof(). In the long run I
would like to create a 'sizeof' that doesn't include the null as a
global define that we can use for any hard-coded string. I have not
thought of a name yet and it would be for 8.1. I count perhaps 84
places it could be used:
$ rgrepc 'sizeof.*- \?1'|wc -l
84
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-11-01 05:06:57 | Re: pgsql: Clarify coding of .exe patch |
Previous Message | Tom Lane | 2004-11-01 05:01:45 | Re: pgsql: Clarify coding of .exe patch |