diff options
author | Dalibor Topic <robilad@yahoo.com> | 2007-12-28 17:49:55 +0000 |
---|---|---|
committer | Dalibor Topic <robilad@yahoo.com> | 2007-12-28 17:49:55 +0000 |
commit | f4f4277a5f4383f1871830466e38292428405fe4 (patch) | |
tree | c97be8762a012d03d066bf869992223d70df87f7 /native | |
parent | 8007c025a63de616761a59e7e595000928671abe (diff) | |
download | classpath-f4f4277a5f4383f1871830466e38292428405fe4.tar.gz |
build fixes for arm-wince
2007-12-28 Dalibor Topic <robilad@kaffe.org>
* configure.ac (AC_CHECK_HEADERS): Check for
netinet/in_systm.h, netinet/ip.h and net/if.h
for Windows CE.
* native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c:
Guard net/if.h include statement. Use unsigned int
instead of u_int.
* native/jni/java-nio/gnu_java_nio_VMChannel.c:
Guard sys/mman.h include statement.
* native/jni/java-nio/gnu_java_nio_VMSelector.c:
Guard sys/select.h include statement.
* native/jni/java-nio/javanio.c:
Guard sys/select.h include statement.
* native/jni/java-nio/javanio.h:
Include sys/time.h.
* native/jni/native-lib/cpio.c:
Guard chmod call by S_IWRITE, since it's not
defined in the arm-wince toolchain.
* native/jni/native-lib/cpnet.h:
Guard netinet/in_systm.h and netinet/ip.h
include statements.
Diffstat (limited to 'native')
-rw-r--r-- | native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c | 6 | ||||
-rw-r--r-- | native/jni/java-nio/gnu_java_nio_VMChannel.c | 2 | ||||
-rw-r--r-- | native/jni/java-nio/gnu_java_nio_VMSelector.c | 3 | ||||
-rw-r--r-- | native/jni/java-nio/javanio.c | 2 | ||||
-rw-r--r-- | native/jni/java-nio/javanio.h | 2 | ||||
-rw-r--r-- | native/jni/native-lib/cpio.c | 4 | ||||
-rw-r--r-- | native/jni/native-lib/cpnet.h | 4 |
7 files changed, 19 insertions, 4 deletions
diff --git a/native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c b/native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c index a59604c04..c9620a4e7 100644 --- a/native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c +++ b/native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c @@ -51,7 +51,9 @@ exception statement from your version. */ #endif #include <netinet/in.h> #include <netinet/tcp.h> +#ifdef HAVE_NET_IF_H #include <net/if.h> +#endif #include <errno.h> #include <stdlib.h> #include <stdio.h> @@ -416,7 +418,7 @@ Java_gnu_java_net_VMPlainSocketImpl_setMulticastInterface6 (JNIEnv *env, #ifdef HAVE_INET6 int result; const char *str_ifname = JCL_jstring_to_cstring (env, ifname); - u_int if_index; + unsigned int if_index; if ((*env)->ExceptionOccurred (env)) { @@ -433,7 +435,7 @@ Java_gnu_java_net_VMPlainSocketImpl_setMulticastInterface6 (JNIEnv *env, } result = setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF, - (u_int *) &if_index, sizeof(if_index)); + (unsigned int *) &if_index, sizeof(if_index)); JCL_free_cstring(env, ifname, str_ifname); diff --git a/native/jni/java-nio/gnu_java_nio_VMChannel.c b/native/jni/java-nio/gnu_java_nio_VMChannel.c index a5bbd7126..7899f0b94 100644 --- a/native/jni/java-nio/gnu_java_nio_VMChannel.c +++ b/native/jni/java-nio/gnu_java_nio_VMChannel.c @@ -43,7 +43,9 @@ exception statement from your version. */ #include <config-int.h> #include <sys/types.h> +#ifdef HAVE_SYS_MMAN_H #include <sys/mman.h> +#endif #include <sys/socket.h> #include <sys/stat.h> #include <sys/uio.h> diff --git a/native/jni/java-nio/gnu_java_nio_VMSelector.c b/native/jni/java-nio/gnu_java_nio_VMSelector.c index 74a408c75..19a6f244d 100644 --- a/native/jni/java-nio/gnu_java_nio_VMSelector.c +++ b/native/jni/java-nio/gnu_java_nio_VMSelector.c @@ -41,8 +41,9 @@ exception statement from your version. */ #if defined(HAVE_SYS_TYPES_H) #include <sys/types.h> #endif - +#if defined(HAVE_SYS_SELECT_H) #include <sys/select.h> +#endif #include <sys/time.h> #include <string.h> diff --git a/native/jni/java-nio/javanio.c b/native/jni/java-nio/javanio.c index 09806f8ba..a7018b347 100644 --- a/native/jni/java-nio/javanio.c +++ b/native/jni/java-nio/javanio.c @@ -45,7 +45,9 @@ exception statement from your version. */ #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> +#ifdef HAVE_SYS_SELECT_H #include <sys/select.h> +#endif #include <sys/uio.h> CPNIO_EXPORT ssize_t diff --git a/native/jni/java-nio/javanio.h b/native/jni/java-nio/javanio.h index bdd11055e..cc31cf3c1 100644 --- a/native/jni/java-nio/javanio.h +++ b/native/jni/java-nio/javanio.h @@ -39,6 +39,8 @@ exception statement from your version. */ #ifndef __JAVANIO_H__ #define __JAVANIO_H__ +#include <sys/time.h> + /** * This header defines functions that are called by our JNI reference * implementation of java.nio.*. In our reference implementation, these diff --git a/native/jni/native-lib/cpio.c b/native/jni/native-lib/cpio.c index 605bd7f99..0ef97f185 100644 --- a/native/jni/native-lib/cpio.c +++ b/native/jni/native-lib/cpio.c @@ -349,9 +349,11 @@ int cpio_setFileReadonly (const char *filename) if (stat(filename, &statbuf) < 0) return errno; - + +#ifdef S_IWRITE if (chmod(filename, statbuf.st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH)) < 0) return errno; +#endif return 0; } diff --git a/native/jni/native-lib/cpnet.h b/native/jni/native-lib/cpnet.h index 72850b4c8..979c363c2 100644 --- a/native/jni/native-lib/cpnet.h +++ b/native/jni/native-lib/cpnet.h @@ -44,9 +44,13 @@ exception statement from your version. */ #include <sys/types.h> #include <sys/socket.h> +#ifdef HAVE_NETINET_IN_SYSTM_H #include <netinet/in_systm.h> +#endif /* HAVE_NETINET_IN_SYSTM_H */ #include <netinet/in.h> +#ifdef HAVE_NETINET_IP_H #include <netinet/ip.h> +#endif /* HAVE_NETINET_IP_H */ typedef struct { jint len; |