This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Toward a satisfactory showmanyc
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: Paolo Carlini <pcarlini at unitus dot it>
- Cc: Nathan Myers <ncm at cantrip dot org>, "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 20 Mar 2003 23:22:03 +0100
- Subject: Re: Toward a satisfactory showmanyc
- References: <3E7A1BFE.8000408@unitus.it>
Paolo Carlini wrote:
Of course this implies autoconf machinery for <sys/ioctl.h>
vs <ioctl.h> and also for FIONREAD in <sys/filio.h>
(I had hoped for fewer different possibilites :(
A small update: this part turns out to be easy, since we can stole
the whole thing from libjava ;)
Essentially:
dnl We check for sys/filio.h because Solaris 2.5 defines FIONREAD there.
dnl On that system, sys/ioctl.h will not include sys/filio.h unless
dnl BSD_COMP is defined; just including sys/filio.h is simpler.
AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
and then:
#ifdef HAVE_SYS_IOCTL_H
#define BSD_COMP /* Get FIONREAD on Solaris2. */
#include <sys/ioctl.h>
#endif
// Pick up FIONREAD on Solaris 2.5.
#ifdef HAVE_SYS_FILIO_H
#include <sys/filio.h>
#endif
Paolo.