public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dave.anglin at bell dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/63471] [5.0 Regression] unix.c:1906:10: error: implicit declaration of function 'ttyname_r'
Date: Wed, 08 Oct 2014 15:37:00 -0000	[thread overview]
Message-ID: <bug-63471-4-I6GzTzORCu@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-63471-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63471

--- Comment #3 from dave.anglin at bell dot net ---
On 10/8/2014 9:43 AM, jb at gcc dot gnu.org wrote:
> Hmm, maybe add something like
>
> AC_CHECK_DECLS_ONCE([ttyname_r])
>
> to configure.ac and then in unix.c(stream_ttyname) check with
>
> #ifdef HAVE_TTYNAME_R && HAVE_DECL_TTYNAME_R
Don't we want to use ttyname_r in multithreaded applications?

It seems HP-UX is the only platform to hide the declaration of ttyname_r 
using _REENTRANT :-(
If configure finds ttyname_r, then presumably we don't need pthread 
linking for it.

On some platforms (MacOS 10.4 and Solaris 11), ttyname_r may return a 
'char *', not 'int'.

Dave


  parent reply	other threads:[~2014-10-08 15:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-07 16:41 [Bug libfortran/63471] New: " danglin at gcc dot gnu.org
2014-10-08 11:13 ` [Bug libfortran/63471] " rguenth at gcc dot gnu.org
2014-10-08 13:31 ` jb at gcc dot gnu.org
2014-10-08 13:43 ` jb at gcc dot gnu.org
2014-10-08 15:37 ` dave.anglin at bell dot net [this message]
2014-10-09  2:07 ` dave.anglin at bell dot net
2014-10-09  3:07 ` jb at gcc dot gnu.org
2014-10-10  7:43 ` jb at gcc dot gnu.org
2014-10-10 13:31 ` dave.anglin at bell dot net
2014-10-10 20:16 ` fxcoudert at gcc dot gnu.org
2014-10-13 17:15 ` danglin at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-63471-4-I6GzTzORCu@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).