History log of /libuv/src/win/fs.c (Results 126 – 150 of 215)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
Revision tags: v0.11.19, v0.10.24, v0.11.18, v0.10.23, v0.10.22, v0.11.17, v0.10.21
# c0716b3d 17-Dec-2013 Alexis Campailla

windows: improved handling of invalid FDs

If passed and invalid FD, _get_osfhandle() sets an error code
through errno, not _doserrno. Hence we need to use
SET_REQ_WIN32_ERROR insted

windows: improved handling of invalid FDs

If passed and invalid FD, _get_osfhandle() sets an error code
through errno, not _doserrno. Hence we need to use
SET_REQ_WIN32_ERROR insted of SET_REQ_RESULT.

In debug builds, _get_osfhandle() also raises a superfluous
assert. I implemented a wrapper that disables all asserts
around the call to _get_osfhandle().

This fixes node.js unit tests test-fs-read-stream.js and
test-listen-fd-ebadf.js.

show more ...

Revision tags: v0.11.16, v0.10.20, v0.11.15, v0.10.19
# c6ecf97a 08-Nov-2013 Ben Noordhuis

windows: use _snwprintf(), not swprintf()

Drop the _CRT_NON_CONFORMING_SWPRINTFS hack and just use _snwprintf().

It's a long and complicated story but the gist of it is that the MS

windows: use _snwprintf(), not swprintf()

Drop the _CRT_NON_CONFORMING_SWPRINTFS hack and just use _snwprintf().

It's a long and complicated story but the gist of it is that the MS CRT
had a swprintf() function before ISO C did, with a different function
prototype to boot: the ISO C one takes a |size| argument, the MS one
does not.

The function prototype that's exported by mingw and mingw-w64 depends
on the mingw version and the _CRT_NON_CONFORMING_SWPRINTFS define.
If they don't match up, you get the wrong prototype and things will
crash at run-time.

Reduce the phase space by sidestepping the whole issue: drop swprintf()
altogether and use _snwprintf() from now on.

Fixes #990.

show more ...

Revision tags: v0.11.14, v0.10.18, v0.10.17, v0.10.16
# 20e774c6 05-Sep-2013 Bert Belder

windows/fs: handle _open_osfhandle() failure correctly

Until now we assumed that _open_osfhandle() would set _doserrno on
failure. This assumption was very wrong in one obvious case, nam

windows/fs: handle _open_osfhandle() failure correctly

Until now we assumed that _open_osfhandle() would set _doserrno on
failure. This assumption was very wrong in one obvious case, namely when
the CRT file descriptor table would fill up. In that case errno is set
to EMFILE, but GetLastError() returns zero - which makes sense because
it's not a win32 error but rather a CRT problem.

show more ...

# 489fb4c9 05-Sep-2013 Bert Belder

windows/fs: make uv_fs_open() report EINVAL correctly

Before, when the user passed an invalid paramter to uv_fs_open, libuv
would detect this and call SET_REQ_RESULT to set the result va

windows/fs: make uv_fs_open() report EINVAL correctly

Before, when the user passed an invalid paramter to uv_fs_open, libuv
would detect this and call SET_REQ_RESULT to set the result value to -1.
SET_REQ_RESULT then stored whatever error code was returned by
GetLastError(), which would have no relationship to the actual problem,
and might as well be zero.

show more ...

# 0f3c910c 05-Sep-2013 Bert Belder

windows/fs: wrap multi-statement macros in do..while block

# faf2c593 05-Sep-2013 Bert Belder

windows/fs: handle _open_osfhandle() failure correctly

Until now we assumed that _open_osfhandle() would set _doserrno on
failure. This assumption was very wrong in one obvious case, nam

windows/fs: handle _open_osfhandle() failure correctly

Until now we assumed that _open_osfhandle() would set _doserrno on
failure. This assumption was very wrong in one obvious case, namely when
the CRT file descriptor table would fill up. In that case errno is set
to EMFILE, but GetLastError() returns zero - which makes sense because
it's not a win32 error but rather a CRT problem.

show more ...

# 812717d0 05-Sep-2013 Bert Belder

windows/fs: make uv_fs_open() report EINVAL correctly

Before, when the user passed an invalid paramter to uv_fs_open, libuv
would detect this and call SET_REQ_RESULT to set the result va

windows/fs: make uv_fs_open() report EINVAL correctly

Before, when the user passed an invalid paramter to uv_fs_open, libuv
would detect this and call SET_REQ_RESULT to set the result value to -1.
SET_REQ_RESULT then stored whatever error code was returned by
GetLastError(), which would have no relationship to the actual problem,
and might as well be zero.

show more ...

# 39bef329 05-Sep-2013 Bert Belder

windows/fs: wrap multi-statement macros in do..while block

Revision tags: v0.11.13, v0.11.12
# fe3a11e0 31-Aug-2013 Brent Cook

windows: check for nonconforming swprintf arguments

Newer versions of mingw do include the correct API for swprintf.
Check for _CRT_NON_CONFORMING_SWPRINTFS as specified in the swprintf

windows: check for nonconforming swprintf arguments

Newer versions of mingw do include the correct API for swprintf.
Check for _CRT_NON_CONFORMING_SWPRINTFS as specified in the swprintf
documentation:
http://msdn.microsoft.com/en-us/library/ybk95axf(v=vs.90).aspx

show more ...

# 76709c6b 31-Aug-2013 Ben Noordhuis

windows: remove unused is_path_dir() function

# bdc82897 31-Aug-2013 Ben Noordhuis

windows: fix flags assignment in uv_fs_readdir()

Revision tags: v0.11.11, v0.11.10
# 20a8e58a 24-Aug-2013 Bert Belder

windows: reimplement uv_fs_stat using NT syscalls

This improves the output of uv_fs_stat:
* `st_ctime` now contains the change time, not the creation time.
* `st_ino` is now fill

windows: reimplement uv_fs_stat using NT syscalls

This improves the output of uv_fs_stat:
* `st_ctime` now contains the change time, not the creation time.
* `st_ino` is now filled in with an fs-specific unique number.
* `st_dev` is set to the serial number of the containing file system.
* `st_blocks` now gets set.
* `st_blksize` is no longer zero, but set to a reasonable default.

show more ...

# 1cc6f96f 24-Aug-2013 Bert Belder

windows: squelch some compiler warnings

This removes some compiler warnings caused by implicit type conversion
from uint64_t to long, which would happen in the `FILETIME_TO_TIMESPEC`

windows: squelch some compiler warnings

This removes some compiler warnings caused by implicit type conversion
from uint64_t to long, which would happen in the `FILETIME_TO_TIMESPEC`
macro.

show more ...

# 7f756955 24-Aug-2013 Bert Belder

windows: make uv_fs_chmod() report errors correctly

Before this patch libuv would attempt to use GetLastError() to retrieve
the cause of NtQueryInformationFile failure, but that's not ho

windows: make uv_fs_chmod() report errors correctly

Before this patch libuv would attempt to use GetLastError() to retrieve
the cause of NtQueryInformationFile failure, but that's not how it
should be done.

show more ...

# 851a6624 24-Aug-2013 Bert Belder

windows: make uv_fs_chmod() report errors correctly

Before this patch libuv would attempt to use GetLastError() to retrieve
the cause of NtQueryInformationFile failure, but that's not ho

windows: make uv_fs_chmod() report errors correctly

Before this patch libuv would attempt to use GetLastError() to retrieve
the cause of NtQueryInformationFile failure, but that's not how it
should be done.

show more ...

Revision tags: v0.10.15, v0.11.9, v0.10.14, v0.11.8, v0.11.7
# 0e7ba080 29-Jul-2013 Ben Noordhuis

unix, windows: make buf arg to uv_fs_write const

Change the uv_fs_write() prototype so the 'buf' argument is now
`const void*` rather than `void*`.

The argument is stored in a n

unix, windows: make buf arg to uv_fs_write const

Change the uv_fs_write() prototype so the 'buf' argument is now
`const void*` rather than `void*`.

The argument is stored in a non-const field in the uv_fs_t but that's
inconsequential because the memory it points to is not touched.

show more ...

# 3d4099eb 25-Jul-2013 Ben Noordhuis

Merge remote-tracking branch 'origin/v0.10'

Conflicts:
AUTHORS
ChangeLog
src/version.c
src/win/fs.c


Revision tags: v0.10.13
# 977e8337 25-Jul-2013 Ben Noordhuis

build: add mingw makefile

* add a very simple Makefile.mingw that builds libuv.a
* apply a couple of fixes to src/win so it actually builds with mingw
(mostly missing includes)

build: add mingw makefile

* add a very simple Makefile.mingw that builds libuv.a
* apply a couple of fixes to src/win so it actually builds with mingw
(mostly missing includes)

Fixes #847.

show more ...

# d779eb53 23-Jul-2013 Ben Noordhuis

unix, windows: fix uv_fs_chown() function prototype

Before this commit, uv_fs_chown() and uv_fs_fchown() took the uid and
gid as signed integers which is wrong because uid_t and gid_t ar

unix, windows: fix uv_fs_chown() function prototype

Before this commit, uv_fs_chown() and uv_fs_fchown() took the uid and
gid as signed integers which is wrong because uid_t and gid_t are
unsigned on most all platforms and IDs that don't fit in a signed
integer do exist.

This is not an ABI change because the size of the uid and gid arguments
do not change, only their sign.

On Windows, uv_uid_t and uv_gid_t are typedef'd as unsigned char for
reasons that are unclear. It doesn't matter: they get cast to ints when
used as function arguments. The arguments themselves are unused.

Partial fix for joyent/node#5890.

show more ...

Revision tags: v0.11.6, v0.10.12, v0.11.5, v0.10.11
# 3ee4d3f1 06-Jun-2013 Ben Noordhuis

unix, windows: return error codes directly

This commit changes the libuv API to return error codes directly rather
than storing them in a loop-global field.

A code snippet like

unix, windows: return error codes directly

This commit changes the libuv API to return error codes directly rather
than storing them in a loop-global field.

A code snippet like this one:

if (uv_foo(loop) < 0) {
uv_err_t err = uv_last_error(loop);
fprintf(stderr, "%s\n", uv_strerror(err));
}

Should be rewritten like this:

int err = uv_foo(loop);
if (err < 0)
fprintf(stderr, "%s\n", uv_strerror(err));

The rationale for this change is that it should make creating bindings
for other languages a lot easier: dealing with struct return values is
painful with most FFIs and often downright buggy.

show more ...

# f9e6029b 27-Jun-2013 Saúl Ibarra Corretgé

unix, windows: add extra fields to uv_stat_t

Revision tags: v0.10.10, v0.11.4, v0.10.9, v0.10.8, v0.11.3, v0.10.7, v0.10.6, v0.11.2, v0.10.5, v0.10.4, v0.11.1
# f78bcfbd 10-Apr-2013 Ben Noordhuis

Merge remote-tracking branch 'origin/v0.10'


# 7570a35b 10-Apr-2013 Shannen Saez

windows: fix memory leak in fs__sendfile

Revision tags: node-v0.11.0, v0.10.2, node-v0.7.3, node-v0.7.7, node-v0.7.5, node-v0.5.3, node-v0.10.1
# 499c7976 12-Mar-2013 Timothy J Fontaine

unix, windows: nanosecond resolution for uv_fs_[fl]stat

Closes #739.

Revision tags: node-v0.10.0, node-v0.9.12, node-v0.9.11, node-v0.8.21
# da716499 10-Feb-2013 Ben Noordhuis

unix, windows: make uv_fs_t.statbuf public

Make the statbuf field public. This means you no longer have to use
req->ptr - though that still works and will continue to work for the
fo

unix, windows: make uv_fs_t.statbuf public

Make the statbuf field public. This means you no longer have to use
req->ptr - though that still works and will continue to work for the
foreseeable future.

Fixes #704.

show more ...

123456789