]> andersk Git - openssh.git/blob - cygwin_util.c
- (djm) Merge cygwin support from Corinna Vinschen <vinschen@cygnus.com>
[openssh.git] / cygwin_util.c
1 /*
2  *
3  * cygwin_util.c
4  *
5  * Author: Corinna Vinschen <vinschen@cygnus.com>
6  *
7  * Copyright (c) 2000 Corinna Vinschen <vinschen@cygnus.com>, Duisburg, Germany
8  *                    All rights reserved
9  *
10  * Created: Sat Sep 02 12:17:00 2000 cv
11  *
12  * This file contains functions for forcing opened file descriptors to
13  * binary mode on Windows systems.
14  */
15
16 #include "config.h"
17
18 #ifdef HAVE_CYGWIN
19 #include <fcntl.h>
20 #include <io.h>
21
22 int binary_open(const char *filename, int flags, mode_t mode)
23 {
24        return open(filename, flags | O_BINARY, mode);
25 }
26
27 int binary_pipe(int fd[2])
28 {
29        int ret = pipe(fd);
30        if (!ret) {
31                setmode (fd[0], O_BINARY);
32                setmode (fd[1], O_BINARY);
33        }
34 }
35 #endif
This page took 0.037841 seconds and 5 git commands to generate.