Hi WineHQ,
I have an older library that i have create using winelib (and an
application that uses it). It use to work fine. In later wine builds this
does not work any more.
I have tried allot of different combinations, and i cannot seem to get was
has broken.
1) Every time a call is made into the library the program crashes
immediately.
2) If i compile all the files into one program from the beginning the
program works fine.
3) Using "winemaker" to create a library and app shows the exact …
[View More]same
problem.
4) It seems to be related to importing the library or maybe the calling
convention?
I have a feeling this is just broken somewhere, or have i done something
wrong all along, and first now do i get punished for it because something
changed? Again, winemaker shows the exact same problem.
I created a simple library setup to test it (a tiny lib and tine app):
commands:
winegcc -Wall -Werror -mwindows -mno-cygwin -fPIC -g -O0 -c lib.c -o lib.o
winegcc -Wall -Werror -mwindows -mno-cygwin -fPIC -g -O0 -c test.c -o test.o
winegcc -shared -olibtest.so lib.o -mwindows -mno-cygwin
winegcc -Wl,-rpath,"\$ORIGIN" -mwindows -mno-cygwin -ltest -L. test.o
-otest.exe
---
lib.c (library):
#include <stdio.h>
#include <stdlib.h>
void lib_call(void)
{
printf("oh\n");
exit(0);
}
---
test.c (app):
#include <windows.h>
extern void lib_call(void);
INT WINAPI WinMain(HINSTANCE inst, HINSTANCE prev_inst, PSTR cmd_line, INT
cmd_show)
{
lib_call();
return 0;
}
---
Can anyone figure this out. I would be very thankful.
Thanks,
/pedro
[View Less]
We need to be able to iterate all registered rawinput devices for
foreign processes, not only the current one.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
v2: Remove the dubious device handle, it will have to be implemented
somehow but that can be done later.
Also did a bit of splitting and reordering to have refactor patches
first and start sending hardware messages earlier, they won't be
dispatched …
[View More]to the applications until the last patch though, but they
can be monitored on +server.
Supersedes: 199658-199662
server/queue.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/server/queue.c b/server/queue.c
index e47980a4aa8..1735d0d6d26 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -1489,11 +1489,11 @@ static user_handle_t find_hardware_message_window( struct desktop *desktop, stru
return win;
}
-static struct rawinput_device_entry *find_rawinput_device( unsigned short usage_page, unsigned short usage )
+static struct rawinput_device_entry *find_rawinput_device( struct process *process, unsigned short usage_page, unsigned short usage )
{
struct rawinput_device_entry *e;
- LIST_FOR_EACH_ENTRY( e, ¤t->process->rawinput_devices, struct rawinput_device_entry, entry )
+ LIST_FOR_EACH_ENTRY( e, &process->rawinput_devices, struct rawinput_device_entry, entry )
{
if (e->device.usage_page != usage_page || e->device.usage != usage) continue;
return e;
@@ -1506,7 +1506,7 @@ static void update_rawinput_device(const struct rawinput_device *device)
{
struct rawinput_device_entry *e;
- if (!(e = find_rawinput_device( device->usage_page, device->usage )))
+ if (!(e = find_rawinput_device( current->process, device->usage_page, device->usage )))
{
if (!(e = mem_alloc( sizeof(*e) ))) return;
list_add_tail( ¤t->process->rawinput_devices, &e->entry );
@@ -3313,9 +3313,9 @@ DECL_HANDLER(update_rawinput_devices)
update_rawinput_device(&devices[i]);
}
- e = find_rawinput_device( 1, 2 );
+ e = find_rawinput_device( current->process, 1, 2 );
current->process->rawinput_mouse = e ? &e->device : NULL;
- e = find_rawinput_device( 1, 6 );
+ e = find_rawinput_device( current->process, 1, 6 );
current->process->rawinput_kbd = e ? &e->device : NULL;
}
--
2.30.0
[View Less]
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
Verified on Debian 7, 8, 10, Testing, Ubuntu 20.10, Fedora 33, Manjaro
20.05 (Arch), openSUSE 15.2. All use sane-backends as the package name
for pkg-config, and not libsane.
I guess the reason it was not found earlier is that the only impact is
the SANE_LIBS variable in the top-level makefile which is unused
anyway since we use SONAME_LIBSANE instead.
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
…
[View More]diff --git a/configure.ac b/configure.ac
index 6a4e9568c40..8ed3b0c2669 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1435,7 +1435,7 @@ WINE_WARNING_WITH(gnutls,[test "x$ac_cv_lib_soname_gnutls" = "x"],
dnl **** Check for SANE ****
if test "x$with_sane" != "xno"
then
- WINE_PACKAGE_FLAGS(SANE,[libsane],,[`${SANE_CONFIG:-sane-config} --cflags 2>/dev/null`],[`${SANE_CONFIG:-sane-config} --ldflags 2>/dev/null`],
+ WINE_PACKAGE_FLAGS(SANE,[sane-backends],,[`${SANE_CONFIG:-sane-config} --cflags 2>/dev/null`],[`${SANE_CONFIG:-sane-config} --ldflags 2>/dev/null`],
[AC_CHECK_HEADER(sane/sane.h,
[WINE_CHECK_SONAME(sane,sane_init,,[SANE_CFLAGS=""],[$SANE_LIBS])],
[SANE_CFLAGS=""])])
--
2.20.1
[View Less]