Mercurial > vim
diff src/xxd/xxd.c @ 602:111509d2767a
updated for version 7.0171
author | vimboss |
---|---|
date | Fri, 16 Dec 2005 21:49:31 +0000 |
parents | da182deebec7 |
children | 0f9f4761ad9c |
line wrap: on
line diff
--- 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"