From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Florian Weimer <fweimer(at)bfk(dot)de> |
Cc: | Jeremy Kerr <jk(at)ozlabs(dot)org>, pgsql-hackers(at)postgresql(dot)org, Atsushi Ogawa <a_ogawa(at)hi-ho(dot)ne(dot)jp> |
Subject: | Re: [PATCH v2] Add bit operations util header |
Date: | 2009-06-03 15:52:49 |
Message-ID: | 5714.1244044369@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Florian Weimer <fweimer(at)bfk(dot)de> writes:
> * Jeremy Kerr:
>> Because now we have to test the compiler *and* the version as well?
> This builtin is not architecture-specific, so you'd save the
> architecture check.
The appropriate way to handle it would be a configure probe to see if
the function is available, thus avoiding any wired-in knowledge about
compiler or compiler version *or* architecture.
The other thing I didn't like about the patch was the assumption that
it's okay to have a "static inline" function in a header. You can
get away with that in gcc but *not* in other compilers. Look at the
existing coding patterns for, eg, list_head; then go thou and do
likewise. Or, since there's currently no need for the code outside
aset.c, forget about putting it in a header and just plop it into
aset.c.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-06-03 16:01:48 | Re: Managing multiple branches in git |
Previous Message | Andres Freund | 2009-06-03 15:48:02 | Plan time Improvement - 64bit bitmapset |