cannot add to postgresql project my own source files

Поиск
Список
Период
Сортировка
От dakotali kasap
Тема cannot add to postgresql project my own source files
Дата
Msg-id 20061223143510.81029.qmail@web31302.mail.mud.yahoo.com
обсуждение исходный текст
Список pgsql-hackers
<div style="font-family:times new roman, new york, times, serif;font-size:12pt">Hi,<br /><br />I want to write a
functionthat takes the raw parsetree and rewrites it according to my rules, then produce new raw parsetrees.<br /><br
/>Iwill call this function inside backend/tcop/postgres.c . I wrote an header file called my_rewriter.h and include
thisinside postgres.c.<br /><br />my_writer.h looks like:<br />-------------------------------------------------<br
/>#ifndefUWSDREWRITE_H<br />#define UWSDREWRITE_H<br /><br />#include "nodes/pg_list.h"<br />#include
"nodes/nodes.h"<br/><br />typedef struct my_Projection<br />{<br />    char *relname;<br />    List attnames;<br />   
char*result_relname;<br /><br />} my_Projection;<br /><br />.<br />.<br />.<br /><br />extern void  my_analyze(Node
*parsetree);<br/>extern void my_rewrite(List *parsetree_list);<br /><br />#endif UWSDREWRITE_H<br
/>---------------------------------------------<br/><br />Then I wrote a C file called my_writer.c, and do the
implementationof my_analyze(Node *parsetree) and my_rewrite(List *parsetree_list) functions.  I need Node and List
structureshere, but when I include the necessary header files (#include "nodes/pg_list.h", #include "nodes/nodes.h"), I
goterrors at compile time like:<br /><br />---------------------------------------<br
/>../../../src/include/nodes/nodes.h:359:error: syntax error before ‘Node’<br />../../../src/include/nodes/nodes.h:398:
error:syntax error before ‘equal’<br />../../../src/include/nodes/nodes.h:398: warning: type defaults to ‘int’ in
declarationof ‘equal’<br />../../../src/include/nodes/nodes.h:398: warning: data definition has no type or storage
class<br/>----------------------------------------<br /><br />So, I think there is a problem with the Makefiles but I
donot know what. I added the object file my_writer.o to the Makefile inside  backend/parser/Makefile and configured
again,but it did not work, what else should I do?<br /><br />regards,<br /><br />dakotali<br /><br /><br /></div><br
/>__________________________________________________<br/>Do You Yahoo!?<br />Tired of spam? Yahoo! Mail has the best
spamprotection around <br />http://mail.yahoo.com  

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Shane Ambler
Дата:
Сообщение: Re: Strange pgsql crash on MacOSX
Следующее
От: ohp@pyrenet.fr
Дата:
Сообщение: libxml on unixware