Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
March 2003
- 109 participants
- 858 messages
Re: Compiling WINE - Hopeless situation? :)
by Sylvain Petreolle
Please update gcc to version 3.x.x, gcc2.96 was a broken unofficial
version of RedHat and all dependancies must be updated too. (like
binutils)
Time to put an entry in README or something else ?
Is gcc version checked by configure ?
--- Matt Bailey <mattb(a)rtccom.net> a écrit : > Hi,
>
> Any ideas on that last error message I sent? One detail I did not
> mention
> is that I still have libstdc++2.10 installed, it says it's version
> 2.96-0.76mdk. I knew there was some 2.96 package still installed but
> I had
> forgotten what it was called. I can't uninstall this package because
> it is
> needed by a BUNCH of other apps........looks like it would just about
> trash
> my Mandrake install to remove this package. Do I need to upgrade this
>
> package, and if so, how would I go about it without completely
> uninstalling
> it? I also have installed libstdc++5, version 3.2-1mdk.
> Is it hopeless? I don't blame you if you gave up on this problem. :)
> Anyway,
> your advice has been greatly helpful already, much appreciated.
>
> -Matt Bailey
=====
Sylvain Petreolle (spetreolle at users dot sourceforge dot net) ICQ #170597259
No more War !
"What if tomorrow the War could be over ?" Morpheus, in "Reloaded".
For the Law of Oil and Fire, Im an European that lives in France.
For all my Brothers and friends, Im a human living on Earth.
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
March 29, 2003
Possible regression: wine/dlls/kernel/tests/process crashes
by Uwe Bonnes
Hallo,
wine/dlls/kernel/tests/process crashed. I was not able to decipher what is
going on.
Bye
--
Uwe Bonnes bon(a)elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
March 29, 2003
More QEMU fixes
by Ulrich Weigand
Hello Fabrice,
I've played a bit with your qemu-0.1.2 release, and got putty running
under Wine under qemu on s390-ibm-linux (using a wineserver also
running under qemu on s390).
To make this work I've had to add a bunch of missing byteorder
conversions and other fixes, which I've appended here.
Mostly, the changes concern the socket area; wine and wineserver
extensively use sockets (sendmsg/recvmsg with ancillary data),
and also the X connection needed fixes (setsockopt). There were
also some other fixes required (poll, select, execve). I haven't
found any problem with the actual CPU emulation, however!
Here's the detailed list of changes:
glibc-2.3.2 compile fix:
Recent glibc supports nanosecond resolution file timestamps
in their struct stat, using this construct
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
# define st_atime st_atim.tv_sec /* Backward compatibility. */
# define st_mtime st_mtim.tv_sec
# define st_ctime st_ctim.tv_sec
This breaks the use of st_atime etc. as struct members; I've renamed
them to target_st_atime etc.
Missing data conversion:
- socketcall on-stack arguments need to be byteswapped
- struct sockaddr (sa_family) needs to be byteswapped
- sendmsg/recvmsg ancillary data needs to be converted
- execve arg and env vectors need to be byteswapped
- select fdset conversion wasn't done due to typo in #if
- added marginal support for setsockopt
Incorrect data conversion:
- poll pollfd array was clobbered (even on native)
If you like, I could also send you the patch to make qemu actually work
on s390; I'm not sure if you are interested in that at this point ...
Bye,
Ulrich
diff -ur qemu-0.1.2/syscall-i386.h qemu-0.1.2-s390/syscall-i386.h
--- qemu-0.1.2/syscall-i386.h 2003-03-26 23:34:59.000000000 +0100
+++ qemu-0.1.2-s390/syscall-i386.h 2003-03-29 02:33:28.000000000 +0100
@@ -255,11 +255,11 @@
target_ulong st_size;
target_ulong st_blksize;
target_ulong st_blocks;
- target_ulong st_atime;
+ target_ulong target_st_atime;
target_ulong __unused1;
- target_ulong st_mtime;
+ target_ulong target_st_mtime;
target_ulong __unused2;
- target_ulong st_ctime;
+ target_ulong target_st_ctime;
target_ulong __unused3;
target_ulong __unused4;
target_ulong __unused5;
@@ -290,13 +290,13 @@
target_ulong st_blocks; /* Number 512-byte blocks allocated. */
target_ulong __pad4; /* future possible st_blocks high bits */
- target_ulong st_atime;
+ target_ulong target_st_atime;
target_ulong __pad5;
- target_ulong st_mtime;
+ target_ulong target_st_mtime;
target_ulong __pad6;
- target_ulong st_ctime;
+ target_ulong target_st_ctime;
target_ulong __pad7; /* will be high 32 bits of ctime someday */
unsigned long long st_ino;
diff -ur qemu-0.1.2/syscall.c qemu-0.1.2-s390/syscall.c
--- qemu-0.1.2/syscall.c 2003-03-26 23:34:59.000000000 +0100
+++ qemu-0.1.2-s390/syscall.c 2003-03-29 04:45:12.000000000 +0100
@@ -26,6 +26,7 @@
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
+#include <time.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/time.h>
@@ -40,6 +41,7 @@
#include <sys/uio.h>
#include <sys/poll.h>
//#include <sys/user.h>
+#include <netinet/tcp.h>
#define termios host_termios
#define winsize host_winsize
@@ -166,7 +168,7 @@
static inline fd_set *target_to_host_fds(fd_set *fds,
target_long *target_fds, int n)
{
-#if !defined(BSWP_NEEDED) && !defined(WORD_BIGENDIAN)
+#if !defined(BSWP_NEEDED) && !defined(WORDS_BIGENDIAN)
return (fd_set *)target_fds;
#else
int i, b;
@@ -188,7 +190,7 @@
static inline void host_to_target_fds(target_long *target_fds,
fd_set *fds, int n)
{
-#if !defined(BSWP_NEEDED) && !defined(WORD_BIGENDIAN)
+#if !defined(BSWP_NEEDED) && !defined(WORDS_BIGENDIAN)
/* nothing to do */
#else
int i, nw, j, k;
@@ -256,55 +258,267 @@
return ret;
}
-static long do_socketcall(int num, long *vptr)
+static inline void target_to_host_sockaddr(struct sockaddr *addr,
+ struct target_sockaddr *target_addr,
+ socklen_t len)
+{
+ memcpy(addr, target_addr, len);
+ addr->sa_family = tswap16(target_addr->sa_family);
+}
+
+static inline void host_to_target_sockaddr(struct target_sockaddr *target_addr,
+ struct sockaddr *addr,
+ socklen_t len)
+{
+ memcpy(target_addr, addr, len);
+ target_addr->sa_family = tswap16(addr->sa_family);
+}
+
+static inline void target_to_host_cmsg(struct msghdr *msgh,
+ struct target_msghdr *target_msgh)
+{
+ struct cmsghdr *cmsg = CMSG_FIRSTHDR(msgh);
+ struct target_cmsghdr *target_cmsg = TARGET_CMSG_FIRSTHDR(target_msgh);
+ socklen_t space = 0;
+
+ while (cmsg && target_cmsg) {
+ void *data = CMSG_DATA(cmsg);
+ void *target_data = TARGET_CMSG_DATA(target_cmsg);
+
+ int len = tswapl(target_cmsg->cmsg_len)
+ - TARGET_CMSG_ALIGN(sizeof (struct target_cmsghdr));
+
+ space += CMSG_SPACE(len);
+ if (space > msgh->msg_controllen) {
+ space -= CMSG_SPACE(len);
+ gemu_log("Host cmsg overflow");
+ break;
+ }
+
+ cmsg->cmsg_level = tswap32(target_cmsg->cmsg_level);
+ cmsg->cmsg_type = tswap32(target_cmsg->cmsg_type);
+ cmsg->cmsg_len = CMSG_LEN(len);
+
+ if (cmsg->cmsg_level != SOL_SOCKET || cmsg->cmsg_type != SCM_RIGHTS) {
+ gemu_log("Unsupported ancillary data: %d/%d\n", cmsg->cmsg_level, cmsg->cmsg_type);
+ memcpy(data, target_data, len);
+ } else {
+ int *fd = (int *)data;
+ int *target_fd = (int *)target_data;
+ int i, numfds = len / sizeof(int);
+
+ for (i = 0; i < numfds; i++)
+ fd[i] = tswap32(target_fd[i]);
+ }
+
+ cmsg = CMSG_NXTHDR(msgh, cmsg);
+ target_cmsg = TARGET_CMSG_NXTHDR(target_msgh, target_cmsg);
+ }
+
+ msgh->msg_controllen = space;
+}
+
+static inline void host_to_target_cmsg(struct target_msghdr *target_msgh,
+ struct msghdr *msgh)
+{
+ struct cmsghdr *cmsg = CMSG_FIRSTHDR(msgh);
+ struct target_cmsghdr *target_cmsg = TARGET_CMSG_FIRSTHDR(target_msgh);
+ socklen_t space = 0;
+
+ while (cmsg && target_cmsg) {
+ void *data = CMSG_DATA(cmsg);
+ void *target_data = TARGET_CMSG_DATA(target_cmsg);
+
+ int len = cmsg->cmsg_len - CMSG_ALIGN(sizeof (struct cmsghdr));
+
+ space += TARGET_CMSG_SPACE(len);
+ if (space > tswapl(target_msgh->msg_controllen)) {
+ space -= TARGET_CMSG_SPACE(len);
+ gemu_log("Target cmsg overflow");
+ break;
+ }
+
+ target_cmsg->cmsg_level = tswap32(cmsg->cmsg_level);
+ target_cmsg->cmsg_type = tswap32(cmsg->cmsg_type);
+ target_cmsg->cmsg_len = tswapl(TARGET_CMSG_LEN(len));
+
+ if (cmsg->cmsg_level != SOL_SOCKET || cmsg->cmsg_type != SCM_RIGHTS) {
+ gemu_log("Unsupported ancillary data: %d/%d\n", cmsg->cmsg_level, cmsg->cmsg_type);
+ memcpy(target_data, data, len);
+ } else {
+ int *fd = (int *)data;
+ int *target_fd = (int *)target_data;
+ int i, numfds = len / sizeof(int);
+
+ for (i = 0; i < numfds; i++)
+ target_fd[i] = tswap32(fd[i]);
+ }
+
+ cmsg = CMSG_NXTHDR(msgh, cmsg);
+ target_cmsg = TARGET_CMSG_NXTHDR(target_msgh, target_cmsg);
+ }
+
+ msgh->msg_controllen = tswapl(space);
+}
+
+static long do_setsockopt(int sockfd, int level, int optname,
+ void *optval, socklen_t optlen)
+{
+ if (level == SOL_TCP) {
+ /* TCP options all take an 'int' value. */
+ int val;
+
+ if (optlen < sizeof(uint32_t))
+ return -EINVAL;
+
+ val = tswap32(*(uint32_t *)optval);
+ return get_errno(setsockopt(sockfd, level, optname, &val, sizeof(val)));
+ }
+
+ else if (level != SOL_SOCKET) {
+ gemu_log("Unsupported setsockopt level: %d\n", level);
+ return -ENOSYS;
+ }
+
+ switch (optname) {
+ /* Options with 'int' argument. */
+ case SO_DEBUG:
+ case SO_REUSEADDR:
+ case SO_TYPE:
+ case SO_ERROR:
+ case SO_DONTROUTE:
+ case SO_BROADCAST:
+ case SO_SNDBUF:
+ case SO_RCVBUF:
+ case SO_KEEPALIVE:
+ case SO_OOBINLINE:
+ case SO_NO_CHECK:
+ case SO_PRIORITY:
+ case SO_BSDCOMPAT:
+ case SO_PASSCRED:
+ case SO_TIMESTAMP:
+ case SO_RCVLOWAT:
+ case SO_RCVTIMEO:
+ case SO_SNDTIMEO:
+ {
+ int val;
+ if (optlen < sizeof(uint32_t))
+ return -EINVAL;
+ val = tswap32(*(uint32_t *)optval);
+ return get_errno(setsockopt(sockfd, level, optname, &val, sizeof(val)));
+ }
+
+ default:
+ gemu_log("Unsupported setsockopt SOL_SOCKET option: %d\n", optname);
+ return -ENOSYS;
+ }
+}
+
+static long do_getsockopt(int sockfd, int level, int optname,
+ void *optval, socklen_t *optlen)
+{
+ gemu_log("getsockopt not yet supported\n");
+ return -ENOSYS;
+}
+
+static long do_socketcall(int num, int32_t *vptr)
{
long ret;
switch(num) {
case SOCKOP_socket:
- ret = get_errno(socket(vptr[0], vptr[1], vptr[2]));
+ {
+ int domain = tswap32(vptr[0]);
+ int type = tswap32(vptr[1]);
+ int protocol = tswap32(vptr[2]);
+
+ ret = get_errno(socket(domain, type, protocol));
+ }
break;
case SOCKOP_bind:
- ret = get_errno(bind(vptr[0], (struct sockaddr *)vptr[1], vptr[2]));
+ {
+ int sockfd = tswap32(vptr[0]);
+ void *target_addr = (void *)tswap32(vptr[1]);
+ socklen_t addrlen = tswap32(vptr[2]);
+ void *addr = alloca(addrlen);
+
+ target_to_host_sockaddr(addr, target_addr, addrlen);
+ ret = get_errno(bind(sockfd, addr, addrlen));
+ }
break;
case SOCKOP_connect:
- ret = get_errno(connect(vptr[0], (struct sockaddr *)vptr[1], vptr[2]));
+ {
+ int sockfd = tswap32(vptr[0]);
+ void *target_addr = (void *)tswap32(vptr[1]);
+ socklen_t addrlen = tswap32(vptr[2]);
+ void *addr = alloca(addrlen);
+
+ target_to_host_sockaddr(addr, target_addr, addrlen);
+ ret = get_errno(connect(sockfd, addr, addrlen));
+ }
break;
case SOCKOP_listen:
- ret = get_errno(listen(vptr[0], vptr[1]));
+ {
+ int sockfd = tswap32(vptr[0]);
+ int backlog = tswap32(vptr[1]);
+
+ ret = get_errno(listen(sockfd, backlog));
+ }
break;
case SOCKOP_accept:
{
- socklen_t size;
- size = tswap32(*(int32_t *)vptr[2]);
- ret = get_errno(accept(vptr[0], (struct sockaddr *)vptr[1], &size));
- if (!is_error(ret))
- *(int32_t *)vptr[2] = size;
+ int sockfd = tswap32(vptr[0]);
+ void *target_addr = (void *)tswap32(vptr[1]);
+ uint32_t *target_addrlen = (void *)tswap32(vptr[2]);
+ socklen_t addrlen = tswap32(*target_addrlen);
+ void *addr = alloca(addrlen);
+
+ ret = get_errno(accept(sockfd, addr, &addrlen));
+ if (!is_error(ret)) {
+ host_to_target_sockaddr(target_addr, addr, addrlen);
+ *target_addrlen = tswap32(addrlen);
+ }
}
break;
case SOCKOP_getsockname:
{
- socklen_t size;
- size = tswap32(*(int32_t *)vptr[2]);
- ret = get_errno(getsockname(vptr[0], (struct sockaddr *)vptr[1], &size));
- if (!is_error(ret))
- *(int32_t *)vptr[2] = size;
+ int sockfd = tswap32(vptr[0]);
+ void *target_addr = (void *)tswap32(vptr[1]);
+ uint32_t *target_addrlen = (void *)tswap32(vptr[2]);
+ socklen_t addrlen = tswap32(*target_addrlen);
+ void *addr = alloca(addrlen);
+
+ ret = get_errno(getsockname(sockfd, addr, &addrlen));
+ if (!is_error(ret)) {
+ host_to_target_sockaddr(target_addr, addr, addrlen);
+ *target_addrlen = tswap32(addrlen);
+ }
}
break;
case SOCKOP_getpeername:
{
- socklen_t size;
- size = tswap32(*(int32_t *)vptr[2]);
- ret = get_errno(getpeername(vptr[0], (struct sockaddr *)vptr[1], &size));
- if (!is_error(ret))
- *(int32_t *)vptr[2] = size;
+ int sockfd = tswap32(vptr[0]);
+ void *target_addr = (void *)tswap32(vptr[1]);
+ uint32_t *target_addrlen = (void *)tswap32(vptr[2]);
+ socklen_t addrlen = tswap32(*target_addrlen);
+ void *addr = alloca(addrlen);
+
+ ret = get_errno(getpeername(sockfd, addr, &addrlen));
+ if (!is_error(ret)) {
+ host_to_target_sockaddr(target_addr, addr, addrlen);
+ *target_addrlen = tswap32(addrlen);
+ }
}
break;
case SOCKOP_socketpair:
{
+ int domain = tswap32(vptr[0]);
+ int type = tswap32(vptr[1]);
+ int protocol = tswap32(vptr[2]);
+ int32_t *target_tab = (void *)tswap32(vptr[3]);
int tab[2];
- int32_t *target_tab = (int32_t *)vptr[3];
- ret = get_errno(socketpair(vptr[0], vptr[1], vptr[2], tab));
+
+ ret = get_errno(socketpair(domain, type, protocol, tab));
if (!is_error(ret)) {
target_tab[0] = tswap32(tab[0]);
target_tab[1] = tswap32(tab[1]);
@@ -312,27 +526,64 @@
}
break;
case SOCKOP_send:
- ret = get_errno(send(vptr[0], (void *)vptr[1], vptr[2], vptr[3]));
+ {
+ int sockfd = tswap32(vptr[0]);
+ void *msg = (void *)tswap32(vptr[1]);
+ size_t len = tswap32(vptr[2]);
+ int flags = tswap32(vptr[3]);
+
+ ret = get_errno(send(sockfd, msg, len, flags));
+ }
break;
case SOCKOP_recv:
- ret = get_errno(recv(vptr[0], (void *)vptr[1], vptr[2], vptr[3]));
+ {
+ int sockfd = tswap32(vptr[0]);
+ void *msg = (void *)tswap32(vptr[1]);
+ size_t len = tswap32(vptr[2]);
+ int flags = tswap32(vptr[3]);
+
+ ret = get_errno(recv(sockfd, msg, len, flags));
+ }
break;
case SOCKOP_sendto:
- ret = get_errno(sendto(vptr[0], (void *)vptr[1], vptr[2], vptr[3],
- (struct sockaddr *)vptr[4], vptr[5]));
+ {
+ int sockfd = tswap32(vptr[0]);
+ void *msg = (void *)tswap32(vptr[1]);
+ size_t len = tswap32(vptr[2]);
+ int flags = tswap32(vptr[3]);
+ void *target_addr = (void *)tswap32(vptr[4]);
+ socklen_t addrlen = tswap32(vptr[5]);
+ void *addr = alloca(addrlen);
+
+ target_to_host_sockaddr(addr, target_addr, addrlen);
+ ret = get_errno(sendto(sockfd, msg, len, flags, addr, addrlen));
+ }
break;
case SOCKOP_recvfrom:
{
- socklen_t size;
- size = tswap32(*(int32_t *)vptr[5]);
- ret = get_errno(recvfrom(vptr[0], (void *)vptr[1], vptr[2],
- vptr[3], (struct sockaddr *)vptr[4], &size));
- if (!is_error(ret))
- *(int32_t *)vptr[5] = size;
+ int sockfd = tswap32(vptr[0]);
+ void *msg = (void *)tswap32(vptr[1]);
+ size_t len = tswap32(vptr[2]);
+ int flags = tswap32(vptr[3]);
+ void *target_addr = (void *)tswap32(vptr[4]);
+ uint32_t *target_addrlen = (void *)tswap32(vptr[5]);
+ socklen_t addrlen = tswap32(*target_addrlen);
+ void *addr = alloca(addrlen);
+
+ ret = get_errno(recvfrom(sockfd, msg, len, flags, addr, &addrlen));
+ if (!is_error(ret)) {
+ host_to_target_sockaddr(target_addr, addr, addrlen);
+ *target_addrlen = tswap32(addrlen);
+ }
}
break;
case SOCKOP_shutdown:
- ret = get_errno(shutdown(vptr[0], vptr[1]));
+ {
+ int sockfd = tswap32(vptr[0]);
+ int how = tswap32(vptr[1]);
+
+ ret = get_errno(shutdown(sockfd, how));
+ }
break;
case SOCKOP_sendmsg:
case SOCKOP_recvmsg:
@@ -344,11 +595,11 @@
struct iovec *vec;
struct target_iovec *target_vec;
- msgp = (void *)vptr[1];
+ msgp = (void *)tswap32(vptr[1]);
msg.msg_name = (void *)tswapl(msgp->msg_name);
msg.msg_namelen = tswapl(msgp->msg_namelen);
- msg.msg_control = (void *)tswapl(msgp->msg_control);
- msg.msg_controllen = tswapl(msgp->msg_controllen);
+ msg.msg_controllen = 2 * tswapl(msgp->msg_controllen);
+ msg.msg_control = alloca(msg.msg_controllen);
msg.msg_flags = tswap32(msgp->msg_flags);
count = tswapl(msgp->msg_iovlen);
@@ -361,17 +612,43 @@
msg.msg_iovlen = count;
msg.msg_iov = vec;
- fd = vptr[0];
- flags = vptr[2];
- if (num == SOCKOP_sendmsg)
- ret = sendmsg(fd, &msg, flags);
- else
- ret = recvmsg(fd, &msg, flags);
- ret = get_errno(ret);
+ fd = tswap32(vptr[0]);
+ flags = tswap32(vptr[2]);
+ if (num == SOCKOP_sendmsg) {
+ target_to_host_cmsg(&msg, msgp);
+ ret = get_errno(sendmsg(fd, &msg, flags));
+ } else {
+ ret = get_errno(recvmsg(fd, &msg, flags));
+ if (!is_error(ret))
+ host_to_target_cmsg(msgp, &msg);
+ }
}
break;
case SOCKOP_setsockopt:
+ {
+ int sockfd = tswap32(vptr[0]);
+ int level = tswap32(vptr[1]);
+ int optname = tswap32(vptr[2]);
+ void *optval = (void *)tswap32(vptr[3]);
+ socklen_t optlen = tswap32(vptr[4]);
+
+ ret = do_setsockopt(sockfd, level, optname, optval, optlen);
+ }
+ break;
case SOCKOP_getsockopt:
+ {
+ int sockfd = tswap32(vptr[0]);
+ int level = tswap32(vptr[1]);
+ int optname = tswap32(vptr[2]);
+ void *optval = (void *)tswap32(vptr[3]);
+ uint32_t *target_len = (void *)tswap32(vptr[4]);
+ socklen_t optlen = tswap32(*target_len);
+
+ ret = do_getsockopt(sockfd, level, optname, optval, &optlen);
+ if (!is_error(ret))
+ *target_len = tswap32(optlen);
+ }
+ break;
default:
gemu_log("Unsupported socketcall: %d\n", num);
ret = -ENOSYS;
@@ -880,7 +1157,27 @@
ret = get_errno(unlink((const char *)arg1));
break;
case TARGET_NR_execve:
- ret = get_errno(execve((const char *)arg1, (void *)arg2, (void *)arg3));
+ {
+ char **argp, **envp;
+ int argc = 0, envc = 0;
+ uint32_t *p;
+ char **q;
+
+ for (p = (void *)arg2; *p; p++)
+ argc++;
+ for (p = (void *)arg3; *p; p++)
+ envc++;
+
+ argp = alloca(argc * sizeof(void *));
+ envp = alloca(envc * sizeof(void *));
+
+ for (p = (void *)arg2, q = argp; *p; p++, q++)
+ *q = (void *)tswap32(*p);
+ for (p = (void *)arg3, q = envp; *p; p++, q++)
+ *q = (void *)tswap32(*p);
+
+ ret = get_errno(execve((const char *)arg1, argp, envp));
+ }
break;
case TARGET_NR_chdir:
ret = get_errno(chdir((const char *)arg1));
@@ -1404,7 +1701,7 @@
case TARGET_NR_ioperm:
goto unimplemented;
case TARGET_NR_socketcall:
- ret = do_socketcall(arg1, (long *)arg2);
+ ret = do_socketcall(arg1, (int32_t *)arg2);
break;
case TARGET_NR_syslog:
goto unimplemented;
@@ -1468,9 +1765,9 @@
target_st->st_size = tswapl(st.st_size);
target_st->st_blksize = tswapl(st.st_blksize);
target_st->st_blocks = tswapl(st.st_blocks);
- target_st->st_atime = tswapl(st.st_atime);
- target_st->st_mtime = tswapl(st.st_mtime);
- target_st->st_ctime = tswapl(st.st_ctime);
+ target_st->target_st_atime = tswapl(st.st_atime);
+ target_st->target_st_mtime = tswapl(st.st_mtime);
+ target_st->target_st_ctime = tswapl(st.st_ctime);
}
}
break;
@@ -1644,17 +1941,17 @@
unsigned int nfds = arg2;
int timeout = arg3;
struct pollfd *pfd;
- int i;
+ unsigned int i;
pfd = alloca(sizeof(struct pollfd) * nfds);
for(i = 0; i < nfds; i++) {
- pfd->fd = tswap32(target_pfd->fd);
- pfd->events = tswap16(target_pfd->events);
+ pfd[i].fd = tswap32(target_pfd[i].fd);
+ pfd[i].events = tswap16(target_pfd[i].events);
}
ret = get_errno(poll(pfd, nfds, timeout));
if (!is_error(ret)) {
for(i = 0; i < nfds; i++) {
- target_pfd->revents = tswap16(pfd->revents);
+ target_pfd[i].revents = tswap16(pfd[i].revents);
}
}
}
@@ -1859,9 +2156,9 @@
target_st->st_size = tswapl(st.st_size);
target_st->st_blksize = tswapl(st.st_blksize);
target_st->st_blocks = tswapl(st.st_blocks);
- target_st->st_atime = tswapl(st.st_atime);
- target_st->st_mtime = tswapl(st.st_mtime);
- target_st->st_ctime = tswapl(st.st_ctime);
+ target_st->target_st_atime = tswapl(st.st_atime);
+ target_st->target_st_mtime = tswapl(st.st_mtime);
+ target_st->target_st_ctime = tswapl(st.st_ctime);
}
}
break;
diff -ur qemu-0.1.2/syscall_defs.h qemu-0.1.2-s390/syscall_defs.h
--- qemu-0.1.2/syscall_defs.h 2003-03-26 23:34:59.000000000 +0100
+++ qemu-0.1.2-s390/syscall_defs.h 2003-03-29 02:36:30.000000000 +0100
@@ -19,6 +19,11 @@
#define SOCKOP_sendmsg 16
#define SOCKOP_recvmsg 17
+struct target_sockaddr {
+ uint16_t sa_family;
+ uint8_t sa_data[14];
+};
+
struct target_timeval {
target_long tv_sec;
target_long tv_usec;
@@ -49,6 +54,43 @@
unsigned int msg_flags;
};
+struct target_cmsghdr {
+ target_long cmsg_len;
+ int cmsg_level;
+ int cmsg_type;
+};
+
+#define TARGET_CMSG_DATA(cmsg) ((unsigned char *) ((struct target_cmsghdr *) (cmsg) + 1))
+#define TARGET_CMSG_NXTHDR(mhdr, cmsg) __target_cmsg_nxthdr (mhdr, cmsg)
+#define TARGET_CMSG_FIRSTHDR(mhdr) \
+ ((size_t) tswapl((mhdr)->msg_controllen) >= sizeof (struct target_cmsghdr) \
+ ? (struct target_cmsghdr *) tswapl((mhdr)->msg_control) : (struct target_cmsghdr *) NULL)
+#define TARGET_CMSG_ALIGN(len) (((len) + sizeof (target_long) - 1) \
+ & (size_t) ~(sizeof (target_long) - 1))
+#define TARGET_CMSG_SPACE(len) (TARGET_CMSG_ALIGN (len) \
+ + TARGET_CMSG_ALIGN (sizeof (struct target_cmsghdr)))
+#define TARGET_CMSG_LEN(len) (TARGET_CMSG_ALIGN (sizeof (struct target_cmsghdr)) + (len))
+
+static __inline__ struct target_cmsghdr *
+__target_cmsg_nxthdr (struct target_msghdr *__mhdr, struct target_cmsghdr *__cmsg)
+{
+ if (tswapl(__cmsg->cmsg_len) < sizeof (struct target_cmsghdr))
+ /* The kernel header does this so there may be a reason. */
+ return 0;
+
+ __cmsg = (struct target_cmsghdr *) ((unsigned char *) __cmsg
+ + TARGET_CMSG_ALIGN (tswapl(__cmsg->cmsg_len)));
+ if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) tswapl(__mhdr->msg_control)
+ + tswapl(__mhdr->msg_controllen))
+ || ((unsigned char *) __cmsg + TARGET_CMSG_ALIGN (tswapl(__cmsg->cmsg_len))
+ > ((unsigned char *) tswapl(__mhdr->msg_control)
+ + tswapl(__mhdr->msg_controllen))))
+ /* No more entries. */
+ return 0;
+ return __cmsg;
+}
+
+
struct target_rusage {
struct target_timeval ru_utime; /* user time used */
struct target_timeval ru_stime; /* system time used */
--
Dr. Ulrich Weigand
weigand(a)informatik.uni-erlangen.de
March 29, 2003
Fwd: Re: Installshield.... no way!
by Davide Giannotti
Oh yeah... i have the native std*tlb files... i unpacked them from my WinXP
Pro cd. I'm currently running wine without windows installation.
Don't know what to say... are you sure that latests installshield work with
wine? I think this is a priority task...
I recompiled wine from a clean tarballz... and as i said, some apps works
fine. But nothing to do with installshield.... :-(
Thanks
Subject: Re: Installshield.... no way!
Date: Saturday 29 March 2003 11:54
From: Uwe Bonnes <bon(a)elektron.ikp.physik.tu-darmstadt.de>
To: Davide Giannotti <davide.giannotti(a)itsplanet.com>
Cc: wine-devel(a)winehq.com
>>>>> "Davide" == Davide Giannotti <davide.giannotti(a)itsplanet.com> writes:
Davide> I give up, after 2 days of try.. Nothing to do with some
Davide> setups. I'm using latest wine on redhat 8.1 with glibc 2.3.1
Davide> recompiled for my processor (athlon xp).
Davide> Apps are launched with winelauncher and the
Davide> LD_ASSUME_KERNEL=2.2.5 var. set. Wine has been compiled from
Davide> source, everything went fine and some apps work fine and
Davide> fast. (like ms office viewers) There's no original dll or config
Davide> setting or suggestion in the mailing lists that brought me
Davide> further. My $800 macromedia studio hangs after extracting files
Davide> and preparing the setup. So do some other apps. I'm still
Davide> hanging on Windozz... :-(
You don't tell about the std*tlb files, so I guess you don't have them.
To state it again:
The native std*tlb Files from a windows installation are nescessary for
InstallShield6 application.
Bye
--
Uwe Bonnes bon(a)elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
-------------------------------------------------------
--
Davide Giannotti
ITS Planet s.n.c
davide.giannotti(a)itsplanet.com
www.itsplanet.com
March 29, 2003
Re: Installshield.... no way!
by Uwe Bonnes
>>>>> "Davide" == Davide Giannotti <davide.giannotti(a)itsplanet.com> writes:
Davide> I give up, after 2 days of try.. Nothing to do with some
Davide> setups. I'm using latest wine on redhat 8.1 with glibc 2.3.1
Davide> recompiled for my processor (athlon xp).
Davide> Apps are launched with winelauncher and the
Davide> LD_ASSUME_KERNEL=2.2.5 var. set. Wine has been compiled from
Davide> source, everything went fine and some apps work fine and
Davide> fast. (like ms office viewers) There's no original dll or config
Davide> setting or suggestion in the mailing lists that brought me
Davide> further. My $800 macromedia studio hangs after extracting files
Davide> and preparing the setup. So do some other apps. I'm still
Davide> hanging on Windozz... :-(
You don't tell about the std*tlb files, so I guess you don't have them.
To state it again:
The native std*tlb Files from a windows installation are nescessary for
InstallShield6 application.
Bye
--
Uwe Bonnes bon(a)elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
March 29, 2003
Installshield.... no way!
by Davide Giannotti
I give up, after 2 days of try..
Nothing to do with some setups.
I'm using latest wine on redhat 8.1 with glibc 2.3.1 recompiled for my
processor (athlon xp).
Apps are launched with winelauncher and the LD_ASSUME_KERNEL=2.2.5 var. set.
Wine has been compiled from source, everything went fine and some apps work
fine and fast. (like ms office viewers)
There's no original dll or config setting or suggestion in the mailing lists
that brought me further.
My $800 macromedia studio hangs after extracting files and preparing the
setup. So do some other apps. I'm still hanging on Windozz... :-(
If somebody has any idea.... thank you all guys.
On Wednesday 26 March 2003 13:34, Davide Giannotti wrote:
> > There's nothing i can do to make some installers work.
> > I always get the
> > "The installshield engine (ikernel.exe) could not be installed" message.
> >
> > I tried to install the dcom98, and it unpacked the files in the
> > windows\system dir, and that's ok, but i don't think there was much more.
> >
> > When i try to install the microsoft installer (InstMsi.exe) it seems
> > working, and it gives me the "succesfull installed" popup windows too...
> > but i know it didn't cause it unpacks and doesn't even ask me if i want to
> > proceed, it just jumps... to the end of process.
> >
> > And when i try to install some progs like Dreamweaver MX, i get the darn
> > message above.
> >
> > Any suggestion?
> >
> > Thank you all guys
> >
> > P.s: The "export LD_ASSUME_KERNEL=2.2.5" command seems to work (at least
> > partially). i added the line in my winelauncher script and konqueror uses
> > winelauncher to start my win apps.
> > Shouldn't you check for glibc version and add that line as default in the
> > winelauncher script?
>
> --
> Davide Giannotti
> ITS Planet s.n.c
> davide.giannotti(a)itsplanet.com
> www.itsplanet.com
--
Davide Giannotti
ITS Planet s.n.c
davide.giannotti(a)itsplanet.com
www.itsplanet.com
March 29, 2003
Re: Debugging winedbg
by Eric Pouech
Ulrich Spoerlein wrote:
> Can anyone please explain this to me?
every module (in the Wine sense) is create with a .init section. the
code in this section is executed as soon as the module is loader (by the
ELF loader). But the code in this section expects a bit of Wine
environment to be already present (basically the wine executable)
with preloading the .exe.so file, this code gets executed with the wine
executable being loaded
> And what would be the easiest way to break into gdb on DEBUG_MainLoop?
add a breakpoint instruction at the start of DEBUG_MainLoop code
__asm__("int 3"); would do
A+
--
Eric Pouech
March 29, 2003
Re: Some shell32 questions and pictures
by Eric Pouech
Steven Edwards wrote:
> Hello,
> I was taking a look at the current shell32 sources from winehq and
> trying to see if we needed to merge in the reactos shell32 fork stuff.
> We have forked a small part of shell32 to be able to run the control
> panel application with our own dll. After doing some testing I wanted to
> see from you guys if our implementation was right and if it would be
> accepted to the winehq tree. I was wondering if this really needs to go
> in to the shell32 or in to the explorer clone.
IMO, both are wrong.
Rendering of control panel should be done in EXPLORER, looking at the
ControlPanel folder. However, the shell folder for the control panel
should be finished (which I'm not sure it is ATM)
A+
--
Eric Pouech
March 29, 2003
Some shell32 questions and pictures
by Steven Edwards
Hello,
I was taking a look at the current shell32 sources from winehq and
trying to see if we needed to merge in the reactos shell32 fork stuff.
We have forked a small part of shell32 to be able to run the control
panel application with our own dll. After doing some testing I wanted to
see from you guys if our implementation was right and if it would be
accepted to the winehq tree. I was wondering if this really needs to go
in to the shell32 or in to the explorer clone.
Thanks
Steven
Standard Win2k Control Panel
http://mail.gleneagle.net/sedwards/control-with-win2k-shell32.jpg
Now with the WINE shell32 from the current CVS you get this under
Windows2000
http://mail.gleneagle.net/sedwards/control-with-wine-shell32.jpg
And with the ReactOS shell32 you get this
http://mail.gleneagle.net/sedwards/control-with-ros-shell32.jpg
March 29, 2003
A few questions on the mingw port.
by Steven Edwards
Hello Everyone,
First I want to thank everyone for the help they have given me in
dealing with my bad spelling, lack of grammer and not following the
rules when working to get most of wine built for mingw. I'm trying to do
a little house keeping with Wine and ReactOS and had a few
changes/questions that could make my and the ReactOS teams life a little
easyer with the port.
1. Can we set --disable-win16 CFLAGS=-DWINE_NOWINSOCK" to be default
when building under Mingw? I tried to write a configure patch for this a
while back but never could get the bastard to work. Once this option is
removed all we will be left with is ./configure to configure wine for
mingw. None of the WINE networking stuff will really work for anyone
working with mingw and I dont expect that to change anytime soon.
Without this flag anything that include winsock.h or winsock2.h will
puke when building on Windows. I know that WINE on linux will need win16
for a while due to older installers that are 16bit but for the mingw
port thats kind of not important.
2. Can we set a conditional option to not build winegcc and winewrap?
These are not needed on Windows as they are only used to port mingw
applications to winelib. Due to the use of Unixisms in these programs
(fork, waitpid, etc) they wont build. Now I know we could stub fork and
wrap waitpid to wait but its kind of pointless and I can see one day
when someone will ask why these dont work on windows even though we
build them. IMHO they just shouldnt get built for us.
winegcc.c: In function `spawn':
winegcc.c:86: warning: implicit declaration of function `fork'
winegcc.c:89: warning: implicit declaration of function `waitpid'
winegcc.c:92: warning: implicit declaration of function `WIFEXITED'
winegcc.c:92: warning: implicit declaration of function `WEXITSTATUS'
gcc -DWINE_NOWINSOCK -Wall -mpreferred-stack-boundary=2 -gstabs+
-Wpointer-arith
-o winegcc winegcc.o -L../libs/port -lwine_port
winegcc.o(.text+0x1a3): In function `spawn':
g:/src/wine-dev/wine/tools/winegcc.c:86: undefined reference to `fork'
winegcc.o(.text+0x1d2):g:/src/wine-dev/wine/tools/winegcc.c:89:
undefined refere
nce to `waitpid'
winegcc.o(.text+0x202):g:/src/wine-dev/wine/tools/winegcc.c:92:
undefined refere
nce to `WIFEXITED'
winegcc.o(.text+0x211):g:/src/wine-dev/wine/tools/winegcc.c:92:
undefined refere
nce to `WEXITSTATUS'
3. Exclude WINEserver. This is a fun one. I took a look at this a while
back a was able to get about 80% of it to compile native on windows.
Before we can even get wineserver to build/link on mingw we still have
the same problem a cygwin port has and that is what to do with the
get/set thread_context stuff. Also from all I have read a mingw port
would require a major redesign because of the signal/pipe usage. I
looked at porting some of the stuff to windows sockets a while back and
decided I still cant program well enough and I have more interesting
things to do like work on ReactOS. =P
4. This may be more a mingw problem rather then something with WINE but
I figured I would ask while I was making noise. When I try to build the
regression tests under mingw with gcc-3.x I am getting this error. If I
dont include wines libmsvcrt.a it goes away. do the exit functions in
wine and mingws source not agree?
gcc registry.o testlist.o -o advapi32_test.exe -L../../../dlls
-ladvapi32 -lke
rnel32 -lntdll -L../../../libs/wine -lwine -L../../../libs/port
-lwine_port -lm
../../../dlls/libmsvcrt.a(ds00443.o)(.text+0x0): multiple definition of
`atexit'
C:/mingw/bin/../lib/gcc-lib/mingw32/3.2.1/../../../crt2.o(.text+0x40):crt1.c:
fi
rst defined here
../../../dlls/libmsvcrt.a(ds00319.o)(.text+0x0): multiple definition of
`_onexit
C:/mingw/bin/../lib/gcc-lib/mingw32/3.2.1/../../../crt2.o(.text+0x60):crt1.c:
fi
rst defined here
make[1]: *** [advapi32_test.exe] Error 1
make[1]: Leaving directory `/g/src/wine-dev/wine/dlls/advapi32/tests'
make: *** [tests] Error 2
At some point I will do documentation for Mingw on MSYS/Cygwin <g>
Thanks
Steven
March 29, 2003