ttyname() - question

mccaugh at s.cs.uiuc.edu mccaugh at s.cs.uiuc.edu
Wed Oct 4 16:25:00 AEST 1989


 Shouldn't the declaration be:

      extern char *ttyname();

 as it surely isn't defined by you, nor does it appear in <stdio.h>. 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 at s.cs.uiuc.edu)

 P.S. Perhaps some other '.h' has to be included for 'ttyname' to be under-
      stood properly in your configuration.
 



More information about the Comp.lang.c mailing list