Some Solaris fixes. <resolv.h> needs <arpa/nameser.h>, sig_context.h
needs to define HANDLER_CONTEXT, wctype.h does not like 'wsprintf'
defined, msdos/dpmi.c needs "stackframe.h" too, and multimedia/dsound.c
needs "winuser.h".

diff --git a/configure b/configure
index 2a4eaba..55fc5ca 100755
--- a/configure
+++ b/configure
@@ -3677,7 +3677,7 @@
 fi
 done
 
-for ac_hdr in wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h sys/statfs.h float.h linux/cdrom.h linux/ucdrom.h sys/cdio.h sys/filio.h sys/modem.h strings.h sys/strtio.h dlfcn.h unistd.h sys/sockio.h net/if.h netinet/in.h sys/file.h libio.h curses.h ncurses.h elf.h resolv.h
+for ac_hdr in wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h sys/statfs.h float.h linux/cdrom.h linux/ucdrom.h sys/cdio.h sys/filio.h sys/modem.h strings.h sys/strtio.h dlfcn.h unistd.h sys/sockio.h net/if.h netinet/in.h sys/file.h libio.h curses.h ncurses.h elf.h arpa/nameser.h resolv.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
diff --git a/configure.in b/configure.in
index d174881..5acc542 100644
--- a/configure.in
+++ b/configure.in
@@ -385,7 +385,7 @@
 dnl **** Check for functions and header files ****
 
 AC_CHECK_FUNCS(clone getpagesize memmove sendmsg sigaltstack strerror stricmp tcgetattr timegm usleep wait4 waitpid vfscanf)
-AC_CHECK_HEADERS(wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h sys/statfs.h float.h linux/cdrom.h linux/ucdrom.h sys/cdio.h sys/filio.h sys/modem.h strings.h sys/strtio.h dlfcn.h unistd.h sys/sockio.h net/if.h netinet/in.h sys/file.h libio.h curses.h ncurses.h elf.h resolv.h)
+AC_CHECK_HEADERS(wctype.h sys/syscall.h syscall.h sys/param.h sys/vfs.h sys/mount.h sys/statfs.h float.h linux/cdrom.h linux/ucdrom.h sys/cdio.h sys/filio.h sys/modem.h strings.h sys/strtio.h dlfcn.h unistd.h sys/sockio.h net/if.h netinet/in.h sys/file.h libio.h curses.h ncurses.h elf.h arpa/nameser.h resolv.h)
 AC_HEADER_STAT()
 AC_C_CONST()
 AC_TYPE_SIZE_T()
diff --git a/include/config.h.in b/include/config.h.in
index 3a96d68..dfce820 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -153,6 +153,9 @@
 /* Define if you have the <X11/xpm.h> header file.  */
 #undef HAVE_X11_XPM_H
 
+/* Define if you have the <arpa/nameser.h> header file.  */
+#undef HAVE_ARPA_NAMESER_H
+
 /* Define if you have the <curses.h> header file.  */
 #undef HAVE_CURSES_H
 
diff --git a/include/sig_context.h b/include/sig_context.h
index 3554854..57a53f2 100644
--- a/include/sig_context.h
+++ b/include/sig_context.h
@@ -273,6 +273,7 @@
 #ifndef __HAVE_SIGCONTEXT
 /* empty entry for non x86 architectures mostly. */
 typedef DWORD SIGCONTEXT;
+#define HANDLER_CONTEXT 0
 #endif
 
 #endif /* __WINE_SIG_CONTEXT_H */
diff --git a/include/winnls.h b/include/winnls.h
index e497dac..4f96837 100644
--- a/include/winnls.h
+++ b/include/winnls.h
@@ -2,6 +2,11 @@
 #define __WINE_WINNLS_H
 
 #ifdef HAVE_WCTYPE_H
+
+/* Sun Bug Workaround */
+#ifdef __WINE__ 
+# undef wsprintf
+#endif
 #include <wctype.h> /* needed for towupper */
 #endif
 #include "wintypes.h"
diff --git a/misc/winsock.c b/misc/winsock.c
index c75900a..d6a5862 100644
--- a/misc/winsock.c
+++ b/misc/winsock.c
@@ -44,6 +44,9 @@
 #include <netdb.h>
 #include <unistd.h>
 #include <stdlib.h>
+#ifdef HAVE_ARPA_NAMESER_H
+# include <arpa/nameser.h>
+#endif
 #ifdef HAVE_RESOLV_H
 # include <resolv.h>
 #endif
diff --git a/misc/winsock_dns.c b/misc/winsock_dns.c
index 906faa2..b3f1ecb 100644
--- a/misc/winsock_dns.c
+++ b/misc/winsock_dns.c
@@ -37,6 +37,9 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <netdb.h>
+#ifdef HAVE_ARPA_NAMESER_H
+# include <arpa/nameser.h>
+#endif
 #ifdef HAVE_RESOLV_H
 # include <resolv.h>
 #endif
diff --git a/multimedia/dsound.c b/multimedia/dsound.c
index baa7ce4..7fd6f92 100644
--- a/multimedia/dsound.c
+++ b/multimedia/dsound.c
@@ -62,6 +62,7 @@
 #include <string.h>
 #include <math.h>	/* Insomnia - pow() function */
 #include "dsound.h"
+#include "winuser.h"
 #include "winerror.h"
 #include "multimedia.h"
 #include "wine/obj_base.h"