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
b8b15f3e
Commit
b8b15f3e
authored
Jul 10, 2005
by
Gerald Pfeifer
Committed by
Alexandre Julliard
Jul 10, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a configure check for struct request_sense. Use this in
CDROM_ScsiPassThroughDir() and CDROM_ScsiPassThrough() to unbreak the build on FreeBSD.
parent
738c770d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
4 deletions
+75
-4
configure
configure
+65
-0
configure.ac
configure.ac
+1
-0
cdrom.c
dlls/ntdll/cdrom.c
+6
-4
config.h.in
include/config.h.in
+3
-0
No files found.
configure
View file @
b8b15f3e
...
...
@@ -17287,6 +17287,71 @@ _ACEOF
fi
echo
"
$as_me
:
$LINENO
: checking for request_sense"
>
&5
echo
$ECHO_N
"checking for request_sense...
$ECHO_C
"
>
&6
if
test
"
${
ac_cv_type_request_sense
+set
}
"
=
set
;
then
echo
$ECHO_N
"(cached)
$ECHO_C
"
>
&6
else
cat
>
conftest.
$ac_ext
<<
_ACEOF
/* confdefs.h. */
_ACEOF
cat
confdefs.h
>>
conftest.
$ac_ext
cat
>>
conftest.
$ac_ext
<<
_ACEOF
/* end confdefs.h. */
#include <linux/cdrom.h>
int
main ()
{
if ((request_sense *) 0)
return 0;
if (sizeof (request_sense))
return 0;
;
return 0;
}
_ACEOF
rm
-f
conftest.
$ac_objext
if
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_compile
\"
"
)
>
&5
(
eval
$ac_compile
)
2>conftest.er1
ac_status
=
$?
grep
-v
'^ *+'
conftest.er1
>
conftest.err
rm
-f
conftest.er1
cat
conftest.err
>
&5
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
&&
{
ac_try
=
'test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_try
\"
"
)
>
&5
(
eval
$ac_try
)
2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
;
}
&&
{
ac_try
=
'test -s conftest.$ac_objext'
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_try
\"
"
)
>
&5
(
eval
$ac_try
)
2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
;
}
;
then
ac_cv_type_request_sense
=
yes
else
echo
"
$as_me
: failed program was:"
>
&5
sed
's/^/| /'
conftest.
$ac_ext
>
&5
ac_cv_type_request_sense
=
no
fi
rm
-f
conftest.err conftest.
$ac_objext
conftest.
$ac_ext
fi
echo
"
$as_me
:
$LINENO
: result:
$ac_cv_type_request_sense
"
>
&5
echo
"
${
ECHO_T
}
$ac_cv_type_request_sense
"
>
&6
if
test
$ac_cv_type_request_sense
=
yes
;
then
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_REQUEST_SENSE 1
_ACEOF
fi
echo
"
$as_me
:
$LINENO
: checking whether linux/input.h is for real"
>
&5
echo
$ECHO_N
"checking whether linux/input.h is for real...
$ECHO_C
"
>
&6
...
...
configure.ac
View file @
b8b15f3e
...
...
@@ -1246,6 +1246,7 @@ AC_C_CONST
AC_C_INLINE
AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t, long long, fsblkcnt_t, fsfilcnt_t])
AC_CHECK_TYPES([sigset_t],,,[#include <signal.h>])
AC_CHECK_TYPES([request_sense],,,[#include <linux/cdrom.h>])
AC_CACHE_CHECK([whether linux/input.h is for real],
wine_cv_linux_input_h,
...
...
dlls/ntdll/cdrom.c
View file @
b8b15f3e
...
...
@@ -1427,10 +1427,11 @@ static NTSTATUS CDROM_ScsiPassThroughDirect(int fd, PSCSI_PASS_THROUGH_DIRECT pP
#ifdef SENSEBUFLEN
if
(
pPacket
->
SenseInfoLength
>
SENSEBUFLEN
)
#else
return
STATUS_INVALID_PARAMETER
;
#elif defined HAVE_REQUEST_SENSE
if
(
pPacket
->
SenseInfoLength
>
sizeof
(
struct
request_sense
))
#endif
return
STATUS_INVALID_PARAMETER
;
#endif
if
(
pPacket
->
DataTransferLength
>
0
&&
!
pPacket
->
DataBuffer
)
return
STATUS_INVALID_PARAMETER
;
...
...
@@ -1547,10 +1548,11 @@ static NTSTATUS CDROM_ScsiPassThrough(int fd, PSCSI_PASS_THROUGH pPacket)
#ifdef SENSEBUFLEN
if
(
pPacket
->
SenseInfoLength
>
SENSEBUFLEN
)
#else
return
STATUS_INVALID_PARAMETER
;
#elif defined HAVE_REQUEST_SENSE
if
(
pPacket
->
SenseInfoLength
>
sizeof
(
struct
request_sense
))
#endif
return
STATUS_INVALID_PARAMETER
;
#endif
if
(
pPacket
->
DataTransferLength
>
0
&&
pPacket
->
DataBufferOffset
<
sizeof
(
SCSI_PASS_THROUGH
))
return
STATUS_INVALID_PARAMETER
;
...
...
include/config.h.in
View file @
b8b15f3e
...
...
@@ -482,6 +482,9 @@
/* Define to 1 if you have the <regex.h> header file. */
#undef HAVE_REGEX_H
/* Define to 1 if the system has the type `request_sense'. */
#undef HAVE_REQUEST_SENSE
/* Define to 1 if you have the <resolv.h> header file. */
#undef HAVE_RESOLV_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