Commit a191802c by Rainer Orth Committed by Rainer Orth

natStackTrace.cc: Include platform.h immediately after config.h.

	* 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.

From-SVN: r63122
parent f380a0ce
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> 2003-02-19 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/ByteBufferImpl.java * gnu/java/nio/ByteBufferImpl.java
......
// natStackTrace.cc - native helper methods for Throwable // 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. This file is part of libgcj.
...@@ -16,6 +16,7 @@ details. */ ...@@ -16,6 +16,7 @@ details. */
*/ */
#include <config.h> #include <config.h>
#include <platform.h>
#include <string.h> #include <string.h>
...@@ -31,8 +32,6 @@ details. */ ...@@ -31,8 +32,6 @@ details. */
#include <java/util/IdentityHashMap.h> #include <java/util/IdentityHashMap.h>
#include <java/lang/ArrayIndexOutOfBoundsException.h> #include <java/lang/ArrayIndexOutOfBoundsException.h>
#include "platform.h"
#include <sys/types.h> #include <sys/types.h>
#include <stdlib.h> #include <stdlib.h>
......
...@@ -60,6 +60,8 @@ _Jv_platform_close_on_exec (jint fd) ...@@ -60,6 +60,8 @@ _Jv_platform_close_on_exec (jint fd)
::fcntl (fd, F_SETFD, FD_CLOEXEC); ::fcntl (fd, F_SETFD, FD_CLOEXEC);
} }
#undef fcntl
#ifdef JV_HASH_SYNCHRONIZATION #ifdef JV_HASH_SYNCHRONIZATION
inline void inline void
_Jv_platform_usleep (unsigned long usecs) _Jv_platform_usleep (unsigned long usecs)
...@@ -80,18 +82,24 @@ _Jv_socket (int domain, int type, int protocol) ...@@ -80,18 +82,24 @@ _Jv_socket (int domain, int type, int protocol)
return ::socket (domain, type, protocol); return ::socket (domain, type, protocol);
} }
#undef socket
inline int inline int
_Jv_connect (jint fd, sockaddr *ptr, int len) _Jv_connect (jint fd, sockaddr *ptr, int len)
{ {
return ::connect (fd, ptr, len); return ::connect (fd, ptr, len);
} }
#undef connect
inline int inline int
_Jv_close (jint fd) _Jv_close (jint fd)
{ {
return ::close (fd); return ::close (fd);
} }
#undef close
// Avoid macro definitions of bind from system headers, e.g. on // Avoid macro definitions of bind from system headers, e.g. on
// Solaris 7 with _XOPEN_SOURCE. FIXME // Solaris 7 with _XOPEN_SOURCE. FIXME
inline int inline int
...@@ -100,6 +108,8 @@ _Jv_bind (int fd, struct sockaddr *addr, int addrlen) ...@@ -100,6 +108,8 @@ _Jv_bind (int fd, struct sockaddr *addr, int addrlen)
return ::bind (fd, addr, addrlen); return ::bind (fd, addr, addrlen);
} }
#undef bind
// Same problem with accept on Tru64 UNIX with _POSIX_PII_SOCKET // Same problem with accept on Tru64 UNIX with _POSIX_PII_SOCKET
inline int inline int
_Jv_accept (int fd, struct sockaddr *addr, socklen_t *addrlen) _Jv_accept (int fd, struct sockaddr *addr, socklen_t *addrlen)
...@@ -107,24 +117,32 @@ _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); return ::accept (fd, addr, addrlen);
} }
#undef accept
inline int inline int
_Jv_listen (int fd, int backlog) _Jv_listen (int fd, int backlog)
{ {
return ::listen (fd, backlog); return ::listen (fd, backlog);
} }
#undef listen
inline int inline int
_Jv_write(int s, void *buf, int len) _Jv_write(int s, void *buf, int len)
{ {
return ::write (s, buf, len); return ::write (s, buf, len);
} }
#undef write
inline int inline int
_Jv_read(int s, void *buf, int len) _Jv_read(int s, void *buf, int len)
{ {
return ::read (s, buf, len); return ::read (s, buf, len);
} }
#undef read
#endif /* DISABLE_JAVA_NET */ #endif /* DISABLE_JAVA_NET */
#endif /* __JV_POSIX_H__ */ #endif /* __JV_POSIX_H__ */
// natObject.cc - Implementation of the Object class. // 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. This file is part of libgcj.
...@@ -9,6 +9,7 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for ...@@ -9,6 +9,7 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */ details. */
#include <config.h> #include <config.h>
#include <platform.h>
#include <string.h> #include <string.h>
...@@ -28,8 +29,6 @@ details. */ ...@@ -28,8 +29,6 @@ details. */
#include <java/lang/Cloneable.h> #include <java/lang/Cloneable.h>
#include <java/lang/Thread.h> #include <java/lang/Thread.h>
#include "platform.h"
#ifdef LOCK_DEBUG #ifdef LOCK_DEBUG
# include <stdio.h> # include <stdio.h>
#endif #endif
......
...@@ -9,6 +9,7 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for ...@@ -9,6 +9,7 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */ details. */
#include <config.h> #include <config.h>
#include <platform.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -33,8 +34,6 @@ details. */ ...@@ -33,8 +34,6 @@ details. */
#include <jni.h> #include <jni.h>
#include "platform.h"
#ifdef HAVE_PWD_H #ifdef HAVE_PWD_H
#include <pwd.h> #include <pwd.h>
#endif #endif
......
// natSystem.cc - Native code implementing System class. // 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. This file is part of libgcj.
...@@ -9,6 +9,7 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for ...@@ -9,6 +9,7 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */ details. */
#include <config.h> #include <config.h>
#include <platform.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
...@@ -24,8 +25,6 @@ details. */ ...@@ -24,8 +25,6 @@ details. */
#include <java/io/PrintStream.h> #include <java/io/PrintStream.h>
#include <java/io/InputStream.h> #include <java/io/InputStream.h>
#include "platform.h"
void void
......
// natTimeZone.cc -- Native side of TimeZone class. // 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. This file is part of libgcj.
...@@ -9,12 +9,11 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for ...@@ -9,12 +9,11 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */ details. */
#include <config.h> #include <config.h>
#include <platform.h>
#include <gcj/cni.h> #include <gcj/cni.h>
#include <jvm.h> #include <jvm.h>
#include "platform.h"
#include <java/util/TimeZone.h> #include <java/util/TimeZone.h>
#include <java/lang/Character.h> #include <java/lang/Character.h>
#include <java/lang/Integer.h> #include <java/lang/Integer.h>
......
// win32.cc - Helper functions for Microsoft-flavored OSs. // 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. This file is part of libgcj.
...@@ -9,11 +9,11 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for ...@@ -9,11 +9,11 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */ details. */
#include <config.h> #include <config.h>
#include <platform.h>
#include <jvm.h> #include <jvm.h>
#include <sys/timeb.h> #include <sys/timeb.h>
#include <stdlib.h> #include <stdlib.h>
#include "platform.h"
#include <java/lang/ArithmeticException.h> #include <java/lang/ArithmeticException.h>
#include <java/util/Properties.h> #include <java/util/Properties.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment