Adding miscadmin.h generates errors ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding miscadmin.h generates errors ?

Otto Blomqvist
After adding miscadmin.h to my source I get "some" errors, shown below. I'm
sure its something simple like adding a flag or similar, but I'v spent hours
on this now. Im running Fedora 3 and Postgres 8.0.3. GCC 3.4.3 20050227.

Any ideas ?

Thanks
/Otto Blomqvist

gcc -Wall -c commfunct.c
In file included from commfunct.c:62:
miscadmin.h:67: error: syntax error before "volatile"
miscadmin.h:67: warning: type defaults to `int' in declaration of
`InterruptPending'
miscadmin.h:67: warning: data definition has no type or storage class
miscadmin.h:68: error: syntax error before "QueryCancelPending"
miscadmin.h:68: warning: type defaults to `int' in declaration of
`QueryCancelPending'
miscadmin.h:68: warning: data definition has no type or storage class
miscadmin.h:69: error: syntax error before "ProcDiePending"
miscadmin.h:69: warning: type defaults to `int' in declaration of
`ProcDiePending'
miscadmin.h:69: warning: data definition has no type or storage class
miscadmin.h:72: error: syntax error before "ImmediateInterruptOK"
miscadmin.h:72: warning: type defaults to `int' in declaration of
`ImmediateInterruptOK'
miscadmin.h:72: warning: data definition has no type or storage class
miscadmin.h:73: error: syntax error before "InterruptHoldoffCount"
miscadmin.h:73: warning: type defaults to `int' in declaration of
`InterruptHoldoffCount'
miscadmin.h:73: warning: data definition has no type or storage class
miscadmin.h:74: error: syntax error before "CritSectionCount"
miscadmin.h:74: warning: type defaults to `int' in declaration of
`CritSectionCount'
miscadmin.h:74: warning: data definition has no type or storage class
miscadmin.h:124: error: syntax error before "IsPostmasterEnvironment"
miscadmin.h:124: warning: type defaults to `int' in declaration of
`IsPostmasterEnvironment'
miscadmin.h:124: warning: data definition has no type or storage class
miscadmin.h:125: error: syntax error before "IsUnderPostmaster"
miscadmin.h:125: warning: type defaults to `int' in declaration of
`IsUnderPostmaster'
miscadmin.h:125: warning: data definition has no type or storage class
miscadmin.h:127: error: syntax error before "ExitOnAnyError"
miscadmin.h:127: warning: type defaults to `int' in declaration of
`ExitOnAnyError'
miscadmin.h:127: warning: data definition has no type or storage class
miscadmin.h:131: error: syntax error before "int"
miscadmin.h:134: error: syntax error before "int"
miscadmin.h:139: error: syntax error before "char"
miscadmin.h:151: error: syntax error before "Oid"
miscadmin.h:151: warning: type defaults to `int' in declaration of
`MyDatabaseId'
miscadmin.h:151: warning: data definition has no type or storage class
miscadmin.h:153: error: syntax error before "Oid"
miscadmin.h:153: warning: type defaults to `int' in declaration of
`MyDatabaseTableSpace'
miscadmin.h:153: warning: data definition has no type or storage class
miscadmin.h:197: error: syntax error before "HasCTZSet"
miscadmin.h:197: warning: type defaults to `int' in declaration of
`HasCTZSet'
miscadmin.h:197: warning: data definition has no type or storage class
miscadmin.h:202: error: syntax error before "enableFsync"
miscadmin.h:202: warning: type defaults to `int' in declaration of
`enableFsync'
miscadmin.h:202: warning: data definition has no type or storage class
miscadmin.h:203: error: syntax error before "allowSystemTableMods"
miscadmin.h:203: warning: type defaults to `int' in declaration of
`allowSystemTableMods'
miscadmin.h:203: warning: data definition has no type or storage class
miscadmin.h:204: error: syntax error before "int"
miscadmin.h:205: error: syntax error before "int"
miscadmin.h:214: error: syntax error before "VacuumCostActive"
miscadmin.h:214: warning: type defaults to `int' in declaration of
`VacuumCostActive'
miscadmin.h:214: warning: data definition has no type or storage class
miscadmin.h:229: error: syntax error before "Oid"
miscadmin.h:234: error: syntax error before "userid"
miscadmin.h:235: error: syntax error before "GetUserId"
miscadmin.h:235: warning: type defaults to `int' in declaration of
`GetUserId'
miscadmin.h:235: warning: data definition has no type or storage class
miscadmin.h:236: error: syntax error before "userid"
miscadmin.h:237: error: syntax error before "GetSessionUserId"
miscadmin.h:237: warning: type defaults to `int' in declaration of
`GetSessionUserId'
miscadmin.h:237: warning: data definition has no type or storage class
miscadmin.h:238: error: syntax error before "userid"
miscadmin.h:241: error: syntax error before "userid"
miscadmin.h:247: error: syntax error before "superuser"
miscadmin.h:247: warning: type defaults to `int' in declaration of
`superuser'
miscadmin.h:247: warning: data definition has no type or storage class
miscadmin.h:248: error: syntax error before "superuser_arg"
miscadmin.h:248: error: syntax error before "userid"
miscadmin.h:248: warning: type defaults to `int' in declaration of
`superuser_arg'
miscadmin.h:248: warning: data definition has no type or storage class
miscadmin.h:305: error: syntax error before "InitPostgres"
miscadmin.h:305: warning: type defaults to `int' in declaration of
`InitPostgres'
miscadmin.h:305: warning: data definition has no type or storage class
miscadmin.h:309: error: syntax error before "mode"
miscadmin.h:310: error: syntax error before "IsIgnoringSystemIndexes"
miscadmin.h:310: warning: type defaults to `int' in declaration of
`IsIgnoringSystemIndexes'
miscadmin.h:310: warning: data definition has no type or storage class
miscadmin.h:311: error: syntax error before "heapOid"
miscadmin.h:313: error: syntax error before "ReindexIsProcessingHeap"
miscadmin.h:313: error: syntax error before "heapOid"
miscadmin.h:313: warning: type defaults to `int' in declaration of
`ReindexIsProcessingHeap'
miscadmin.h:313: warning: data definition has no type or storage class
miscadmin.h:314: error: syntax error before "ReindexIsProcessingIndex"
miscadmin.h:314: error: syntax error before "indexOid"
miscadmin.h:314: warning: type defaults to `int' in declaration of
`ReindexIsProcessingIndex'
miscadmin.h:314: warning: data definition has no type or storage class
miscadmin.h:315: error: syntax error before "bool"
miscadmin.h:316: error: syntax error before "bool"
miscadmin.h:139: warning: array 'my_exec_path' assumed to have one element



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq
Reply | Threaded
Open this post in threaded view
|

Re: Adding miscadmin.h generates errors ?

Michael Fuhr
On Wed, Jul 06, 2005 at 02:51:53PM -0700, Otto Blomqvist wrote:
> After adding miscadmin.h to my source I get "some" errors, shown below. I'm
> sure its something simple like adding a flag or similar, but I'v spent hours
> on this now. Im running Fedora 3 and Postgres 8.0.3. GCC 3.4.3 20050227.

If you're writing server-side code then you should be including
postgres.h before any other headers.  See "Writing Code" in the
"C-Language Functions" section of the "Extending SQL" chapter of
the documentation for details.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [hidden email] so that your
       message can get through to the mailing list cleanly
Reply | Threaded
Open this post in threaded view
|

Re: Adding miscadmin.h generates errors ?

Álvaro Herrera
In reply to this post by Otto Blomqvist
On Wed, Jul 06, 2005 at 02:51:53PM -0700, Otto Blomqvist wrote:
> After adding miscadmin.h to my source I get "some" errors, shown below. I'm
> sure its something simple like adding a flag or similar, but I'v spent hours
> on this now. Im running Fedora 3 and Postgres 8.0.3. GCC 3.4.3 20050227.

Do you include c.h before miscadmin.h?  It seems to be required.
(The first error seems to be related to DLL_IMPORT).

--
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
"You knock on that door or the sun will be shining on places inside you
that the sun doesn't usually shine" (en Death: "The High Cost of Living")

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [hidden email]