diff options
author | Damien Miller <djm@mindrot.org> | 2001-02-18 12:30:55 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2001-02-18 12:30:55 +1100 |
commit | 2deb3f64f60d5fe0331f87416d99536b220d7a4f (patch) | |
tree | 1d5e69bd29c83bd339c14b970d1189843260f2ba | |
parent | e74ebd03c23896f3f3d3f00cf5cc44c3f16c4c43 (diff) |
- (djm) Fix my breaking of cygwin builds, Patch from Corinna Vinschen
<vinschen@redhat.com> and myself.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Makefile.in | 4 | ||||
-rw-r--r-- | openbsd-compat/bsd-cygwin_util.c | 17 | ||||
-rw-r--r-- | openbsd-compat/bsd-cygwin_util.h | 7 |
4 files changed, 25 insertions, 7 deletions
@@ -3,6 +3,8 @@ | |||
3 | <tim@multitalents.net> | 3 | <tim@multitalents.net> |
4 | - (Bal) Patch for lack of RA_RESTART in misc.c for mysignal by | 4 | - (Bal) Patch for lack of RA_RESTART in misc.c for mysignal by |
5 | stevesk | 5 | stevesk |
6 | - (djm) Fix my breaking of cygwin builds, Patch from Corinna Vinschen | ||
7 | <vinschen@redhat.com> and myself. | ||
6 | 8 | ||
7 | 20010217 | 9 | 20010217 |
8 | - (bal) OpenBSD Sync: | 10 | - (bal) OpenBSD Sync: |
@@ -4010,4 +4012,4 @@ | |||
4010 | - Wrote replacements for strlcpy and mkdtemp | 4012 | - Wrote replacements for strlcpy and mkdtemp |
4011 | - Released 1.0pre1 | 4013 | - Released 1.0pre1 |
4012 | 4014 | ||
4013 | $Id: ChangeLog,v 1.784 2001/02/17 16:51:07 mouring Exp $ | 4015 | $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 @@ | |||
1 | # $Id: Makefile.in,v 1.152 2001/02/15 03:01:59 mouring Exp $ | 1 | # $Id: Makefile.in,v 1.153 2001/02/18 01:30:55 djm Exp $ |
2 | 2 | ||
3 | prefix=@prefix@ | 3 | prefix=@prefix@ |
4 | exec_prefix=@exec_prefix@ | 4 | exec_prefix=@exec_prefix@ |
@@ -26,7 +26,7 @@ PATHS= -DETCDIR=\"$(sysconfdir)\" \ | |||
26 | CC=@CC@ | 26 | CC=@CC@ |
27 | LD=@LD@ | 27 | LD=@LD@ |
28 | CFLAGS=@CFLAGS@ | 28 | CFLAGS=@CFLAGS@ |
29 | CPPFLAGS=@CPPFLAGS@ -I. -I$(srcdir)/openbsd-compat -I$(srcdir) $(PATHS) @DEFS@ | 29 | CPPFLAGS=@CPPFLAGS@ -I$(srcdir)/openbsd-compat $(PATHS) @DEFS@ |
30 | LIBS=@LIBS@ | 30 | LIBS=@LIBS@ |
31 | AR=@AR@ | 31 | AR=@AR@ |
32 | RANLIB=@RANLIB@ | 32 | 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 @@ | |||
15 | 15 | ||
16 | #include "includes.h" | 16 | #include "includes.h" |
17 | 17 | ||
18 | RCSID("$Id: bsd-cygwin_util.c,v 1.2 2001/02/09 01:55:36 djm Exp $"); | 18 | RCSID("$Id: bsd-cygwin_util.c,v 1.3 2001/02/18 01:30:56 djm Exp $"); |
19 | 19 | ||
20 | #ifdef HAVE_CYGWIN | 20 | #ifdef HAVE_CYGWIN |
21 | 21 | ||
@@ -26,8 +26,21 @@ RCSID("$Id: bsd-cygwin_util.c,v 1.2 2001/02/09 01:55:36 djm Exp $"); | |||
26 | #include <windows.h> | 26 | #include <windows.h> |
27 | #define is_winnt (GetVersion() < 0x80000000) | 27 | #define is_winnt (GetVersion() < 0x80000000) |
28 | 28 | ||
29 | int binary_open(const char *filename, int flags, mode_t mode) | 29 | #if defined(open) && open == binary_open |
30 | # undef open | ||
31 | #endif | ||
32 | #if defined(pipe) && open == binary_pipe | ||
33 | # undef pipe | ||
34 | #endif | ||
35 | |||
36 | int binary_open(const char *filename, int flags, ...) | ||
30 | { | 37 | { |
38 | va_list ap; | ||
39 | mode_t mode; | ||
40 | |||
41 | va_start(ap, flags); | ||
42 | mode = va_arg(ap, mode_t); | ||
43 | va_end(ap); | ||
31 | return open(filename, flags | O_BINARY, mode); | 44 | return open(filename, flags | O_BINARY, mode); |
32 | } | 45 | } |
33 | 46 | ||
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 @@ | |||
13 | * binary mode on Windows systems. | 13 | * binary mode on Windows systems. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | /* $Id: bsd-cygwin_util.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */ | 16 | /* $Id: bsd-cygwin_util.h,v 1.3 2001/02/18 01:30:56 djm Exp $ */ |
17 | 17 | ||
18 | #include "config.h" | 18 | #ifndef _BSD_CYGWIN_UTIL_H |
19 | #define _BSD_CYGWIN_UTIL_H | ||
19 | 20 | ||
20 | #ifdef HAVE_CYGWIN | 21 | #ifdef HAVE_CYGWIN |
21 | 22 | ||
@@ -28,3 +29,5 @@ int check_ntsec(const char *filename); | |||
28 | #define pipe binary_pipe | 29 | #define pipe binary_pipe |
29 | 30 | ||
30 | #endif /* HAVE_CYGWIN */ | 31 | #endif /* HAVE_CYGWIN */ |
32 | |||
33 | #endif /* _BSD_CYGWIN_UTIL_H */ | ||