Re: [HACKERS] int8 type -- call for porting results!

Поиск
Список
Период
Сортировка
От David Hartwig
Тема Re: [HACKERS] int8 type -- call for porting results!
Дата
Msg-id 35D9B2DC.7C25DFE4@insightdist.com
обсуждение исходный текст
Ответ на int8 type -- call for porting results!  ("Thomas G. Lockhart" <lockhart@alumni.caltech.edu>)
Ответы Re: [HACKERS] int8 type -- call for porting results!
Re: [HACKERS] int8 type -- call for porting results!
Список pgsql-hackers
I just started compiling the 6.4 snapshot from this weekend on our AIX 4.1.4
system.   I am running into problems surrounding snprintf().

1.  Do I need to set something in Makefile.global to activate the
compilation of snprintf()

2.  snprintf() does not compile clean.  It has several explicate referenced
to FILE data elements which are not on our FILE structure.   The error
messages follow:

       81 |         f._flags = __SWR | __SSTR;
            ........a..........b.......c......
a - 1506-022 (S) "_flags" is not a member of "struct {...}".
b - 1506-045 (S) Undeclared identifier __SWR.
c - 1506-045 (S) Undeclared identifier __SSTR.
       82 |         f._bf._base = f._p = (unsigned char *)str;
            ........a.............b...........................
a - 1506-022 (S) "_bf" is not a member of "struct {...}".
b - 1506-022 (S) "_p" is not a member of "struct {...}".
       83 |         f._bf._size = f._w = n;
            ........a.............b........
a - 1506-022 (S) "_bf" is not a member of "struct {...}".
b - 1506-022 (S) "_w" is not a member of "struct {...}".
       86 |                 *f._p = '\0';
            .................a...........
a - 1506-022 (S) "_p" is not a member of "struct {...}".
gmake: *** [snprintf.o] Error 1

This section does not look to portable.   I'm thinking that you could  use a
simple sprintf() in int8out() and made the buffer sufficiently big enough
that it could not overflow.   I will gladly submit a patch.

Please advise.

Thomas G. Lockhart wrote:

> Hi. A month or two ago I put an int8 data type into Postgres. Aside from
> being useful on its own, it could also form the basis for other types
> needing extended range, such as money, decimal, and numeric types (the
> last two are SQL92 types).
>
> Anyway, I implemented it on a gcc/x86/Linux machine, and we will need to
> ensure that it works on other platforms. If you are doing any work at
> all with a post-v6.3.2 source tree on another platform/OS combination,
> can you please look at the results of the int8 regression test, or run
> that test on your own, and let me know if it worked? If it didn't work,
> then we should either put it on the list of things to do or make it work
> in time for v6.4. But at the moment I don't know either way.
>
> btw, there is a chance that the Alpha port will work since I coded for
> it and I used to work on Alpha machines...
>
> TIA
>
>                      - Tom




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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: sequence creation
Следующее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] int8 type -- call for porting results!