Re: [HACKERS] SPARC, SunOS 5.5.1, gcc 2.7.2.1 - can't compile... - Mailing list pgsql-hackers

From David Hartwig
Subject Re: [HACKERS] SPARC, SunOS 5.5.1, gcc 2.7.2.1 - can't compile...
Date
Msg-id 35EFEB5A.9B061DF5@insightdist.com
Whole thread Raw
In response to SPARC, SunOS 5.5.1, gcc 2.7.2.1 - can't compile...  (Vadim Mikheev <vadim@krs.ru>)
Responses Re: [HACKERS] SPARC, SunOS 5.5.1, gcc 2.7.2.1 - can't compile...  (The Hermit Hacker <scrappy@hub.org>)
Re: [HACKERS] SPARC, SunOS 5.5.1, gcc 2.7.2.1 - can't compile...  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers

Vadim Mikheev wrote:

> src/backend/port/snprintf.c:
>
> snprintf.c:84: structure has no member named `_flags'
> snprintf.c:84: `__SWR' undeclared (first use this function)
> snprintf.c:84: (Each undeclared identifier is reported only once
> snprintf.c:84: for each function it appears in.)
> snprintf.c:84: `__SSTR' undeclared (first use this function)
> snprintf.c:85: structure has no member named `_bf'
> snprintf.c:85: structure has no member named `_p'
> snprintf.c:86: structure has no member named `_bf'
> snprintf.c:86: structure has no member named `_w'
> snprintf.c:89: structure has no member named `_p'
>                ^^^^^^^^^
> This is about FILE structure...
> BSD code was used for snprintf.c, but
> FILE in BSD is not the same as in SunOS 5.5.1...

I have the same problem on my AIX box.    , Linux includes snprint as in the
stdio library.

I would prefer to drop snprintf altogether, and replace it with sprintf and a
sufficient buffer.   The places where snprintf is used are logically bound to
string lengths less than 64 bytes.   Otherwise, snprintf becomes another
porting issue.    I have no idea how to ( or wheather I can) implement this
using vprintf.    The flags and data structures are very different.



pgsql-hackers by date:

Previous
From: Metin Ozsavran
Date:
Subject: Can PostgreSQL answer near-real-time demands?
Next
From: jwieck@debis.com (Jan Wieck)
Date:
Subject: Re: [HACKERS] Release 6.4