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
bf8da00e
Commit
bf8da00e
authored
Nov 09, 2020
by
Damjan Jovanovic
Committed by
Alexandre Julliard
Nov 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Improve character device type detection on FreeBSD and macOS.
Signed-off-by:
Damjan Jovanovic
<
damjan.jov@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a563f584
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
2 deletions
+33
-2
configure
configure
+1
-1
configure.ac
configure.ac
+1
-1
file.c
dlls/ntdll/unix/file.c
+28
-0
config.h.in
include/config.h.in
+3
-0
No files found.
configure
View file @
bf8da00e
...
...
@@ -7589,7 +7589,7 @@ fi
for
ac_header
in
sys/mount.h sys/statfs.h sys/user.h sys/vfs.h
for
ac_header
in
sys/
conf.h sys/
mount.h sys/statfs.h sys/user.h sys/vfs.h
do
:
as_ac_Header
=
`
$as_echo
"ac_cv_header_
$ac_header
"
|
$as_tr_sh
`
ac_fn_c_check_header_compile
"
$LINENO
"
"
$ac_header
"
"
$as_ac_Header
"
"#include <sys/types.h>
...
...
configure.ac
View file @
bf8da00e
...
...
@@ -540,7 +540,7 @@ AC_HEADER_STAT()
dnl **** Checks for headers that depend on other ones ****
AC_CHECK_HEADERS([sys/mount.h sys/statfs.h sys/user.h sys/vfs.h],,,
AC_CHECK_HEADERS([sys/
conf.h sys/
mount.h sys/statfs.h sys/user.h sys/vfs.h],,,
[#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
...
...
dlls/ntdll/unix/file.c
View file @
bf8da00e
...
...
@@ -99,6 +99,9 @@
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_CONF_H
#include <sys/conf.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
...
...
@@ -6065,6 +6068,31 @@ static NTSTATUS get_device_info( int fd, FILE_FS_DEVICE_INFORMATION *info )
info
->
DeviceType
=
FILE_DEVICE_TAPE
;
break
;
}
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__APPLE__)
{
int
d_type
;
if
(
ioctl
(
fd
,
FIODTYPE
,
&
d_type
)
==
0
)
{
switch
(
d_type
)
{
case
D_TAPE
:
info
->
DeviceType
=
FILE_DEVICE_TAPE
;
break
;
case
D_DISK
:
info
->
DeviceType
=
FILE_DEVICE_DISK
;
break
;
case
D_TTY
:
info
->
DeviceType
=
FILE_DEVICE_SERIAL_PORT
;
break
;
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
case
D_MEM
:
info
->
DeviceType
=
FILE_DEVICE_NULL
;
break
;
#endif
}
/* no special d_type for parallel ports */
}
}
#endif
}
else
if
(
S_ISBLK
(
st
.
st_mode
))
...
...
include/config.h.in
View file @
bf8da00e
...
...
@@ -1001,6 +1001,9 @@
/* Define to 1 if you have the <sys/cdio.h> header file. */
#undef HAVE_SYS_CDIO_H
/* Define to 1 if you have the <sys/conf.h> header file. */
#undef HAVE_SYS_CONF_H
/* Define to 1 if you have the <sys/epoll.h> header file. */
#undef HAVE_SYS_EPOLL_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