mirror of
https://github.com/corda/corda.git
synced 2025-01-08 14:03:06 +00:00
Merge branch 'master' of oss:/var/local/git/avian into powerpc
This commit is contained in:
commit
4299063be9
@ -95,8 +95,11 @@ init(JNIEnv* e, sockaddr_in* address, jstring hostString, jint port)
|
|||||||
hostent* host = gethostbyname(chars);
|
hostent* host = gethostbyname(chars);
|
||||||
e->ReleaseStringUTFChars(hostString, chars);
|
e->ReleaseStringUTFChars(hostString, chars);
|
||||||
if (host == 0) {
|
if (host == 0) {
|
||||||
// herror("init: gethostbyname");
|
#ifdef WIN32
|
||||||
throwIOException(e);
|
throwIOException(e);
|
||||||
|
#else
|
||||||
|
throwIOException(e, hstrerror(h_errno));
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
memset(address, 0, sizeof(sockaddr_in));
|
memset(address, 0, sizeof(sockaddr_in));
|
||||||
@ -236,7 +239,10 @@ makeSocket(JNIEnv* e, bool blocking = false)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int s = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
int s = ::socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
||||||
if (s < 0) { throwIOException(e); return s; }
|
if (s < 0) {
|
||||||
|
throwIOException(e);
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
if (not blocking) makeNonblocking(e, s);
|
if (not blocking) makeNonblocking(e, s);
|
||||||
|
|
||||||
@ -260,9 +266,11 @@ Java_java_nio_channels_ServerSocketChannel_natDoListen(JNIEnv *e,
|
|||||||
{
|
{
|
||||||
int s = makeSocket(e);
|
int s = makeSocket(e);
|
||||||
if (s < 0) return s;
|
if (s < 0) return s;
|
||||||
|
if (e->ExceptionOccurred()) return 0;
|
||||||
|
|
||||||
sockaddr_in address;
|
sockaddr_in address;
|
||||||
init(e, &address, host, port);
|
init(e, &address, host, port);
|
||||||
|
if (e->ExceptionOccurred()) return 0;
|
||||||
|
|
||||||
::doListen(e, s, &address);
|
::doListen(e, s, &address);
|
||||||
return s;
|
return s;
|
||||||
@ -276,9 +284,11 @@ Java_java_nio_channels_SocketChannel_natDoConnect(JNIEnv *e,
|
|||||||
jbooleanArray retVal)
|
jbooleanArray retVal)
|
||||||
{
|
{
|
||||||
int s = makeSocket(e);
|
int s = makeSocket(e);
|
||||||
|
if (e->ExceptionOccurred()) return 0;
|
||||||
|
|
||||||
sockaddr_in address;
|
sockaddr_in address;
|
||||||
init(e, &address, host, port);
|
init(e, &address, host, port);
|
||||||
|
if (e->ExceptionOccurred()) return 0;
|
||||||
|
|
||||||
jboolean connected = ::doConnect(e, s, &address);
|
jboolean connected = ::doConnect(e, s, &address);
|
||||||
e->SetBooleanArrayRegion(retVal, 0, 1, &connected);
|
e->SetBooleanArrayRegion(retVal, 0, 1, &connected);
|
||||||
|
5
classpath/java/lang/Override.java
Normal file
5
classpath/java/lang/Override.java
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
package java.lang;
|
||||||
|
|
||||||
|
public @interface Override {
|
||||||
|
|
||||||
|
}
|
@ -52,8 +52,8 @@ Thread**
|
|||||||
fill(Thread* t, Thread* o, Thread** array)
|
fill(Thread* t, Thread* o, Thread** array)
|
||||||
{
|
{
|
||||||
if (t != o) *(array++) = t;
|
if (t != o) *(array++) = t;
|
||||||
if (t->peer) fill(t->peer, o, array);
|
if (t->peer) array = fill(t->peer, o, array);
|
||||||
if (t->child) fill(t->child, o, array);
|
if (t->child) array = fill(t->child, o, array);
|
||||||
|
|
||||||
return array;
|
return array;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user