[postgis-devel] Can we stop using .c prefix for SQL files ?

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Fri Oct 12 01:33:09 PDT 2012

On 12/10/12 08:59, Sandro Santilli wrote:

> Pretty please ?
> I think I've changed the Makefile to use an SQLPP command which
> should resolve to proper CPP now (no more GCC -E) which in turn
> should not care about the file extension.
> Maybe the easier would be for me to just commit the change and
> see what happens, unless our bots have a way to be configured
> for building an experimental git branch, do they ?
> Or Robe: are you willing to add this feature ?
> --strk;

The .c extension was to make it clear that the file includes C 
pre-processor directives which caught me out several times - I don't 
believe that any versions of gcc broke because of the extension.

The problem is that the use of the C pre-processor itself is the bug 
(for example this doesn't work on platforms that don't have a suitable 
pre-processor, e.g. MSVC). If you're working on this, then I'd recommend 
throwing it away and finding a better cross-platform solution instead 
(perhaps creating a mini pre-processor written in perl?) as it's already 
a build requirement for our supported platforms.



More information about the postgis-devel mailing list