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

From: David Hartwig <daveh(at)insightdist(dot)com>
To: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Postgres Hackers List <hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] int8 type -- call for porting results!
Date: 1998-08-18 16:59:08
Message-ID: 35D9B2DC.7C25DFE4@insightdist.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 1998-08-18 17:17:49 Re: [HACKERS] int8 type -- call for porting results!
Previous Message Bruce Momjian 1998-08-18 16:50:07 sequence creation