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
533e7eea
Commit
533e7eea
authored
Feb 19, 2002
by
Lawson Whitney
Committed by
Alexandre Julliard
Feb 19, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for nonstandard baud rate in SetCommState.
parent
be495630
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
0 deletions
+31
-0
configure
configure
+0
-0
configure.ac
configure.ac
+1
-0
comm.c
dlls/kernel/comm.c
+27
-0
config.h.in
include/config.h.in
+3
-0
No files found.
configure
View file @
533e7eea
This diff is collapsed.
Click to expand it.
configure.ac
View file @
533e7eea
...
...
@@ -885,6 +885,7 @@ AC_CHECK_HEADERS(\
linux/cdrom.h \
linux/input.h \
linux/joystick.h \
linux/serial.h \
linux/ucdrom.h \
net/if.h \
netdb.h \
...
...
dlls/kernel/comm.c
View file @
533e7eea
...
...
@@ -68,6 +68,10 @@
#include "debugtools.h"
#ifdef HAVE_LINUX_SERIAL_H
#include <linux/serial.h>
#endif
DEFAULT_DEBUG_CHANNEL
(
comm
);
#if !defined(TIOCINQ) && defined(FIONREAD)
...
...
@@ -911,6 +915,29 @@ BOOL WINAPI SetCommState(
break
;
#endif
default:
#if defined (HAVE_LINUX_SERIAL_H) && defined (TIOCSSERIAL)
{
struct
serial_struct
nuts
;
int
arby
;
ioctl
(
fd
,
TIOCGSERIAL
,
&
nuts
);
nuts
.
custom_divisor
=
nuts
.
baud_base
/
lpdcb
->
BaudRate
;
if
(
!
(
nuts
.
custom_divisor
))
nuts
.
custom_divisor
=
1
;
arby
=
nuts
.
baud_base
/
nuts
.
custom_divisor
;
nuts
.
flags
&=
~
ASYNC_SPD_MASK
;
nuts
.
flags
|=
ASYNC_SPD_CUST
;
WARN
(
"You (or a program acting at your behest) have specified
\n
"
"a non-standard baud rate %ld. Wine will set the rate to %d,
\n
"
"which is as close as we can get by our present understanding of your
\n
"
"hardware. I hope you know what you are doing. Any disruption Wine
\n
"
"has caused to your linux system can be undone with setserial
\n
"
"(see man setserial). If you have incapacitated a Hayes type modem,
\n
"
"reset it and it will probably recover.
\n
"
,
lpdcb
->
BaudRate
,
arby
);
ioctl
(
fd
,
TIOCSSERIAL
,
&
nuts
);
port
.
c_cflag
|=
B38400
;
}
break
;
#endif
/* Don't have linux/serial.h or lack TIOCSSERIAL */
COMM_SetCommError
(
handle
,
IE_BAUDRATE
);
close
(
fd
);
ERR
(
"baudrate %ld
\n
"
,
lpdcb
->
BaudRate
);
...
...
include/config.h.in
View file @
533e7eea
...
...
@@ -238,6 +238,9 @@
/* Define if you have the <linux/joystick.h> header file. */
#undef HAVE_LINUX_JOYSTICK_H
/* Define if you have the <linux/serial.h> header file. */
#undef HAVE_LINUX_SERIAL_H
/* Define if you have the <linux/ucdrom.h> header file. */
#undef HAVE_LINUX_UCDROM_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