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
f21961cc
Commit
f21961cc
authored
Sep 05, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add a configure check for the tcdrain function.
Also remove the tcgetattr check that is no longer used.
parent
050a46f3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
12 deletions
+32
-12
configure
configure
+1
-1
configure.ac
configure.ac
+1
-1
file.c
dlls/ntdll/file.c
+1
-8
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+1
-0
serial.c
dlls/ntdll/serial.c
+26
-0
config.h.in
include/config.h.in
+2
-2
No files found.
configure
View file @
f21961cc
...
...
@@ -13436,7 +13436,7 @@ for ac_func in \
strtoll
\
strtoull
\
symlink
\
tc
getattr
\
tc
drain
\
thr_kill2
\
timegm
\
usleep
\
...
...
configure.ac
View file @
f21961cc
...
...
@@ -2063,7 +2063,7 @@ AC_CHECK_FUNCS(\
strtoll \
strtoull \
symlink \
tc
getattr
\
tc
drain
\
thr_kill2 \
timegm \
usleep \
...
...
dlls/ntdll/file.c
View file @
f21961cc
...
...
@@ -2777,14 +2777,7 @@ NTSTATUS WINAPI NtFlushBuffersFile( HANDLE hFile, IO_STATUS_BLOCK* IoStatusBlock
if
(
!
ret
&&
type
==
FD_TYPE_SERIAL
)
{
while
(
tcdrain
(
fd
)
==
-
1
)
{
if
(
errno
!=
EINTR
)
{
ret
=
FILE_GetNtStatus
();
break
;
}
}
ret
=
COMM_FlushBuffersFile
(
fd
);
}
else
{
...
...
dlls/ntdll/ntdll_misc.h
View file @
f21961cc
...
...
@@ -142,6 +142,7 @@ extern NTSTATUS TAPE_DeviceIoControl(HANDLE hDevice,
ULONG
IoControlCode
,
LPVOID
lpInBuffer
,
DWORD
nInBufferSize
,
LPVOID
lpOutBuffer
,
DWORD
nOutBufferSize
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
COMM_FlushBuffersFile
(
int
fd
)
DECLSPEC_HIDDEN
;
/* file I/O */
struct
stat
;
...
...
dlls/ntdll/serial.c
View file @
f21961cc
...
...
@@ -1342,3 +1342,29 @@ NTSTATUS COMM_DeviceIoControl(HANDLE hDevice,
lpOutBuffer
,
nOutBufferSize
);
return
status
;
}
NTSTATUS
COMM_FlushBuffersFile
(
int
fd
)
{
#ifdef HAVE_TCDRAIN
while
(
tcdrain
(
fd
)
==
-
1
)
{
if
(
errno
!=
EINTR
)
return
FILE_GetNtStatus
();
}
return
STATUS_SUCCESS
;
#elif defined(TIOCDRAIN)
while
(
ioctl
(
fd
,
TIOCDRAIN
)
==
-
1
)
{
if
(
errno
!=
EINTR
)
return
FILE_GetNtStatus
();
}
return
STATUS_SUCCESS
;
#elif defined(TCSBRK)
while
(
ioctl
(
fd
,
TCSBRK
,
1
)
==
-
1
)
{
if
(
errno
!=
EINTR
)
return
FILE_GetNtStatus
();
}
return
STATUS_SUCCESS
;
#else
ERR
(
"not supported
\n
"
);
return
STATUS_NOT_IMPLEMENTED
;
#endif
}
include/config.h.in
View file @
f21961cc
...
...
@@ -1068,8 +1068,8 @@
/* Define to 1 if you have the <sys/wait.h> header file. */
#undef HAVE_SYS_WAIT_H
/* Define to 1 if you have the `tc
getattr
' function. */
#undef HAVE_TC
GETATTR
/* Define to 1 if you have the `tc
drain
' function. */
#undef HAVE_TC
DRAIN
/* Define to 1 if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H
...
...
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