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
1bb94039
Commit
1bb94039
authored
May 08, 1999
by
Patrik Stridvall
Committed by
Alexandre Julliard
May 08, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ANSI C fixes.
parent
3f284324
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
497 additions
and
134 deletions
+497
-134
configure
configure
+277
-47
configure.in
configure.in
+1
-0
edit.c
controls/edit.c
+17
-14
menu.c
controls/menu.c
+5
-3
dbg.y
debugger/dbg.y
+5
-0
xfont.c
graphics/x11drv/xfont.c
+2
-2
snoop.c
if1632/snoop.c
+3
-3
config.h.in
include/config.h.in
+22
-0
server.h
include/server.h
+3
-0
stackframe.h
include/stackframe.h
+2
-2
bit_array.c
ipc/bit_array.c
+7
-8
wsprintf.c
misc/wsprintf.c
+1
-1
instr.c
miscemu/instr.c
+12
-8
ioports.c
msdos/ioports.c
+6
-6
datacache.c
ole/datacache.c
+5
-5
defaulthandler.c
ole/defaulthandler.c
+3
-3
hglobalstream.c
ole/hglobalstream.c
+2
-2
memlockbytes.c
ole/memlockbytes.c
+2
-2
client.c
scheduler/client.c
+53
-13
sysdeps.c
scheduler/sysdeps.c
+1
-1
socket.c
server/socket.c
+53
-12
trace.c
server/trace.c
+3
-0
build.c
tools/build.c
+7
-1
parser.y
tools/wrc/parser.y
+5
-1
No files found.
configure
View file @
1bb94039
...
...
@@ -3953,6 +3953,235 @@ EOF
fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo
$ac_n
"checking for working alloca.h""...
$ac_c
"
1>&6
echo
"configure:3960: checking for working alloca.h"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_alloca_h
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 3965 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
if
{
(
eval echo
configure:3972:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
;
then
rm
-rf
conftest
*
ac_cv_header_alloca_h
=
yes
else
echo
"configure: failed program was:"
>
&5
cat
conftest.
$ac_ext
>
&5
rm
-rf
conftest
*
ac_cv_header_alloca_h
=
no
fi
rm
-f
conftest
*
fi
echo
"
$ac_t
""
$ac_cv_header_alloca_h
"
1>&6
if
test
$ac_cv_header_alloca_h
=
yes
;
then
cat
>>
confdefs.h
<<
\
EOF
#define HAVE_ALLOCA_H 1
EOF
fi
echo
$ac_n
"checking for alloca""...
$ac_c
"
1>&6
echo
"configure:3993: checking for alloca"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_func_alloca_works
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 3998 "configure"
#include "confdefs.h"
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
# endif
#endif
int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
if
{
(
eval echo
configure:4021:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
;
then
rm
-rf
conftest
*
ac_cv_func_alloca_works
=
yes
else
echo
"configure: failed program was:"
>
&5
cat
conftest.
$ac_ext
>
&5
rm
-rf
conftest
*
ac_cv_func_alloca_works
=
no
fi
rm
-f
conftest
*
fi
echo
"
$ac_t
""
$ac_cv_func_alloca_works
"
1>&6
if
test
$ac_cv_func_alloca_works
=
yes
;
then
cat
>>
confdefs.h
<<
\
EOF
#define HAVE_ALLOCA 1
EOF
fi
if
test
$ac_cv_func_alloca_works
=
no
;
then
# The SVR3 libPW and SVR4 libucb both contain incompatible functions
# that cause trouble. Some versions do not even contain alloca or
# contain a buggy version. If you still want to use their alloca,
# use ar to extract alloca.o from them instead of compiling alloca.c.
ALLOCA
=
alloca.o
cat
>>
confdefs.h
<<
\
EOF
#define C_ALLOCA 1
EOF
echo
$ac_n
"checking whether alloca needs Cray hooks""...
$ac_c
"
1>&6
echo
"configure:4053: checking whether alloca needs Cray hooks"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_os_cray
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 4058 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif
EOF
if
(
eval
"
$ac_cpp
conftest.
$ac_ext
"
)
2>&5 |
egrep
"webecray"
>
/dev/null 2>&1
;
then
rm
-rf
conftest
*
ac_cv_os_cray
=
yes
else
rm
-rf
conftest
*
ac_cv_os_cray
=
no
fi
rm
-f
conftest
*
fi
echo
"
$ac_t
""
$ac_cv_os_cray
"
1>&6
if
test
$ac_cv_os_cray
=
yes
;
then
for
ac_func
in
_getb67 GETB67 getb67
;
do
echo
$ac_n
"checking for
$ac_func
""...
$ac_c
"
1>&6
echo
"configure:4083: checking for
$ac_func
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_func_
$ac_func
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 4088 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char
$ac_func
(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char
$ac_func
();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_
$ac_func
) || defined (__stub___
$ac_func
)
choke me
#else
$ac_func
();
#endif
; return 0; }
EOF
if
{
(
eval echo
configure:4111:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
;
then
rm
-rf
conftest
*
eval
"ac_cv_func_
$ac_func
=yes"
else
echo
"configure: failed program was:"
>
&5
cat
conftest.
$ac_ext
>
&5
rm
-rf
conftest
*
eval
"ac_cv_func_
$ac_func
=no"
fi
rm
-f
conftest
*
fi
if
eval
"test
\"
`
echo
'$ac_cv_func_'
$ac_func
`
\"
= yes"
;
then
echo
"
$ac_t
""yes"
1>&6
cat
>>
confdefs.h
<<
EOF
#define CRAY_STACKSEG_END
$ac_func
EOF
break
else
echo
"
$ac_t
""no"
1>&6
fi
done
fi
echo
$ac_n
"checking stack direction for C alloca""...
$ac_c
"
1>&6
echo
"configure:4138: checking stack direction for C alloca"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_c_stack_direction
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
if
test
"
$cross_compiling
"
=
yes
;
then
ac_cv_c_stack_direction
=
0
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 4146 "configure"
#include "confdefs.h"
find_stack_direction ()
{
static char *addr = 0;
auto char dummy;
if (addr == 0)
{
addr = &dummy;
return find_stack_direction ();
}
else
return (&dummy > addr) ? 1 : -1;
}
main ()
{
exit (find_stack_direction() < 0);
}
EOF
if
{
(
eval echo
configure:4165:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
&&
(
./conftest
;
exit
)
2>/dev/null
then
ac_cv_c_stack_direction
=
1
else
echo
"configure: failed program was:"
>
&5
cat
conftest.
$ac_ext
>
&5
rm
-fr
conftest
*
ac_cv_c_stack_direction
=
-1
fi
rm
-fr
conftest
*
fi
fi
echo
"
$ac_t
""
$ac_cv_c_stack_direction
"
1>&6
cat
>>
confdefs.h
<<
EOF
#define STACK_DIRECTION
$ac_cv_c_stack_direction
EOF
fi
for
ac_func
in
\
_lwp_create
\
clone
\
...
...
@@ -3972,12 +4201,12 @@ for ac_func in \
do
echo
$ac_n
"checking for
$ac_func
""...
$ac_c
"
1>&6
echo
"configure:
3976
: checking for
$ac_func
"
>
&5
echo
"configure:
4205
: checking for
$ac_func
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_func_
$ac_func
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line
3981
"configure"
#line
4210
"configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char
$ac_func
(); below. */
...
...
@@ -4000,7 +4229,7 @@ $ac_func();
; return 0; }
EOF
if
{
(
eval echo
configure:4
004
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
;
then
if
{
(
eval echo
configure:4
233
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
;
then
rm
-rf
conftest
*
eval
"ac_cv_func_
$ac_func
=yes"
else
...
...
@@ -4059,17 +4288,17 @@ for ac_hdr in \
do
ac_safe
=
`
echo
"
$ac_hdr
"
|
sed
'y%./+-%__p_%'
`
echo
$ac_n
"checking for
$ac_hdr
""...
$ac_c
"
1>&6
echo
"configure:4
063
: checking for
$ac_hdr
"
>
&5
echo
"configure:4
292
: checking for
$ac_hdr
"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_
$ac_safe
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 4
068
"configure"
#line 4
297
"configure"
#include "confdefs.h"
#include <
$ac_hdr
>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:4
073
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:4
302
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -4096,12 +4325,12 @@ fi
done
echo
$ac_n
"checking whether stat file-mode macros are broken""...
$ac_c
"
1>&6
echo
"configure:4
100
: checking whether stat file-mode macros are broken"
>
&5
echo
"configure:4
329
: checking whether stat file-mode macros are broken"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_stat_broken
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 4
105
"configure"
#line 4
334
"configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
...
...
@@ -4154,12 +4383,12 @@ fi
echo
$ac_n
"checking for working const""...
$ac_c
"
1>&6
echo
"configure:4
158
: checking for working const"
>
&5
echo
"configure:4
387
: checking for working const"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_c_const
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 4
163
"configure"
#line 4
392
"configure"
#include "confdefs.h"
int main() {
...
...
@@ -4208,7 +4437,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
if
{
(
eval echo
configure:4
212
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:4
441
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_c_const
=
yes
else
...
...
@@ -4229,21 +4458,21 @@ EOF
fi
echo
$ac_n
"checking for inline""...
$ac_c
"
1>&6
echo
"configure:4
233
: checking for inline"
>
&5
echo
"configure:4
462
: checking for inline"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_c_inline
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
ac_cv_c_inline
=
no
for
ac_kw
in
inline __inline__ __inline
;
do
cat
>
conftest.
$ac_ext
<<
EOF
#line 4
240
"configure"
#line 4
469
"configure"
#include "confdefs.h"
int main() {
}
$ac_kw
foo() {
; return 0; }
EOF
if
{
(
eval echo
configure:4
247
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:4
476
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_c_inline
=
$ac_kw
;
break
else
...
...
@@ -4269,12 +4498,12 @@ EOF
esac
echo
$ac_n
"checking for ANSI C header files""...
$ac_c
"
1>&6
echo
"configure:4
273
: checking for ANSI C header files"
>
&5
echo
"configure:4
502
: checking for ANSI C header files"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_header_stdc
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 4
278
"configure"
#line 4
507
"configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
...
...
@@ -4282,7 +4511,7 @@ else
#include <float.h>
EOF
ac_try
=
"
$ac_cpp
conftest.
$ac_ext
>/dev/null 2>conftest.out"
{
(
eval echo
configure:4
286
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
{
(
eval echo
configure:4
515
:
\"
$ac_try
\"
)
1>&5
;
(
eval
$ac_try
)
2>&5
;
}
ac_err
=
`
grep
-v
'^ *+'
conftest.out
`
if
test
-z
"
$ac_err
"
;
then
rm
-rf
conftest
*
...
...
@@ -4299,7 +4528,7 @@ rm -f conftest*
if
test
$ac_cv_header_stdc
=
yes
;
then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat
>
conftest.
$ac_ext
<<
EOF
#line 4
303
"configure"
#line 4
532
"configure"
#include "confdefs.h"
#include <string.h>
EOF
...
...
@@ -4317,7 +4546,7 @@ fi
if
test
$ac_cv_header_stdc
=
yes
;
then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat
>
conftest.
$ac_ext
<<
EOF
#line 4
321
"configure"
#line 4
550
"configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
...
...
@@ -4338,7 +4567,7 @@ if test "$cross_compiling" = yes; then
:
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 4
342
"configure"
#line 4
571
"configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
...
...
@@ -4349,7 +4578,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if
{
(
eval echo
configure:4
353
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
&&
(
./conftest
;
exit
)
2>/dev/null
if
{
(
eval echo
configure:4
582
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
&&
(
./conftest
;
exit
)
2>/dev/null
then
:
else
...
...
@@ -4373,12 +4602,12 @@ EOF
fi
echo
$ac_n
"checking for size_t""...
$ac_c
"
1>&6
echo
"configure:4
377
: checking for size_t"
>
&5
echo
"configure:4
606
: checking for size_t"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_type_size_t
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 4
382
"configure"
#line 4
611
"configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
...
...
@@ -4406,7 +4635,7 @@ EOF
fi
echo
$ac_n
"checking size of long long""...
$ac_c
"
1>&6
echo
"configure:4
410
: checking size of long long"
>
&5
echo
"configure:4
639
: checking size of long long"
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_sizeof_long_long
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -4414,7 +4643,7 @@ else
ac_cv_sizeof_long_long
=
0
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 4
418
"configure"
#line 4
647
"configure"
#include "confdefs.h"
#include <stdio.h>
main()
...
...
@@ -4425,7 +4654,7 @@ main()
exit(0);
}
EOF
if
{
(
eval echo
configure:4
429
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
&&
(
./conftest
;
exit
)
2>/dev/null
if
{
(
eval echo
configure:4
658
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
&&
(
./conftest
;
exit
)
2>/dev/null
then
ac_cv_sizeof_long_long
=
`
cat
conftestval
`
else
...
...
@@ -4449,12 +4678,12 @@ EOF
if
test
"
$ac_cv_header_sys_vfs_h
"
=
"yes"
then
echo
$ac_n
"checking "
whether sys/vfs.h defines statfs
"""...
$ac_c
"
1>&6
echo
"configure:4
453
: checking "
whether sys/vfs.h defines statfs
""
>
&5
echo
"configure:4
682
: checking "
whether sys/vfs.h defines statfs
""
>
&5
if
eval
"test
\"
`
echo
'$''{'
wine_cv_sys_vfs_has_statfs
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 4
458
"configure"
#line 4
687
"configure"
#include "confdefs.h"
#include <sys/types.h>
...
...
@@ -4471,7 +4700,7 @@ int main() {
; return 0; }
EOF
if
{
(
eval echo
configure:4
475
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:4
704
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
wine_cv_sys_vfs_has_statfs
=
yes
else
...
...
@@ -4498,12 +4727,12 @@ fi
if
test
"
$ac_cv_header_sys_statfs_h
"
=
"yes"
then
echo
$ac_n
"checking "
whether sys/statfs.h defines statfs
"""...
$ac_c
"
1>&6
echo
"configure:4
502
: checking "
whether sys/statfs.h defines statfs
""
>
&5
echo
"configure:4
731
: checking "
whether sys/statfs.h defines statfs
""
>
&5
if
eval
"test
\"
`
echo
'$''{'
wine_cv_sys_statfs_has_statfs
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 4
507
"configure"
#line 4
736
"configure"
#include "confdefs.h"
#include <sys/types.h>
...
...
@@ -4518,7 +4747,7 @@ int main() {
; return 0; }
EOF
if
{
(
eval echo
configure:4
522
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:4
751
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
wine_cv_sys_statfs_has_statfs
=
yes
else
...
...
@@ -4545,12 +4774,12 @@ fi
if
test
"
$ac_cv_header_sys_mount_h
"
=
"yes"
then
echo
$ac_n
"checking "
whether sys/mount.h defines statfs
"""...
$ac_c
"
1>&6
echo
"configure:4
549
: checking "
whether sys/mount.h defines statfs
""
>
&5
echo
"configure:4
778
: checking "
whether sys/mount.h defines statfs
""
>
&5
if
eval
"test
\"
`
echo
'$''{'
wine_cv_sys_mount_has_statfs
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 4
554
"configure"
#line 4
783
"configure"
#include "confdefs.h"
#include <sys/types.h>
...
...
@@ -4565,7 +4794,7 @@ int main() {
; return 0; }
EOF
if
{
(
eval echo
configure:4
569
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:4
798
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
wine_cv_sys_mount_has_statfs
=
yes
else
...
...
@@ -4591,7 +4820,7 @@ fi
echo
$ac_n
"checking "
for
statfs.f_bfree
"""...
$ac_c
"
1>&6
echo
"configure:4
595
: checking "
for
statfs.f_bfree
""
>
&5
echo
"configure:4
824
: checking "
for
statfs.f_bfree
""
>
&5
if
eval
"test
\"
`
echo
'$''{'
wine_cv_statfs_bfree
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -4600,7 +4829,7 @@ else
wine_cv_statfs_bfree
=
no
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 4
604
"configure"
#line 4
833
"configure"
#include "confdefs.h"
#include <sys/types.h>
...
...
@@ -4627,7 +4856,7 @@ int main() {
; return 0; }
EOF
if
{
(
eval echo
configure:4
631
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:4
860
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
wine_cv_statfs_bfree
=
yes
else
...
...
@@ -4651,7 +4880,7 @@ EOF
fi
echo
$ac_n
"checking "
for
statfs.f_bavail
"""...
$ac_c
"
1>&6
echo
"configure:4
655
: checking "
for
statfs.f_bavail
""
>
&5
echo
"configure:4
884
: checking "
for
statfs.f_bavail
""
>
&5
if
eval
"test
\"
`
echo
'$''{'
wine_cv_statfs_bavail
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -4660,7 +4889,7 @@ else
wine_cv_statfs_bavail
=
no
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 4
664
"configure"
#line 4
893
"configure"
#include "confdefs.h"
#include <sys/types.h>
...
...
@@ -4687,7 +4916,7 @@ int main() {
; return 0; }
EOF
if
{
(
eval echo
configure:4
691
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:4
920
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
wine_cv_statfs_bavail
=
yes
else
...
...
@@ -4712,7 +4941,7 @@ fi
echo
$ac_n
"checking "
for
working sigaltstack
"""...
$ac_c
"
1>&6
echo
"configure:4
716
: checking "
for
working sigaltstack
""
>
&5
echo
"configure:4
945
: checking "
for
working sigaltstack
""
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_c_working_sigaltstack
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
...
...
@@ -4721,7 +4950,7 @@ else
else
cat
>
conftest.
$ac_ext
<<
EOF
#line 4
725
"configure"
#line 4
954
"configure"
#include "confdefs.h"
#include <stdio.h>
...
...
@@ -4759,7 +4988,7 @@ else
}
EOF
if
{
(
eval echo
configure:4
763
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
&&
(
./conftest
;
exit
)
2>/dev/null
if
{
(
eval echo
configure:4
992
:
\"
$ac_link
\"
)
1>&5
;
(
eval
$ac_link
)
2>&5
;
}
&&
test
-s
conftest
&&
(
./conftest
;
exit
)
2>/dev/null
then
ac_cv_c_working_sigaltstack
=
"yes"
else
...
...
@@ -4786,12 +5015,12 @@ fi
echo
$ac_n
"checking "
for
msg_accrights
in
struct msghdr
"""...
$ac_c
"
1>&6
echo
"configure:
4790
: checking "
for
msg_accrights
in
struct msghdr
""
>
&5
echo
"configure:
5019
: checking "
for
msg_accrights
in
struct msghdr
""
>
&5
if
eval
"test
\"
`
echo
'$''{'
ac_cv_c_msg_accrights
'+set}'
`
\"
= set"
;
then
echo
$ac_n
"(cached)
$ac_c
"
1>&6
else
cat
>
conftest.
$ac_ext
<<
EOF
#line
4795
"configure"
#line
5024
"configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
...
...
@@ -4799,7 +5028,7 @@ int main() {
struct msghdr hdr; hdr.msg_accrights=0
; return 0; }
EOF
if
{
(
eval echo
configure:
4803
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
if
{
(
eval echo
configure:
5032
:
\"
$ac_compile
\"
)
1>&5
;
(
eval
$ac_compile
)
2>&5
;
}
;
then
rm
-rf
conftest
*
ac_cv_c_msg_accrights
=
"yes"
else
...
...
@@ -5055,6 +5284,7 @@ s%@C2MAN@%$C2MAN%g
s%@XLIB@%
$XLIB
%g
s%@DLLFLAGS@%
$DLLFLAGS
%g
s%@LDSHARED@%
$LDSHARED
%g
s%@ALLOCA@%
$ALLOCA
%g
s%@GCC_NO_BUILTIN@%
$GCC_NO_BUILTIN
%g
/@MAKE_RULES@/r
$MAKE_RULES
s%@MAKE_RULES@%%g
...
...
configure.in
View file @
1bb94039
...
...
@@ -438,6 +438,7 @@ fi
dnl **** Check for functions ****
AC_FUNC_ALLOCA()
AC_CHECK_FUNCS(\
_lwp_create \
clone \
...
...
controls/edit.c
View file @
1bb94039
...
...
@@ -11,6 +11,8 @@
* please read EDIT.TODO (and update it when you change things)
*/
#include "config.h"
#include <string.h>
#include "winnt.h"
#include "win.h"
...
...
@@ -113,8 +115,9 @@ typedef struct
#define ORDER_UINT(x,y) do { if ((UINT)(y) < (UINT)(x)) SWAP_UINT32((x),(y)); } while(0)
#define DPRINTF_EDIT_NOTIFY(hwnd, str) \
({TRACE_(edit)("notification " str " sent to hwnd=%08x\n", \
(UINT)(hwnd));})
do {TRACE_(edit)("notification " str " sent to hwnd=%08x\n", \
(UINT)(hwnd));} while(0)
/* used for disabled or read-only edit control */
#define EDIT_SEND_CTLCOLORSTATIC(wnd,hdc) \
(SendMessageA((wnd)->parent->hwndSelf, WM_CTLCOLORSTATIC, \
...
...
@@ -123,10 +126,10 @@ typedef struct
(SendMessageA((wnd)->parent->hwndSelf, WM_CTLCOLOREDIT, \
(WPARAM)(hdc), (LPARAM)(wnd)->hwndSelf))
#define EDIT_NOTIFY_PARENT(wnd, wNotifyCode, str) \
(DPRINTF_EDIT_NOTIFY((wnd)->parent->hwndSelf, str),
\
do {DPRINTF_EDIT_NOTIFY((wnd)->parent->hwndSelf, str);
\
SendMessageA((wnd)->parent->hwndSelf, WM_COMMAND, \
MAKEWPARAM((wnd)->wIDmenu, wNotifyCode), \
(LPARAM)(wnd)->hwndSelf)
)
MAKEWPARAM((wnd)->wIDmenu, wNotifyCode), \
(LPARAM)(wnd)->hwndSelf);} while(0
)
#define DPRINTF_EDIT_MSG16(str) \
TRACE_(edit)(\
"16 bit : " str ": hwnd=%08x, wParam=%08x, lParam=%08x\n", \
...
...
@@ -145,12 +148,12 @@ typedef struct
/*
* These functions have trivial implementations
* We still like to call them internally
* "static
__inline__
" makes them more like macro's
* "static
inline
" makes them more like macro's
*/
static
__inline__
BOOL
EDIT_EM_CanUndo
(
WND
*
wnd
,
EDITSTATE
*
es
);
static
__inline__
void
EDIT_EM_EmptyUndoBuffer
(
WND
*
wnd
,
EDITSTATE
*
es
);
static
__inline__
void
EDIT_WM_Clear
(
WND
*
wnd
,
EDITSTATE
*
es
);
static
__inline__
void
EDIT_WM_Cut
(
WND
*
wnd
,
EDITSTATE
*
es
);
static
inline
BOOL
EDIT_EM_CanUndo
(
WND
*
wnd
,
EDITSTATE
*
es
);
static
inline
void
EDIT_EM_EmptyUndoBuffer
(
WND
*
wnd
,
EDITSTATE
*
es
);
static
inline
void
EDIT_WM_Clear
(
WND
*
wnd
,
EDITSTATE
*
es
);
static
inline
void
EDIT_WM_Cut
(
WND
*
wnd
,
EDITSTATE
*
es
);
/*
* This is the only exported function
*/
...
...
@@ -252,7 +255,7 @@ static LRESULT EDIT_WM_VScroll(WND *wnd, EDITSTATE *es, INT action, INT pos, HWN
* EM_CANUNDO
*
*/
static
__inline__
BOOL
EDIT_EM_CanUndo
(
WND
*
wnd
,
EDITSTATE
*
es
)
static
inline
BOOL
EDIT_EM_CanUndo
(
WND
*
wnd
,
EDITSTATE
*
es
)
{
return
(
es
->
undo_insert_count
||
lstrlenA
(
es
->
undo_text
));
}
...
...
@@ -263,7 +266,7 @@ static __inline__ BOOL EDIT_EM_CanUndo(WND *wnd, EDITSTATE *es)
* EM_EMPTYUNDOBUFFER
*
*/
static
__inline__
void
EDIT_EM_EmptyUndoBuffer
(
WND
*
wnd
,
EDITSTATE
*
es
)
static
inline
void
EDIT_EM_EmptyUndoBuffer
(
WND
*
wnd
,
EDITSTATE
*
es
)
{
es
->
undo_insert_count
=
0
;
*
es
->
undo_text
=
'\0'
;
...
...
@@ -275,7 +278,7 @@ static __inline__ void EDIT_EM_EmptyUndoBuffer(WND *wnd, EDITSTATE *es)
* WM_CLEAR
*
*/
static
__inline__
void
EDIT_WM_Clear
(
WND
*
wnd
,
EDITSTATE
*
es
)
static
inline
void
EDIT_WM_Clear
(
WND
*
wnd
,
EDITSTATE
*
es
)
{
EDIT_EM_ReplaceSel
(
wnd
,
es
,
TRUE
,
""
);
}
...
...
@@ -286,7 +289,7 @@ static __inline__ void EDIT_WM_Clear(WND *wnd, EDITSTATE *es)
* WM_CUT
*
*/
static
__inline__
void
EDIT_WM_Cut
(
WND
*
wnd
,
EDITSTATE
*
es
)
static
inline
void
EDIT_WM_Cut
(
WND
*
wnd
,
EDITSTATE
*
es
)
{
EDIT_WM_Copy
(
wnd
,
es
);
EDIT_WM_Clear
(
wnd
,
es
);
...
...
controls/menu.c
View file @
1bb94039
...
...
@@ -756,7 +756,7 @@ static void MENU_CalcItemSize( HDC hdc, MENUITEM *lpitem, HWND hwndOwner,
BITMAP
bm
;
HBITMAP
resBmp
=
0
;
/
/ Check if there is a magic menu item associated with this item
/
* Check if there is a magic menu item associated with this item */
if
((
LOWORD
((
int
)
lpitem
->
text
))
<
12
)
{
resBmp
=
MENU_LoadMagicItem
((
int
)
lpitem
->
text
,
(
lpitem
->
fType
&
MF_HILITE
),
...
...
@@ -1149,8 +1149,10 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
HDC
hdcMem
=
CreateCompatibleDC
(
hdc
);
// Check if there is a magic menu item associated with this item
// and load the appropriate bitmap
/*
* Check if there is a magic menu item associated with this item
* and load the appropriate bitmap
*/
if
((
LOWORD
((
int
)
lpitem
->
text
))
<
12
)
{
resBmp
=
MENU_LoadMagicItem
((
int
)
lpitem
->
text
,
(
lpitem
->
fState
&
MF_HILITE
),
...
...
debugger/dbg.y
View file @
1bb94039
...
...
@@ -6,12 +6,17 @@
* Copyright 1995 Morten Welinder
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <sys/stat.h>
#include <unistd.h>
#ifdef HAVE_ALLOCA_H
#include <alloca.h>
#endif
#include "winbase.h"
#include "class.h"
...
...
graphics/x11drv/xfont.c
View file @
1bb94039
...
...
@@ -2637,9 +2637,9 @@ BOOL X11DRV_GetTextExtentPoint( DC *dc, LPCSTR str, INT count,
TRACE
(
font
,
"x = %f y = %f
\n
"
,
x
,
y
);
x
*=
pfo
->
lpX11Trans
->
pixelsize
/
1000
.
0
;
y
*=
pfo
->
lpX11Trans
->
pixelsize
/
1000
.
0
;
size
->
cx
=
fabs
f
((
x
+
dc
->
w
.
breakRem
+
count
*
dc
->
w
.
charExtra
)
*
size
->
cx
=
fabs
((
x
+
dc
->
w
.
breakRem
+
count
*
dc
->
w
.
charExtra
)
*
dc
->
wndExtX
/
dc
->
vportExtX
);
size
->
cy
=
fabs
f
(
y
*
dc
->
wndExtY
/
dc
->
vportExtY
);
size
->
cy
=
fabs
(
y
*
dc
->
wndExtY
/
dc
->
vportExtY
);
}
return
TRUE
;
}
...
...
if1632/snoop.c
View file @
1bb94039
...
...
@@ -265,19 +265,19 @@ void WINAPI SNOOP16_Entry(CONTEXT *context) {
max
=
fun
->
nrofargs
;
if
(
max
>
16
)
max
=
16
;
for
(
i
=
max
;
i
--
;)
DPRINTF
(
"%04x%s"
,
*
(
WORD
*
)(
PTR_SEG_OFF_TO_LIN
(
SS_reg
(
context
),
SP_reg
(
context
))
+
8
+
sizeof
(
WORD
)
*
i
),
i
?
","
:
""
);
DPRINTF
(
"%04x%s"
,
*
(
WORD
*
)(
(
char
*
)
PTR_SEG_OFF_TO_LIN
(
SS_reg
(
context
),
SP_reg
(
context
))
+
8
+
sizeof
(
WORD
)
*
i
),
i
?
","
:
""
);
if
(
max
!=
fun
->
nrofargs
)
DPRINTF
(
" ..."
);
}
else
if
(
fun
->
nrofargs
<
0
)
{
DPRINTF
(
"<unknown, check return>"
);
ret
->
args
=
HeapAlloc
(
SystemHeap
,
0
,
16
*
sizeof
(
WORD
));
memcpy
(
ret
->
args
,(
LPBYTE
)(
PTR_SEG_OFF_TO_LIN
(
SS_reg
(
context
),
SP_reg
(
context
))
+
8
),
sizeof
(
WORD
)
*
16
);
memcpy
(
ret
->
args
,(
LPBYTE
)(
(
char
*
)
PTR_SEG_OFF_TO_LIN
(
SS_reg
(
context
),
SP_reg
(
context
))
+
8
),
sizeof
(
WORD
)
*
16
);
}
DPRINTF
(
") ret=%04x:%04x
\n
"
,
HIWORD
(
ret
->
origreturn
),
LOWORD
(
ret
->
origreturn
));
}
void
WINAPI
SNOOP16_Return
(
CONTEXT
*
context
)
{
SNOOP16_RETURNENTRY
*
ret
=
(
SNOOP16_RETURNENTRY
*
)(
PTR_SEG_OFF_TO_LIN
(
CS_reg
(
context
),
IP_reg
(
context
))
-
5
);
SNOOP16_RETURNENTRY
*
ret
=
(
SNOOP16_RETURNENTRY
*
)(
(
char
*
)
PTR_SEG_OFF_TO_LIN
(
CS_reg
(
context
),
IP_reg
(
context
))
-
5
);
/* We haven't found out the nrofargs yet. If we called a cdecl
* function it is too late anyway and we can just set '0' (which
...
...
include/config.h.in
View file @
1bb94039
/* include/config.h.in. Generated automatically from configure.in by autoheader. */
/* Define if using alloca.c. */
#undef C_ALLOCA
/* Define to empty if the keyword does not work. */
#undef const
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
#undef CRAY_STACKSEG_END
/* Define if you have alloca, as a function or macro. */
#undef HAVE_ALLOCA
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#undef HAVE_ALLOCA_H
/* Define as __inline if that's what the C compiler calls it. */
#undef inline
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
#undef STACK_DIRECTION
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
#undef STAT_MACROS_BROKEN
...
...
include/server.h
View file @
1bb94039
...
...
@@ -501,12 +501,14 @@ struct create_pipe_reply
/* Allocate a console for the current process */
struct
alloc_console_request
{
int
dummy
;
};
/* Free the console of the current process */
struct
free_console_request
{
int
dummy
;
};
...
...
@@ -597,6 +599,7 @@ struct read_console_input_request
};
struct
read_console_input_reply
{
int
dummy
;
/* INPUT_RECORD records[0]; */
/* input records */
};
...
...
include/stackframe.h
View file @
1bb94039
...
...
@@ -79,10 +79,10 @@ typedef void *VA_LIST16;
(thdb)->cur_stack += (size))
/* Push a DWORD on the 32-bit stack */
#define STACK32_PUSH(context,val) (*--(
(DWORD *)
ESP_reg(context)) = (val))
#define STACK32_PUSH(context,val) (*--(
*(DWORD **)&
ESP_reg(context)) = (val))
/* Pop a DWORD from the 32-bit stack */
#define STACK32_POP(context) (*(
(DWORD *)
ESP_reg(context))++)
#define STACK32_POP(context) (*(
*(DWORD **)&
ESP_reg(context))++)
/* Win32 register functions */
#define REGS_ENTRYPOINT(name) void WINAPI __regs_##name( CONTEXT *context )
...
...
ipc/bit_array.c
View file @
1bb94039
...
...
@@ -35,11 +35,10 @@
#include "bit_array.h"
#ifdef HAS_BITOPS
#define inline __inline__
/* So we can compile with -ansi */
#include <asm/bitops.h>
#else
static
__inline__
int
clear_bit
(
int
bit
,
int
*
mem
);
static
__inline__
int
set_bit
(
int
bit
,
int
*
mem
);
static
inline
int
clear_bit
(
int
bit
,
int
*
mem
);
static
inline
int
set_bit
(
int
bit
,
int
*
mem
);
#endif
/* HAS_BITOPS */
...
...
@@ -81,7 +80,7 @@ static void initialize_arrays()
** Find first zero bit in the integer.
** Assume there is at least one zero.
*/
static
__inline__
int
find_zbit_in_integer
(
unsigned
int
integer
)
static
inline
int
find_zbit_in_integer
(
unsigned
int
integer
)
{
int
i
;
...
...
@@ -98,7 +97,7 @@ static __inline__ int find_zbit_in_integer(unsigned int integer)
}
/* return -1 on failure */
static
__inline__
int
find_first_zero_bit
(
unsigned
*
array
,
int
bits
)
static
inline
int
find_first_zero_bit
(
unsigned
*
array
,
int
bits
)
{
unsigned
int
integer
;
int
i
;
...
...
@@ -120,7 +119,7 @@ static __inline__ int find_first_zero_bit(unsigned *array, int bits)
return
-
1
;
}
static
__inline__
int
test_bit
(
int
pos
,
unsigned
*
array
)
static
inline
int
test_bit
(
int
pos
,
unsigned
*
array
)
{
unsigned
int
integer
;
int
bit
=
BIT_IN_INT
(
pos
);
...
...
@@ -139,7 +138,7 @@ static __inline__ int test_bit(int pos, unsigned *array)
/* inputs: bit number and memory address (32 bit) */
/* output: Value of the bit before modification */
static
__inline__
int
clear_bit
(
int
bit
,
int
*
mem
)
static
inline
int
clear_bit
(
int
bit
,
int
*
mem
)
{
int
ret
;
...
...
@@ -151,7 +150,7 @@ static __inline__ int clear_bit(int bit, int *mem)
return
(
ret
);
}
static
__inline__
int
set_bit
(
int
bit
,
int
*
mem
)
static
inline
int
set_bit
(
int
bit
,
int
*
mem
)
{
int
ret
;
__asm__
(
"xor %1,%1
\n
"
...
...
misc/wsprintf.c
View file @
1bb94039
...
...
@@ -382,7 +382,7 @@ INT WINAPI wvsnprintfA( LPSTR buffer, UINT maxlen, LPCSTR spec,
LPSTR
p
=
buffer
;
UINT
i
,
len
;
CHAR
number
[
20
];
WPRINTF_DATA
argData
=
(
WPRINTF_DATA
)
0
;
WPRINTF_DATA
argData
;
while
(
*
spec
&&
(
maxlen
>
1
))
{
...
...
miscemu/instr.c
View file @
1bb94039
...
...
@@ -23,7 +23,11 @@ DECLARE_DEBUG_CHANNEL(io)
(IS_V86(context) ? FALSE : IS_SELECTOR_32BIT(seg))
#define STACK_sig(context) \
(IS_SEL_32(context,SS_sig(context)) ? ESP_sig(context) : SP_sig(context))
(IS_SEL_32(context,SS_sig(context)) ? ESP_sig(context) : (DWORD)SP_sig(context))
#define ADD_STACK_sig(context,offset) \
do { if (IS_SEL_32(context,SS_sig(context))) ESP_sig(context) += (offset); \
else SP_sig(context) += (offset); } while(0)
#define MAKE_PTR(seg,off) \
(IS_SELECTOR_SYSTEM(seg) ? (void *)(off) : PTR_SEG_OFF_TO_LIN(seg,off))
...
...
@@ -408,7 +412,7 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
case
0x17
:
SS_sig
(
context
)
=
seg
;
break
;
case
0x1f
:
DS_sig
(
context
)
=
seg
;
break
;
}
STACK_sig
(
context
)
+=
long_op
?
4
:
2
;
ADD_STACK_sig
(
context
,
long_op
?
4
:
2
)
;
EIP_sig
(
context
)
+=
prefixlen
+
1
;
return
TRUE
;
}
...
...
@@ -465,7 +469,7 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
if
(
INSTR_ReplaceSelector
(
context
,
&
seg
))
{
FS_sig
(
context
)
=
seg
;
STACK_sig
(
context
)
+=
long_op
?
4
:
2
;
ADD_STACK_sig
(
context
,
long_op
?
4
:
2
)
;
EIP_sig
(
context
)
+=
prefixlen
+
2
;
return
TRUE
;
}
...
...
@@ -480,7 +484,7 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
if
(
INSTR_ReplaceSelector
(
context
,
&
seg
))
{
GS_sig
(
context
)
=
seg
;
STACK_sig
(
context
)
+=
long_op
?
4
:
2
;
ADD_STACK_sig
(
context
,
long_op
?
4
:
2
)
;
EIP_sig
(
context
)
+=
prefixlen
+
2
;
return
TRUE
;
}
...
...
@@ -667,7 +671,7 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
*
(
--
stack
)
=
FL_sig
(
context
);
*
(
--
stack
)
=
CS_sig
(
context
);
*
(
--
stack
)
=
IP_sig
(
context
)
+
prefixlen
+
2
;
STACK_sig
(
context
)
-=
3
*
sizeof
(
WORD
);
ADD_STACK_sig
(
context
,
-
3
*
sizeof
(
WORD
)
);
/* Jump to the interrupt handler */
CS_sig
(
context
)
=
HIWORD
(
addr
);
EIP_sig
(
context
)
=
LOWORD
(
addr
);
...
...
@@ -681,7 +685,7 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
EIP_sig
(
context
)
=
*
stack
++
;
CS_sig
(
context
)
=
*
stack
++
;
EFL_sig
(
context
)
=
*
stack
;
STACK_sig
(
context
)
+=
3
*
sizeof
(
DWORD
);
/* Pop the return address and flags */
ADD_STACK_sig
(
context
,
3
*
sizeof
(
DWORD
)
);
/* Pop the return address and flags */
}
else
{
...
...
@@ -689,7 +693,7 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
EIP_sig
(
context
)
=
*
stack
++
;
CS_sig
(
context
)
=
*
stack
++
;
FL_sig
(
context
)
=
*
stack
;
STACK_sig
(
context
)
+=
3
*
sizeof
(
WORD
);
/* Pop the return address and flags */
ADD_STACK_sig
(
context
,
3
*
sizeof
(
WORD
)
);
/* Pop the return address and flags */
}
return
TRUE
;
...
...
@@ -803,7 +807,7 @@ BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
WORD
*
stack
=
(
WORD
*
)
STACK_PTR
(
context
);
*--
stack
=
CS_sig
(
context
);
*--
stack
=
EIP_sig
(
context
);
STACK_sig
(
context
)
-=
2
*
sizeof
(
WORD
);
ADD_STACK_sig
(
context
,
-
2
*
sizeof
(
WORD
)
);
CS_sig
(
context
)
=
SELECTOROF
(
gpHandler
);
EIP_sig
(
context
)
=
OFFSETOF
(
gpHandler
);
...
...
msdos/ioports.c
View file @
1bb94039
...
...
@@ -184,38 +184,38 @@ static void do_IO_port_init_read_or_write(char* temp, char rw)
}
}
static
__inline__
BYTE
inb
(
WORD
port
)
static
inline
BYTE
inb
(
WORD
port
)
{
BYTE
b
;
__asm__
__volatile__
(
"inb %w1,%0"
:
"=a"
(
b
)
:
"d"
(
port
)
);
return
b
;
}
static
__inline__
WORD
inw
(
WORD
port
)
static
inline
WORD
inw
(
WORD
port
)
{
WORD
w
;
__asm__
__volatile__
(
"inw %w1,%0"
:
"=a"
(
w
)
:
"d"
(
port
)
);
return
w
;
}
static
__inline__
DWORD
inl
(
WORD
port
)
static
inline
DWORD
inl
(
WORD
port
)
{
DWORD
dw
;
__asm__
__volatile__
(
"inl %w1,%0"
:
"=a"
(
dw
)
:
"d"
(
port
)
);
return
dw
;
}
static
__inline__
void
outb
(
BYTE
value
,
WORD
port
)
static
inline
void
outb
(
BYTE
value
,
WORD
port
)
{
__asm__
__volatile__
(
"outb %b0,%w1"
:
:
"a"
(
value
),
"d"
(
port
)
);
}
static
__inline__
void
outw
(
WORD
value
,
WORD
port
)
static
inline
void
outw
(
WORD
value
,
WORD
port
)
{
__asm__
__volatile__
(
"outw %w0,%w1"
:
:
"a"
(
value
),
"d"
(
port
)
);
}
static
__inline__
void
outl
(
DWORD
value
,
WORD
port
)
static
inline
void
outl
(
DWORD
value
,
WORD
port
)
{
__asm__
__volatile__
(
"outl %0,%w1"
:
:
"a"
(
value
),
"d"
(
port
)
);
}
...
...
ole/datacache.c
View file @
1bb94039
...
...
@@ -114,11 +114,11 @@ typedef struct DataCache DataCache;
* by this object.
*/
#define _ICOM_THIS_From_IDataObject(class,name) class* this = (class*)name;
#define _ICOM_THIS_From_NDIUnknown(class, name) class* this = (class*)(((
void
*)name)-sizeof(void*));
#define _ICOM_THIS_From_IPersistStorage(class, name) class* this = (class*)(((
void
*)name)-2*sizeof(void*));
#define _ICOM_THIS_From_IViewObject2(class, name) class* this = (class*)(((
void
*)name)-3*sizeof(void*));
#define _ICOM_THIS_From_IOleCache2(class, name) class* this = (class*)(((
void
*)name)-4*sizeof(void*));
#define _ICOM_THIS_From_IOleCacheControl(class, name) class* this = (class*)(((
void
*)name)-5*sizeof(void*));
#define _ICOM_THIS_From_NDIUnknown(class, name) class* this = (class*)(((
char
*)name)-sizeof(void*));
#define _ICOM_THIS_From_IPersistStorage(class, name) class* this = (class*)(((
char
*)name)-2*sizeof(void*));
#define _ICOM_THIS_From_IViewObject2(class, name) class* this = (class*)(((
char
*)name)-3*sizeof(void*));
#define _ICOM_THIS_From_IOleCache2(class, name) class* this = (class*)(((
char
*)name)-4*sizeof(void*));
#define _ICOM_THIS_From_IOleCacheControl(class, name) class* this = (class*)(((
char
*)name)-5*sizeof(void*));
/*
* Prototypes for the methods of the DataCache class.
...
...
ole/defaulthandler.c
View file @
1bb94039
...
...
@@ -107,9 +107,9 @@ typedef struct DefaultHandler DefaultHandler;
* by this object.
*/
#define _ICOM_THIS_From_IOleObject(class,name) class* this = (class*)name;
#define _ICOM_THIS_From_NDIUnknown(class, name) class* this = (class*)(((
void
*)name)-sizeof(void*));
#define _ICOM_THIS_From_IDataObject(class, name) class* this = (class*)(((
void
*)name)-2*sizeof(void*));
#define _ICOM_THIS_From_IRunnableObject(class, name) class* this = (class*)(((
void
*)name)-3*sizeof(void*));
#define _ICOM_THIS_From_NDIUnknown(class, name) class* this = (class*)(((
char
*)name)-sizeof(void*));
#define _ICOM_THIS_From_IDataObject(class, name) class* this = (class*)(((
char
*)name)-2*sizeof(void*));
#define _ICOM_THIS_From_IRunnableObject(class, name) class* this = (class*)(((
char
*)name)-3*sizeof(void*));
/*
* Prototypes for the methods of the DefaultHandler class.
...
...
ole/hglobalstream.c
View file @
1bb94039
...
...
@@ -426,7 +426,7 @@ HRESULT WINAPI HGLOBALStreamImpl_Read(
*/
supportBuffer
=
GlobalLock
(
This
->
supportHandle
);
memcpy
(
pv
,
supportBuffer
+
This
->
currentPosition
.
LowPart
,
bytesToReadFromBuffer
);
memcpy
(
pv
,
(
char
*
)
supportBuffer
+
This
->
currentPosition
.
LowPart
,
bytesToReadFromBuffer
);
/*
* Move the current position to the new position
...
...
@@ -510,7 +510,7 @@ HRESULT WINAPI HGLOBALStreamImpl_Write(
*/
supportBuffer
=
GlobalLock
(
This
->
supportHandle
);
memcpy
(
supportBuffer
+
This
->
currentPosition
.
LowPart
,
pv
,
cb
);
memcpy
(
(
char
*
)
supportBuffer
+
This
->
currentPosition
.
LowPart
,
pv
,
cb
);
/*
* Move the current position to the new position
...
...
ole/memlockbytes.c
View file @
1bb94039
...
...
@@ -380,7 +380,7 @@ HRESULT WINAPI HGLOBALLockBytesImpl_ReadAt(
supportBuffer
=
GlobalLock
(
This
->
supportHandle
);
memcpy
(
pv
,
supportBuffer
+
ulOffset
.
LowPart
,
(
char
*
)
supportBuffer
+
ulOffset
.
LowPart
,
bytesToReadFromBuffer
);
/*
...
...
@@ -458,7 +458,7 @@ HRESULT WINAPI HGLOBALLockBytesImpl_WriteAt(
*/
supportBuffer
=
GlobalLock
(
This
->
supportHandle
);
memcpy
(
supportBuffer
+
ulOffset
.
LowPart
,
pv
,
cb
);
memcpy
(
(
char
*
)
supportBuffer
+
ulOffset
.
LowPart
,
pv
,
cb
);
/*
* Return the number of bytes written.
...
...
scheduler/client.c
View file @
1bb94039
...
...
@@ -64,9 +64,9 @@ static void CLIENT_SendRequest_v( enum request req, int pass_fd,
{
THDB
*
thdb
=
THREAD_Current
();
#ifndef HAVE_MSGHDR_ACCRIGHTS
struct
cmsg_fd
cmsg
=
{
sizeof
(
cmsg
),
SOL_SOCKET
,
SCM_RIGHTS
,
pass_fd
}
;
struct
cmsg_fd
cmsg
;
#endif
struct
msghdr
msghdr
=
{
NULL
,
0
,
vec
,
veclen
,
}
;
struct
msghdr
msghdr
;
struct
header
head
;
int
i
,
ret
,
len
;
...
...
@@ -80,16 +80,39 @@ static void CLIENT_SendRequest_v( enum request req, int pass_fd,
head
.
len
=
len
;
head
.
seq
=
thdb
->
seq
++
;
msghdr
.
msg_name
=
NULL
;
msghdr
.
msg_namelen
=
0
;
msghdr
.
msg_iov
=
vec
;
msghdr
.
msg_iovlen
=
veclen
;
#ifdef HAVE_MSGHDR_ACCRIGHTS
if
(
pass_fd
!=
-
1
)
/* we have an fd to send */
{
#ifdef HAVE_MSGHDR_ACCRIGHTS
msghdr
.
msg_accrights
=
(
void
*
)
&
pass_fd
;
msghdr
.
msg_accrights
=
(
void
*
)
&
pass_fd
;
msghdr
.
msg_accrightslen
=
sizeof
(
pass_fd
);
#else
}
else
{
msghdr
.
msg_accrights
=
NULL
;
msghdr
.
msg_accrightslen
=
0
;
}
#else
/* HAVE_MSGHDR_ACCRIGHTS */
if
(
pass_fd
!=
-
1
)
/* we have an fd to send */
{
cmsg
.
len
=
sizeof
(
cmsg
);
cmsg
.
level
=
SOL_SOCKET
;
cmsg
.
type
=
SCM_RIGHTS
;
cmsg
.
fd
=
pass_fd
;
msghdr
.
msg_control
=
&
cmsg
;
msghdr
.
msg_controllen
=
sizeof
(
cmsg
);
#endif
}
else
{
msghdr
.
msg_control
=
NULL
;
msghdr
.
msg_controllen
=
0
;
}
msghdr
.
msg_flags
=
0
;
#endif
/* HAVE_MSGHDR_ACCRIGHTS */
if
((
ret
=
sendmsg
(
thdb
->
socket
,
&
msghdr
,
0
))
<
len
)
{
...
...
@@ -122,7 +145,7 @@ void CLIENT_SendRequest( enum request req, int pass_fd,
vec
[
i
].
iov_len
=
va_arg
(
args
,
int
);
}
va_end
(
args
);
return
CLIENT_SendRequest_v
(
req
,
pass_fd
,
vec
,
n
);
CLIENT_SendRequest_v
(
req
,
pass_fd
,
vec
,
n
);
}
...
...
@@ -137,15 +160,32 @@ static unsigned int CLIENT_WaitReply_v( int *len, int *passed_fd,
{
THDB
*
thdb
=
THREAD_Current
();
int
pass_fd
=
-
1
;
#ifdef HAVE_MSGHDR_ACCRIGHTS
struct
msghdr
msghdr
=
{
NULL
,
0
,
vec
,
veclen
,
(
void
*
)
&
pass_fd
,
sizeof
(
int
)
};
#else
struct
cmsg_fd
cmsg
=
{
sizeof
(
cmsg
),
SOL_SOCKET
,
SCM_RIGHTS
,
-
1
};
struct
msghdr
msghdr
=
{
NULL
,
0
,
vec
,
veclen
,
&
cmsg
,
sizeof
(
cmsg
),
0
};
#endif
struct
header
head
;
int
ret
,
remaining
;
#ifdef HAVE_MSGHDR_ACCRIGHTS
struct
msghdr
msghdr
;
msghdr
.
msg_accrights
=
(
void
*
)
&
pass_fd
;
msghdr
.
msg_accrightslen
=
sizeof
(
int
);
#else
/* HAVE_MSGHDR_ACCRIGHTS */
struct
msghdr
msghdr
;
struct
cmsg_fd
cmsg
;
cmsg
.
len
=
sizeof
(
cmsg
);
cmsg
.
level
=
SOL_SOCKET
;
cmsg
.
type
=
SCM_RIGHTS
;
cmsg
.
fd
=
-
1
;
msghdr
.
msg_control
=
&
cmsg
;
msghdr
.
msg_controllen
=
sizeof
(
cmsg
);
msghdr
.
msg_flags
=
0
;
#endif
/* HAVE_MSGHDR_ACCRIGHTS */
msghdr
.
msg_name
=
NULL
;
msghdr
.
msg_namelen
=
0
;
msghdr
.
msg_iov
=
vec
;
msghdr
.
msg_iovlen
=
veclen
;
assert
(
veclen
>
0
);
vec
[
0
].
iov_base
=
&
head
;
vec
[
0
].
iov_len
=
sizeof
(
head
);
...
...
scheduler/sysdeps.c
View file @
1bb94039
...
...
@@ -158,7 +158,7 @@ int SYSDEPS_SpawnThread( THDB *thread )
#ifdef HAVE__LWP_CREATE
ucontext_t
context
;
_lwp_makecontext
(
&
context
,
(
void
(
*
)(
void
*
))
SYSDEPS_StartThread
,
thread
,
NULL
,
thread
->
stack_base
,
thread
->
teb
.
stack_top
-
thread
->
stack_base
);
NULL
,
thread
->
stack_base
,
(
char
*
)
thread
->
teb
.
stack_top
-
(
char
*
)
thread
->
stack_base
);
if
(
_lwp_create
(
&
context
,
0
,
NULL
)
)
return
-
1
;
return
0
;
...
...
server/socket.c
View file @
1bb94039
...
...
@@ -70,10 +70,9 @@ static void do_write( struct client *client, int client_fd )
{
struct
iovec
vec
[
2
];
#ifndef HAVE_MSGHDR_ACCRIGHTS
struct
cmsg_fd
cmsg
=
{
sizeof
(
cmsg
),
SOL_SOCKET
,
SCM_RIGHTS
,
client
->
pass_fd
};
struct
cmsg_fd
cmsg
;
#endif
struct
msghdr
msghdr
=
{
NULL
,
0
,
vec
,
2
,
}
;
struct
msghdr
msghdr
;
int
ret
;
/* make sure we have something to send */
...
...
@@ -81,12 +80,17 @@ static void do_write( struct client *client, int client_fd )
/* make sure the client is listening */
assert
(
client
->
state
==
READING
);
msghdr
.
msg_name
=
NULL
;
msghdr
.
msg_namelen
=
0
;
msghdr
.
msg_iov
=
vec
;
if
(
client
->
count
<
sizeof
(
client
->
head
))
{
vec
[
0
].
iov_base
=
(
char
*
)
&
client
->
head
+
client
->
count
;
vec
[
0
].
iov_len
=
sizeof
(
client
->
head
)
-
client
->
count
;
vec
[
1
].
iov_base
=
client
->
data
;
vec
[
1
].
iov_len
=
client
->
head
.
len
-
sizeof
(
client
->
head
);
msghdr
.
msg_iovlen
=
2
;
}
else
{
...
...
@@ -94,16 +98,36 @@ static void do_write( struct client *client, int client_fd )
vec
[
0
].
iov_len
=
client
->
head
.
len
-
client
->
count
;
msghdr
.
msg_iovlen
=
1
;
}
#ifdef HAVE_MSGHDR_ACCRIGHTS
if
(
client
->
pass_fd
!=
-
1
)
/* we have an fd to send */
{
#ifdef HAVE_MSGHDR_ACCRIGHTS
msghdr
.
msg_accrights
=
(
void
*
)
&
client
->
pass_fd
;
msghdr
.
msg_accrightslen
=
sizeof
(
client
->
pass_fd
);
#else
}
else
{
msghdr
.
msg_accrights
=
NULL
;
msghdr
.
msg_accrightslen
=
0
;
}
#else
/* HAVE_MSGHDR_ACCRIGHTS */
if
(
client
->
pass_fd
!=
-
1
)
/* we have an fd to send */
{
cmsg
.
len
=
sizeof
(
cmsg
);
cmsg
.
level
=
SOL_SOCKET
;
cmsg
.
type
=
SCM_RIGHTS
;
cmsg
.
fd
=
client
->
pass_fd
;
msghdr
.
msg_control
=
&
cmsg
;
msghdr
.
msg_controllen
=
sizeof
(
cmsg
);
#endif
}
else
{
msghdr
.
msg_control
=
NULL
;
msghdr
.
msg_controllen
=
0
;
}
msghdr
.
msg_flags
=
0
;
#endif
/* HAVE_MSGHDR_ACCRIGHTS */
ret
=
sendmsg
(
client_fd
,
&
msghdr
,
0
);
if
(
ret
==
-
1
)
{
...
...
@@ -133,14 +157,31 @@ static void do_read( struct client *client, int client_fd )
{
struct
iovec
vec
;
int
pass_fd
=
-
1
;
#ifdef HAVE_MSGHDR_ACCRIGHTS
struct
msghdr
msghdr
=
{
NULL
,
0
,
&
vec
,
1
,
(
void
*
)
&
pass_fd
,
sizeof
(
int
)
};
#else
struct
cmsg_fd
cmsg
=
{
sizeof
(
cmsg
),
SOL_SOCKET
,
SCM_RIGHTS
,
-
1
};
struct
msghdr
msghdr
=
{
NULL
,
0
,
&
vec
,
1
,
&
cmsg
,
sizeof
(
cmsg
),
0
};
#endif
int
ret
;
#ifdef HAVE_MSGHDR_ACCRIGHTS
struct
msghdr
msghdr
;
msghdr
.
msg_accrights
=
(
void
*
)
&
pass_fd
;
msghdr
.
msg_accrightslen
=
sizeof
(
int
);
#else
/* HAVE_MSGHDR_ACCRIGHTS */
struct
msghdr
msghdr
;
struct
cmsg_fd
cmsg
;
cmsg
.
len
=
sizeof
(
cmsg
);
cmsg
.
level
=
SOL_SOCKET
;
cmsg
.
type
=
SCM_RIGHTS
;
cmsg
.
fd
=
-
1
;
msghdr
.
msg_control
=
&
cmsg
;
msghdr
.
msg_controllen
=
sizeof
(
cmsg
);
msghdr
.
msg_flags
=
0
;
#endif
/* HAVE_MSGHDR_ACCRIGHTS */
msghdr
.
msg_name
=
NULL
;
msghdr
.
msg_namelen
=
0
;
msghdr
.
msg_iov
=
&
vec
;
msghdr
.
msg_iovlen
=
1
;
if
(
client
->
count
<
sizeof
(
client
->
head
))
{
vec
.
iov_base
=
(
char
*
)
&
client
->
head
+
client
->
count
;
...
...
server/trace.c
View file @
1bb94039
...
...
@@ -453,11 +453,13 @@ static int dump_create_pipe_reply( struct create_pipe_reply *req, int len )
static
int
dump_alloc_console_request
(
struct
alloc_console_request
*
req
,
int
len
)
{
fprintf
(
stderr
,
" dummy=%d"
,
req
->
dummy
);
return
(
int
)
sizeof
(
*
req
);
}
static
int
dump_free_console_request
(
struct
free_console_request
*
req
,
int
len
)
{
fprintf
(
stderr
,
" dummy=%d"
,
req
->
dummy
);
return
(
int
)
sizeof
(
*
req
);
}
...
...
@@ -548,6 +550,7 @@ static int dump_read_console_input_request( struct read_console_input_request *r
static
int
dump_read_console_input_reply
(
struct
read_console_input_reply
*
req
,
int
len
)
{
fprintf
(
stderr
,
" dummy=%d"
,
req
->
dummy
);
return
(
int
)
sizeof
(
*
req
);
}
...
...
tools/build.c
View file @
1bb94039
...
...
@@ -1007,6 +1007,9 @@ static int BuildSpec32File( char * specfile, FILE *outfile )
/* Output code for all register functions */
fprintf
(
outfile
,
"#ifdef __i386__
\n
"
);
fprintf
(
outfile
,
"#ifndef __GNUC__
\n
"
);
fprintf
(
outfile
,
"static void __asm__dummy() {
\n
"
);
fprintf
(
outfile
,
"#endif /* !defined(__GNUC__) */
\n
"
);
for
(
i
=
Base
,
odp
=
OrdinalDefinitions
+
Base
;
i
<=
Limit
;
i
++
,
odp
++
)
{
if
(
odp
->
type
!=
TYPE_REGISTER
)
continue
;
...
...
@@ -1021,7 +1024,10 @@ static int BuildSpec32File( char * specfile, FILE *outfile )
odp
->
u
.
func
.
link_name
,
odp
->
u
.
func
.
link_name
,
odp
->
u
.
func
.
link_name
,
odp
->
u
.
func
.
link_name
);
}
fprintf
(
outfile
,
"#endif
\n
"
);
fprintf
(
outfile
,
"#ifndef __GNUC__
\n
"
);
fprintf
(
outfile
,
"}
\n
"
);
fprintf
(
outfile
,
"#endif /* !defined(__GNUC__) */
\n
"
);
fprintf
(
outfile
,
"#endif /* defined(__i386__) */
\n
"
);
/* Output the DLL functions prototypes */
...
...
tools/wrc/parser.y
View file @
1bb94039
...
...
@@ -85,14 +85,18 @@
* - Corrected syntax problems with an old yacc (;)
* - Added extra comment about grammar
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <assert.h>
#include <ctype.h>
#include <string.h>
#ifdef HAVE_ALLOCA_H
#include <alloca.h>
#endif
#include <config.h>
#include "wrc.h"
#include "utils.h"
#include "newstruc.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