This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ../../gcc/cppfiles.c:823: size of array `intermed' has non-integer type


On Wed, 17 Mar 1999 11:39:12 -0500 (EST), "John David Anglin" wrote:
>Under hpux9.01, PIPE_BUF is only defined in limits.h if _XPG2 is defined.
>Here is the warning in the include file:
>
>/*
> * The following limits are not actually invariant, but can vary by file
> * system or device.  the correct values can be determined using the
> * pathconf() function.  The default values are provided here because the
> * constants are specified by several publications including XPG Issue 2
> * and SVID Issue 2.
> */

Hmm... I suppose in theory we ought to do it like this:

#ifdef _PC_PIPE_BUF
#undef PIPE_BUF
#define PIPE_BUF fpathconf (desc, _PC_PIPE_BUF)
#else
#ifndef PIPE_BUF
#define PIPE_BUF 4096  /* sane default */
#endif
#endif

The problem with this is PIPE_BUF is being used in an array
declaration, so we need a constant.  I don't think this is worth
sweating over, the only thing this choice affects is performance, and
it *should* be in the noise anyway.  If we have horrible performance
problems on systems like hpux9 we can revisit.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]