* tests/test-forkpty.c (SIGNATURE_CHECK): Add appropriate const. Reported by Simon Josefsson.
Signed-off-by: Eric Blake <ebl...@redhat.com> --- > I get a warning during compile though: > > test-forkpty.c:24: warning: initialization from incompatible pointer type > Oops - bug on my part. I'm pushing this. > According to the Mac OS X manpage the signature is: > > pid_t > forkpty(int *amaster, char *name, struct termios *termp, > struct winsize *winp); > > Libc has this signature: > > extern int forkpty (int *__amaster, char *__name, > const struct termios *__termp, > const struct winsize *__winp) __THROW; > > Is pid_t and int guaranteed to be the same size? No, they are not necessarily the same size. But at this point, I haven't spent any time trying to tackle the MacOS issues, just the signature check. ChangeLog | 6 ++++++ tests/test-forkpty.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7098e41..61d9292 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-04-15 Eric Blake <ebl...@redhat.com> + + test-forkpty: fix expected signature + * tests/test-forkpty.c (SIGNATURE_CHECK): Add appropriate const. + Reported by Simon Josefsson. + 2010-04-15 Jim Meyering <meyer...@redhat.com> maint.mk: texinfo_suffix_re_: correct the default regexp diff --git a/tests/test-forkpty.c b/tests/test-forkpty.c index d87a107..bbccb22 100644 --- a/tests/test-forkpty.c +++ b/tests/test-forkpty.c @@ -21,8 +21,8 @@ #include <pty.h> #include "signature.h" -SIGNATURE_CHECK (forkpty, int, (int *, char *, struct termios *, - struct winsize *)); +SIGNATURE_CHECK (forkpty, int, (int *, char *, struct termios const *, + struct winsize const *)); #include <stdio.h> -- 1.6.6.1