Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a6a5fb7a
Commit
a6a5fb7a
authored
Oct 07, 2005
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Oct 07, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix initial position for files opened with O_APPEND flag.
parent
9e18b7ef
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
file.c
dlls/msvcrt/file.c
+0
-7
file.c
dlls/msvcrt/tests/file.c
+8
-0
No files found.
dlls/msvcrt/file.c
View file @
a6a5fb7a
...
@@ -1480,13 +1480,6 @@ int MSVCRT__sopen( const char *path, int oflags, int shflags, ... )
...
@@ -1480,13 +1480,6 @@ int MSVCRT__sopen( const char *path, int oflags, int shflags, ... )
fd
=
msvcrt_alloc_fd
(
hand
,
wxflag
);
fd
=
msvcrt_alloc_fd
(
hand
,
wxflag
);
TRACE
(
":fd (%d) handle (%p)
\n
"
,
fd
,
hand
);
TRACE
(
":fd (%d) handle (%p)
\n
"
,
fd
,
hand
);
if
(
fd
>
0
)
{
if
(
oflags
&
MSVCRT__O_APPEND
)
_lseek
(
fd
,
0
,
FILE_END
);
}
return
fd
;
return
fd
;
}
}
...
...
dlls/msvcrt/tests/file.c
View file @
a6a5fb7a
...
@@ -242,6 +242,14 @@ static void test_file_write_read( void )
...
@@ -242,6 +242,14 @@ static void test_file_write_read( void )
ok
(
memcmp
(
mytext
,
btext
,
strlen
(
mytext
))
==
0
,
ok
(
memcmp
(
mytext
,
btext
,
strlen
(
mytext
))
==
0
,
"problems with _O_TEXT _write / _read
\n
"
);
"problems with _O_TEXT _write / _read
\n
"
);
_close
(
tempfd
);
_close
(
tempfd
);
memset
(
btext
,
0
,
LLEN
);
tempfd
=
_open
(
tempf
,
_O_APPEND
|
_O_RDWR
);
/* open for APPEND in default mode */
ok
(
tell
(
tempfd
)
==
0
,
"bad position %lu expecting 0
\n
"
,
tell
(
tempfd
));
ok
(
_read
(
tempfd
,
btext
,
LLEN
)
==
lstrlenA
(
mytext
),
"_read _O_APPEND got bad length
\n
"
);
ok
(
memcmp
(
mytext
,
btext
,
strlen
(
mytext
))
==
0
,
"problems with _O_APPEND _read
\n
"
);
_close
(
tempfd
);
ret
=
unlink
(
tempf
);
ret
=
unlink
(
tempf
);
ok
(
ret
!=-
1
,
"Can't unlink '%s': %d
\n
"
,
tempf
,
errno
);
ok
(
ret
!=-
1
,
"Can't unlink '%s': %d
\n
"
,
tempf
,
errno
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment