Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5bea4f87
Commit
5bea4f87
authored
Nov 25, 2000
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Nov 25, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid using TIOCM_* constants if not available.
parent
c7b49e5d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
comm.c
dlls/kernel/comm.c
+20
-2
No files found.
dlls/kernel/comm.c
View file @
5bea4f87
...
...
@@ -60,7 +60,7 @@
#endif
#include "heap.h"
#include "options.h"
#include "wine/port.h"
#include "server.h"
#include "winerror.h"
#include "services.h"
...
...
@@ -71,7 +71,7 @@
DEFAULT_DEBUG_CHANNEL
(
comm
);
#if
ndef TIOCINQ
#if
!defined(TIOCINQ) && defined(FIONREAD)
#define TIOCINQ FIONREAD
#endif
...
...
@@ -122,10 +122,18 @@ static struct termios m_stat[MAX_PORTS];
static
void
COMM_MSRUpdate
(
UCHAR
*
pMsr
,
unsigned
int
mstat
)
{
UCHAR
tmpmsr
=
0
;
#ifdef TIOCM_CTS
if
(
mstat
&
TIOCM_CTS
)
tmpmsr
|=
MSR_CTS
;
#endif
#ifdef TIOCM_DSR
if
(
mstat
&
TIOCM_DSR
)
tmpmsr
|=
MSR_DSR
;
#endif
#ifdef TIOCM_RI
if
(
mstat
&
TIOCM_RI
)
tmpmsr
|=
MSR_RI
;
#endif
#ifdef TIOCM_CAR
if
(
mstat
&
TIOCM_CAR
)
tmpmsr
|=
MSR_RLSD
;
#endif
*
pMsr
=
(
*
pMsr
&
~
MSR_MASK
)
|
tmpmsr
;
}
...
...
@@ -1862,8 +1870,10 @@ BOOL WINAPI ClearCommError(HANDLE handle,LPDWORD errors,LPCOMSTAT lpStat)
lpStat
->
cbOutQue
=
0
;
/* FIXME: find a different way to find out */
#endif
#ifdef TIOCINQ
if
(
ioctl
(
fd
,
TIOCINQ
,
&
lpStat
->
cbInQue
))
WARN
(
"ioctl returned error
\n
"
);
#endif
TRACE
(
"handle %d cbInQue = %ld cbOutQue = %ld
\n
"
,
handle
,
lpStat
->
cbInQue
,
lpStat
->
cbOutQue
);
...
...
@@ -2561,15 +2571,23 @@ BOOL WINAPI GetCommModemStatus(HANDLE hFile,LPDWORD lpModemStat )
TRACE
(
"ioctl failed
\n
"
);
return
FALSE
;
}
#ifdef TIOCM_CTS
if
(
mstat
&
TIOCM_CTS
)
*
lpModemStat
|=
MS_CTS_ON
;
#endif
#ifdef TIOCM_DSR
if
(
mstat
&
TIOCM_DSR
)
*
lpModemStat
|=
MS_DSR_ON
;
#endif
#ifdef TIOCM_RNG
if
(
mstat
&
TIOCM_RNG
)
*
lpModemStat
|=
MS_RING_ON
;
#endif
#ifdef TIOCM_CAR
/*FIXME: Not really sure about RLSD UB 990810*/
if
(
mstat
&
TIOCM_CAR
)
*
lpModemStat
|=
MS_RLSD_ON
;
#endif
TRACE
(
"%s%s%s%s
\n
"
,
(
*
lpModemStat
&
MS_RLSD_ON
)
?
"MS_RLSD_ON "
:
""
,
(
*
lpModemStat
&
MS_RING_ON
)
?
"MS_RING_ON "
:
""
,
...
...
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