summaryrefslogtreecommitdiff
path: root/src/xxd
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-12-16 21:49:31 +0000
committerBram Moolenaar <Bram@vim.org>2005-12-16 21:49:31 +0000
commit12033fb4bfa58447ba89104ff671a076e756b8e6 (patch)
tree3a109c25124eea7e67e2b2a6a02db9db18bb7a2c /src/xxd
parentbca84a12bdbb4bb33e9ba32bfe320abbf54ae5fb (diff)
downloadvim-git-12033fb4bfa58447ba89104ff671a076e756b8e6.tar.gz
updated for version 7.0171
Diffstat (limited to 'src/xxd')
-rw-r--r--src/xxd/xxd.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/xxd/xxd.c b/src/xxd/xxd.c
index 299ba37f7..2b553dd6b 100644
--- a/src/xxd/xxd.c
+++ b/src/xxd/xxd.c
@@ -146,16 +146,18 @@ char osver[] = "";
#if !defined(CYGWIN) && (defined(CYGWIN32) || defined(__CYGWIN__) || defined(__CYGWIN32__))
# define CYGWIN
#endif
-#if defined(MSDOS) || defined(WIN32) || defined(OS2) || defined(CYGWIN)
+#if defined(MSDOS) || defined(WIN32) || defined(OS2)
# define BIN_READ(yes) ((yes) ? "rb" : "rt")
# define BIN_WRITE(yes) ((yes) ? "wb" : "wt")
# define BIN_CREAT(yes) ((yes) ? (O_CREAT|O_BINARY) : O_CREAT)
# define BIN_ASSIGN(fp, yes) setmode(fileno(fp), (yes) ? O_BINARY : O_TEXT)
-# if defined(CYGWIN)
-# define PATH_SEP '/'
-# else
-# define PATH_SEP '\\'
-# endif
+# define PATH_SEP '\\'
+#elif defined(CYGWIN)
+# define BIN_READ(yes) ((yes) ? "rb" : "rt")
+# define BIN_WRITE(yes) ((yes) ? "wb" : "w")
+# define BIN_CREAT(yes) ((yes) ? (O_CREAT|O_BINARY) : O_CREAT)
+# define BIN_ASSIGN(fp, yes) ((yes) ? (void) setmode(fileno(fp), O_BINARY) : (void) (fp))
+# define PATH_SEP '/'
#else
# ifdef VMS
# define BIN_READ(dummy) "r"