Does ecpg understand forward declarations?

Поиск
Список
Период
Сортировка
От Sam Liapis
Тема Does ecpg understand forward declarations?
Дата
Msg-id 019201d42966$c8071f60$58155e20$@constrainttec.com
обсуждение исходный текст
Список pgsql-interfaces

[Retransmitting from MS mail client in the hope message is well formatted]

 

I'm a newbie to postgresql and ecpg in particular.

 

My brief is to 'convert' Oracle pro*C files ready for ecpg preprocessing.

 

I've so far struck what appears to be ecpg limitation such as multi-dim arrays, function pointers and void type.

But the one that's biting hard right now is ecpg seems to be unaware of or ignores forward declarations.

Take the classic scenario of mutually dependent structs A & B shown below.

 

ECPG keeps bailing with "ERROR: unrecognized data type name struct B" (at line 100)

If I remove the forward declaration its the same error for line 110 (struct B* ptr;)

 

100  struct B;

101

102 struct A {

         ...

110      struct B* ptr;

111  };

112

113  struct B {

         ...

120      struct A* ptr;

121 };

 

Can someone confirm this indeed is a shortcoming of ecpg and suggest any way around it?

 

Thanks,

Sam

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

Предыдущее
От: Sam Liapis
Дата:
Сообщение: Does ecpg understand forward declarations?
Следующее
От: Erwin Brandenberger
Дата:
Сообщение: ODBC SQLBindParameter for numeric