This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
fdopen and _fcntl
- To: newlib at sources dot redhat dot com
- Subject: fdopen and _fcntl
- From: "J. Johnston" <jjohnstn at cygnus dot com>
- Date: Wed, 21 Feb 2001 18:45:56 -0500
- Organization: Red Hat Inc.
A problem has occurred recently trying to link newlib with the new libstdc++ library v3 due to the
use of fdopen(). The libc/stdio/fdopen.c code was calling _fcntl() to verify the flags passed, but
_fcntl() is not one of the base newlib OS functions and most newlib embedded targets don't have it
either in newlib, libgloss, or as part of a bsp.
I have checked in a fix whereby the _fcntl() calls in fdopen() are now protected by a check for
HAVE_FCNTL. I have defined this flag in configure.host for a number of platforms, but I may have
missed some. If you notice any configuration where this flag should be set, but isn't, please
notify the mailing list.
-- Jeff J.
2001-02-21 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/fdopen.c (fdopen): Protect calls to _fcntl() with
HAVE_FCNTL flag check.
* configure.host: Define HAVE_FCNTL for Cygwin, go32, RTEMS, sparc64,
powerpcle, x86 netware, x86 sco, x86 Linux and Vxworks.