A simple cleanup
Corinna Vinschen
vinschen at redhat.com
Sat Feb 3 01:46:17 EST 2001
Hi,
I have attached a patch which eliminates two "#ifdef HAVE_CYGWIN".
In scp.c I have replaced it by "#ifdef HAVE_TCGETPGRP". tcgetpgrp(3)
is the correct way to get the controlling tty anyway, according to
POSIX.1 and SUSv2.
The HAVE_CYGWIN in includes.h can be dropped because Cygwin got a
netinet/tcp.h in the meantime.
Corinna
--
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.
mailto:vinschen at redhat.com
-------------- next part --------------
Index: configure.in
===================================================================
RCS file: /cvs/openssh_cvs/configure.in,v
retrieving revision 1.228
diff -u -p -r1.228 configure.in
--- configure.in 2001/01/31 21:52:03 1.228
+++ configure.in 2001/02/02 14:37:12
@@ -316,7 +316,7 @@ AC_CHECK_FUNC(utimes,
AC_CHECK_HEADERS(bstring.h endian.h floatingpoint.h getopt.h lastlog.h limits.h login.h login_cap.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h regex.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/queue.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h sys/un.h stddef.h time.h ttyent.h usersec.h util.h utime.h utmp.h utmpx.h vis.h)
dnl Checks for library functions.
-AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getnameinfo getrlimit getrusage getttyent inet_aton inet_ntoa innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty realpath rresvport_af setdtablesize setenv seteuid setlogin setproctitle setreuid setrlimit setsid sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep strtok_r sysconf utimes vsnprintf vhangup vis waitpid _getpty __b64_ntop)
+AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getnameinfo getrlimit getrusage getttyent inet_aton inet_ntoa innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty realpath rresvport_af setdtablesize setenv seteuid setlogin setproctitle setreuid setrlimit setsid sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep strtok_r sysconf tcgetpgrp utimes vsnprintf vhangup vis waitpid _getpty __b64_ntop)
dnl Checks for time functions
AC_CHECK_FUNCS(gettimeofday time)
dnl Checks for libutil functions
Index: includes.h
===================================================================
RCS file: /cvs/openssh_cvs/includes.h,v
retrieving revision 1.43
diff -u -p -r1.43 includes.h
--- includes.h 2001/01/31 21:52:03 1.43
+++ includes.h 2001/02/02 14:37:12
@@ -29,9 +29,7 @@ static /**/const char *const rcsid[] = {
#include <sys/wait.h>
#include <sys/resource.h>
-#ifndef HAVE_CYGWIN
#include <netinet/tcp.h>
-#endif
#include <arpa/inet.h>
#include <stdio.h>
Index: scp.c
===================================================================
RCS file: /cvs/openssh_cvs/scp.c,v
retrieving revision 1.47
diff -u -p -r1.47 scp.c
--- scp.c 2001/01/22 05:34:42 1.47
+++ scp.c 2001/02/02 14:37:14
@@ -1111,11 +1111,7 @@ foregroundproc()
if (pgrp == -1)
pgrp = getpgrp();
-#ifdef HAVE_CYGWIN
- /*
- * Cygwin only supports tcgetpgrp() for getting the controlling tty
- * currently.
- */
+#ifdef HAVE_TCGETPGRP
return ((ctty_pgrp = tcgetpgrp(STDOUT_FILENO)) != -1 &&
ctty_pgrp == pgrp);
#else
More information about the openssh-unix-dev
mailing list