msvcrt: fill in _chsize, _dup, _dup2
JustFillBug
mozbugbox at yahoo.com.au
Wed Sep 15 02:12:37 CDT 2004
Update to have _dup2 return whatever described in MS document.
Index: file.c
===================================================================
RCS file: /home/wine/wine/dlls/msvcrt/file.c,v
retrieving revision 1.71
diff -u -r1.71 file.c
--- file.c 8 Sep 2004 01:37:24 -0000 1.71
+++ file.c 15 Sep 2004 07:00:23 -0000
@@ -494,8 +494,7 @@
*/
int _chsize(int fd, long size)
{
- FIXME("(fd=%d, size=%ld): stub\n", fd, size);
- return -1;
+ return ftruncate(fd, size);
}
/*********************************************************************
@@ -503,8 +502,7 @@
*/
int _dup(int od)
{
- FIXME("(od=%d): stub\n", od);
- return -1;
+ return dup(od);
}
/*********************************************************************
@@ -512,8 +510,11 @@
*/
int _dup2(int od, int nd)
{
- FIXME("(od=%d, nd=%d): stub\n", od, nd);
- return -1;
+ int retval;
+ retval = dup2(od, nd);
+ if (retval != -1)
+ retval = 0;
+ return retval;
}
/*********************************************************************
More information about the wine-patches
mailing list