diff --git a/ChangeLog b/ChangeLog index fbc6e3fc6..404423a5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,8 @@ - (Bal) Patch for lack of RA_RESTART in misc.c for mysignal by stevesk + - (djm) Fix my breaking of cygwin builds, Patch from Corinna Vinschen + and myself. 20010217 - (bal) OpenBSD Sync: @@ -4010,4 +4012,4 @@ - Wrote replacements for strlcpy and mkdtemp - Released 1.0pre1 -$Id: ChangeLog,v 1.784 2001/02/17 16:51:07 mouring Exp $ +$Id: ChangeLog,v 1.785 2001/02/18 01:30:55 djm Exp $ diff --git a/Makefile.in b/Makefile.in index 1f8696a9c..a955a529b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.152 2001/02/15 03:01:59 mouring Exp $ +# $Id: Makefile.in,v 1.153 2001/02/18 01:30:55 djm Exp $ prefix=@prefix@ exec_prefix=@exec_prefix@ @@ -26,7 +26,7 @@ PATHS= -DETCDIR=\"$(sysconfdir)\" \ CC=@CC@ LD=@LD@ CFLAGS=@CFLAGS@ -CPPFLAGS=@CPPFLAGS@ -I. -I$(srcdir)/openbsd-compat -I$(srcdir) $(PATHS) @DEFS@ +CPPFLAGS=@CPPFLAGS@ -I$(srcdir)/openbsd-compat $(PATHS) @DEFS@ LIBS=@LIBS@ AR=@AR@ RANLIB=@RANLIB@ diff --git a/openbsd-compat/bsd-cygwin_util.c b/openbsd-compat/bsd-cygwin_util.c index 2dcb35521..ea981be50 100644 --- a/openbsd-compat/bsd-cygwin_util.c +++ b/openbsd-compat/bsd-cygwin_util.c @@ -15,7 +15,7 @@ #include "includes.h" -RCSID("$Id: bsd-cygwin_util.c,v 1.2 2001/02/09 01:55:36 djm Exp $"); +RCSID("$Id: bsd-cygwin_util.c,v 1.3 2001/02/18 01:30:56 djm Exp $"); #ifdef HAVE_CYGWIN @@ -26,8 +26,21 @@ RCSID("$Id: bsd-cygwin_util.c,v 1.2 2001/02/09 01:55:36 djm Exp $"); #include #define is_winnt (GetVersion() < 0x80000000) -int binary_open(const char *filename, int flags, mode_t mode) +#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, ...) { + va_list ap; + mode_t mode; + + va_start(ap, flags); + mode = va_arg(ap, mode_t); + va_end(ap); return open(filename, flags | O_BINARY, mode); } diff --git a/openbsd-compat/bsd-cygwin_util.h b/openbsd-compat/bsd-cygwin_util.h index b5d63cdc7..e2d4b4dae 100644 --- a/openbsd-compat/bsd-cygwin_util.h +++ b/openbsd-compat/bsd-cygwin_util.h @@ -13,9 +13,10 @@ * binary mode on Windows systems. */ -/* $Id: bsd-cygwin_util.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */ +/* $Id: bsd-cygwin_util.h,v 1.3 2001/02/18 01:30:56 djm Exp $ */ -#include "config.h" +#ifndef _BSD_CYGWIN_UTIL_H +#define _BSD_CYGWIN_UTIL_H #ifdef HAVE_CYGWIN @@ -28,3 +29,5 @@ int check_ntsec(const char *filename); #define pipe binary_pipe #endif /* HAVE_CYGWIN */ + +#endif /* _BSD_CYGWIN_UTIL_H */