This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
match pty.h to glibc
- From: Eric Blake <ebb9 at byu dot net>
- To: cygwin-patches at cygwin dot com
- Date: Fri, 25 Dec 2009 22:13:53 -0700
- Subject: match pty.h to glibc
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
As of glibc 2.8, pty.h now marks the last two arguments of openpty and
forkpty as const. These functions are not standardized, and we aren't
altering the parameters, so I see no reason why we can't also make the
change. OK to apply?
2009-12-26 Eric Blake <ebb9@byu.net>
* include/pty.h (openpty, forkpty): Mark last two arguments const,
to match glibc 2.8.
* libc/bsdlib.cc (openpty, forkpty): Likewise.
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAks1m5AACgkQ84KuGfSFAYCTCQCgjmQaM56Acwh0eX9g6+yabGny
jB4An0ziKLGgy+svOXGZT27+sq1dfATn
=l343
-----END PGP SIGNATURE-----
>From 730f55925137fb0bea116ac5ec3864d86aaa4ac6 Mon Sep 17 00:00:00 2001
From: Eric Blake <ebb9@byu.net>
Date: Fri, 25 Dec 2009 22:09:58 -0700
Subject: [PATCH] change pty.h signatures
---
winsup/cygwin/ChangeLog | 6 ++++++
winsup/cygwin/include/pty.h | 6 ++++--
winsup/cygwin/libc/bsdlib.cc | 7 ++++---
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/winsup/cygwin/include/pty.h b/winsup/cygwin/include/pty.h
index e4b4da0..7b92a2b 100644
--- a/winsup/cygwin/include/pty.h
+++ b/winsup/cygwin/include/pty.h
@@ -8,8 +8,10 @@
extern "C" {
#endif
-int _EXFUN(openpty ,(int *, int *, char *, struct termios *, struct winsize *));
-int _EXFUN(forkpty ,(int *, char *, struct termios *, struct winsize *));
+int _EXFUN(openpty ,(int *, int *, char *, const struct termios *,
+ const struct winsize *));
+int _EXFUN(forkpty ,(int *, char *, const struct termios *,
+ const struct winsize *));
#ifdef __cplusplus
}
diff --git a/winsup/cygwin/libc/bsdlib.cc b/winsup/cygwin/libc/bsdlib.cc
index 61797e4..116b246 100644
--- a/winsup/cygwin/libc/bsdlib.cc
+++ b/winsup/cygwin/libc/bsdlib.cc
@@ -97,8 +97,8 @@ login_tty (int fd)
}
extern "C" int
-openpty (int *amaster, int *aslave, char *name, struct termios *termp,
- struct winsize *winp)
+openpty (int *amaster, int *aslave, char *name, const struct termios *termp,
+ const struct winsize *winp)
{
int master, slave;
char pts[TTY_NAME_MAX];
@@ -130,7 +130,8 @@ openpty (int *amaster, int *aslave, char *name, struct termios *termp,
}
extern "C" int
-forkpty (int *amaster, char *name, struct termios *termp, struct winsize *winp)
+forkpty (int *amaster, char *name, const struct termios *termp,
+ const struct winsize *winp)
{
int master, slave, pid;
--
1.6.4.2