diff options
-rw-r--r-- | libjava/ChangeLog | 12 | ||||
-rw-r--r-- | libjava/gnu/gcj/runtime/natStackTrace.cc | 5 | ||||
-rw-r--r-- | libjava/include/posix.h | 18 | ||||
-rw-r--r-- | libjava/java/lang/natObject.cc | 5 | ||||
-rw-r--r-- | libjava/java/lang/natRuntime.cc | 3 | ||||
-rw-r--r-- | libjava/java/lang/natSystem.cc | 5 | ||||
-rw-r--r-- | libjava/java/util/natTimeZone.cc | 5 | ||||
-rw-r--r-- | libjava/win32.cc | 4 |
8 files changed, 41 insertions, 16 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 5846d4a1ab0..8c495344485 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,15 @@ +2003-02-19 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> + + * gnu/gcj/runtime/natStackTrace.cc: Include platform.h immediately + after config.h. Use <> for consistency. + * java/lang/natObject.cc: Likewise. + * java/lang/natRuntime.cc: Likewise. + * java/lang/natSystem.cc: Likewise. + * java/util/natTimeZone.cc: Likewise. + * win32.cc: Likewise. + * include/posix.h (fcntl, socket, connect, close, bind, accept, + listen, write, read): Undef to avoid interference from OS macros. + 2003-02-19 Michael Koch <konqueror@gmx.de> * gnu/java/nio/ByteBufferImpl.java diff --git a/libjava/gnu/gcj/runtime/natStackTrace.cc b/libjava/gnu/gcj/runtime/natStackTrace.cc index 937f8dd3470..d39cd00dbab 100644 --- a/libjava/gnu/gcj/runtime/natStackTrace.cc +++ b/libjava/gnu/gcj/runtime/natStackTrace.cc @@ -1,6 +1,6 @@ // natStackTrace.cc - native helper methods for Throwable -/* Copyright (C) 2000, 2002 Free Software Foundation, Inc +/* Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc This file is part of libgcj. @@ -16,6 +16,7 @@ details. */ */ #include <config.h> +#include <platform.h> #include <string.h> @@ -31,8 +32,6 @@ details. */ #include <java/util/IdentityHashMap.h> #include <java/lang/ArrayIndexOutOfBoundsException.h> -#include "platform.h" - #include <sys/types.h> #include <stdlib.h> diff --git a/libjava/include/posix.h b/libjava/include/posix.h index 0e1220a10b3..0aadd47d3b3 100644 --- a/libjava/include/posix.h +++ b/libjava/include/posix.h @@ -60,6 +60,8 @@ _Jv_platform_close_on_exec (jint fd) ::fcntl (fd, F_SETFD, FD_CLOEXEC); } +#undef fcntl + #ifdef JV_HASH_SYNCHRONIZATION inline void _Jv_platform_usleep (unsigned long usecs) @@ -80,18 +82,24 @@ _Jv_socket (int domain, int type, int protocol) return ::socket (domain, type, protocol); } +#undef socket + inline int _Jv_connect (jint fd, sockaddr *ptr, int len) { return ::connect (fd, ptr, len); } +#undef connect + inline int _Jv_close (jint fd) { return ::close (fd); } +#undef close + // Avoid macro definitions of bind from system headers, e.g. on // Solaris 7 with _XOPEN_SOURCE. FIXME inline int @@ -100,6 +108,8 @@ _Jv_bind (int fd, struct sockaddr *addr, int addrlen) return ::bind (fd, addr, addrlen); } +#undef bind + // Same problem with accept on Tru64 UNIX with _POSIX_PII_SOCKET inline int _Jv_accept (int fd, struct sockaddr *addr, socklen_t *addrlen) @@ -107,24 +117,32 @@ _Jv_accept (int fd, struct sockaddr *addr, socklen_t *addrlen) return ::accept (fd, addr, addrlen); } +#undef accept + inline int _Jv_listen (int fd, int backlog) { return ::listen (fd, backlog); } +#undef listen + inline int _Jv_write(int s, void *buf, int len) { return ::write (s, buf, len); } +#undef write + inline int _Jv_read(int s, void *buf, int len) { return ::read (s, buf, len); } +#undef read + #endif /* DISABLE_JAVA_NET */ #endif /* __JV_POSIX_H__ */ diff --git a/libjava/java/lang/natObject.cc b/libjava/java/lang/natObject.cc index a050baa3f66..33f3e8de27f 100644 --- a/libjava/java/lang/natObject.cc +++ b/libjava/java/lang/natObject.cc @@ -1,6 +1,6 @@ // natObject.cc - Implementation of the Object class. -/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation +/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation This file is part of libgcj. @@ -9,6 +9,7 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for details. */ #include <config.h> +#include <platform.h> #include <string.h> @@ -28,8 +29,6 @@ details. */ #include <java/lang/Cloneable.h> #include <java/lang/Thread.h> -#include "platform.h" - #ifdef LOCK_DEBUG # include <stdio.h> #endif diff --git a/libjava/java/lang/natRuntime.cc b/libjava/java/lang/natRuntime.cc index 09f1e04f361..9879b259dd5 100644 --- a/libjava/java/lang/natRuntime.cc +++ b/libjava/java/lang/natRuntime.cc @@ -9,6 +9,7 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for details. */ #include <config.h> +#include <platform.h> #include <stdlib.h> @@ -33,8 +34,6 @@ details. */ #include <jni.h> -#include "platform.h" - #ifdef HAVE_PWD_H #include <pwd.h> #endif diff --git a/libjava/java/lang/natSystem.cc b/libjava/java/lang/natSystem.cc index ffa3f1a5053..e2d42324386 100644 --- a/libjava/java/lang/natSystem.cc +++ b/libjava/java/lang/natSystem.cc @@ -1,6 +1,6 @@ // natSystem.cc - Native code implementing System class. -/* Copyright (C) 1998, 1999, 2000, 2001 , 2002 Free Software Foundation +/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation This file is part of libgcj. @@ -9,6 +9,7 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for details. */ #include <config.h> +#include <platform.h> #include <stdio.h> #include <string.h> @@ -24,8 +25,6 @@ details. */ #include <java/io/PrintStream.h> #include <java/io/InputStream.h> -#include "platform.h" - void diff --git a/libjava/java/util/natTimeZone.cc b/libjava/java/util/natTimeZone.cc index ea59293513d..cb564a97591 100644 --- a/libjava/java/util/natTimeZone.cc +++ b/libjava/java/util/natTimeZone.cc @@ -1,6 +1,6 @@ // natTimeZone.cc -- Native side of TimeZone class. -/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation +/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation This file is part of libgcj. @@ -9,12 +9,11 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for details. */ #include <config.h> +#include <platform.h> #include <gcj/cni.h> #include <jvm.h> -#include "platform.h" - #include <java/util/TimeZone.h> #include <java/lang/Character.h> #include <java/lang/Integer.h> diff --git a/libjava/win32.cc b/libjava/win32.cc index af1163fbfa9..59c3be244b6 100644 --- a/libjava/win32.cc +++ b/libjava/win32.cc @@ -1,6 +1,6 @@ // win32.cc - Helper functions for Microsoft-flavored OSs. -/* Copyright (C) 2002 Free Software Foundation +/* Copyright (C) 2002, 2003 Free Software Foundation This file is part of libgcj. @@ -9,11 +9,11 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for details. */ #include <config.h> +#include <platform.h> #include <jvm.h> #include <sys/timeb.h> #include <stdlib.h> -#include "platform.h" #include <java/lang/ArithmeticException.h> #include <java/util/Properties.h> |