diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/iobuf.c | 17 | ||||
-rw-r--r-- | common/w32-afunix.h | 2 |
2 files changed, 11 insertions, 8 deletions
diff --git a/common/iobuf.c b/common/iobuf.c index d49de9695..e8b4a034e 100644 --- a/common/iobuf.c +++ b/common/iobuf.c @@ -267,6 +267,7 @@ direct_open (const char *fname, const char *mode, int mode700) unsigned long da, cd, sm; HANDLE hfile; + (void)mode700; /* Note, that we do not handle all mode combinations */ /* According to the ReactOS source it seems that open() of the @@ -2271,8 +2272,6 @@ iobuf_set_limit (iobuf_t a, off_t nlimit) off_t iobuf_get_filelength (iobuf_t a, int *overflow) { - struct stat st; - if (overflow) *overflow = 0; @@ -2330,11 +2329,15 @@ iobuf_get_filelength (iobuf_t a, int *overflow) } log_error ("GetFileSize for handle %p failed: %s\n", fp, w32_strerror (0)); -#else - if ( !fstat (FD2INT (fp), &st) ) - return st.st_size; - log_error("fstat() failed: %s\n", strerror(errno) ); -#endif +#else /*!HAVE_W32_SYSTEM*/ + { + struct stat st; + + if ( !fstat (FD2INT (fp), &st) ) + return st.st_size; + log_error("fstat() failed: %s\n", strerror(errno) ); + } +#endif /*!HAVE_W32_SYSTEM*/ } return 0; diff --git a/common/w32-afunix.h b/common/w32-afunix.h index f6282a3dd..7025a4914 100644 --- a/common/w32-afunix.h +++ b/common/w32-afunix.h @@ -38,7 +38,7 @@ #include <unistd.h> /* We can easiliy replace this code by the socket wrappers from libassuan. */ -#warning Please do not use this module anymore +#warning Remove this code; it is only used on w32 by symcryptrun. #define DIRSEP_C '\\' |