embedded updates
From-SVN: r49562
This commit is contained in:
parent
383aa2ef49
commit
b5ee195f1e
12 changed files with 532 additions and 318 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue