mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-24 11:24:05 +08:00
embedded updates
From-SVN: r49562
This commit is contained in:
parent
383aa2ef49
commit
b5ee195f1e
@ -1,3 +1,24 @@
|
||||
2002-02-06 Anthony Green <green@redhat.com>
|
||||
|
||||
* java/net/natPlainSocketImpl.cc: Fix DISABLE_JAVA_NET targets.
|
||||
Implement missing method stubs.
|
||||
java/net/natPlainDatagramSocketImpl.cc: Fix DISABLE_JAVA_NET
|
||||
targets.
|
||||
* java/lang/natSystem.cc (getSystemTimeZone): Some targets have no
|
||||
concept of timezones.
|
||||
(init_properties): Don't refer to _Jv_Environment_Properties
|
||||
when this feature is not available.
|
||||
* include/config.h.in: Rebuilt.
|
||||
* acconfig.h: Add DISABLE_MAIN_ARGS.
|
||||
* prims.cc (_Jv_RunMain): Use DISABLE_MAIN_ARGS.
|
||||
* configure: Rebuilt.
|
||||
* configure.in: Add --disable-main-args option. Test for
|
||||
opendir function. Replace AC_CHECK_SIZEOF with
|
||||
AC_COMPILE_CHECK_SIZEOF.
|
||||
* java/io/natFile.cc (performList): Check HAVE_OPENDIR.
|
||||
* aclocal.m4: Rebuilt.
|
||||
* acinclude.m4: Add AC_COMPILE_CHECK_SIZEOF.
|
||||
|
||||
2002-02-06 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* verify.cc (require_array_type): If argument is a null array of
|
||||
|
@ -123,6 +123,9 @@
|
||||
getenv("GCJ_PROPERTIES"). */
|
||||
#undef DISABLE_GETENV_PROPERTIES
|
||||
|
||||
/* Define if we should ignore arguments to main(). */
|
||||
#undef DISABLE_MAIN_ARGS
|
||||
|
||||
/* Define if using setjmp/longjmp exceptions. */
|
||||
#undef SJLJ_EXCEPTIONS
|
||||
|
||||
@ -132,6 +135,9 @@
|
||||
/* Define if you have dladdr() */
|
||||
#undef HAVE_DLADDR
|
||||
|
||||
/* Define if tzname is missing. */
|
||||
#undef NO_TZNAME
|
||||
|
||||
/* Define if getuid() and friends are missing. */
|
||||
#undef NO_GETUID
|
||||
|
||||
|
@ -1,3 +1,29 @@
|
||||
AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
|
||||
[changequote(<<, >>)dnl
|
||||
dnl The name to #define.
|
||||
define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
|
||||
dnl The cache variable name.
|
||||
define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
|
||||
changequote([, ])dnl
|
||||
AC_MSG_CHECKING(size of $1)
|
||||
AC_CACHE_VAL(AC_CV_NAME,
|
||||
[for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence.
|
||||
AC_TRY_COMPILE([#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
$2
|
||||
], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
|
||||
if test x$AC_CV_NAME != x ; then break; fi
|
||||
done
|
||||
])
|
||||
if test x$AC_CV_NAME = x ; then
|
||||
AC_MSG_ERROR([cannot determine a size for $1])
|
||||
fi
|
||||
AC_MSG_RESULT($AC_CV_NAME)
|
||||
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
|
||||
undefine([AC_TYPE_NAME])dnl
|
||||
undefine([AC_CV_NAME])dnl
|
||||
])
|
||||
|
||||
AC_DEFUN(LIBGCJ_CONFIGURE,
|
||||
[
|
||||
dnl Default to --enable-multilib
|
||||
|
42
libjava/aclocal.m4
vendored
42
libjava/aclocal.m4
vendored
@ -1,6 +1,6 @@
|
||||
dnl aclocal.m4 generated automatically by aclocal 1.4
|
||||
dnl aclocal.m4 generated automatically by aclocal 1.4-p5
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
@ -10,6 +10,32 @@ dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
|
||||
[changequote(<<, >>)dnl
|
||||
dnl The name to #define.
|
||||
define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
|
||||
dnl The cache variable name.
|
||||
define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
|
||||
changequote([, ])dnl
|
||||
AC_MSG_CHECKING(size of $1)
|
||||
AC_CACHE_VAL(AC_CV_NAME,
|
||||
[for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence.
|
||||
AC_TRY_COMPILE([#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
$2
|
||||
], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
|
||||
if test x$AC_CV_NAME != x ; then break; fi
|
||||
done
|
||||
])
|
||||
if test x$AC_CV_NAME = x ; then
|
||||
AC_MSG_ERROR([cannot determine a size for $1])
|
||||
fi
|
||||
AC_MSG_RESULT($AC_CV_NAME)
|
||||
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
|
||||
undefine([AC_TYPE_NAME])dnl
|
||||
undefine([AC_CV_NAME])dnl
|
||||
])
|
||||
|
||||
AC_DEFUN(LIBGCJ_CONFIGURE,
|
||||
[
|
||||
dnl Default to --enable-multilib
|
||||
@ -239,7 +265,7 @@ AC_DEFUN([AM_LC_MESSAGES],
|
||||
dnl Usage:
|
||||
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||
|
||||
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||
PACKAGE=[$1]
|
||||
AC_SUBST(PACKAGE)
|
||||
@ -267,7 +293,7 @@ AC_REQUIRE([AC_PROG_MAKE_SET])])
|
||||
# Check to make sure that the build environment is sane.
|
||||
#
|
||||
|
||||
AC_DEFUN(AM_SANITY_CHECK,
|
||||
AC_DEFUN([AM_SANITY_CHECK],
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
@ -308,7 +334,7 @@ AC_MSG_RESULT(yes)])
|
||||
|
||||
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
||||
dnl The program must properly implement --version.
|
||||
AC_DEFUN(AM_MISSING_PROG,
|
||||
AC_DEFUN([AM_MISSING_PROG],
|
||||
[AC_MSG_CHECKING(for working $2)
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
@ -327,7 +353,7 @@ AC_SUBST($1)])
|
||||
|
||||
# serial 1
|
||||
|
||||
AC_DEFUN(AM_MAINTAINER_MODE,
|
||||
AC_DEFUN([AM_MAINTAINER_MODE],
|
||||
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
||||
dnl maintainer-mode is disabled by default
|
||||
AC_ARG_ENABLE(maintainer-mode,
|
||||
@ -344,7 +370,7 @@ AC_DEFUN(AM_MAINTAINER_MODE,
|
||||
|
||||
# Define a conditional.
|
||||
|
||||
AC_DEFUN(AM_CONDITIONAL,
|
||||
AC_DEFUN([AM_CONDITIONAL],
|
||||
[AC_SUBST($1_TRUE)
|
||||
AC_SUBST($1_FALSE)
|
||||
if $2; then
|
||||
@ -357,7 +383,7 @@ fi])
|
||||
|
||||
# Like AC_CONFIG_HEADER, but automatically create stamp file.
|
||||
|
||||
AC_DEFUN(AM_CONFIG_HEADER,
|
||||
AC_DEFUN([AM_CONFIG_HEADER],
|
||||
[AC_PREREQ([2.12])
|
||||
AC_CONFIG_HEADER([$1])
|
||||
dnl When config.status generates a header, we must update the stamp-h file.
|
||||
|
655
libjava/configure
vendored
655
libjava/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -63,6 +63,14 @@ if test "$enable_getenv_properties" = no; then
|
||||
AC_DEFINE(DISABLE_GETENV_PROPERTIES)
|
||||
fi
|
||||
|
||||
dnl Whether we should use arguments to main()
|
||||
if test -z "$enable_main_args"; then
|
||||
enable_main_args=${enable_main_args_default-yes}
|
||||
fi
|
||||
if test "$enable_main_args" = no; then
|
||||
AC_DEFINE(DISABLE_MAIN_ARGS)
|
||||
fi
|
||||
|
||||
|
||||
dnl Should we use hashtable-based synchronization?
|
||||
dnl Currently works only for Linux X86/ia64
|
||||
@ -187,7 +195,7 @@ dnl If the target is an eCos system, use the appropriate eCos
|
||||
dnl I/O routines.
|
||||
dnl FIXME: this should not be a local option but a global target
|
||||
dnl system; at present there is no eCos target.
|
||||
TARGET_ECOS="no"
|
||||
TARGET_ECOS=${PROCESS-"no"}
|
||||
AC_ARG_WITH(ecos,
|
||||
[ --with-ecos enable runtime eCos target support],
|
||||
TARGET_ECOS="$with_ecos"
|
||||
@ -463,7 +471,7 @@ if test -n "${with_cross_host}"; then
|
||||
fi
|
||||
NATIVE=no
|
||||
else
|
||||
AC_CHECK_FUNCS(strerror ioctl select fstat open fsync sleep)
|
||||
AC_CHECK_FUNCS(strerror ioctl select fstat open fsync sleep opendir)
|
||||
AC_CHECK_FUNCS(gmtime_r localtime_r readdir_r getpwuid_r getcwd)
|
||||
AC_CHECK_FUNCS(access stat mkdir rename rmdir unlink realpath utime chmod)
|
||||
AC_CHECK_FUNCS(nl_langinfo setlocale)
|
||||
@ -707,8 +715,7 @@ LT_AC_PROG_GCJ
|
||||
|
||||
CPPFLAGS=$GCJ_SAVE_CPPFLAGS
|
||||
|
||||
dnl FIXME: cross compilation
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
AC_COMPILE_CHECK_SIZEOF(void *)
|
||||
|
||||
ZLIBS=
|
||||
ZDEPS=
|
||||
|
@ -151,6 +151,9 @@
|
||||
getenv("GCJ_PROPERTIES"). */
|
||||
#undef DISABLE_GETENV_PROPERTIES
|
||||
|
||||
/* Define if we should ignore arguments to main(). */
|
||||
#undef DISABLE_MAIN_ARGS
|
||||
|
||||
/* Define if you have /proc/self/exe */
|
||||
#undef HAVE_PROC_SELF_EXE
|
||||
|
||||
@ -158,7 +161,6 @@
|
||||
/* Define if you have dladdr() */
|
||||
#undef HAVE_DLADDR
|
||||
|
||||
|
||||
/* Define if getuid() and friends are missing. */
|
||||
#undef NO_GETUID
|
||||
|
||||
@ -171,9 +173,6 @@
|
||||
/* Define if you are using JVMPI. */
|
||||
#undef ENABLE_JVMPI
|
||||
|
||||
/* The number of bytes in a void *. */
|
||||
#undef SIZEOF_VOID_P
|
||||
|
||||
/* Define if you have the access function. */
|
||||
#undef HAVE_ACCESS
|
||||
|
||||
@ -252,6 +251,9 @@
|
||||
/* Define if you have the open function. */
|
||||
#undef HAVE_OPEN
|
||||
|
||||
/* Define if you have the opendir function. */
|
||||
#undef HAVE_OPENDIR
|
||||
|
||||
/* Define if you have the pipe function. */
|
||||
#undef HAVE_PIPE
|
||||
|
||||
@ -408,6 +410,9 @@
|
||||
/* Define if dlopen is available */
|
||||
#undef HAVE_DLOPEN
|
||||
|
||||
/* The number of bytes in type void * */
|
||||
#undef SIZEOF_VOID_P
|
||||
|
||||
/* Define if <inttypes.h> is available */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
|
@ -131,7 +131,9 @@ java::io::File::performList (java::io::FilenameFilter *filter,
|
||||
java::io::FileFilter *fileFilter,
|
||||
java::lang::Class *result_type)
|
||||
{
|
||||
#ifdef HAVE_DIRENT_H
|
||||
/* Some systems have dirent.h, but no directory reading functions like
|
||||
opendir. */
|
||||
#if defined(HAVE_DIRENT_H) && defined(HAVE_OPENDIR)
|
||||
char buf[MAXPATHLEN];
|
||||
jsize total = JvGetStringUTFRegion (path, 0, path->length(), buf);
|
||||
buf[total] = '\0';
|
||||
@ -178,9 +180,9 @@ java::io::File::performList (java::io::FilenameFilter *filter,
|
||||
jobjectArray ret = JvNewObjectArray (list->size(), result_type, NULL);
|
||||
list->toArray(ret);
|
||||
return ret;
|
||||
#else /* HAVE_DIRENT_H */
|
||||
#else /* HAVE_DIRENT_H && HAVE_OPENDIR */
|
||||
return NULL;
|
||||
#endif /* HAVE_DIRENT_H */
|
||||
#endif /* HAVE_DIRENT_H && HAVE_OPENDIR */
|
||||
}
|
||||
|
||||
jboolean
|
||||
|
@ -271,7 +271,9 @@ java::lang::System::getSystemTimeZone (void)
|
||||
tz1 = tzname[0];
|
||||
tz2 = strcmp (tzname[0], tzname[1]) ? tzname[1] : "";
|
||||
#else
|
||||
#error Neither tm_zone nor tzname defined
|
||||
// Some targets have no concept of timezones.
|
||||
tz1 = "???";
|
||||
tz2 = tz1;
|
||||
#endif
|
||||
|
||||
if ((tzoffset % 3600) == 0)
|
||||
@ -464,6 +466,7 @@ java::lang::System::init_properties (void)
|
||||
}
|
||||
|
||||
// Set the system properties from the user's environment.
|
||||
#ifndef DISABLE_GETENV_PROPERTIES
|
||||
if (_Jv_Environment_Properties)
|
||||
{
|
||||
size_t i = 0;
|
||||
@ -475,6 +478,7 @@ java::lang::System::init_properties (void)
|
||||
i++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (_Jv_Jar_Class_Path)
|
||||
newprops->put(JvNewStringLatin1 ("java.class.path"),
|
||||
|
@ -36,6 +36,7 @@ details. */
|
||||
#include <bstring.h>
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_JAVA_NET
|
||||
// Avoid macro definitions of bind from system headers, e.g. on
|
||||
// Solaris 7 with _XOPEN_SOURCE. FIXME
|
||||
static inline int
|
||||
@ -43,6 +44,7 @@ _Jv_bind (int fd, struct sockaddr *addr, int addrlen)
|
||||
{
|
||||
return ::bind (fd, addr, addrlen);
|
||||
}
|
||||
#endif /* DISABLE_JAVA_NET */
|
||||
|
||||
#ifdef bind
|
||||
#undef bind
|
||||
|
@ -37,6 +37,8 @@ details. */
|
||||
typedef int socklen_t;
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_JAVA_NET
|
||||
|
||||
// Avoid macro definitions of bind, connect from system headers, e.g. on
|
||||
// Solaris 7 with _XOPEN_SOURCE. FIXME
|
||||
static inline int
|
||||
@ -79,6 +81,7 @@ _Jv_recv (T_ret (*recv_func) (T_fd s, T_buf buf, T_len len, T_flags flags),
|
||||
{
|
||||
return recv_func ((T_fd) s, (T_buf) buf, (T_len) len, (T_flags) flags);
|
||||
}
|
||||
#endif /* DISABLE_JAVA_NET */
|
||||
|
||||
#include <gcj/cni.h>
|
||||
#include <gcj/javaprims.h>
|
||||
@ -151,6 +154,48 @@ java::net::PlainSocketImpl::getOption (jint)
|
||||
JvNewStringLatin1 ("SocketImpl.getOption: unimplemented"));
|
||||
}
|
||||
|
||||
jint
|
||||
java::net::PlainSocketImpl::read(void)
|
||||
{
|
||||
throw new SocketException (
|
||||
JvNewStringLatin1 ("SocketImpl.read: unimplemented"));
|
||||
}
|
||||
|
||||
jint
|
||||
java::net::PlainSocketImpl::read(jbyteArray buffer, jint offset, jint count)
|
||||
{
|
||||
throw new SocketException (
|
||||
JvNewStringLatin1 ("SocketImpl.read: unimplemented"));
|
||||
}
|
||||
|
||||
void
|
||||
java::net::PlainSocketImpl::write(jint b)
|
||||
{
|
||||
throw new SocketException (
|
||||
JvNewStringLatin1 ("SocketImpl.write: unimplemented"));
|
||||
}
|
||||
|
||||
void
|
||||
java::net::PlainSocketImpl::write(jbyteArray b, jint offset, jint len)
|
||||
{
|
||||
throw new SocketException (
|
||||
JvNewStringLatin1 ("SocketImpl.write: unimplemented"));
|
||||
}
|
||||
|
||||
jint
|
||||
java::net::PlainSocketImpl::available(void)
|
||||
{
|
||||
throw new SocketException (
|
||||
JvNewStringLatin1 ("SocketImpl.available: unimplemented"));
|
||||
}
|
||||
|
||||
void
|
||||
java::net::PlainSocketImpl::close(void)
|
||||
{
|
||||
throw new SocketException (
|
||||
JvNewStringLatin1 ("SocketImpl.close: unimplemented"));
|
||||
}
|
||||
|
||||
#else /* DISABLE_JAVA_NET */
|
||||
|
||||
union SockAddr
|
||||
|
@ -1001,13 +1001,18 @@ _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv,
|
||||
|
||||
java::lang::Runtime *runtime = NULL;
|
||||
|
||||
|
||||
#ifdef DISABLE_MAIN_ARGS
|
||||
_Jv_ThisExecutable ("[Embedded App]");
|
||||
#else
|
||||
#ifdef HAVE_PROC_SELF_EXE
|
||||
char exec_name[20];
|
||||
sprintf (exec_name, "/proc/%d/exe", getpid ());
|
||||
_Jv_ThisExecutable (exec_name);
|
||||
#else
|
||||
_Jv_ThisExecutable (argv[0]);
|
||||
#endif
|
||||
#endif /* HAVE_PROC_SELF_EXE */
|
||||
#endif /* DISABLE_MAIN_ARGS */
|
||||
|
||||
try
|
||||
{
|
||||
@ -1021,7 +1026,11 @@ _Jv_RunMain (jclass klass, const char *name, int argc, const char **argv,
|
||||
// for `main'; that way it will be set up if `main' is a JNI method.
|
||||
runtime = java::lang::Runtime::getRuntime ();
|
||||
|
||||
#ifdef DISABLE_MAIN_ARGS
|
||||
arg_vec = JvConvertArgv (0, 0);
|
||||
#else
|
||||
arg_vec = JvConvertArgv (argc - 1, argv + 1);
|
||||
#endif
|
||||
|
||||
using namespace gnu::gcj::runtime;
|
||||
if (klass)
|
||||
|
Loading…
Reference in New Issue
Block a user