diff --git a/.gitignore b/.gitignore index aff794f5e5..8028923871 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ .gdb_history build -*~ \ No newline at end of file +*~ +.classpath +.project +.settings +bin diff --git a/classpath/java-nio.cpp b/classpath/java-nio.cpp index 07e33cc353..540cb89364 100644 --- a/classpath/java-nio.cpp +++ b/classpath/java-nio.cpp @@ -742,9 +742,9 @@ Java_java_nio_channels_SocketSelector_natDoSocketSelect(JNIEnv *e, jclass, if (FD_ISSET(s->control.writer(), &(s->write)) or FD_ISSET(s->control.writer(), &(s->except))) { - unsigned socket = s->control.writer(); - FD_CLR(socket, &(s->write)); - FD_CLR(socket, &(s->except)); + int socket = s->control.writer(); + FD_CLR(static_cast(socket), &(s->write)); + FD_CLR(static_cast(socket), &(s->except)); int error; socklen_t size = sizeof(int); diff --git a/classpath/java/io/Externalizable.java b/classpath/java/io/Externalizable.java new file mode 100644 index 0000000000..c08b67587f --- /dev/null +++ b/classpath/java/io/Externalizable.java @@ -0,0 +1,16 @@ +/* Copyright (c) 2010, Avian Contributors + + Permission to use, copy, modify, and/or distribute this software + for any purpose with or without fee is hereby granted, provided + that the above copyright notice and this permission notice appear + in all copies. + + There is NO WARRANTY for this software. See license.txt for + details. */ + +package java.io; + +public interface Externalizable { + public void readExternal(ObjectInput in); + public void writeExternal(ObjectOutput out); +} diff --git a/classpath/java/io/ObjectInput.java b/classpath/java/io/ObjectInput.java new file mode 100644 index 0000000000..fd8c702bd9 --- /dev/null +++ b/classpath/java/io/ObjectInput.java @@ -0,0 +1,21 @@ +/* Copyright (c) 2010, Avian Contributors + + Permission to use, copy, modify, and/or distribute this software + for any purpose with or without fee is hereby granted, provided + that the above copyright notice and this permission notice appear + in all copies. + + There is NO WARRANTY for this software. See license.txt for + details. */ + +package java.io; + +public interface ObjectInput { + public int available(); + public void close(); + public void read(); + public void read(byte[] b); + public void read(byte[] b, int off, int len); + public Object readObject(); + public long skip(long n); +} diff --git a/classpath/java/io/ObjectOutput.java b/classpath/java/io/ObjectOutput.java new file mode 100644 index 0000000000..cf794447ce --- /dev/null +++ b/classpath/java/io/ObjectOutput.java @@ -0,0 +1,20 @@ +/* Copyright (c) 2010, Avian Contributors + + Permission to use, copy, modify, and/or distribute this software + for any purpose with or without fee is hereby granted, provided + that the above copyright notice and this permission notice appear + in all copies. + + There is NO WARRANTY for this software. See license.txt for + details. */ + +package java.io; + +public interface ObjectOutput { + public void close(); + public void flush(); + public void write(byte[] b); + public void write(byte[] b, int off, int len); + public void write(int b); + public void writeObject(Object obj); +} diff --git a/makefile b/makefile index 6322e4f2bf..0451a7724c 100644 --- a/makefile +++ b/makefile @@ -193,12 +193,21 @@ ifeq ($(platform),windows) cflags = -I$(inc) $(common-cflags) ifeq (,$(filter mingw32 cygwin,$(build-platform))) - cxx = i586-mingw32msvc-g++ - cc = i586-mingw32msvc-gcc - dlltool = i586-mingw32msvc-dlltool - ar = i586-mingw32msvc-ar - ranlib = i586-mingw32msvc-ranlib - strip = i586-mingw32msvc-strip + ifeq (,$(shell which x86_64-w64-mingw32-g++)) + cxx = i586-mingw32msvc-g++ + cc = i586-mingw32msvc-gcc + dlltool = i586-mingw32msvc-dlltool + ar = i586-mingw32msvc-ar + ranlib = i586-mingw32msvc-ranlib + strip = i586-mingw32msvc-strip + else + cxx = x86_64-w64-mingw32-g++ $(mflag) + cc = x86_64-w64-mingw32-gcc $(mflag) + dlltool = x86_64-w64-mingw32-dlltool -mi386 --as-flags=--32 + ar = x86_64-w64-mingw32-ar + ranlib = x86_64-w64-mingw32-ranlib + strip = x86_64-w64-mingw32-strip + endif else common-cflags += "-I$(JAVA_HOME)/include/win32" build-cflags = $(common-cflags) -I$(src) -mthreads @@ -212,8 +221,8 @@ ifeq ($(platform),windows) endif ifeq ($(arch),x86_64) - cxx = x86_64-w64-mingw32-g++ - cc = x86_64-w64-mingw32-gcc + cxx = x86_64-w64-mingw32-g++ $(mflag) + cc = x86_64-w64-mingw32-gcc $(mflag) dlltool = x86_64-w64-mingw32-dlltool ar = x86_64-w64-mingw32-ar ranlib = x86_64-w64-mingw32-ranlib