Use ws_open(), not open(), so we handle UTF-8 pathnames on Windows.
Update or remove some additional "we don't have ferror() in zlib" comments to reflect the current reality. svn path=/trunk/; revision=36568
This commit is contained in:
parent
35c66a1745
commit
f5f74bed3d
|
@ -107,9 +107,6 @@ static int wtap_file_read_pattern (wtap *wth, const char *pattern, int *err)
|
|||
if (file_eof(wth->fh))
|
||||
return 0; /* EOF */
|
||||
else {
|
||||
/* We (presumably) got an error (there's no equivalent to
|
||||
"ferror()" in zlib, alas, so we don't have a wrapper
|
||||
to check for an error). */
|
||||
*err = file_error(wth->fh);
|
||||
return -1; /* error */
|
||||
}
|
||||
|
|
|
@ -226,10 +226,7 @@ static gint64 cosine_seek_next_packet(wtap *wth, int *err, char *hdr)
|
|||
/* We got an EOF. */
|
||||
*err = 0;
|
||||
} else {
|
||||
/* We (presumably) got an error (there's no
|
||||
equivalent to "ferror()" in zlib, alas,
|
||||
so we don't have a wrapper to check for
|
||||
an error). */
|
||||
/* We got an error. */
|
||||
*err = file_error(wth->fh);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -128,8 +128,7 @@ static gint64 dbs_etherwatch_seek_next_packet(wtap *wth, int *err)
|
|||
/* We got an EOF. */
|
||||
*err = 0;
|
||||
} else {
|
||||
/* We (presumably) got an error (there's no equivalent to "ferror()"
|
||||
in zlib, alas, so we don't have a wrapper to check for an error). */
|
||||
/* We got an error. */
|
||||
*err = file_error(wth->fh);
|
||||
}
|
||||
return -1;
|
||||
|
|
|
@ -126,9 +126,7 @@ static gint64 eyesdn_seek_next_packet(wtap *wth, int *err)
|
|||
/* We got an EOF. */
|
||||
*err = 0;
|
||||
} else {
|
||||
/* We (presumably) got an error (there's no equivalent to
|
||||
"ferror()" in zlib, alas, so we don't have a wrapper to
|
||||
check for an error). */
|
||||
/* We got an error. */
|
||||
*err = file_error(wth->fh);
|
||||
}
|
||||
return -1;
|
||||
|
|
|
@ -780,7 +780,7 @@ gzwfile_open(const char *path)
|
|||
GZWFILE_T state;
|
||||
int save_errno;
|
||||
|
||||
fd = open(path, O_BINARY|O_WRONLY|O_CREAT|O_TRUNC, 0666);
|
||||
fd = ws_open(path, O_BINARY|O_WRONLY|O_CREAT|O_TRUNC, 0666);
|
||||
if (fd == -1)
|
||||
return NULL;
|
||||
state = gzwfile_fdopen(fd);
|
||||
|
|
|
@ -427,12 +427,12 @@ iseries_seek_next_packet (wtap * wth, int *err)
|
|||
{
|
||||
if (file_eof (wth->fh))
|
||||
{
|
||||
/* We got an EOF. */
|
||||
*err = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We (presumably) got an error (there's no equivalent to "ferror()"
|
||||
in zlib, alas, so we don't have a wrapper to check for an error). */
|
||||
/* We got an error. */
|
||||
*err = file_error (wth->fh);
|
||||
}
|
||||
return -1;
|
||||
|
|
|
@ -135,10 +135,7 @@ static gint64 netscreen_seek_next_packet(wtap *wth, int *err, char *hdr)
|
|||
/* We got an EOF. */
|
||||
*err = 0;
|
||||
} else {
|
||||
/* We (presumably) got an error (there's no
|
||||
equivalent to "ferror()" in zlib, alas,
|
||||
so we don't have a wrapper to check for
|
||||
an error). */
|
||||
/* We got an error. */
|
||||
*err = file_error(wth->fh);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -150,8 +150,7 @@ static gint64 toshiba_seek_next_packet(wtap *wth, int *err)
|
|||
/* We got an EOF. */
|
||||
*err = 0;
|
||||
} else {
|
||||
/* We (presumably) got an error (there's no equivalent to "ferror()"
|
||||
in zlib, alas, so we don't have a wrapper to check for an error). */
|
||||
/* We got an error. */
|
||||
*err = file_error(wth->fh);
|
||||
}
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue