Re: MSVCRT: implement _chsize

2005-03-30 Thread Alexandre Julliard
Hans Leidekker <[EMAIL PROTECTED]> writes: > int _chsize(int fd, long size) > { > -FIXME("(fd=%d, size=%ld): stub\n", fd, size); > -return -1; > +DWORD cur, pos; > +HANDLE handle; > +BOOL ret = FALSE; > + > +TRACE("(fd=%d, size=%ld)\n", fd, size); > + > +LOCK_FILES();

Re: MSVCRT: implement _chsize

2005-03-30 Thread Dmitry Timoshkov
"Hans Leidekker" <[EMAIL PROTECTED]> wrote: > int _chsize(int fd, long size) > { > -FIXME("(fd=%d, size=%ld): stub\n", fd, size); > -return -1; > +DWORD cur, pos; > +HANDLE handle; > +BOOL ret = FALSE; > + > +TRACE("(fd=%d, size=%ld)\n", fd, size); > + > +LOCK_FILES()

Re: MSVCRT: implement _chsize (RESEND)

2005-03-29 Thread Alexandre Julliard
Hans Leidekker <[EMAIL PROTECTED]> writes: > Anything wrong with this one? > > This should fix apps built with MinGW (bug report 2826). You should at least restore the file position before returning, though it would probably be better to not change the file position at all, this is not thread sa