[patch]: Add declaration of ttyname_r to unistd.h

Corinna Vinschen vinschen@redhat.com
Tue Apr 20 11:41:00 GMT 2004


Hi,

I applied the below patch to libc/include/sys/unistd.h to add ttyname_r
to Cygwin.  Sorry for the missing comma in the first try...


Corinna

	* libc/include/sys/unistd.h (ttyname_r): Add declaration for Cygwin.

Index: libc/include/sys/unistd.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/sys/unistd.h,v
retrieving revision 1.50
diff -u -p -r1.50 unistd.h
--- libc/include/sys/unistd.h   10 Apr 2004 20:39:47 -0000      1.50
+++ libc/include/sys/unistd.h   20 Apr 2004 11:13:15 -0000
@@ -146,6 +146,9 @@ long    _EXFUN(sysconf, (int __name ));
 pid_t   _EXFUN(tcgetpgrp, (int __fildes ));
 int     _EXFUN(tcsetpgrp, (int __fildes, pid_t __pgrp_id ));
 char    _EXFUN(*ttyname, (int __fildes ));
+#if defined(__CYGWIN__)
+int     _EXFUN(ttyname_r, (int, char *, size_t)); 
+#endif
 int     _EXFUN(unlink, (const char *__path ));
 int     _EXFUN(vhangup, (void ));
 _READ_WRITE_RETURN_TYPE _EXFUN(write, (int __fd, const void *__buf, size_t __nbyte ));

-- 
Corinna Vinschen
Cygwin Co-Project Leader
Red Hat, Inc.



More information about the Newlib mailing list