OpenSSH 2.5.0p1

Damien Miller djm at mindrot.org
Sat Feb 17 11:01:45 EST 2001


On Sat, 17 Feb 2001, Corinna Vinschen wrote:

> Just got the latest from CVS. Damien has made a change to the
> openbsd-compat/bsd-cygwin_util.c file which broke the Cygwin build.
> You must not include bsd-cygwin_util.h in bsd-cygwin_util.c
> because of the dangerous redefinitions of open and pipe.

Sorry!

Does this fix?

Index: openbsd-compat/bsd-cygwin_util.c
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/bsd-cygwin_util.c,v
retrieving revision 1.2
diff -u -r1.2 bsd-cygwin_util.c
--- openbsd-compat/bsd-cygwin_util.c	2001/02/09 01:55:36	1.2
+++ openbsd-compat/bsd-cygwin_util.c	2001/02/17 00:01:10
@@ -26,6 +26,13 @@
 #include <windows.h>
 #define is_winnt       (GetVersion() < 0x80000000)
 
+#if defined(open) && open == binary_open
+# undef open
+#endif
+#if defined(pipe) && open == binary_pipe
+# undef pipe
+#endif
+
 int binary_open(const char *filename, int flags, mode_t mode)
 {
 	return open(filename, flags | O_BINARY, mode);
Index: openbsd-compat/bsd-cygwin_util.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/bsd-cygwin_util.h,v
retrieving revision 1.2
diff -u -r1.2 bsd-cygwin_util.h
--- openbsd-compat/bsd-cygwin_util.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/bsd-cygwin_util.h	2001/02/17 00:01:10
@@ -15,7 +15,8 @@
 
 /* $Id: bsd-cygwin_util.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
 
-#include "config.h"
+#ifndef _BSD_CYGWIN_UTIL_H
+#define _BSD_CYGWIN_UTIL_H
 
 #ifdef HAVE_CYGWIN
 
@@ -28,3 +29,5 @@
 #define pipe binary_pipe
 
 #endif /* HAVE_CYGWIN */
+
+#endif /* _BSD_CYGWIN_UTIL_H */

-- 
| Damien Miller <djm at mindrot.org> \ ``E-mail attachments are the poor man's 
| http://www.mindrot.org          /   distributed filesystem'' - Dan Geer






More information about the openssh-unix-dev mailing list