Search Postgresql Archives

Re: Building extensions on Windows using VS2008

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



deepak <deepak.pn@xxxxxxxxx> writes:
> Here's the trimmed down version of the source and the Makefile (copied and
> modified from the 'cube' contrib project)
> (with which I see the error related to redefinition)

> /* myext.c */

> #include <string.h>
> #include <math.h>
> #include "postgres.h"
> #include "fmgr.h"

As was noted upthread, this ordering is pretty unsafe.  postgres.h
should always be included *first* in any C file that's meant to run in
the backend environment.  There are platforms in which failing to do so
causes crashes because of 32-vs-64-bit issues.  Not sure if this
explains your Windows issue too, but in any case the above is wrong.

> myext.o: myext.c

> clean:
>     rm -f myext.o

BTW, these rules are unnecessary --- having listed myext.o in OBJS is
sufficient.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux