Commit Graph

3500 Commits

Author SHA1 Message Date
Joshua Warner
b3d4f33522 fix memory leak in Java_java_io_File_lastModified (exposed in debug mode) 2013-10-17 13:54:59 -06:00
Joshua Warner
526e3a41a8 Merge pull request #81 from dscho/last-modified
Fix unsatisfied link error when calling java.io.File#lastModified on non-Windows
2013-10-17 12:38:06 -07:00
Johannes Schindelin
974073ed17 Make sure to test java.io.File#lastModified
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-10-17 14:30:41 -05:00
Johannes Schindelin
ba10a58e3b Support java.io.File#lastModified not only on Windows
There was already non-Windows support, but it was put into the
Windows-specific part. Move it outside.

While at it, change the left-over 'st' to 'fileStat' to fix the
compilation.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-10-17 14:22:59 -05:00
Joshua Warner
4285d84406 fix windows.cpp compile for newer versions of mingw 2013-09-11 09:30:35 -06:00
Joshua Warner
314f18644f make getChars and releaseChars static, to prevent them being confused with implementations in other objects if they're not inlined (debug mode) 2013-09-06 08:47:46 -06:00
Joshua Warner
3136c9d156 fix ios sim=true build 2013-09-03 21:22:34 -06:00
Joshua Warner
699ca75c54 fix sdk detection logic 2013-09-03 21:03:29 -06:00
Joshua Warner
b6c7cfef73 Merge pull request #77 from joshuawarner32/win-cmd-excape
add proper argument escaping in Runtime.exec for windows
2013-08-30 13:04:57 -07:00
Joshua Warner
4572c02bf0 fix typo 2013-08-30 11:32:17 -06:00
Joshua Warner
3d361619a3 add proper argument escaping in Runtime.exec for windows 2013-08-29 14:37:14 -06:00
Dan Cunningham
0db1a2c414 The unlink/_wunlink call will not delete directories, use remove/_wremove instead 2013-08-28 15:27:31 -06:00
Joel Dice
c06dd28ea0 fix Android classpath build for iOS
This mainly involved reworking the makefile to avoid conflating
Darwin/ARM builds with iOS, since we may also want to build for the
iOS Simulator, which is i386.

Note that I was only able to test this on the Simulator, since I don't
have a real iOS device to test with.  Sorry if I broke something; if
so, please fix it :)
2013-07-31 15:20:32 -07:00
Joel Dice
56a0aea160 update android.pro for compatibility with recent upstream code 2013-07-31 15:19:12 -07:00
Joel Dice
c0c2b75be1 change expat URL in README.md
Apparently we have readytalk.github.io set up to 301 redirect all URLs
to oss.readytalk.com, which confuses curl.  Rather than figure out how
to make curl do the right thing, I've just changed the URL to point to
oss.readytalk.com.
2013-07-31 15:17:24 -07:00
Joshua Warner
cfa62d8d2f Merge pull request #75 from frustaci/patch-1
Fix 16-byte boundary in Linux x86
2013-07-29 07:54:18 -07:00
frustaci
a6440375ca Update x86.S
GCC now assumes by default that the stack is aligned to a 16-byte boundary in Linux x86, so let's do our part to honour that. :)
Otherwise native code that depends on the stack to be aligned to 16 bytes would seg fault (like SSE).
https://groups.google.com/forum/#!topic/avian/SyCl-Jfw2U8
2013-07-28 10:39:55 -03:00
Joshua Warner
c09f329728 Merge pull request #71 from jentfoo/issue70
Fix ClassCastException in UnmodifiableMap as well as fix modifying unmodifiable structures through iterators
2013-07-17 12:00:19 -07:00
Mike Jensen
2e921b803d Added a simple test to show the original issue 2013-07-17 11:53:35 -06:00
Mike Jensen
bfe7b9110a Removed exception message based on Josh's recommendation 2013-07-17 11:52:48 -06:00
Mike Jensen
7da59277e5 This solves a class cast exception from a call to .values() from an UnmodifiableMap. It also solves an issue where you can modify an unmodifiable collection through the Iterator or ListIterator (depending on the structure type). 2013-07-15 08:54:44 -06:00
Mike Jensen
bdcec728f7 Merge pull request #2 from ReadyTalk/master
Update personal avian to current readytalk/avian
2013-07-15 07:31:26 -07:00
Mike Keesey
aab1b6e087 Adding another possible case for addThread to expect. One common case that triggers is is when both arguments to addThread are the same thread (such as the call from attachThread). SWT on darwin seems to do this for dialog boxes. 2013-07-14 15:59:43 -06:00
Joel Dice
ccebdb2107 Merge remote-tracking branch 'jet/master' 2013-07-09 10:04:50 -06:00
JET
1b6d8e1085 Added native Math.exp() implementation. 2013-07-09 08:31:48 -06:00
Joel Dice
3058e4254d only use librt on Linux; OS X doesn't have or need it 2013-07-07 11:35:20 -06:00
Joel Dice
82577d742f fix Android classpath build
Hopefully it will stay fixed this time, since we now specify commit
hashes for each dependency which are known to work.
2013-07-05 14:36:16 -06:00
Joel Dice
a9d9bc5d20 fix Clang warnings 2013-07-03 13:33:46 -07:00
Joel Dice
87b02eb949 update copyright years
Previously, I used a shell script to extract modification date ranges
from the Git history, but that was complicated and unreliable, so now
every file just gets the same year range in its copyright header.  If
someone needs to know when a specific file was modified and by whom,
they can look at the Git history themselves; no need to include it
redundantly in the header.
2013-07-02 20:52:38 -06:00
Joel Dice
c5d2cb007c tweaks to prepare for 0.7 release 2013-07-02 14:39:20 -06:00
JET
b66d8b9fbf Expanded DatagramChannel and corrected blocking configuration in connect(). 2013-07-02 10:10:05 -06:00
Edison
e07a1e2f57 FIX : To run embeded application, it complains for missing libgcc_s_dw2-1.dll and libstdc++-6.dll.(#60) 2013-06-15 19:04:29 +08:00
Joel Dice
b3cb20d6eb JVM_GetDeclaredClasses and JVM_GetClassInterfaces should return instances of Class[], not Object[] 2013-06-06 18:37:05 -06:00
Joshua Warner
de21913d13 fix linux->darwin cross-compile
There were two issues: the linux->darwin cross compiler is more stringent
about unused variables, and the makefile specified flags for building ON
darwin that were actually applicable whenever we are building FOR darwin.
2013-06-04 13:32:22 -06:00
Joshua Warner
cb11e21f95 force unicode support in java-io.cpp when including windows.h 2013-06-04 11:52:18 -06:00
Joshua Warner
8df12d5003 Use native windows APIs for File.exists()
On windows, there are obscure cases where _wstat can return non-zero for a path that
actually exists, but the native GetFileAttributes returns valid attributes.  This is
the case in particular when the user or process doesn't have permissions to access
the directory (for instance, anything outside of %temp%\Low, when running as a
low-integrity process).

This was causing problems with .mkdirs() - which first tries to check if the parent
exists, and creates it if it doesn't. In our particular case, the exists() was
returning false for the parent, even though it exists, and .mkdir() works fine,
mkdirs() fails for the same directory.
2013-05-31 11:17:21 -06:00
Joel Dice
84e23659f9 remove unecessary PROTECT statements
Since there's no possibility of garbage collection during the
lifetimes of these local variables, there's no need to protect the
references.
2013-05-14 14:33:37 -06:00
Simon Ochsenreither
e088fa07ae Make exception messages match the ones from OpenJDK/Android
This commit changes the exception message format of
ClassCastException and CloneNotSupportedException.
2013-05-14 15:04:34 +02:00
Joel Dice
4a69496ab4 perform any necessary argument conversion in JVM_NewInstanceFromConstructor
We must use the same utility function as JVM_InvokeMethod to ensure
that primitive arguments are unboxed when necessary.
2013-05-13 14:27:39 -06:00
Joel Dice
4b0bbd85e8 fix sun.misc.Unsafe.arrayIndexScale implementation
The original implementation was based on the assumption that the
passed class would be the array element type, whereas it is actually
the array type itself.
2013-05-13 14:25:59 -06:00
Joel Dice
6507150246 wait until all non-daemon threads exit before invoking the class library shutdown method
Running the shutdown method prematurely can cause deadlock in
OpenJDK's AWT implementation and may have other nasty effects besides
that.
2013-05-13 13:17:42 -06:00
Joel Dice
fcfdd6be3a initialize the class if necessary when the "new" operator is invoked
This is one of the conditions specified in
http://docs.oracle.com/javase/specs/jls/se7/html/jls-12.html#jls-12.4.1,
which I had forgotten about.
2013-05-13 13:12:58 -06:00
Joel Dice
7e2d265fb9 filter flags argument to JVM_Open
The class library may pass non-standard flags to JVM_Open which will
confuse the OS if we pass them through, so we must filter them out.
2013-05-13 13:11:12 -06:00
Joel Dice
6d5fbdeb7b provide stub for JVM_UnloadLibrary
It may leak file handles under certain circumstances to do nothing in
JVM_UnloadLibrary, but, for now, an empty implementation is more
useful than one that aborts the process.
2013-05-13 13:08:40 -06:00
Joel Dice
419ac24963 don't load libmawt ahead of time when starting the VM
At one point, loading libmawt ahead of time was necessary to make AWT
work, but recent versions of OpenJDK seem to take care this from Java
code, in which case loading it ahead of time causes trouble, so we
comment it out for now until we exactly when it's needed.
2013-05-13 13:05:13 -06:00
Joel Dice
435dbbc874 add stub implementation of JVM_CurrentClassLoader 2013-05-10 11:29:20 -06:00
Joel Dice
6b3a352b38 Merge remote-tracking branch 'origin/master' 2013-04-30 23:08:18 -06:00
Joel Dice
529c7a17fb add support for the RuntimeVisibleParameterAnnotations attribute 2013-04-30 22:55:59 -06:00
Joel Dice
b1840a297d implement Unsafe.{put|get}Char 2013-04-30 22:54:45 -06:00
Joel Dice
af9e162827 fix OpenJDK build regression due to recent Android classpath refactoring 2013-04-30 22:53:56 -06:00