Patches for kdelibs on HPUX / aCC
Marcus Camen
mcamen at mcamen.de
Sat Jan 25 12:54:31 GMT 2003
Hi *,
during the last weeks a friend on mine (Olaf Flebbe) has tried to get
KDE_3_1_BRANCH / kdelibs runnung on HPUX 11 using HPs aCC compiler.
Not suprisingly, quite a number of patches are necessary. He forwarded me a
few of them to be considered to be part of KDE CVS.
---- snip
> Hi,
>
> a couple of patches for HPUX 11
>
> 1) I needed to define _XOPEN_EXTENDED_SOURCE in order to get the correct
> definition of getsockname()
>
> 2) if you define _XOPEN_EXTENDED_SOURCE htons is found in arpa/inet.h
>
> 3) The getdomainname() is only found in the aCC headers, not in the cc
> headers. As a work around I let the fakes compile. It has an inconsistent
> declaration in the config.h vs the fakes.h. I changed it to be consistent
> (though not 100% correct)
>
> 4) res_init() is found in the library, but not declared in any
> header. I do not understand the aclocal.m4 stuff, so I hacked a quick fix
> for it: Simply declare it. Hope it does not break anything.
>
> Olaf
---- snip
You can find the patches for KDE_3_1_BRANCH / kdelibs in the attachment.
Opinions ?
IMHO the definition of _XOPEN_EXTENDED_SOURCE on HPUX 11 needs some autoconf
magic. Unfortunately I am not an auto* guru at all, so I have no patch for
this one. If you can give me a hint how to implement this....
--
Marcus
-------------- next part --------------
Index: configure.in.in
===================================================================
RCS file: /home/kde/kdelibs/configure.in.in,v
retrieving revision 1.92.2.4
diff -u -3 -p -u -r1.92.2.4 configure.in.in
--- configure.in.in 28 Dec 2002 13:59:02 -0000 1.92.2.4
+++ configure.in.in 24 Jan 2003 17:10:32 -0000
@@ -43,7 +43,7 @@ dnl Checks for header files.
KDE_CHECK_STL
AC_HEADER_DIRENT
AC_HEADER_STDC
-AC_CHECK_HEADERS(sys/param.h sys/mman.h sys/time.h sys/cdefs.h fnmatch.h sysent.h strings.h sys/stat.h sys/select.h sys/socket.h linux/socket.h socketbits.h sigaction.h paths.h malloc.h monetary.h limits.h sys/soundcard.h dlfcn.h)
+AC_CHECK_HEADERS(sys/param.h sys/mman.h sys/time.h sys/cdefs.h fnmatch.h sysent.h strings.h sys/stat.h sys/select.h sys/socket.h linux/socket.h socketbits.h sigaction.h paths.h malloc.h monetary.h limits.h sys/soundcard.h dlfcn.h arpa/inet.h)
DCOPIDL2CPP="compiled"
DCOPIDL="compiled"
Index: kdecore/fakes.c
===================================================================
RCS file: /home/kde/kdelibs/kdecore/fakes.c,v
retrieving revision 1.9.2.3
diff -u -3 -p -u -r1.9.2.3 fakes.c
--- kdecore/fakes.c 28 Dec 2002 13:47:29 -0000 1.9.2.3
+++ kdecore/fakes.c 24 Jan 2003 17:10:32 -0000
@@ -137,7 +137,7 @@ void usleep(unsigned int usec) {
#include <errno.h>
#include <stdio.h>
-int getdomainname(char *name, size_t len)
+int getdomainname(char *name, unsigned int len)
{
struct utsname uts;
struct hostent *hent;
Index: kdecore/kextsock.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdecore/kextsock.cpp,v
retrieving revision 1.44.2.4
diff -u -3 -p -u -r1.44.2.4 kextsock.cpp
--- kdecore/kextsock.cpp 13 Jan 2003 00:09:55 -0000 1.44.2.4
+++ kdecore/kextsock.cpp 24 Jan 2003 17:10:36 -0000
@@ -26,11 +26,16 @@
#include <sys/socket.h>
#include <sys/times.h>
#include <netinet/in.h>
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+
#include <sys/un.h>
#ifdef HAVE_RES_INIT
# include <arpa/nameser.h>
# include <resolv.h>
+extern "C" int res_init();
#endif
#include <stdio.h>
More information about the kde-core-devel
mailing list