This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
[patch]: Add declaration of ttyname_r to unistd.h
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: newlib at sources dot redhat dot com
- Date: Tue, 20 Apr 2004 13:15:17 +0200
- Subject: [patch]: Add declaration of ttyname_r to unistd.h
- Reply-to: newlib at sources dot redhat dot com
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.