Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!ux1.cso.uiuc.edu!uxc.cso.uiuc.edu!uxc.cso.uiuc.edu!m.cs.uiuc.edu!s.cs.uiuc.edu!mccaugh From: mccaugh@s.cs.uiuc.edu Newsgroups: comp.lang.c Subject: Re: ttyname() - question Message-ID: <207600046@s.cs.uiuc.edu> Date: 4 Oct 89 06:25:00 GMT References: <99@lkbpyr.UUCP> Lines: 21 Nf-ID: #R:lkbpyr.UUCP:-9900:s.cs.uiuc.edu:207600046:000:679 Nf-From: s.cs.uiuc.edu!mccaugh Oct 4 01:25:00 1989 Shouldn't the declaration be: extern char *ttyname(); as it surely isn't defined by you, nor does it appear in . Also, did you know that 'ttyname' takes a system file-descriptor (I did not see one as an argument). You might try calling 'isatty' just to determine if your tty is "recognized" by the system. You refer to system differences, so I would con- sult the 'man' pages, then include enough #ifdef's to (hopefully) cover most of the cases. Best of Luck. Scott McCaughrin University of Illinois (mccaugh@s.cs.uiuc.edu) P.S. Perhaps some other '.h' has to be included for 'ttyname' to be under- stood properly in your configuration.