Comparar commits

..

2215 Commits

Autor SHA1 Mensagem Data
Daniel Doubrovkine (dB.) @dblockdotorg 296e89e7c6 Merge pull request #334 from msteiger/knownfolder
Added Shell32.SHGetKnownFolderPath and corresponding constants
2014-05-26 06:55:28 -04:00
Martin Steiger e52c4255d9 Fixed inheritance of LPVOID and simplified access to CoTaskMem* 2014-05-25 17:32:13 +02:00
Martin Steiger a0eaa3fb95 Merge remote-tracking branch 'twall/master' into knownfolder 2014-05-25 17:02:45 +02:00
Martin Steiger bf870bb9e3 Added Win32 Monitor Configuration API in com.sun.jna.platform.win32.Dxva2. 2014-05-24 15:09:05 -04:00
Martin Steiger 8d4aa48713 Added Shell32.SHGetKnownFolderPath and corresponding constants 2014-05-24 12:55:05 +02:00
Martin Steiger 21d459bb55 Added CoTaskMemAlloc, CoTaskMemRealloc and CoTaskMemFree to com.sun.jna.platform.win32.Ole32. 2014-05-23 11:52:03 -04:00
Tobias 05210b2332 added my changes 2014-05-23 09:57:41 +02:00
Tobias 942380eadd Added Winspool monitor sample and updated Kernel32, WinBase, Winspool
Added a full running Winspool monitor sample to demonstrate how to watch
for new print jobs added to the spooler on windows.
2014-05-23 09:55:38 +02:00
Tobias e0ff9cd8d3 Some minor changes to MS Office samples
Test and small changes to the MS Office samples
2014-05-22 09:55:27 +02:00
Tobias 3470e24b46 New MS Word sample
Providing new samples with MS Word 14 running on Windows 7/64bit
2014-05-21 13:11:18 +02:00
Tobias ab513b62a0 Variant and TlbImp Fix
Small fixes to answer support calls
2014-05-21 11:25:02 +02:00
Timothy Wall da6c521e1c add change entry for PR #319 2014-05-13 06:17:41 -04:00
Timothy Wall 5115f143ce Merge pull request #319 from marco2357/master
fixed direct-mapping type-mapped pointer result types
2014-05-13 06:11:52 -04:00
Timothy Wall 64466deb5e Ensure exception message includes all faulty field information (fixes broken test) 2014-04-21 06:21:58 -04:00
Timothy Wall d8638912f0 fix build on newer mac OSX (10.8/10.9) 2014-04-21 06:06:02 -04:00
Timothy Wall 87c582ce23 Merge pull request #321 from headcr4sh/patch-1
Add syntax highlighting to C- and Java code

Oooh, pretty!
2014-04-20 14:56:04 -04:00
Benjamin P. Jung 9f1361b533 Add syntax highlighting to C- and Java code 2014-04-20 20:08:29 +02:00
Timothy Wall 323a913bf6 Merge pull request #290 from ebourg/master
Exception chaining for com.sun.jna.Structure
2014-04-09 20:56:21 -04:00
Taco deff187509 removed unused imports 2014-04-09 18:49:14 +02:00
Taco cfbe750615 improved testcase 2014-04-09 18:33:31 +02:00
Emmanuel Bourg 32447ce488 Added an entry in the changelog for #290 2014-04-09 17:51:49 +02:00
Emmanuel Bourg 27c7d3ad49 Exception chaining for com.sun.jna.Structure 2014-04-09 17:20:55 +02:00
Timothy Wall 9340b94e63 Merge pull request #314 from andymcd/aarch64
Add and bundle support for AArch64
2014-04-09 07:13:20 -04:00
Taco d7bb1e189f fixed direct-mapping type-mapped pointer result types 2014-04-08 18:23:44 +02:00
Andrew McDermott 6cd4216336 Add and bundle support for AArch64
Signed-off-by: Andrew McDermott <andrew.mcdermott@linaro.org>
2014-04-04 05:44:12 +00:00
Daniel Doubrovkine (dB.) @dblockdotorg bbef9fa6ab Fixed link to JavaDoc. 2014-03-31 07:11:38 -04:00
Timothy Wall 28fc8ce789 enable AIX build, update natives 2014-03-18 17:16:31 -07:00
Daniel Doubrovkine (dB.) 8508354adc Merge pull request #307 from tyrcho/patch-1
fix javadoc links
2014-03-08 10:52:17 -05:00
Michel Daviot 6d8bf1eaf4 fix javadoc links 2014-03-08 13:30:41 +01:00
dB d498bd9493 Preparing for development, 4.1.1. 2014-03-06 11:10:44 -05:00
dB c490fc9101 Release 4.1.0 to Maven Central. 2014-03-06 11:06:40 -05:00
dB 05348f6c26 Moved general docs from publishing to maven central to releasing. 2014-03-06 10:58:09 -05:00
dB bfc02645a0 You don't need permissions to Sonatype, the explanation to get java.net access is right above. 2014-03-06 10:48:00 -05:00
dB 46238caafb Push at the very end, so everything is staged. 2014-03-06 08:48:56 -05:00
dB 2a756c628a Switch order of release because download links point to Maven central. 2014-03-06 08:42:10 -05:00
dB 56eb5c7d4a Added documentation on where to request access to Sonatype. 2014-03-06 08:40:13 -05:00
dB 1bd0db1148 Release 4.1.0. 2014-03-06 08:18:49 -05:00
dB dc013ea124 Release 4.1. 2014-03-06 08:04:24 -05:00
dB 34d87fd98f Preparing for 4.1 release. 2014-03-06 08:00:08 -05:00
Timothy Wall 71631fb543 Merge pull request #306 from swills/master
Use getCanonicalPath instead of getAbsolutePath for native library tests
2014-02-27 06:56:42 -05:00
Steve Wills 4934eb644b Use getCanonicalPath instead of getAbsolutePath for these two tests 2014-02-26 23:05:40 +00:00
Timothy Wall f3e7ede297 Tighten prose. 2014-02-23 08:35:06 -05:00
Daniel Doubrovkine (dB.) 2c0d097389 Merge pull request #301 from BusyByte/master
Added Advapi32Util accessCheck method to verify file permissions
2014-01-22 14:35:06 -08:00
pair9 e3aa9cd1a2 Changed Advapi32Test.testAccessCheck to work on non-US-English systems and general cleanup 2014-01-22 16:24:12 -06:00
pair9 d84910a762 Added test for com.sun.jna.platform.win32.Advapi32.AccessCheck and updated changelog markup 2014-01-22 13:24:20 -06:00
Timothy Wall 2c16197d0f Merge branch 'issue-300' of github.com:twall/jna 2014-01-21 22:45:49 -05:00
Timothy Wall 2e4c4349dd Merge branch 'issue-300' of github.com:twall/jna into issue-300 2014-01-21 22:44:53 -05:00
Timothy Wall 5d4e9b14fd update change log 2014-01-21 22:44:25 -05:00
Timothy Wall feecc7fd1e Merge branch 'issue-300' of github.com:twall/jna 2014-01-21 22:42:36 -05:00
Shawn Garner 3f23dc3ffb Addressed code review items from pull request 2014-01-22 02:35:26 +00:00
Shawn Garner 5ce1658269 Added Advapi32Util accessCheck method to verify file permissions 2014-01-21 04:53:49 +00:00
Timothy Wall 75a532b088 update natives 2014-01-13 02:24:32 -05:00
Timothy Wall 8aa8a2e090 update native 2014-01-13 02:23:39 -05:00
Timothy Wall 4836f05059 don't align arguments in stdcall 2014-01-13 02:23:08 -05:00
Timothy Wall ed35e7b973 fix clallback prototype 2014-01-13 01:16:23 -05:00
Timothy Wall 4e4dbda6f0 add extra args, triggering stdcall stack bug 2014-01-13 00:52:47 -05:00
Timothy Wall 6756267f48 attempt to reproduce issue #300 2014-01-12 17:06:13 -05:00
Tobias 87200e8006 Some Changes to the COM support
- New feature for supporting also DispId`s for Tlb generation.
- Added new parameter to TlbImp source code generator for selecting a
custom output directory.
2014-01-03 20:21:57 +01:00
Barry Roberts 35c743df72 Added com.sun.jna.platform.win32.Kernel32.ResetEvent. 2013-12-11 08:58:32 -05:00
Daniel Doubrovkine (dB.) c94c3b9ee0 Merge pull request #292 from ebourg/unused-imports
Remove unused imports
2013-11-15 15:24:33 -08:00
Emmanuel Bourg 1d0988127d Removed unused imports 2013-11-15 23:44:34 +01:00
Daniel Doubrovkine (dB.) e736b45a35 Merge pull request #291 from ebourg/stringbuilders
Replace StringBuffers with StringBuilders
2013-11-15 14:42:39 -08:00
Emmanuel Bourg e67a50c904 Replaced StringBuffers with StringBuilders 2013-11-15 23:11:08 +01:00
Timothy Wall 6f37195ce2 cloudbees test trigger 2013-11-14 07:01:12 -05:00
Timothy Wall 9785311050 cloudbees test trigger 2013-11-14 07:00:51 -05:00
Timothy Wall ed5dac53cc fix typo in javadoc 2013-11-08 07:08:40 -05:00
Daniel Doubrovkine (dB.) 6b25643334 Update CHANGES.md 2013-11-06 11:49:20 -08:00
Daniel Doubrovkine (dB.) 667fdd1e32 Merge pull request #287 from daifei4321/master
Updated Win32WindowDemo.java
2013-11-06 11:46:50 -08:00
Dai Fei a0c486f826 Update CHANGES.md 2013-10-29 15:27:40 +08:00
daifei4321 a41d97d9e8 Update Win32WindowDemo.java
Used DBT.DBTF_MEDIA to replace 1.
Used DBT.DBTF_NET to replace 2.
2013-10-25 16:17:38 +08:00
daifei4321 30b64fb78c Fixed 2 bugs in Win32WindowDemo.java
Added setting dbcc_size before RegisterDeviceNotification.
Create DEV_BROADCAST_DEVICEINTERFACE only when should.
Added extra info (drive letter, change to media in drive or to physical drive, is network drive) for logic drive add/remove.
2013-10-25 16:10:56 +08:00
daifei4321 f277c9dce2 Update DBT.java added DBTF_MEDIA and DBTF_NET 2013-10-25 15:05:24 +08:00
Markus KARG c7dcf61bb6 Added com.sun.jna.platform.win32.Kernel32.GetPrivateProfileSection, GetPrivateProfileSectionNames and WritePrivateProfileSection and corresponding Kernel32Util helpers. 2013-10-07 19:58:36 -04:00
Daniel Doubrovkine (dB.) 438d1313fc Merge pull request #280 from dblock/kc7bfi-merged
#270 + #271: Added OpenGL32 support.
2013-10-06 17:05:45 -07:00
dB e465dca4ce Moved OpenGL declarations in the corresponding file(s) with the Windows SDK. 2013-10-06 20:00:01 -04:00
David Robinson 99bd756eab Added OpenGL32 support. 2013-10-06 14:31:37 -04:00
Timothy Wall b2e16d4f6c fixes issue #279 2013-10-06 13:23:46 -04:00
Timothy Wall 6f13f2e6d9 Accommodate altered libc loading on FreeBSD 2013-10-06 13:21:45 -04:00
Timothy Wall f5d7955f41 clean up new files (line termination and errant unicode) 2013-10-05 16:38:00 -04:00
Daniel Doubrovkine (dB.) 0aab1f52a5 Merge pull request #278 from dblock/lpolestr-fix
Fix: LPOLESTR constructor with a string doesn't allocate memory.
2013-10-05 06:56:49 -07:00
Daniel Doubrovkine (dB.) 8dd1592f70 Merge pull request #276 from dblock/fix-tests
Removed dependency on JNA_LIB and contrib paths.
2013-10-04 04:48:19 -07:00
dB eaf9e25461 Fix: LPOLESTR constructor with a string doesn't allocate memory. 2013-10-04 07:46:51 -04:00
Daniel Doubrovkine (dB.) deb7cc68f4 Merge pull request #277 from dblock/shortcut-clsids
Fix: use shell objects available on all versions of Windows.
2013-10-04 04:31:07 -07:00
dB 5b3a782ab7 Fix: use shell objects available on all versions of Windows. 2013-10-04 07:28:09 -04:00
Daniel Doubrovkine (dB.) 66fcd236cf Merge pull request #272 from dblock/windows-build
Choose whether to use MSVC based on MSVC env.
2013-10-04 04:13:01 -07:00
dB 487dab42de Removed dependency on JNA_LIB and contrib paths. 2013-10-04 06:58:10 -04:00
Daniel Doubrovkine (dB.) bb27c09164 Merge pull request #274 from dblock/fix-tests
Fix: use a different CLSID, remove dependency on Word.
2013-10-04 03:48:58 -07:00
dB f6ceaf3355 Merged from master. 2013-10-04 06:46:13 -04:00
dB cb8f9dd7df Fix: use a different CLSID, remove dependency on Word. 2013-10-03 09:29:33 -04:00
dB 395bffcf72 Choose whether to use MSVC based on MSVC environment variable. 2013-10-02 14:21:26 -04:00
Daniel Doubrovkine 35cc5e2e31 Fix: Win32 unit tests. 2013-09-26 07:28:58 -04:00
Daniel Doubrovkine 4df5e827a7 Merged #253. 2013-09-25 07:21:59 -04:00
Daniel Doubrovkine 8de77d3df3 Merged RAS32 API support. 2013-09-25 06:50:00 -04:00
drrobison 8a4a7e1b1a More tests 2013-09-23 16:32:18 -04:00
drrobison 7dc7547271 Change log 2013-09-23 16:00:40 -04:00
Timothy Wall 4ee5e0efec update changelog 2013-09-21 07:30:14 -04:00
Timothy Wall e79f6e0e04 Merge pull request #266 from brettwooldridge/master
Fix for issue#226 "Convert platform to OSGi"

Verified that new OSGI entries show up in jna-platform.jar.
2013-09-21 04:25:48 -07:00
Brett Wooldridge 9de200502a Build jna-platform jar with OSGi headers. Fix OSGi "Bundle-version" header of core jna.jar to contain full version number, rather
than just ${jna.major} number.
2013-09-20 13:05:07 +09:00
Brett Wooldridge 57197d3cc8 Revert "Build jna-platform jar with OSGi headers. Fix OSGi "Bundle-version" header of core jna.jar to contain full version number, rather"
This reverts commit e4a1158b50.
2013-09-20 13:04:05 +09:00
Brett Wooldridge e4a1158b50 Build jna-platform jar with OSGi headers. Fix OSGi "Bundle-version" header of core jna.jar to contain full version number, rather
than just ${jna.major} number.
2013-09-20 12:55:19 +09:00
drrobison 23a7cbaf11 Provide support for the Windows RAS32 API 2013-09-19 11:52:13 -04:00
Timothy Wall 21765f9a9c fix WinDef.POINT references 2013-09-19 07:13:29 -04:00
Timothy Wall bc0b30fec5 Merge branch 'master' of github.com:twall/jna 2013-09-19 07:10:11 -04:00
Timothy Wall 6883010c0f fix WinDef.POINT references 2013-09-19 07:09:45 -04:00
Timothy Wall 3fc7603da8 remove console output from tests (COM tests still need cleanup and proper assertions) 2013-09-14 15:28:24 -04:00
Tobias 79c3521c94 some extensions to support dispid 2013-08-23 17:01:56 +02:00
Tobias 1d6fa14851 some code improvement and cleaning up 2013-08-23 13:39:53 +02:00
Tobias ddecf09700 some small bug fixes to TLB generating 2013-08-20 15:38:01 +02:00
Tobias e9d3793b61 some changes 2013-08-20 13:58:30 +02:00
Tobias 5ec1f87113 bug trapping code 2013-08-20 11:23:55 +02:00
Tobias Wolf f35fe81b40 some changes to find the bug 2013-08-20 08:18:54 +02:00
Timothy Wall 4d0f5ab5d5 remove DOS line terminators 2013-08-19 18:51:35 -04:00
Timothy Wall 919a31f16e fix incorrectly-named 'byReference' classes to 'ByReference' 2013-08-19 16:56:38 -04:00
Tobias 938ee0ddd8 removal of file 2013-08-19 15:08:34 +02:00
Tobias 4f9260b35e some changes to find issue with JNA 4 2013-08-19 15:07:36 +02:00
Tobias 6e0690aa70 Merge pull request #254 from twall/com-branch
After a while I didn`t got any feedback, therefore I merge the code
2013-08-19 00:35:51 -07:00
Tobias 854165453a some changes
added some unit tests
2013-08-09 14:56:54 +02:00
Tobias 04d74c8ba5 arrays extended and unit test 2013-08-09 10:08:35 +02:00
Tobias 0ddf39c979 added some test 2013-08-08 14:05:15 +02:00
Tobias 842904ad44 removeed all array initialisation code 2013-08-07 13:54:55 +02:00
Tobias 20b582e97b some changes 2013-08-07 11:21:03 +02:00
Tobias 2553a95c95 some changes 2013-08-06 16:28:14 +02:00
Tobias f989080691 removed some warnings 2013-08-06 14:24:22 +02:00
Tobias 02230ef692 some changes 2013-08-06 11:02:24 +02:00
Tobias d8d9c62de1 git shows me changes (old/new) 2013-08-06 10:58:37 +02:00
Tobias c1ac91e00f some changes to jna 4 2013-08-06 10:54:33 +02:00
Tobias 4f1f03346f some changes 2013-08-06 10:52:24 +02:00
Tobias 8c9e2e67ef some changes to support jna 4 2013-08-06 10:24:41 +02:00
Tobias 2c32c5596e changes including update to jna 4.0 2013-08-05 18:12:25 +02:00
Tobias af8c85428d merge commit 2013-08-05 15:48:37 +02:00
Tobias 2bb0ac91d1 some cosmetics 2013-08-05 10:58:49 +02:00
Tobias 8f24f1d82a Update README.md 2013-08-05 10:35:33 +02:00
Tobias 6762c42a18 Update CHANGES.md 2013-08-05 10:32:45 +02:00
Falldog f1903d903c Update CHANGES.md 2013-08-02 23:00:12 +08:00
Tobias 2ee9962838 some changes to TlbImp 2013-08-02 11:15:05 +02:00
Tobias 9f4155a150 some changes 2013-08-01 18:03:00 +02:00
Falldog 44f6e5ab76 Modify the API in Advapi32Util for support registryGetKey() in WOW64 flag 2013-07-31 15:46:47 +08:00
Tobias b10c508a6b some changes 2013-07-30 16:00:19 +02:00
Timothy Wall 70f3c4757f remove superfluous (and problematic) utf8 BOM 2013-07-22 07:19:39 -04:00
Timothy Wall 15b2df4acf enable platform tests to run w/o native build bits 2013-07-22 06:59:34 -04:00
Daniel Doubrovkine (dB.) 3157243deb Merge pull request #249 from Falldog/master
Add registryCloseKey()
2013-07-21 09:33:19 -07:00
Timothy Wall 95526ab823 fix bug if ByValue types are explicitly used in struct fields 2013-07-21 09:03:15 -04:00
falldog cf6b5e4dce Add UnitTest testRegistryGetCloseKey & update CHANGES.md 2013-07-20 09:32:27 +08:00
falldog 4b245b9053 Add registryCloseKey() for close registry key by registryGetKey() 2013-07-19 11:00:26 +08:00
Timothy Wall 923cd5a937 fix javadoc links 2013-07-15 07:03:50 -04:00
Daniel Doubrovkine (dB.) 342afd7221 Fixed JNA platform download link. 2013-07-12 11:52:59 -04:00
Timothy Wall 91a9bd6ab3 remove non-ascii from javadoc 2013-07-06 09:16:27 -04:00
Timothy Wall b980a28c91 bump version 2013-07-04 14:51:52 -04:00
Timothy Wall 9b7ba38dc2 final 4.0 changes 2013-07-04 14:42:30 -04:00
Timothy Wall 08157deece Merge branch 'master' of github.com:twall/jna 2013-07-04 10:24:54 -04:00
Timothy Wall c7e7e2bcdc Update PublishingToMavenCentral.md 2013-07-04 10:24:26 -04:00
Timothy Wall 01ab778621 Update ReleasingJNA.md 2013-07-04 10:09:55 -04:00
Timothy Wall 312de23e5e Merge branch 'master' of github.com:twall/jna 2013-07-04 10:05:09 -04:00
Timothy Wall 792c5374d7 Update ReleasingJNA.md 2013-07-04 10:04:37 -04:00
Timothy Wall 34dea52d6c Update PublishingToMavenCentral.md 2013-07-04 10:02:32 -04:00
Timothy Wall 6f3703d00b fix line termination 2013-07-04 10:00:28 -04:00
Timothy Wall cbd4b46f9f fix paths to jna-platform.jar 2013-07-04 10:00:01 -04:00
Timothy Wall ff1109389c Update PublishingToMavenCentral.md 2013-07-04 09:51:26 -04:00
Timothy Wall c31e9cdebf Update ReleasingJNA.md 2013-07-04 09:48:30 -04:00
Timothy Wall 97449288eb ensure native bits get built for 'native' target and for tests 2013-07-03 07:23:53 -04:00
Timothy Wall 9c2aebcf3c Merge branch 'master' of github.com:twall/jna 2013-07-03 07:21:55 -04:00
Timothy Wall 54c1851db5 speed up callback lookup 2013-07-03 07:21:35 -04:00
Timothy Wall f1d0a9b688 propagate field access permissions to Union 2013-07-02 13:01:06 -04:00
Timothy Wall d62a8abb24 by default, don't build native
make Structure get/setFieldValue protected
2013-06-26 07:27:17 -04:00
Tobias 3f182664be some changes 2013-06-24 18:28:33 +02:00
Daniel Doubrovkine (dB.) 6f362b53c3 Update CHANGES.md 2013-06-23 15:46:47 -06:00
Daniel Doubrovkine (dB.) 617420eaf9 Update CHANGES.md 2013-06-23 15:46:18 -06:00
bsorrentino e0d2079802 Add support of function SHAppBarMessage from ShellApi. 2013-06-23 14:35:58 -07:00
Timothy Wall 897b318324 update win64 natives 2013-06-16 20:30:02 -04:00
Timothy Wall 1737d6addb accommodate long path names, fixes #243 2013-06-16 09:05:26 -04:00
Timothy Wall 418a53806c rename JNA load test 2013-06-15 07:15:42 -04:00
Timothy Wall 79272c76a5 make unpacked path available as a system property, track down JVM error in System.load 2013-06-15 07:05:53 -04:00
Timothy Wall d0936b0189 use jna-platform as id for platform jar 2013-06-13 03:47:31 -04:00
Timothy Wall 8db46b4c1a update freebsd natives 2013-06-13 03:39:54 -04:00
Timothy Wall c6a88f3b7f update openbsd-x86-64 natives 2013-06-13 03:38:30 -04:00
Timothy Wall 2fb4c9b683 add more test coverage 2013-06-11 05:03:32 -04:00
Timothy Wall 766db7a318 fix formatting 2013-06-11 04:52:50 -04:00
Timothy Wall e8d4a3e6c0 Fix varargs tests 2013-06-11 04:50:03 -04:00
Timothy Wall 9ac8de0f5d add some Function tests 2013-06-11 04:36:35 -04:00
Timothy Wall fed3b9f432 check for invalid Structure.ByReference usage 2013-06-11 04:04:47 -04:00
Tobias Wolf 327b429d79 some changes 2013-06-09 20:18:31 +02:00
Tobias Wolf 55cca7220a some changes 2013-06-09 13:09:40 +02:00
Timothy Wall 3e55136c6a add license info files 2013-06-08 09:05:03 -04:00
Timothy Wall 2d7971a429 fix alignment on osx/ppc 2013-06-06 21:49:14 -04:00
Timothy Wall acf06d725f update sunos-x86* natives 2013-06-04 23:45:59 -04:00
Timothy Wall e5dcc56056 update w32ce-arm natives 2013-06-04 23:29:12 -04:00
Timothy Wall ce96234b72 Merge branch 'master' of github.com:twall/jna 2013-06-04 22:59:01 -04:00
Timothy Wall 3b8fe3b011 update android natives 2013-06-04 22:58:38 -04:00
Timothy Wall 82561550e8 update sunos natives 2013-06-05 03:01:36 +02:00
Timothy Wall 631920d41e update darwin natives 2013-06-04 18:25:45 -04:00
Timothy Wall 6021064040 Merge branch 'master' of github.com:twall/jna 2013-06-04 18:16:52 -04:00
Timothy Wall 0547a9c3e2 update linux-arm natives 2013-06-04 18:16:35 -04:00
Timothy Wall a1fe8ce22c update linux-x86 natives 2013-06-04 17:59:20 -04:00
Timothy Wall 5e56b8565a update win64 natives 2013-06-04 08:49:03 -04:00
Timothy Wall 16d4db1790 fix snprintf on windows 2013-06-04 08:44:14 -04:00
Timothy Wall 32442cd2c4 revise last error checking 2013-06-04 03:29:16 -04:00
Timothy Wall 2ac6c86266 Merge branch 'master' of github.com:twall/jna 2013-06-02 18:43:22 -04:00
Timothy Wall 5664101490 fix broken test on XP 2013-06-02 18:42:56 -04:00
Timothy Wall d2dda4abb6 update win32 natives 2013-06-02 18:42:42 -04:00
Timothy Wall 1f878f01f7 Merge branch 'master' of github.com:twall/jna 2013-06-02 19:53:21 +02:00
Timothy Wall bf28737ebd update sparc/v9 natives 2013-06-02 19:52:40 +02:00
Timothy Wall 7fb2c1b041 fix w32 compile error 2013-06-02 13:50:48 -04:00
Timothy Wall 4f3dcfdf4b update docs 2013-06-02 09:18:27 -04:00
Timothy Wall 13b2d7c0c1 Merge branch 'amd64-pthread-cleanup' of github.com:twall/jna 2013-06-02 08:45:33 -04:00
Timothy Wall 2239bdfdfd improve library load debugging 2013-06-02 08:44:32 -04:00
Timothy Wall c6151c3775 ensure native library found in jar 2013-06-02 08:34:03 -04:00
Timothy Wall 0387196f85 fix library load error w/unicode 2013-06-02 14:18:32 +02:00
Timothy Wall c7e7798979 fix amd64 native thread cleanup test 2013-05-30 10:42:09 -04:00
Timothy Wall aa80c8d19f Merge branch 'amd64-pthread-cleanup' of github.com:twall/jna into amd64-pthread-cleanup 2013-05-30 08:03:06 -04:00
Timothy Wall 02d5f47380 Merge branch 'master' of github.com:twall/jna into amd64-pthread-cleanup 2013-05-30 07:42:21 -04:00
Timothy Wall 75f3ed2d5a revise thread termination flag logic 2013-05-30 07:41:24 -04:00
Timothy Wall 4e5afb4940 make 32-bit win32 MSVC comment explicit 2013-05-30 07:09:55 -04:00
Timothy Wall 85793114d4 fix #237, LastErrorException/getLastError thread-safe errno on AIX 2013-05-30 07:00:30 -04:00
Timothy Wall 708e76473a Merge branch 'master' of github.com:twall/jna into amd64-pthread-cleanup 2013-05-30 06:57:43 -04:00
Timothy Wall 2b8773a8f0 fix padding on ppc 2013-05-29 23:55:12 -04:00
Timothy Wall 962ae7998e fix broken test 2013-05-29 23:24:45 -04:00
Timothy Wall 8f199788a5 force gcc to 32-bit mode for i386 builds on amd64 2013-05-29 21:24:43 -04:00
Timothy Wall caaddd1179 add thread termination flags and checking 2013-05-29 20:43:26 -04:00
Timothy Wall 3704b23a71 auto-strip profiler prefix set in jna.profiler.prefix 2013-05-28 22:49:20 -04:00
Timothy Wall c596f9f7d5 add explicit test for direct mapping use of supplied function mapper 2013-05-28 22:18:21 -04:00
Timothy Wall f6208e71f4 Merge branch 'master' of github.com:twall/jna into amd64-pthread-cleanup 2013-05-28 07:00:30 -04:00
Timothy Wall 85a3cda5c8 update win32-x86 natives 2013-05-27 23:09:32 -04:00
Timothy Wall 6c591c38d9 fix failing test on XP 2013-05-27 23:08:18 -04:00
Timothy Wall 15aac21e2b restore gcc as default win32 32-bit build 2013-05-27 22:22:17 -04:00
Timothy Wall e0441a356d fix failing test 2013-05-27 16:20:58 -04:00
Timothy Wall f3da8161aa verify proper module handle for dll callbacks 2013-05-27 16:14:38 -04:00
Timothy Wall 609e3e459b fix dll callbacks inline asm with msvc 2013-05-27 15:11:55 -04:00
Timothy Wall 8638bb57f9 fix 32-bit build under MSVC 10 2013-05-27 07:56:05 -04:00
Timothy Wall d11084ce0d Merge branch 'master' of github.com:twall/jna into amd64-pthread-cleanup 2013-05-27 07:16:08 -04:00
Timothy Wall 1ae335c7da update win64 natives 2013-05-26 17:56:55 -04:00
Timothy Wall 99529821b4 Merge branch 'master' of github.com:twall/jna 2013-05-26 17:52:52 -04:00
Timothy Wall d551e656cb fix win64 compile warnings 2013-05-26 09:57:45 -04:00
Timothy Wall ba49b166fb add test for GetLastError interception 2013-05-26 09:57:28 -04:00
Timothy Wall a3e002c1db fix w32 test 2013-05-26 09:20:32 -04:00
Timothy Wall 02601e4f7c Merge branch 'master' of github.com:twall/jna 2013-05-25 20:23:51 -04:00
Timothy Wall e2349e4bf6 expand test coverage 2013-05-25 20:11:43 -04:00
Timothy Wall 87afaf44f7 fix javadoc warnings 2013-05-25 19:29:26 -04:00
Timothy Wall bb913b171d add missing methods on opaque pointer
fix NPE
2013-05-25 19:07:07 -04:00
Daniel Doubrovkine (dB.) 975063a28f Fixed links, consistent tense. 2013-05-25 14:29:03 -03:00
Daniel Doubrovkine 8e44c82096 Merged from master. 2013-05-25 13:17:17 -04:00
Daniel Doubrovkine (dB.) 7a33f0b43e Added a note on \r. 2013-05-25 13:53:53 -03:00
Daniel Doubrovkine (dB.) cfdf20f4b7 Clarified Win64 64-bit builds. 2013-05-25 13:48:22 -03:00
Timothy Wall 13207caab6 update clover 2013-05-24 23:31:37 -04:00
Timothy Wall 980b86e2c5 fix test 2013-05-24 23:31:20 -04:00
Timothy Wall c6afe5f73d check for options caching 2013-05-24 08:17:57 -04:00
Timothy Wall 5c48942bda clean up synchronization around options loading 2013-05-24 00:08:57 -04:00
Timothy Wall 82c032329a Merge pull request #234 from dblock/eclipse-build
Fix: Eclipse project build.
2013-05-23 15:06:57 -07:00
Timothy Wall 2a2bdbe60c merge from upstream 2013-05-22 22:36:55 -04:00
Timothy Wall 9414757638 update linux-arm natives 2013-05-22 22:29:56 -04:00
Timothy Wall 253dc5abae work around linux-arm class incompatibility bug in StructureTest 2013-05-22 22:27:56 -04:00
Timothy Wall 296185c0ba fix FP callback args on ARM 2013-05-22 21:12:56 -04:00
Daniel Doubrovkine 70cff3e17a Fix: Eclipse project build. 2013-05-22 18:02:54 -04:00
Timothy Wall 78969b8050 avoid static field initialization bug 2013-05-21 15:19:13 -04:00
Timothy Wall d90f6e3346 fix typo 2013-05-21 14:02:48 -04:00
Timothy Wall 8f99db35dd fix struct padding test on linux-arm 2013-05-21 13:45:38 -04:00
Timothy Wall b5759955d5 bump versions 2013-05-21 13:26:40 -04:00
Timothy Wall adafa3b2c4 last error now always preserved 2013-05-20 23:33:24 -04:00
Timothy Wall 979f43da07 more cleanup 2013-05-20 23:28:06 -04:00
Timothy Wall 528036e9e3 remove inadvertently added files 2013-05-20 23:20:47 -04:00
Timothy Wall 39aebf1d0b fix WORDByReference definition 2013-05-20 19:59:42 -04:00
Timothy Wall 45df2eb8f5 correct test to fix failure 2013-05-20 19:55:03 -04:00
Tobias Wolf 7ae490a393 make parameter reverse ordering as expected by COM runtime 2013-05-20 12:13:42 +02:00
Tobias Wolf 4c114f7796 added sample for MSWord SaveAs function 2013-05-20 10:49:46 +02:00
Timothy Wall 92aa443023 fix file mods 2013-05-19 22:54:56 -04:00
Timothy Wall 1492546150 revise string encoding 2013-05-19 22:53:38 -04:00
Timothy Wall 95c7be884f clean up platform tests and error handling on windows 2013-05-18 12:39:27 -04:00
Timothy Wall 00acbd664e fix javadoc warning 2013-05-17 13:56:49 -04:00
Timothy Wall e7b4a2d5ec add CoInit constants
fix last error formatting
2013-05-17 13:41:03 -04:00
Timothy Wall d7448ad16c remove dummy files 2013-05-16 23:04:11 -07:00
Timothy Wall 7d8afba0f4 clean up some platform win32 junk 2013-05-16 23:03:28 -07:00
Timothy Wall 0f1bdc87d4 enable android-x86 cross-builds 2013-05-16 23:01:14 -07:00
Timothy Wall d4ed7ea34f remove superfluous Structure.ByReference usage 2013-05-15 10:05:07 -04:00
Timothy Wall daf8d5ef89 fix up VM arch flags 2013-05-15 10:04:40 -04:00
Timothy Wall 3ba1fd0975 update openbsd-x86 natives 2013-05-14 03:00:06 -04:00
Timothy Wall a3cdb5a90d leave test file behind on failure 2013-05-14 02:59:24 -04:00
Timothy Wall c6c99b8b98 abstract option for default encoding for library names 2013-06-13 03:14:17 -04:00
Timothy Wall fffe7926da replace generic bsd handling 2013-06-13 03:01:27 -04:00
Timothy Wall 285e5305cb remove generic bsd placeholders 2013-06-13 02:49:33 -04:00
Timothy Wall b9fa73ce7a add bsd targets 2013-06-13 02:48:26 -04:00
Timothy Wall d5669d2ae4 fix javadoc warnings 2013-06-13 02:23:31 -04:00
Timothy Wall 3db7fc10ec rename platform.jar to jna-platform.jar 2013-06-13 02:23:18 -04:00
Timothy Wall 7a0ec5b1df fix vm arch property def 2013-05-13 23:37:16 -04:00
Timothy Wall 8e99313ea4 update changelog 2013-05-13 08:42:10 -04:00
Timothy Wall 8e8aba6ffb getContextClassLoader() may return null 2013-05-13 08:32:15 -04:00
Timothy Wall f903aa926d use a single build directory, multiple build/native-(prefix) directories 2013-05-13 08:01:14 -04:00
Timothy Wall 3848e55813 update license information 2013-05-12 09:18:48 -04:00
Timothy Wall 55778824f3 Merge branch 'master' of github.com:twall/jna into amd64-pthread-cleanup 2013-05-12 09:03:59 -04:00
Timothy Wall 5b240371d9 Merge branch 'master' of github.com:twall/jna 2013-05-12 00:05:30 -04:00
Timothy Wall d65432a014 update w32 natives
fix stdcall stack in libffi
auto-update version resource
2013-05-11 23:55:54 -04:00
Timothy Wall 107d7fa43e report correct javaws error on win64 2013-05-11 21:44:11 -04:00
Timothy Wall bf19830d66 fix padding for windows 2013-05-11 19:16:16 -04:00
Timothy Wall 090b248708 update linux/x86 natives 2013-05-11 15:33:51 -04:00
Timothy Wall e5855c2fa1 fix web start test timeout 2013-05-11 15:33:37 -04:00
Timothy Wall 064785b985 Merge branch 'master' of github.com:twall/jna 2013-05-11 12:21:03 -04:00
Timothy Wall 757446c64e update android natives 2013-05-11 12:20:55 -04:00
Timothy Wall 14e69d1501 update solaris/x86 natives 2013-05-11 12:19:13 -04:00
Timothy Wall 874caccc53 make arch handling more consistent; don't load Native class from Platform 2013-05-11 12:15:39 -04:00
Timothy Wall 295aaa4c31 work around solaris/x86 JVM bug 2013-05-11 11:49:28 -04:00
Timothy Wall dbd45ddf90 update osx natives 2013-05-11 09:27:02 -04:00
Timothy Wall 2f2289c9df Merge branch 'master' of github.com:twall/jna 2013-05-11 15:15:53 +02:00
Timothy Wall 9b7dddfe0c update sunos natives, fix struct padding test expected results 2013-05-11 15:15:18 +02:00
Timothy Wall 21a468a125 consolidate BSD targets test 2013-05-11 01:14:39 -04:00
Timothy Wall de82d964ca update bsd64 native 2013-05-10 20:57:30 -04:00
Timothy Wall d843968432 consolidate BSD targets 2013-05-10 20:54:57 -04:00
Timothy Wall f4958ee8f9 fix broken callback test on BSD 2013-05-10 20:53:02 -04:00
twalljava@java.net 1ed65484e0 fix test on 32-bit 2013-05-10 17:10:25 -04:00
Timothy Wall 8c1e1c2d2e remove invalid character from javadoc 2013-05-10 08:44:38 -04:00
Timothy Wall c888d6e86a fix README typos 2013-05-10 08:32:03 -04:00
Timothy Wall a9ef0e6aca use current java version for compatibility if less than 1.6 2013-05-10 08:24:16 -04:00
Timothy Wall 35b409dce8 Merge branch 'master' of github.com:twall/jna 2013-05-10 08:03:01 -04:00
Timothy Wall 16f3f9310e fix javadoc warning 2013-05-10 08:02:33 -04:00
Timothy Wall 5206982e48 add ASL
set compatibility to 1.6 by default
tweak CreateProcessW definition
avoid unicode errors in username on win32 (temp files)
2013-05-10 08:00:53 -04:00
Timothy Wall 8e9e3b45b6 add symlink creation timeout 2013-05-09 09:14:19 -04:00
Timothy Wall f96eddc6ca update android native 2013-05-08 23:55:27 -04:00
Timothy Wall b2dc918313 update osx natives 2013-05-08 08:01:23 -04:00
Timothy Wall d511e9f0e5 update win32 native 2013-05-08 07:46:36 -04:00
Timothy Wall ed93f9833e Merge branch 'master' of github.com:twall/jna 2013-05-08 07:21:29 -04:00
Timothy Wall 4b34601dc3 update win64 nattttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttive 2013-05-08 07:17:23 -04:00
Timothy Wall c7142dc82c update sparc natives 2013-05-08 13:09:45 +02:00
Timothy Wall 9914826b57 fix line terminators 2013-05-07 08:37:20 -04:00
Trejkaz d2159d70e3 Fixing compilation issues in Kernel32UtilTest 2013-05-07 20:41:20 +10:00
Trejkaz 6a06656c16 Merge branch 'master' of https://github.com/twall/jna
Pulling master back to get compilation fixes.
2013-05-07 20:39:27 +10:00
Timothy Wall b1aa24d911 add test for loading from path with unicode characters (fails on XP, at least) 2013-05-06 09:04:02 -04:00
Timothy Wall 198cb1f9df fix file permissions 2013-05-06 08:25:36 -04:00
Timothy Wall 3fa90d76f5 update linux amd64 natives 2013-05-04 11:51:59 -04:00
Timothy Wall bfea982d45 update linux-x86-64 natives 2013-05-04 11:46:43 -04:00
Timothy Wall 78d70e760e update linux-x86 natives 2013-06-02 13:35:36 -04:00
Timothy Wall 4b9632c4ee update linux/amd64 natives 2013-05-04 11:43:17 -04:00
Timothy Wall 6c9708070c update linux/x86 natives 2013-05-11 01:32:46 -04:00
Timothy Wall b7a299f42a amd64/linux pthread investigations 2013-05-04 11:38:12 -04:00
Timothy Wall e35977776d symlink creation now broken on osx 10.8.3 2013-05-01 15:29:50 -04:00
Timothy Wall 25d1b110a3 Merge branch 'master' of github.com:twall/jna 2013-05-01 00:12:04 -04:00
Timothy Wall 38b796a516 fix #223, union sizing/layout issue 2013-05-01 00:11:19 -04:00
Trejkaz 136653a644 GetLogicalProcessorInformation and associated structs 2013-05-01 13:24:31 +10:00
Timothy Wall 1af1000139 Add prominent links for mailing list and stackoverflow 2013-04-30 07:41:56 -03:00
Timothy Wall 5db3b42770 consolidate compiler pragmas 2013-04-25 08:22:37 -04:00
Timothy Wall 6b552cc03d fix framework loading on OSX 2013-04-25 08:22:16 -04:00
Timothy Wall 19d7775e91 windows won't load libraries w/truncated name 2013-04-24 08:33:53 -04:00
Timothy Wall 299b0a9517 catch attempts to run 64-bit tests on 32-bit javaws 2013-04-24 08:11:49 -04:00
Timothy Wall 075efa649d use a different error code on windows, fixes broken test 2013-04-24 06:57:16 -04:00
Timothy Wall b4f0f21421 fixes for oracle openjdk 2013-04-22 08:48:27 -04:00
Timothy Wall dbeda7f67d fix some tests under clover 2013-04-21 22:37:47 -04:00
Timothy Wall ea56252d2f fix javadoc warnings 2013-04-21 09:46:56 -04:00
Timothy Wall 8d376755dc clean up some function naming
fix typo
2013-04-21 09:39:10 -04:00
Timothy Wall 5d8243ec3b revise resource extraction to use explicit class loaders 2013-04-21 09:33:05 -04:00
Timothy Wall 85e962c124 fix #218 2013-04-17 21:02:53 -04:00
Timothy Wall 97403354a2 add tests for library loading from resource path 2013-04-17 20:53:09 -04:00
Timothy Wall 605dfcbd33 update CHANGES.md 2013-04-17 07:32:04 -04:00
Timothy Wall 3f6441c420 Merge branch 'master' of github.com:twall/jna 2013-04-17 07:29:12 -04:00
Timothy Wall 885586188c clean up platform test runner, run on all platforms 2013-04-17 07:28:28 -04:00
Timothy Wall a517ca68e9 fix libjsig path 2013-04-16 19:39:58 -04:00
Tobias 4f84e1b325 some changes for typelib 2013-04-15 17:50:13 +02:00
Timothy Wall 5857cf7c49 fix load/unload tests 2013-04-14 22:06:38 -04:00
Timothy Wall 52bec37a5b remove extraneous endif 2013-04-14 10:33:02 -04:00
Timothy Wall 48b584d979 reinstate option for xcode 4 only 2013-04-14 10:30:13 -04:00
Dan Rollo 6d2658d888 Revert back to 'failifexecutionfails' for git call. 2013-04-11 03:32:16 -04:00
Dan Rollo 48df3d3cd2 Try 'searchpath' in clean-exec target on OSX. 2013-04-11 03:20:35 -04:00
Dan Rollo d58add66d4 Fix compile error on MacOSX introduced in a676e3acaa. 2013-04-11 01:40:44 -04:00
Timothy Wall 5ac33562cf trim some fat 2013-04-10 07:28:14 -04:00
Timothy Wall 483223546b update from libffi 3.0.13 2013-04-10 07:24:45 -04:00
Dan Rollo 3a795a4483 add 'failifexecutionfails' to ignore problems reverting version stamped files. Was causing build problem on OSX build agent. 2013-04-10 00:21:57 -04:00
Timothy Wall 3e0ee7eced always create errno, detach TLS 2013-04-09 06:20:20 -04:00
Timothy Wall 721a080af9 clean up nounpack handling 2013-04-09 05:57:06 -04:00
Timothy Wall e8dd1564d5 tweak build notes 2013-04-09 05:21:19 -04:00
Timothy Wall 6b923bcf0c avoid superfluous rebuilds on windows, fix md5 checksum with newer ant 2013-04-09 05:19:46 -04:00
Timothy Wall 889d2bbb11 avoid spurious rebuilds 2013-04-09 04:55:06 -04:00
Timothy Wall d53bbd32a9 fix win32 build 2013-04-09 04:08:33 -04:00
Timothy Wall 467ab4ec17 reapply changes 2013-04-08 16:44:50 -04:00
Timothy Wall 900a68eb63 Merge pull request #213 from tomohiron/fix_dump_memory
fix dump memory problem
2013-04-08 13:44:14 -07:00
Timothy Wall 638135f309 pre-merge 2013-04-08 16:43:47 -04:00
Timothy Wall 3a94cbf242 pre-merge 2013-04-08 16:42:43 -04:00
Timothy Wall 8326d791bf fix web start deployment path under oracle 2013-04-08 16:36:57 -04:00
Timothy Wall a676e3acaa fix building under newer xcode, fix compiler warning 2013-04-08 16:32:29 -04:00
Timothy Wall 8a5265c1dd invalidate native jars 2013-04-08 09:58:25 -04:00
Timothy Wall cab106167c update CHANGES.md 2013-04-08 09:57:55 -04:00
Timothy Wall 6fc42f59e1 use tls for callback detach indication, avoid potential conflict with last error 2013-04-08 09:56:42 -04:00
Timothy Wall d0995f3bc2 update natives 2013-04-08 08:00:19 -04:00
Timothy Wall 8ed4def1f3 Merge branch 'master' of github.com:twall/jna 2013-04-08 01:37:48 +02:00
Timothy Wall bf0ab0ea55 update natives 2013-04-08 01:34:57 +02:00
Timothy Wall d4a33cbc58 update native 2013-04-07 19:31:51 -04:00
tomohiro 18cd75b130 modified CHANGES.md 2013-04-08 04:40:38 +09:00
Timothy Wall 4b2c411a2e reorganize tests, ensure by value arguments always use their own memory 2013-04-07 10:09:58 -04:00
tomohiro b33ac764b4 fix Structure.toString because it dumped memory when jna.dump_memory was false 2013-04-07 14:23:23 +09:00
Timothy Wall 0edd935144 fix direct buffer args tests 2013-04-06 18:09:47 -04:00
Timothy Wall 839be7862e use snapshot versions for maven 2013-04-06 17:19:59 -04:00
Timothy Wall 3cfb7df151 enable canonical processor designations on other platforms 2013-04-06 17:19:14 -04:00
Timothy Wall 3364dfcc2a fix compiler warnings on win64 2013-04-06 17:18:50 -04:00
Timothy Wall 818f7fa5d6 obsolete native libs 2013-04-06 17:15:27 -04:00
Timothy Wall 8bb128062a Merge pull request #212 from twall/native-struct-ptr-creation
Native struct ptr creation
2013-04-06 13:23:03 -07:00
Timothy Wall f576184c13 Merge branch 'master' of github.com:twall/jna into native-struct-ptr-creation 2013-04-06 16:14:19 -04:00
Timothy Wall 7d57612d7d Merge pull request #211 from twall/improved_last_error
Improved last error
2013-04-06 13:12:09 -07:00
Timothy Wall c94e9ff4b7 reset read flag when base pointer is altered 2013-04-06 09:40:58 -04:00
Timothy Wall 0a8a67ca5f Merge branch 'improved_last_error' of github.com:twall/jna into native-struct-ptr-creation 2013-04-06 09:36:48 -04:00
Timothy Wall dac9dc4742 Merge branch 'improved_last_error' of github.com:twall/jna into native-struct-ptr-creation 2013-04-06 09:35:07 -04:00
Timothy Wall bf91b32d25 rename with consistent processor names 2013-04-06 09:33:33 -04:00
Timothy Wall 16e6031999 use consistent processor arch names, bump version number 2013-04-06 09:30:13 -04:00
Timothy Wall a4ee620aaf merge from upstream 2013-04-06 08:49:44 -04:00
Timothy Wall 2c18ec2b75 update links 2013-04-06 07:24:18 -04:00
Timothy Wall f0080de225 prepare for release 2013-04-06 06:51:55 -04:00
Timothy Wall e176d09eac distinguish PRs from issues 2013-04-06 06:28:17 -04:00
Timothy Wall 9ff14b0a90 distinguish PRs from issues 2013-04-06 06:27:38 -04:00
Timothy Wall 1b234b6c3b remove non-ascii character 2013-04-06 06:25:19 -04:00
Timothy Wall 84cfea1ac0 make resource prefix available via Platform 2013-04-06 06:14:18 -04:00
Timothy Wall 85d8d08972 update docs 2013-04-06 06:07:54 -04:00
Timothy Wall 5cf120de75 Merge pull request #210 from bertfrees/24f60158d4bf25c3fa57f53ae2ba6fb0c80a1637
OSGi fix for Mac OS X
2013-04-06 02:39:49 -07:00
Timothy Wall bdf38eaf8e fix compile error 2013-04-05 07:28:22 -04:00
Timothy Wall 3823533c17 add support for loading native libraries from classpath (FS or jar) 2013-04-05 05:13:53 -04:00
Timothy Wall fecaf92ec1 auto-generate copyright year 2013-04-05 02:14:06 -04:00
Tobias d7ed79ea07 some changes for typelib parsing 2013-04-04 17:42:45 +02:00
Timothy Wall 830dc666ad avoid NPE 2013-04-04 06:50:30 -04:00
Tobias 68010b6752 some changes 2013-04-03 18:17:38 +02:00
Timothy Wall b7951759ec avoid having to edit/commit file to toggle between maven modes 2013-04-03 05:30:03 -04:00
Timothy Wall ead2c70a1a avoid inadvertent AWT library load 2013-04-03 05:29:22 -04:00
Timothy Wall e0016e875f avoid inadvertent AWT library load 2013-04-03 05:21:05 -04:00
Tobias d74598979a some changes 2013-04-02 18:02:02 +02:00
Bert Frees 24f60158d4 OSGi fix for Max OS X 2013-04-01 21:34:58 +02:00
Timothy Wall 910642248d add OSX framework search options 2013-03-30 08:11:06 -04:00
Timothy Wall b26402bd57 use ptr-based structure creation 2013-03-30 07:58:14 -04:00
Tobias 6166a169e3 some changes 2013-03-27 17:13:02 +01:00
Timothy Wall bf1579a5dc use distinct maps for direct vs non-direct callbacks (performance) 2013-03-26 21:58:22 -04:00
Tobias 2a51bbfba5 some changes 2013-03-26 17:44:10 +01:00
Timothy Wall d8e8889d92 improve performance saving last error (per thread) 2013-03-26 11:28:27 -04:00
Timothy Wall 6fdb21414d fix #206 2013-03-24 19:44:07 -04:00
Timothy Wall 6178c5c6a0 Merge branch 'master' of github.com:twall/jna 2013-03-24 19:41:25 -04:00
Timothy Wall e7b0c5d05d tweak javadoc dependency for platform target 2013-03-24 18:52:46 -04:00
Timothy Wall 1140b4eed2 fix typo 2013-03-24 14:09:57 -03:00
Timothy Wall 99613775b1 Merge pull request #204 from twall/optimized-struct-init
Avoid superfluous memory allocation when Structure base address provided...
2013-03-24 09:59:59 -07:00
Timothy Wall 13c1a17018 Merge branch 'master' of github.com:twall/jna 2013-03-22 10:39:11 -04:00
Timothy Wall e51a82e19d Fix Carbon library declaration 2013-03-22 10:38:44 -04:00
Timothy Wall 5180a7e092 fix JNI containing classname in performance test 2013-03-22 10:38:08 -04:00
Tobias d56c74724c some changes to typelib parsing 2013-03-22 10:30:27 +01:00
Tobias 27e9f0f005 some changes to typelib parsing 2013-03-20 18:05:31 +01:00
Tobias 832845535a some minor changes 2013-03-20 17:00:01 +01:00
Tobias fcf1f5c283 restored because of lost source code 2013-03-19 17:21:29 +01:00
Tobias 47d1f3cc89 some changes 2013-03-19 14:46:40 +01:00
Tobias 58b89ebc55 some changes 2013-03-19 13:04:35 +01:00
Dan Rollo a2bfccb15b Merge pull request #207 from bhamail/master
remove obsolete comments now that empty Structures are defined as invalid
2013-03-18 20:28:22 -07:00
Dan Rollo 7904663f14 remove obsolete comments now that empty Structures are defined as invalid and test for by StructureTest class. 2013-03-18 23:24:07 -04:00
Tobias bbc1d4b432 some changes regarding typelib 2013-03-18 17:11:20 +01:00
Anthony Green f22ab3c687 Merge branch 'master' of github.com:/atgreen/libffi 2013-03-17 18:37:50 -04:00
Anthony Green 12b1886d7b cygwin fix & updates for 3.0.13 2013-03-17 18:33:59 -04:00
Anthony Green d08124bedf cygwin fix & updates for 3.0.13 2013-03-17 18:32:12 -04:00
Anthony Green cb32c812d0 Fix lib install dir 2013-03-17 09:27:55 -04:00
Timothy Wall 69fbc85665 make conditional read perform auto-read 2013-03-16 10:51:39 -04:00
Timothy Wall 65a246f39b merge from upstream 2013-03-16 10:06:40 -04:00
Timothy Wall 0d9bd6d96b add explicit tests for empty structs and structs with only private fields 2013-03-16 09:56:00 -04:00
Anthony Green efd7866a36 2.0.13rc1 2013-03-16 08:35:57 -04:00
Anthony Green ff647ad4df Merge branch 'master' of github.com:/atgreen/libffi
Conflicts:
	ChangeLog
2013-03-16 08:20:40 -04:00
Anthony Green 4acf0056f5 Build fix for soft-float power targets 2013-03-16 08:18:45 -04:00
Anthony Green 675c983922 Documentation fix 2013-03-16 08:12:38 -04:00
Anthony Green 8a286f570c Fix for m68000 systems 2013-03-16 08:12:19 -04:00
Anthony Green d9dd417b09 Fix for m68000 systems 2013-03-16 08:01:19 -04:00
Anthony Green 215763d012 Update configury. 2013-03-16 07:57:35 -04:00
Anthony Green 9180d8f39c Merge branch 'master' of github.com:/atgreen/libffi 2013-03-16 07:46:55 -04:00
Anthony Green 2fb527a017 Add Meta processor support 2013-03-16 07:46:38 -04:00
Anthony Green 211a9ebf4d Merge pull request #32 from alex/patch-1
Fix for a crasher due to misaligned stack on x86-32.
2013-03-16 07:28:20 -04:00
Anthony Green 7e1b32649e Merge pull request #32 from alex/patch-1
Fix for a crasher due to misaligned stack on x86-32.
2013-03-16 04:24:40 -07:00
Timothy Wall ed58f42176 restore deleted files 2013-03-15 18:42:48 -04:00
Tobias e00752087b some changes 2013-03-15 16:44:07 +01:00
Tobias 626bf14b2d Merge pull request #205 from twall/com-branch
some changes regarding COM and Variant support
2013-03-15 03:48:19 -07:00
Timothy Wall 683e7351f0 fix contrib reference to deprecated method 2013-03-15 06:46:23 -04:00
Tobias 5242a7d826 some changes 2013-03-15 11:36:53 +01:00
Alex Gaynor ee18766b16 Fix for a crasher due to misaligned stack on x86-32.
Full information on reproduction (using Python's ctypes available here: http://bugs.python.org/issue17423)
2013-03-14 15:00:33 -07:00
Timothy Wall f3a384f011 Merge branch 'master' of github.com:twall/jna into optimized-struct-init 2013-03-14 16:35:38 -04:00
Timothy Wall 5267a6ddde add javadoc dependency to platform.jar 2013-03-14 13:56:25 -04:00
Timothy Wall a9f757f39c Merge branch 'master' of github.com:twall/jna into optimized-struct-init 2013-03-14 13:52:41 -04:00
Timothy Wall af1ef9330f fix javadoc errors/warnings 2013-03-14 13:51:58 -04:00
Timothy Wall cf58970bdf remove deprecated methods 2013-03-14 13:39:42 -04:00
Timothy Wall 4595abcebe Merge branch 'master' of github.com:twall/jna 2013-03-14 13:31:37 -04:00
Tobias 4b73c277fa Merge pull request #200 from wolftobias/master
some changes for the Variant date structure
2013-03-14 07:01:23 -07:00
Tobias 9f80a92973 Merge remote-tracking branch 'upstream/master'
Conflicts:
	contrib/platform/src/com/sun/jna/platform/win32/Kernel32.java
	contrib/platform/src/com/sun/jna/platform/win32/OleAuto.java
2013-03-14 14:56:55 +01:00
Dan Rollo b4091b4f45 fix SNAPSHOT publish doc typo 2013-03-08 16:24:08 -05:00
Dan Rollo cb714b9f8b Merge pull request #202 from bhamail/master
Add Publish SNAPSHOT docs
2013-03-08 12:23:09 -08:00
Dan Rollo 0769a8e597 fix typo 2013-03-08 15:21:42 -05:00
Dan Rollo 846cbb3c96 fix typo 2013-03-08 15:20:55 -05:00
Dan Rollo e6d7829ca2 doc format fix 2013-03-08 15:19:23 -05:00
Dan Rollo 404cf22380 doc format fix 2013-03-08 15:17:33 -05:00
Dan Rollo 6c75db5003 add notes on how to publish development SNAPSHOT for pre-release testing. 2013-03-08 15:16:01 -05:00
Tobias 71a8ecfd27 Merge pull request #201 from wolftobias/jnaCOM
Merge the new jnaCOM branch with the master branch to bring the new COM feature to live with the main jna code tree.
2013-03-07 05:25:55 -08:00
Tobias 2582708b2f some fixed and extension for Variant date 2013-03-07 14:14:44 +01:00
Tobias 5587a8fadc fix to VARIANT class 2013-03-07 13:30:09 +01:00
Tobias 22cb28ec50 Update FrequentlyAskedQuestions.md 2013-03-07 13:05:53 +01:00
Timothy Wall c4d9966709 don't check structure memory allocation on direct mappings (yet) 2013-03-03 16:40:31 -05:00
Timothy Wall c69d03a74b more Structure(Pointer) implementations and tests 2013-03-03 10:03:47 -05:00
Timothy Wall 38643d974b update more Structure.newInstance calls 2013-03-02 20:58:38 -05:00
Timothy Wall 00308279df update change log 2013-03-02 14:15:16 -05:00
Timothy Wall 896f4b8b85 used optimized structure+pointer ctor when possible 2013-03-02 12:43:14 -05:00
Timothy Wall ae1bafb39b remove deprecated methods 2013-03-02 12:41:45 -05:00
Daniel Doubrovkine (dB.) 3e2e7ffec7 Merge pull request #197 from headcrashing/WindowMessages
Destroying temporarily created HWND after test
2013-02-24 06:59:08 -08:00
Head Crashing Informatics 46bc91fc63 Destroying temporarily created HWND after test
To demonstrate prevention of resource leaking, this code utilizes the try-finally idiom to destroy tempoarily created HWND even in case of any exceptions or failed assertions.
2013-02-23 18:55:21 +01:00
Daniel Doubrovkine (dB.) fb9e4c6262 Merge pull request #196 from headcrashing/WindowMessages
RegisterWindowMessage
2013-02-23 06:52:02 -08:00
Markus KARG aa043c73e7 Fixed PR number in CHANGES.md 2013-02-23 15:46:43 +01:00
Daniel Doubrovkine (dB.) 68ed3e521e Merge pull request #194 from headcrashing/CLSIDFromProgID
Clsid from prog
2013-02-23 06:37:01 -08:00
Markus KARG b6b3a51d32 Added line to CHANGES.md for this pull request. 2013-02-23 15:31:35 +01:00
Markus KARG 7573196742 Merge branch 'master' of https://github.com/twall/jna into CLSIDFromProgID 2013-02-23 15:27:47 +01:00
Markus KARG b2e16a0ca5 Added info to CHANGES.md about this pull request. 2013-02-23 14:50:20 +01:00
Markus KARG 53809b3c38 Merge branch 'master' of https://github.com/twall/jna into WindowMessages 2013-02-23 14:42:43 +01:00
Daniel Doubrovkine (dB.) 2549728a97 Update CHANGES.md 2013-02-22 14:18:42 -05:00
Daniel Doubrovkine (dB.) 06fde953b1 Merge pull request #192 from headcrashing/master
New Windows Shell API mapping: SHGetSpecialFolderPath
2013-02-22 11:15:40 -08:00
Markus KARG 21b9287cfd Added feature line in CHANGES.md for this pull request. 2013-02-22 19:33:50 +01:00
Markus KARG eeeed87239 Test for CLSIDFromProgID 2013-02-22 17:11:54 +01:00
Markus KARG 97e50d7a35 Mapped RegisterWindowMessage of User32.dll, added User32Util
which wraps registerWindowMessage, createWindow and createWindowEx.
2013-02-22 16:37:58 +01:00
Markus KARG f0195711b5 Mapped GetPrivateProfileString, GetPrivateProfileInt and
WritePrivateProfileString of Kernel32.dll
2013-02-22 15:02:25 +01:00
Markus KARG 68ba4117f6 Mapped SHGetSpecialFolderPath of Shell32.dll 2013-02-21 22:19:39 +01:00
Timothy Wall dbd584d305 skip javah target on skip-native 2013-02-18 12:52:27 -05:00
Anthony Green f308faf1ea Add moxie support. Release 3.0.12. 2013-02-11 14:25:13 -05:00
Anthony Green 4ea22e54e3 Update README 2013-02-10 08:48:38 -05:00
Anthony Green 10e77227b6 mend 2013-02-10 08:47:26 -05:00
Tobias e69d7fa485 some changes 2013-02-09 16:57:35 +01:00
Anthony Green a9521411a5 sparc v8 and testsuite fixes 2013-02-09 06:54:40 -05:00
Anthony Green 70b11b47ee Fix small struct passing on ppc 2013-02-08 16:12:19 -05:00
Anthony Green 63ba1fa79f Remove xfail for arm*-*-*. 2013-02-08 15:18:19 -05:00
Anthony Green 24fbca4c1d Fix typo 2013-02-08 14:19:56 -05:00
Anthony Green b0fa11cb0a More man page cleanup 2013-02-08 14:17:13 -05:00
Anthony Green 8bd15d139a Fix many.c testcase for ppc 2013-02-08 13:56:37 -05:00
Anthony Green 7aab825cf1 Add missing files to dist 2013-02-08 13:26:21 -05:00
Anthony Green cb03ea8f4e sparc v9 fixes for sun tools 2013-02-08 12:25:18 -05:00
Anthony Green 35ee8d44f3 Fix microblaze big-endian struct issue 2013-02-08 07:12:41 -05:00
Anthony Green 9db7e1a958 Fix botched sparc patch. Update version. 2013-02-07 21:06:08 -05:00
Timothy Wall cdb4797fa3 move IUnknownTest to its rightful place (w/rename) 2013-02-07 20:39:24 -05:00
Timothy Wall bd4207dfa4 fix compilation error 2013-02-07 20:32:30 -05:00
Timothy Wall c9493636a9 fix some compilation errors/warnings 2013-02-07 20:29:13 -05:00
Anthony Green ce0138e614 Update bug report address. rc2. 2013-02-07 18:04:01 -05:00
Anthony Green fd07c9e404 Add cache flushing routine for sun compiler on sparc solaris 2.8 2013-02-07 18:00:36 -05:00
Anthony Green ed6ae9501b Add libtool-ldflags. Define toolexeclibdir for non-GCC builds. 2013-02-07 16:43:36 -05:00
Anthony Green ffef2e046a x32 and libtool fixes 2013-02-07 15:47:01 -05:00
Anthony Green 95eecebb28 Remove a.out cruft from dist 2013-02-07 15:32:46 -05:00
Anthony Green 176aa9d2e2 Fix GCC usage test and update README 2013-02-07 15:29:22 -05:00
Anthony Green f3a4f3fdde Fixes for AIX xlc compiler. 2013-02-07 09:57:20 -05:00
Tobias e6d76b9bc8 some util changes 2013-02-07 14:00:58 +01:00
Timothy Wall 49868b8203 use SIZE_T size for size_t 2013-02-07 07:00:00 -05:00
Anthony Green 522f8fef49 Fix man page. Clean out junk. 2013-02-06 20:31:31 -05:00
Anthony Green c4dfa259eb Bump soversion 2013-02-06 17:43:24 -05:00
Anthony Green f62bd63fe6 Release candidate 1 2013-02-06 17:38:32 -05:00
Anthony Green f7cd61e9e6 Fix pkgconfig install bits 2013-02-06 17:38:04 -05:00
Anthony Green 6a79012942 Work around LLVM ABI problem on x86-64 2013-02-06 17:37:15 -05:00
Tobias 528e1bcbe9 some changes 2013-02-06 18:03:09 +01:00
Timothy Wall f0fd47dbdb Merge pull request #185 from wolftobias/master
New implementation to support COM
2013-02-05 18:01:25 -08:00
Timothy Wall e1c2632941 Merge pull request #190 from wolftobias/patch-2
Update www/PlatformLibrary.md
2013-02-05 18:00:57 -08:00
Tobias Wolf ef19ab440b some changes 2013-02-05 22:28:25 +01:00
Tobias 75bb17e11f Update www/PlatformLibrary.md 2013-02-05 11:31:50 +01:00
Tobias 2c2f4bee15 typlib utils 2013-02-05 10:16:39 +01:00
Tobias Wolf 58696f0c2c some changes 2013-02-04 07:05:05 +01:00
Tobias 4130e11693 some changes 2013-02-01 15:28:37 +01:00
Tobias 19de232dd2 some changes 2013-01-31 17:20:37 +01:00
Tobias afb3fb6ab1 some changes 2013-01-30 17:50:36 +01:00
Tobias Wolf 4dda1bcdd1 some changes for typelib parsing 2013-01-29 19:52:40 +01:00
Tobias Wolf c665f2ccb9 some changes 2013-01-27 20:02:17 +01:00
Anthony Green 370112938e Merge pull request #28 from jralls/master
Reorder x86_64 checks
2013-01-27 05:09:04 -08:00
John Ralls bcc0c28001 Reorder x86_64 tests
So that darwin and cygwin/mingw are tested before the generic check --
which allows them to actually be set.
2013-01-26 15:26:01 -08:00
Timothy Wall 1f01a50e09 update javadoc 2013-01-26 07:57:06 -05:00
Timothy Wall 9cc0ce3148 fix string field write issue where native-derived struct is assigned to an inner structure field 2013-01-26 07:32:39 -05:00
Timothy Wall bd0425966f javadoc fixes 2013-01-26 07:31:23 -05:00
Dan Rollo 7089c83878 Merge pull request #188 from bhamail/test-getFieldOrder
Test get field order
2013-01-25 08:03:52 -08:00
Dan Rollo 9511c34c54 update changes 2013-01-25 11:02:09 -05:00
Dan Rollo c6e9d44c7d remove unused reference to peer. 2013-01-25 11:01:57 -05:00
Dan Rollo 3d051ecbb5 Merge pull request #187 from bhamail/test-getFieldOrder
Test runs under linux and Structure fixes all pass, so I will commit this. build.xml changes still need cleanup. Please holler with any other suggestions.
2013-01-24 21:58:39 -08:00
Dan Rollo f0ae20f0b6 kluges to get at least the Structure test to run under linux. This needs cleanup. 2013-01-25 00:39:46 -05:00
Dan Rollo 2c83e4c22b fix getFieldOrder() to return correct field names for X11 structures. 2013-01-25 00:38:23 -05:00
Dan Rollo 07eaffd28f comment out manual test method. 2013-01-24 23:21:06 -05:00
Dan Rollo 8c1f995e4e changes to allow StructureFieldOrderTest to run on linux. Still needs fixes to platform build.xml to allow this to run under linux AND fixes are needed for X11 Structure.getFieldOrder() methods. 2013-01-24 23:16:15 -05:00
Dan Rollo f721075ac3 Merge pull request #186 from bhamail/master
fix platform project compile on linux
2013-01-24 19:54:55 -08:00
Dan Rollo da711cc76b allow platform project to compile on non-windows jvm. 2013-01-24 22:48:49 -05:00
Dan Rollo d9fb94a13d Merge pull request #183 from bhamail/test-getFieldOrder
Test Structure.getFieldOrder()

All Structure warnings are solved, so I'm going to commit this.

BTW, I saw something odd ("has unknown size" error) when instantiating an empty Structure (one with no instance fields). Please see the @todo comments in com.sun.jna.StructureFieldOrderInspectorTest.java. Restore the test: testCheckMethodGetFieldOrderStaticFieldOnlyStatic() to reproduce the behavior.
2013-01-24 18:51:37 -08:00
Dan Rollo 9da1b4528d re-do skip windows tests that will fail if current user is non-admin 2013-01-24 21:12:13 -05:00
Dan Rollo 768ea368a6 re-update changes doc 2013-01-24 20:52:46 -05:00
Dan Rollo 6ff34c29db Revert "update changes doc"
This reverts commit 6d608dd49b.
2013-01-24 20:39:56 -05:00
Dan Rollo acdfd6ea20 Revert "skip test that will fail if user it non-admin"
This reverts commit f10c45b1f8.
2013-01-24 20:38:22 -05:00
Dan Rollo b9bf45ecce Revert "skip test that will fail if current user is non-admin"
This reverts commit be0e5b51cd.
2013-01-24 20:37:54 -05:00
Dan Rollo b5df2c589a Revert "skip test that will fail if user is non-admin"
This reverts commit f8d521999c.
2013-01-24 20:37:32 -05:00
Dan Rollo dff973e9ee Revert "Resolve merge conflicts."
This reverts commit 4a0644f3cd, reversing
changes made to f8d521999c.
2013-01-24 20:36:20 -05:00
Dan Rollo 4a0644f3cd Resolve merge conflicts. 2013-01-24 17:51:09 -05:00
Dan Rollo f8d521999c skip test that will fail if user is non-admin 2013-01-24 17:27:16 -05:00
Dan Rollo be0e5b51cd skip test that will fail if current user is non-admin 2013-01-24 17:20:27 -05:00
Dan Rollo f10c45b1f8 skip test that will fail if user it non-admin 2013-01-24 17:05:44 -05:00
Dan Rollo 6d608dd49b update changes doc 2013-01-24 16:55:37 -05:00
Dan Rollo 70658a0279 add commented example of test for individual Structure class. 2013-01-24 16:33:10 -05:00
Dan Rollo f3ceebecfd fix getFieldOrder() to return correct field name: grpi3_group_sid instead of grpi3_group_id. 2013-01-24 16:26:30 -05:00
Dan Rollo 251eae5cac include super classes when looking for fields and getFieldOrder() method. 2013-01-24 16:15:41 -05:00
Dan Rollo 07b88af439 ignore ctor errors in stuctures manually validated by wolftobias. 2013-01-24 15:46:53 -05:00
Dan Rollo 959616e992 patch from twall: addresses the missing default constructor warnings. 2013-01-24 15:25:05 -05:00
Dan Rollo f7b2f910b7 ignore static fields as per twall notes. 2013-01-24 15:10:00 -05:00
Dan Rollo 4220566fb4 support compiling platform project with 64bit jvm. 2013-01-24 14:05:46 -05:00
Dan Rollo 415179f9b7 fix compiler warning from invalid chars in javadoc, like: User32.java:1511: warning: unmappable character for encoding UTF8 2013-01-24 13:56:11 -05:00
Tobias Wolf 9a9f8cbd99 added some Excel example 2013-01-24 15:17:23 +01:00
Tobias Wolf 319f6e9047 some cosmetic changes 2013-01-24 13:47:55 +01:00
Tobias Wolf 9b7d02618e some changes to the Word implementation 2013-01-24 13:05:09 +01:00
Dan Rollo ed2f4d3b05 add unit test to platform project to scan for Structure.getFieldOrder() problems. 2013-01-24 02:34:21 -05:00
Dan Rollo fef81ce17f change ignore constructor error list to be list of classname prefixes. allows for ignoring all inner classes of a given class. 2013-01-24 02:22:54 -05:00
Dan Rollo 1942640b2d add batch version of check method 2013-01-24 02:07:44 -05:00
Dan Rollo d8232c9122 allow user supplied list of classes for which to ignore constructor errors. 2013-01-24 01:45:58 -05:00
Dan Rollo 1a8b3b55d8 handle inaccessible getFieldOrder() method. 2013-01-24 01:32:55 -05:00
Dan Rollo 156d2015a5 try adding reflections test libs via file name pattern. 2013-01-24 01:09:43 -05:00
Dan Rollo 8cbbb1eec8 try adding reflections test lib file name pattern. 2013-01-24 01:06:31 -05:00
Dan Rollo 351d68faf6 try adding reflections test libs via *.jar pattern. 2013-01-24 01:04:56 -05:00
Dan Rollo 6d0651acbc add jna test classes to test classpath so we can use StructureFieldOrder scanner. 2013-01-24 00:56:02 -05:00
Dan Rollo 7bd83c65f9 remove stale imports 2013-01-24 00:49:15 -05:00
Dan Rollo dfe8862e0f add jna test classes to test classpath so we can use StructureFieldOrder scanner. 2013-01-24 00:44:21 -05:00
Dan Rollo e89e70c9a6 add helper method 2013-01-24 00:32:24 -05:00
Dan Rollo 8f06411357 remove unneeded cast 2013-01-24 00:04:16 -05:00
Dan Rollo 011a2eaed7 testToScanForGetFieldOrderIssues 2013-01-24 00:02:39 -05:00
Dan Rollo f29b2f5c51 Add test utility to scan for Structure.getFieldOrder() issues. 2013-01-23 23:17:33 -05:00
twall 1a9d2daef3 Update CHANGES.md 2013-01-23 11:40:33 -05:00
twall 662f961d91 Announce DLL-based callbacks
Somehow forgot to include this when 3.5 went out.
2013-01-23 11:40:00 -05:00
twall 7e06d1ab81 Update CHANGES.md 2013-01-23 11:32:13 -05:00
Tobias Wolf 6a22e39d4c some new changes 2013-01-21 17:08:15 +01:00
Daniel Doubrovkine ff27aaffe3 Merged from xwizard/jna. 2013-01-21 08:22:55 -05:00
twall 601f1026eb Add line for linux-amd64 rebuild 2013-01-21 08:17:33 -05:00
Anthony Green bada2e326d Update README 2013-01-21 08:02:07 -05:00
Anthony Green 655bb8f369 Merge branch 'master' of github.com:/atgreen/libffi 2013-01-21 08:01:24 -05:00
Anthony Green 1035ffb2f4 Update README 2013-01-21 08:01:13 -05:00
Anthony Green 840f975866 Merge branch 'master' of github.com:/atgreen/libffi 2013-01-21 07:55:53 -05:00
Anthony Green aeb8719a34 New microblaze support 2013-01-21 07:55:37 -05:00
Anthony Green 40860245a4 New microblaze support 2013-01-21 07:37:30 -05:00
Anthony Green 20cae32b15 Xtensa support 2013-01-21 07:07:38 -05:00
Anthony Green 9742f91782 Mention IBM XL compiler support on AIX. 2013-01-21 07:03:41 -05:00
xwizard bdf59518fb Update CHANGES.md 2013-01-21 11:09:31 +01:00
Daniel Doubrovkine (dB.) 3f7e52a4d9 Merge pull request #178 from davidmc24/platform-userinfo10
platform: add mapping of USER_INFO_10 structure to LMAccess
2013-01-20 14:29:41 -08:00
David M. Carr 8da7dc2e56 changes: add entry for addition of USER_INFO_10 2013-01-20 15:00:26 -05:00
xwizard b1cda9cd72 Fixes "XDestroyWindowEvent does not provide enough names" error 2013-01-20 20:48:20 +01:00
David M. Carr 811d025b88 platform tests: add coverage for Netapi32.NetUserEnum with user level 10 2013-01-19 22:27:09 -05:00
David M. Carr c7e96bd3c0 platform: add mapping of USER_INFO_10 structure to LMAccess 2013-01-19 22:20:45 -05:00
Timothy Wall bc67864e57 compile linux-amd64 against glibc 2.3.6, with GLIBC_2.2.5 as newest symbol 2013-01-19 13:10:48 -05:00
twall 96a4450d70 Update www/FrequentlyAskedQuestions.md 2013-01-18 19:16:32 -05:00
twall 8591ebd55f Update www/FrequentlyAskedQuestions.md 2013-01-18 15:33:04 -05:00
Tobias 16b6d591d5 some changes regarding right structure size 2013-01-18 15:05:51 +01:00
Tobias 5e3e485d4d some changes 2013-01-18 11:04:17 +01:00
Tobias Wolf f7bd979d1b some changes 2013-01-17 18:02:52 +01:00
Tobias 176b44fd65 some changes 2013-01-17 16:34:32 +01:00
Tobias Wolf 548714343a some changes 2013-01-15 20:26:04 +01:00
twall 8ce6297b97 Merge pull request #175 from bnbeckwith/patch-1
Update contrib/platform/src/com/sun/jna/platform/unix/X11.java
2013-01-15 04:33:43 -08:00
Tobias 52897e2693 some changes 2013-01-15 13:20:58 +01:00
Tobias Wolf d5582d6181 fix for Variant structure
- the vt variable was from type Integer, correct is type USHORT
2013-01-14 20:16:49 +01:00
Tobias Wolf d9868285a0 some changes 2013-01-14 19:54:47 +01:00
Tobias Wolf 429bed5aba datatypes overworked 2 2013-01-14 17:49:58 +01:00
Tobias Wolf 3442e07023 datatypes over-worked 2013-01-14 17:43:07 +01:00
Benjamin Beckwith fef7e3786e Update contrib/platform/src/com/sun/jna/platform/unix/X11.java
Added "event" to the list of fields for XDestroyWindowEvent's getFieldOrder() method.
2013-01-14 11:22:04 -05:00
Tobias Wolf e77f69908a changed brecord struct 2013-01-14 14:22:46 +01:00
Tobias c2be88fd9c some changes 2013-01-14 12:32:26 +01:00
Tobias 85f8c409de some changes in Variant 2013-01-14 11:18:25 +01:00
Anthony Green f03eab0824 Remove obsolete inline test functions 2013-01-11 17:14:11 -05:00
Anthony Green 05fbe1faed xlc compiler support 2013-01-11 16:54:40 -05:00
Anthony Green 0b4986a788 [travis] install dejagnu with sudo 2013-01-11 11:19:52 -05:00
Anthony Green 3c337eef51 [travis] install dejagnu 2013-01-11 11:18:14 -05:00
Anthony Green 90720962ce Add first travis config file 2013-01-11 10:57:30 -05:00
Tobias ad442d822d some changes 2013-01-11 16:28:49 +01:00
Anthony Green bff052d9cd 32-bit x86 fix and more 2013-01-11 10:24:32 -05:00
Tobias bbfc36e8c6 some changes 2013-01-11 16:19:07 +01:00
Tobias 136dbaa257 some changes to Variant 2013-01-11 14:05:13 +01:00
Anthony Green cd41aeab61 Add compiler column to table 2013-01-10 17:25:45 -05:00
Anthony Green 8bf987d4df Fix for sunpro compiler on Solaris 2013-01-10 17:24:51 -05:00
Anthony Green 3ee74fd6dc Update documentation version. 2013-01-10 17:15:03 -05:00
Anthony Green 13e2d7b925 Handle both 32 and 64-bit x86 builds regardless of target triple 2013-01-10 10:52:02 -05:00
Tobias b6215a24b5 some changes in the Variant structure 2013-01-10 14:34:44 +01:00
Anthony Green 5141543000 Don't run EH tests with non-GNU compiler 2013-01-10 07:35:53 -05:00
Anthony Green 56ba8d86f4 Don't use warning checking macro with sun compiler 2013-01-10 07:25:10 -05:00
Anthony Green 6a028caec1 Don't use GCCisms to define types when
+       building with the SUNPRO compiler.
2013-01-10 01:19:43 -05:00
Anthony Green 2d9b393975 Fix for closures with sunpro compiler 2013-01-09 21:14:54 -05:00
Tobias Wolf c62b73bdf5 some changes 2013-01-09 14:48:10 +01:00
Anthony Green 8308984e47 Make sure we're running dejagnu tests with the right compiler. 2013-01-08 15:14:21 -05:00
Anthony Green f26c7ca671 Make compiler options in dejagnu runs compiler specific 2013-01-08 14:47:05 -05:00
Anthony Green 74c776e219 Switch x86 Solaris to X86 from X86_64 2013-01-08 12:25:54 -05:00
Anthony Green 8962c8c8d0 Fix read-only eh_frame test 2013-01-08 12:22:24 -05:00
Anthony Green 35ddb69c2b Only emit DWARF unwind info when building with GCC 2013-01-08 07:53:37 -05:00
Anthony Green f7879bc3f3 Testsuite fix for Solaris vendor compiler 2013-01-08 07:30:28 -05:00
Anthony Green 67cea90fc0 mend 2013-01-07 06:30:24 -05:00
Thorsten Glaser 0de3277b18 Testsuite fixes (was Re: [PATCH] Fix libffi on m68k-linux-gnu, completely)
Dixi quod…

>although I believe some 3.0.11 checks to be broken:

And indeed, with a few minor changes on top of git master,
I still get a full run of PASS plus one XPASS on amd64-linux!

With the other patches (from this message’s parent) and
these applied, I get a full PASS on m68k-linux as well.

So, please git am these three diffs ☺

bye,
//mirabilos
--
FWIW, I'm quite impressed with mksh interactively. I thought it was much
*much* more bare bones. But it turns out it beats the living hell out of
ksh93 in that respect. I'd even consider it for my daily use if I hadn't
wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh
From 5cb15a3bad1f0fb360520dd48bfc938c821cdcca Mon Sep 17 00:00:00 2001
From: Thorsten Glaser <tg@mirbsd.org>
Date: Sun, 2 Dec 2012 23:20:56 +0000
Subject: [PATCH 1/2] Fix tests writing to a closure retval via pointer casts

As explained in <Pine.BSM.4.64L.1212022014490.23442@herc.mirbsd.org>
all other tests that do the same cast to an ffi_arg pointer instead.

PASS on amd64-linux (Xen domU) and m68k-linux (ARAnyM)

Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
2013-01-07 06:22:51 -05:00
Anthony Green 8f4772f383 m68k fixes for signed 8 and 16-bit calls. 2013-01-07 06:14:53 -05:00
Anthony Green ea7f8440d5 remove gcc-ism 2013-01-04 09:09:32 -05:00
Tobias Wolf 2832feaa8e Additional changes to the com implementation 2013-01-03 19:37:31 +01:00
Anthony Green f06c0f1037 Add missing ChangeLog entry and generated files. 2013-01-02 09:39:17 -05:00
Anthony Green 1f8675d4c1 Merge pull request #26 from rofl0r/master
fix build error on ppc when long double == double
2013-01-02 06:34:38 -08:00
Anthony Green 335f419a86 Merge pull request #23 from rurban/master
cygwin/mingw shared libs need libtool LDFLAGS = -no-undefined
2013-01-02 06:30:03 -08:00
Anthony Green 53236d5061 Regenerate files 2013-01-02 09:24:55 -05:00
Anthony Green 72222ca3fb Update texinfo.tex 2013-01-02 09:06:38 -05:00
Anthony Green 1e326c9543 Update config.guess and config.sub 2013-01-02 09:05:02 -05:00
Anthony Green cb6671f5b8 Missing .gitignore changes for xcode support 2013-01-02 08:56:07 -05:00
Anthony Green ebbe779668 missed x32 libtool patch. 2013-01-02 08:54:05 -05:00
Anthony Green 4394096da0 missed trampoline_table patch. Move to GCC. 2013-01-02 08:51:35 -05:00
Anthony Green ed7a59c3ff Windows symbol export fix. Move to GCC. 2013-01-02 08:48:01 -05:00
Anthony Green ccee09a4ff +2012-03-21 Peter Rosin <peda@lysator.liu.se>
+
+       * testsuite/lib/target-libpath.exp [*-*-cygwin*, *-*-mingw*]
+       (set_ld_library_path_env_vars): Add the library search dir to PATH
+       (and save PATH for later).
+       (restore_ld_library_path_env_vars): Restore PATH.
2013-01-02 08:41:55 -05:00
Anthony Green 089dbce7cc med 2013-01-02 08:37:35 -05:00
Anthony Green 980a334c42 Test GCC update 2013-01-02 08:34:01 -05:00
Anthony Green 8bad679ade New stand-alone patch 2013-01-02 08:28:35 -05:00
Anthony Green 981c32ee11 Merge with GCC. Eliminate quilt bits. 2013-01-02 07:34:03 -05:00
Tobias Wolf f90fd1288b added MS COM support and MS Office samples 2013-01-01 14:14:56 +01:00
Tobias Wolf 2e27312ea0 Variant structure added 2013-01-01 14:14:55 +01:00
unknown f2b6eb5e7a Updated CHANGES. 2012-12-11 20:35:01 -05:00
Daniel Doubrovkine 24439832da Merge branch 'master' of https://github.com/wolftobias/jna into wolftobias 2012-12-11 20:09:02 -05:00
Daniel Doubrovkine (dB.) 89c1f7fa4c Removed extra dot. 2012-12-10 16:02:20 -05:00
Tobias Wolf b78eef7789 add unit test to guid structure 2012-12-10 15:20:38 +01:00
Tobias Wolf aaa7fd0123 fixed some changes asked by the jna team 2012-12-09 19:30:44 +01:00
Tobias Wolf 8b17879219 Fixed some problems with the guid structure
- Now the java guid structure can be used directly as alternative to
'Ole32Util.getGUIDFromString()'.
- The listening for usb devices is now working also with filter usage
2012-12-08 10:51:48 +01:00
Tobias Wolf 6ab495c8eb extension for listening to windows devices (usb) 2012-12-07 16:41:05 +01:00
twall 03be32b103 Add Native.register() call. 2012-12-05 09:34:36 -05:00
Tobias Wolf 4218a07549 code extension for creating and registering win32 windows
Create new code for registering new window classes and creating window
example. Listening for win32 window events. Listening for logoff/logon
events. Created also new api for 'Wtsapi32.dll'.
2012-12-01 17:46:10 +01:00
Anthony Green 61a0549295 Refresh config.guess and config.sub 2012-11-28 06:07:41 -05:00
rofl0r f6b58d2bdc fix build on ppc when long double == double 2012-11-22 16:26:21 +01:00
Dan Rollo 17a26e7dbc Merge pull request #160 from bhamail/master
re-fix broken download links (to maven central for now). See Issue #158
2012-11-21 18:33:22 -08:00
Dan Rollo 580dd76041 re-fix broken download links (reported by hanneshorn). For now pointing to maven central copies. Not sure why github blob links work, then don't. 2012-11-21 21:30:13 -05:00
Dan Rollo 74ae45c476 re-fix broken download links (reported by hanneshorn). For now pointing to maven central copies. Not sure why github blob links work, then don't. 2012-11-21 21:26:35 -05:00
Dan Rollo d6d99a9b6b re-fix broken download links (reported by hanneshorn). For now pointing to maven central copies. Not sure why github blob links work, then don't. 2012-11-21 21:25:02 -05:00
Dan Rollo 3854e50e64 Merge pull request #159 from bhamail/master
fix dead download links.
2012-11-21 18:15:57 -08:00
Dan Rollo a8966e8dcf fix broken download links (reported by hanneshorn). 2012-11-21 21:13:15 -05:00
Anthony Green 69da33a076 Pull in config.sub for aarch64 support and more 2012-11-12 15:25:47 -05:00
twall 98c7993a41 Bump UnsatisfiedLinkError help 2012-11-09 09:32:48 -05:00
twall 662763fdcc Indicate getFieldOrder() usage 2012-11-09 09:31:13 -05:00
twall 47211510b0 Use getFieldOrder() 2012-11-09 09:29:32 -05:00
Dan Rollo 997ff2e7ed Merge pull request #157 from bhamail/master
add release step info to exclude committing platform specific jar.
2012-11-08 09:07:45 -08:00
Dan Rollo 32d19f0a61 add release step info to exclude committing platform specific jar. 2012-11-08 12:04:41 -05:00
Dan Rollo a5ce77f5c4 add release step info to exclude committing platform specific jar. 2012-11-08 12:01:30 -05:00
Dan Rollo 464e03172f add release step info to exclude committing platform specific jar. 2012-11-08 11:55:51 -05:00
Dan Rollo d9ad71341c Merge pull request #156 from bhamail/fix-snapshot-deploy
Fix snapshot deploy
2012-11-07 13:51:22 -08:00
Dan Rollo 4eedc67bf0 make regex global to replace both 'version' tag values (artifact version and jna dependency version) in pom-platform.xml. 2012-11-07 16:47:25 -05:00
Dan Rollo c96712eadc fix deploy snapshot target to include sources and javadoc. 2012-11-07 16:45:30 -05:00
Anthony Green f680b598b7 Add missing aarch64 configury bits 2012-11-06 16:00:40 -05:00
Timothy Wall 3b2fd06dc0 compile against GNU C Library 2.3.6 2012-10-31 20:50:38 -04:00
Anthony Green dfadfb1985 Rebase for ppc64 fix 2012-10-31 06:46:41 -04:00
Anthony Green e944b8c7eb Add PaX work-around 2012-10-30 14:06:40 -04:00
Anthony Green 9ccd51be1f Fix commit conflicts 2012-10-30 13:37:37 -04:00
Anthony Green f342996cb5 Darwin12 fix 2012-10-30 07:42:27 -04:00
Anthony Green 58e8b66f70 AArch64 port 2012-10-30 07:36:49 -04:00
Anthony Green fa5d747905 AArch64 port 2012-10-30 07:07:19 -04:00
Anthony Green 6993a6686f Fix autoconf macros 2012-10-30 06:59:32 -04:00
Dan Rollo 296b97d58a Merge pull request #153 from bhamail/master
Prep for next development iteration.
2012-10-27 18:44:07 -07:00
Dan Rollo 363db04779 Increment version for next development iteration. 2012-10-27 21:20:03 -04:00
Dan Rollo 13f2419f33 For some reason, depenency version on jna didn't get updated in pom-platform.xml, so update now 2012-10-27 20:57:32 -04:00
Dan Rollo ec9868b85b Merge pull request #152 from bhamail/master
Release 3.5.1 - dist jars, etc.
2012-10-27 17:40:39 -07:00
Dan Rollo a31faf3026 Release 3.5.1 - commit 'ant clean dist' generated files. 2012-10-27 20:35:00 -04:00
Dan Rollo e1fda6694b Release 3.5.1 - add notes about 'ant clean dist' additional files to commit. 2012-10-27 20:33:04 -04:00
Dan Rollo 2fb117023b Release 3.5.1 - add note about 'ant clean dist'. 2012-10-27 15:28:19 -04:00
Dan Rollo d2a70dac78 Release 3.5.1 - add note about manual delete of platform.jar 2012-10-27 14:54:00 -04:00
Dan Rollo 18218163fd Release 3.5.1 - Update README.md links 2012-10-27 14:45:49 -04:00
Dan Rollo fccab0ac15 Release 3.5.1 - set release versions, update notes 2012-10-27 14:40:39 -04:00
Daniel Doubrovkine 02a01db39a Made 3.5.0 links go to Maven. 2012-10-27 08:24:40 -04:00
Dan Rollo bd950aa654 Merge pull request #149 from bhamail/master
update release docs
2012-10-24 20:59:50 -07:00
Dan Rollo 32758ee8e2 add note to send release notice. 2012-10-24 23:57:35 -04:00
Dan Rollo 0c79114d30 typo 2012-10-24 23:57:18 -04:00
Dan Rollo 43b426410d update release docs to include incrementing version for next development iteration. 2012-10-24 23:52:08 -04:00
Dan Rollo 26de4b0dd0 update release notes to include incrementing version for next development iteration. 2012-10-24 23:51:09 -04:00
Dan Rollo 58243488fc Merge pull request #148 from bhamail/master
revert publish sources SNAPSHOT jar. Only do jars for now.
2012-10-24 20:01:40 -07:00
Dan Rollo 489b5ddde1 Merge remote branch 'upstream/master' 2012-10-24 22:59:51 -04:00
Dan Rollo 0d0d36d599 revert: deploy sources and javadoc SNAPSHOT jars. Only do jar for now. 2012-10-24 22:58:57 -04:00
Dan Rollo 2d454fb7dc Merge pull request #147 from bhamail/master
also deploy sources and javadoc SNAPSHOT jars.
2012-10-24 18:58:49 -07:00
Dan Rollo 5097ed533f update 'deploy snapshot' target to also deploy sources and javadoc SNAPSHOT jars. 2012-10-24 21:56:59 -04:00
Dan Rollo 160dee7d84 Merge pull request #146 from bhamail/master
increment to next development version (if "-SNAPSHOT" suffix causes problems, I will remove it).
2012-10-24 17:40:43 -07:00
Dan Rollo 7395736b9f increment jna.version to next development version (3.5.1-SNAPSHOT). 2012-10-24 20:10:59 -04:00
Daniel Doubrovkine (dB.) b64c489135 Update CHANGES.md 2012-10-24 19:11:14 -03:00
Daniel Doubrovkine (dB.) fffc3f0f7c Merge pull request #145 from aikidojohn/master
Fixing Netapi32Util.getDomainTrusts() includes "empty" domain object
2012-10-24 15:10:00 -07:00
John Hite 5dd4e0c846 Updating CHANGES.md 2012-10-24 17:20:44 -04:00
John Hite e32ae1cae6 Fixing the DOMAIN_CONTROLLER_INFO structure. It was missing a field declaration. This should fix the getDC method and unit test 2012-10-24 17:09:32 -04:00
John Hite 8771dce348 Fixing null values in first domain trust array entry 2012-10-24 16:15:50 -04:00
Daniel Doubrovkine (dB.) 3ac6f75611 Update www/Contributing.md 2012-10-20 17:33:17 -03:00
Dan Rollo f88d243071 Merge pull request #143 from bhamail/master
Release 3.5.0 - dist jars and doc links
2012-10-18 18:53:11 -07:00
Dan Rollo feb7b88279 Release 3.5.0 - Update README.md, commit and push. 2012-10-18 21:33:40 -04:00
Dan Rollo 070b47e825 Release 3.5.0 - Run ant dist target. Commit and push generated jar files in dist. Includes new jna-min.jar. 2012-10-18 21:25:14 -04:00
Dan Rollo c1289c07be Merge pull request #141 from bhamail/master
typo
2012-10-15 09:12:47 -07:00
Dan Rollo e68fd9dfaf doc typo 2012-10-15 12:00:35 -04:00
twall f23a4bf9d5 Merge pull request #139 from trespasserw/patch-1
Diagnostic for temp jnidispatch file creation
2012-10-13 06:05:36 -07:00
Anthony Green 70084e70dd Update Tile* port info 2012-10-12 23:55:06 -04:00
Anthony Green 9c00a3f674 TILE-Gx/TILEPro support 2012-10-12 16:46:06 -04:00
Anthony Green 048d2f41c3 Rebase 2012-10-11 10:55:25 -04:00
Roman Shevchenko b769daec0c Diagnostic for temp jnidispatch file creation
Nesting underlying exception will provide more insight
on what may caused an error.
2012-10-11 14:38:59 +03:00
Daniel Doubrovkine (dB.) 4e36f71f3a Merge pull request #137 from danwi/registry_get_empty_values
Add issue #135 to CHANGES.md
2012-10-08 08:32:02 -07:00
Daniel Wiklund 25db8ccfa7 Add issue #135 to CHANGES.md 2012-10-08 16:56:44 +02:00
Daniel Doubrovkine (dB.) 5c2923c0af Merge pull request #136 from danwi/registry_get_empty_values
Add fix for issue #135 in Advapi32Util (reading empty values)
2012-10-08 07:33:25 -07:00
Daniel Wiklund 018ad7f2c0 Add fix for issue #135 in Advapi32Util (reading empty values)
With this fix it is possible to read values from registry of the following
types even when the size of the value is 0:

REG_SZ
REG_EXPAND_SZ
REG_MULTI_SZ
REG_NONE
REG_BINARY (fixed by earlier committer)

Advapi32UtilTest updated with unit test triggering the bug.
2012-10-08 16:16:30 +02:00
Timothy Wall c1a7fd7267 Merge branch 'master' of github.com:twall/jna 2012-10-06 11:49:59 -04:00
Timothy Wall 3c086de42c add 'min' jar to dist 2012-10-06 11:49:09 -04:00
Timothy Wall b48390fc1e note platforms where test fails 2012-10-06 10:30:50 -04:00
Timothy Wall 136fe02333 Merge branch 'master' of github.com:twall/jna 2012-10-06 09:01:54 -04:00
Timothy Wall 5f9d100b2d attach native thread as daemon to avoid tests hanging on exit 2012-10-06 09:01:30 -04:00
twall 176f3f32d4 Update www/FrequentlyAskedQuestions.md 2012-10-06 09:47:27 -03:00
twall 2667202a3f Move native long != Java long to top of list 2012-10-06 09:46:50 -03:00
Timothy Wall 245eb88b40 fix #128, use 16-bit mask for upper/lower parts of DWORD 2012-10-06 00:49:17 -04:00
Timothy Wall d51479c357 update changes, fixes #113, fixes #114 2012-10-06 00:44:07 -04:00
Timothy Wall 7a583b1aaa apply PR #114, support for gnu/kfreebsd 2012-10-06 00:38:56 -04:00
Timothy Wall eaff9bd176 fixes #129 2012-10-05 06:58:14 -04:00
Timothy Wall da4d941906 add dlopen mods to changelog 2012-10-05 05:48:30 -04:00
Dan Rollo ed94e60da3 Merge pull request #132 from bhamail/maven-cleanup
note maven changes
2012-10-04 19:24:38 -07:00
Dan Rollo 2fe6c956b4 note maven changes 2012-10-04 22:22:45 -04:00
Timothy Wall 559c7d7f13 add library open options 2012-10-04 21:58:28 -04:00
Timothy Wall 6b7f2eeadb catch all AWT loading errors 2012-10-02 07:26:58 -04:00
Dan Rollo 7bda1b3d0e Merge pull request #131 from bhamail/maven-cleanup
Maven cleanup
2012-10-01 17:10:45 -07:00
Dan Rollo d516b01c75 Add note about settings.xml location. 2012-10-01 20:07:45 -04:00
Dan Rollo 08c579f0cb Add note about settings.xml location. 2012-10-01 20:06:33 -04:00
Timothy Wall c231069066 fix typos 2012-09-29 11:26:17 -04:00
Timothy Wall ec16947808 update w32ce-arm build, native 2012-09-29 09:13:39 -04:00
Dan Rollo 2d61573175 Merge pull request #126 from bhamail/maven-cleanup
Maven cleanup
2012-09-27 15:06:49 -07:00
Dan Rollo 507c065c0e fix typo 2012-09-27 17:47:18 -04:00
Dan Rollo cf6b6299e0 Keep pom-platform.xml version tag in since automatically (same as pom.xml version tag). Update release docs to match. Add a note that 'deploy' target only works for SNAPSHOT. 2012-09-27 17:45:31 -04:00
Dan Rollo 862a746170 Update maven release step links. 2012-09-27 15:02:00 -04:00
Dan Rollo 14717ce21f Update maven release steps. 2012-09-27 14:59:06 -04:00
Dan Rollo 72aade4f8f fix typo 2012-09-27 14:52:35 -04:00
Dan Rollo fbf75539f9 fix typo 2012-09-27 14:51:45 -04:00
Dan Rollo 879402d020 md format cleanup 2012-09-27 14:49:15 -04:00
Dan Rollo 7296f2213d Add step in release process to update the pom <version> values to match the version (jna.version) in build.xml. 2012-09-27 14:44:25 -04:00
Dan Rollo fb243c6cf5 Add reference to java.net maven repo docs. 2012-09-27 13:50:47 -04:00
Dan Rollo 20d1a720ce Add slash to urls, to match doc's examples. 2012-09-27 13:50:22 -04:00
Dan Rollo ea12e0755b settings.xml example 2012-09-26 22:37:48 -04:00
Dan Rollo 83cc22a24c settings.xml example 2012-09-26 22:36:44 -04:00
Dan Rollo c795c80439 Go back to using java.net maven repo. Add settings.xml example. 2012-09-26 22:31:36 -04:00
Dan Rollo edab625da6 Change deploy snapshot target to include platform jar. 2012-09-26 11:33:36 -04:00
Dan Rollo 9f9240391b Add failonerror=true to mvn calls so ant build will fail if mvn goal fails. 2012-09-25 21:11:10 -04:00
Dan Rollo 4fbbc6b42a comment cleanup 2012-09-25 21:01:45 -04:00
Dan Rollo cdbc379608 comment cleanup 2012-09-25 20:59:38 -04:00
Dan Rollo bfeac30452 Add warning about quiet mvn failures. 2012-09-25 20:54:08 -04:00
Dan Rollo 2e7d188afa Add warning about quiet mvn failures. 2012-09-25 20:53:39 -04:00
Dan Rollo d291bd52cd Extract maven-gpg-plugin version to common property. Add 'useagent' so will be prompted for gpg passphrase. 2012-09-25 20:45:47 -04:00
Dan Rollo d8e8fd09a6 Remove obsolete maven artifact files. 2012-09-25 19:55:52 -04:00
Dan Rollo d66471e4c0 Restore 'depends' to maven targets - some jars are not banked in 'dist'. Make maven artifact jar names more consistent. Only include files (src, javadoc) for the specific project (jna or platform). 2012-09-25 19:49:54 -04:00
Dan Rollo bb7d364f45 Update maven repo URL's to use sonatype for publishing to central repo. Remove 'depends' from maven deploy and stage tasks - will use what is in 'dist' folder. 2012-09-25 17:19:34 -04:00
Dan Rollo f9f8474e7f Add maven ant tasks jar to lib dir for use in deploying maven artifacts. Update maven repo URL's to use sonatype for publishing to central repo. Remove 'depends' from maven deploy and stage tasks - will use what is in 'dist' folder. 2012-09-25 17:05:47 -04:00
Dan Rollo e2cac3a280 Remove unused tags, add dependency to jna 2012-09-25 12:45:51 -04:00
Dan Rollo d6b5c2c797 Remove unused tags 2012-09-25 12:00:36 -04:00
twall c0e51cb47f Update www/DirectMapping.md 2012-09-25 11:57:04 -03:00
twall 03f054b474 Update www/DirectMapping.md 2012-09-25 11:56:18 -03:00
twall 511676e0e9 Update www/GettingStarted.md 2012-09-25 08:11:06 -03:00
twall 94ac8af162 Update www/GettingStarted.md 2012-09-25 08:08:43 -03:00
twall a814936bd7 Note direct mapping and link 2012-09-25 08:06:52 -03:00
twall e42b2ca09d Link directly to examples 2012-09-25 08:02:43 -03:00
Timothy Wall 7be159d0c2 update solarix/intel natives 2012-09-24 19:33:02 -04:00
Timothy Wall c53c384096 update sunos natives 2012-09-24 23:46:00 +02:00
dblock 6a52c22a02 Moved some hanging docs into www. 2012-09-24 09:09:53 -04:00
Daniel Doubrovkine 6f30debd34 Minor prettifications to CHANGES. 2012-09-23 18:43:24 -04:00
Timothy Wall d400921e17 Merge branch 'master' of github.com:twall/jna 2012-09-23 17:30:28 -04:00
Timothy Wall e95b37e5de update android-arm native 2012-09-23 17:29:51 -04:00
Timothy Wall b9cc27c1ad update win32-x86 native 2012-09-23 15:14:11 -04:00
Timothy Wall c8852f7c44 update win32-x86 native 2012-09-23 14:44:22 -04:00
Timothy Wall 18b0700337 obsolete outdated native jars, update darwin 2012-09-23 14:08:04 -04:00
Timothy Wall 8d535e72c7 update win32-amd64 native 2012-09-23 12:43:56 -04:00
Timothy Wall 2f51fc68cb fix file perms 2012-09-23 09:28:00 -04:00
Timothy Wall 1f1972bf0e remove msvc90 dependency, spurious '-g' flags in libffi, fix compiler warnings against dlmalloc.c 2012-09-23 08:37:30 -04:00
Timothy Wall e91fbd35c2 tweaks for win32-amd64 build 2012-09-23 02:24:52 -04:00
Timothy Wall f46c5ffc2b w32 tweaks 2012-09-22 22:40:33 -04:00
Timothy Wall a9f90b508a fix build on w32 2012-09-22 21:03:29 -04:00
Timothy Wall 7dd96c6978 fix build on win32 2012-09-22 20:45:03 -04:00
Timothy Wall 0c888d992b accommodate makefile variable overrides from ant or environment 2012-09-22 19:58:14 -04:00
Timothy Wall 14da21e9f9 Merge branch 'master' of github.com:twall/jna 2012-09-22 17:06:20 -04:00
Timothy Wall 019e861539 merge android branch 2012-09-22 17:05:24 -04:00
Kristian Rosenvold 79d208096b o Added first (untested) verison of how to publish to maven central 2012-09-22 11:32:47 +02:00
Timothy Wall 28c4c5fef5 merge from upstream 2012-09-21 06:57:14 -04:00
Timothy Wall 5e211134d5 merge from master 2012-09-21 06:55:08 -04:00
Timothy Wall 310e829d70 note changes 2012-09-21 00:29:29 -04:00
Timothy Wall 3d0040a183 check more thoroughly for unanticipated exceptions 2012-09-20 23:57:20 -04:00
Timothy Wall bbb0501f76 properly propagate exceptions through native code 2012-09-20 23:41:03 -04:00
Timothy Wall 641b7aa3ad fix crash on win64 2012-09-20 22:45:22 -04:00
Timothy Wall 1572b12f75 merge from master 2012-09-20 17:37:25 -04:00
Timothy Wall 689ddc493f android doesn't support shlib jar unpack; place in a convenient location instead 2012-09-20 17:28:33 -04:00
Timothy Wall cb05293c11 clean up thread termination handling 2012-09-20 16:19:25 -04:00
Timothy Wall d5e2ee902d update change log 2012-09-20 15:59:14 -04:00
Timothy Wall b9995b2ad0 w32 thread auto-cleanup 2012-09-20 15:02:07 -04:00
Timothy Wall bd243519df w32 implementation 2012-09-20 13:52:34 -04:00
Timothy Wall f11614bc27 simplified thread-local destructor (pthreads) 2012-09-20 13:17:47 -04:00
Timothy Wall 58a5185c20 auto-cleanup of attached callback threads 2012-09-20 08:41:57 -04:00
Timothy Wall e92ff82c19 update android instructions 2012-09-20 07:21:36 -04:00
Timothy Wall c4c07d7878 fixes issue #121 2012-09-20 01:17:55 -04:00
Timothy Wall e07ed3082d clean up some var usage 2012-09-20 01:14:09 -04:00
Timothy Wall 5728822dad tweak formatting 2012-09-19 13:49:32 -04:00
Timothy Wall fd13022f7c don't copy out-of-date.jar to dist, copy native jars *only* directly from lib/native 2012-09-19 11:23:39 -04:00
Timothy Wall 296eaec0e6 perform cross-builds into dedicated build directory 2012-09-19 10:28:45 -04:00
Timothy Wall 8b8672214c add android native jar 2012-09-19 10:08:04 -04:00
Timothy Wall 2f662bcf6d remove obsolete setFieldOrder references 2012-09-19 10:03:39 -04:00
Timothy Wall 35f12b7027 merge from master 2012-09-19 09:51:01 -04:00
Timothy Wall 719fab1ad2 fix main class reference 2012-09-18 22:38:44 -04:00
Timothy Wall 67ffdd5168 pushed wrong versions of demo jars 2012-09-18 22:32:34 -04:00
Timothy Wall afc3fe3687 update demos to include full native libs 2012-09-18 22:27:14 -04:00
Timothy Wall 14dbeda4ed fix broken demo jars 2012-09-18 22:24:28 -04:00
Timothy Wall f5ee066cc0 demos must be in same directory as jna.jar to run properly 2012-09-18 20:43:43 -04:00
Timothy Wall ad65bcccfb avoid spurious errors when common osx frameworks don't actually exist 2012-09-18 20:36:05 -04:00
Timothy Wall fab66d7d49 search additional OSX paths 2012-09-18 18:49:40 -04:00
Timothy Wall d78c38e4e2 update changelog 2012-09-19 00:14:22 +02:00
Timothy Wall 21cecef8ef fix crash with native mapped callback args 2012-09-18 21:58:39 +02:00
Timothy Wall 3e8511fbc6 Merge branch 'master' of github.com:twall/jna 2012-09-18 09:34:58 -04:00
Timothy Wall 21863e190d use upstream libffi as subtree instead of separate local copy 2012-09-18 09:28:54 -04:00
Timothy Wall fb84300563 Merge libffi as native/libffi 2012-09-18 09:06:50 -04:00
Timothy Wall a8de00b8e5 fix MSVC dll callbacks build (mingw64 required) 2012-09-17 07:23:01 -04:00
Timothy Wall 5fd52be589 add missing file 2012-09-16 15:47:12 -04:00
Timothy Wall 6335fef0b1 fix build for MSVC express 10 2012-09-16 13:24:35 -04:00
Daniel Doubrovkine 3455742d89 The javadoc and src-mvn.zip should be ignored; out-of-date.jar is used to wipe all the native binaries when there's an incompatible JNI change. 2012-09-15 22:08:25 -04:00
Timothy Wall 6ba364f64f Merge branch 'master' of github.com:twall/jna into dll-callback 2012-09-15 21:58:55 -04:00
Daniel Doubrovkine 164da6cf1c Minor updates to CHANGES. 2012-09-15 21:28:33 -04:00
Daniel Doubrovkine 1b6bc6342e Re-added missing declaration. 2012-09-15 21:26:54 -04:00
Daniel Doubrovkine bde74fdccf Merged 3.5.0 from master. 2012-09-15 21:15:47 -04:00
Timothy Wall 6dd612162d synch with master 2012-09-15 17:58:44 -04:00
Timothy Wall 2ff4d20fad require structure field order 2012-09-15 17:52:01 -04:00
unknown fbcd02ae6e Merge branch 'master' of github.com:twall/jna into netapi32-fixes 2012-09-15 09:31:01 -04:00
Timothy Wall 6de51cdf5a move field validation out of layout derivation 2012-09-14 21:10:48 -04:00
unknown e97b1df6ee Merge branch 'master' of github.com:twall/jna into netapi32-fixes 2012-09-14 07:53:37 -04:00
Timothy Wall 65d68b8d70 avoid using deprecated setTypeMapper 2012-09-14 07:00:55 -04:00
Daniel Doubrovkine f915ec7e05 Merge branch 'master' of github.com:twall/jna into netapi32-fixes 2012-09-08 20:39:06 -04:00
Timothy Wall 44b4bc0cac fix gcc version check, avoid deprecated function in structure test 2012-09-08 16:27:08 -04:00
Daniel Doubrovkine 2a6ac9a20d Fixed ANT build and package name. 2012-09-08 16:22:52 -04:00
Daniel Doubrovkine 076298e343 Merged from master. 2012-09-08 16:11:47 -04:00
Timothy Wall 1c3ab0f80f fix javadoc errors 2012-09-08 16:04:27 -04:00
Timothy Wall a0ae2836d9 merge from upstream 2012-09-08 15:02:25 -04:00
Timothy Wall 2309762aca fix broken Structure.setFieldOrder issue 2012-09-08 11:07:05 -04:00
Daniel Doubrovkine e4d89f7087 Fixed typos. 2012-09-08 08:42:36 -04:00
Daniel Doubrovkine 44c41b6faf Fix: Netapi32Test broken. 2012-09-08 08:41:57 -04:00
Daniel Doubrovkine 8003de03ec Fix: w32keyhook package to make Eclipse happy. 2012-09-08 08:40:58 -04:00
twall c5ae6a3cbb Merge pull request #117 from phailwhale22/master
Closes issue #116
2012-09-07 16:34:22 -07:00
twall 4581cb2f61 Avoid invalid 3.4.2 build 2012-09-07 20:32:46 -03:00
phailwhale22 804795c5f8 fix for issue #116 (continued yet again)
I'm failing hard... ok to merge? Indentation was fixed and I removed the
try block.
2012-09-07 18:26:30 -04:00
Timothy Wall efce3ec30e update OSX native reference 2012-09-06 07:27:45 -04:00
Timothy Wall e56835fccc fix native jar file refresh 2012-09-06 07:25:42 -04:00
Timothy Wall 4f495756aa Merge branch 'master' of github.com:twall/jna 2012-09-06 07:05:38 -04:00
Timothy Wall 9dce43affa fix file perms 2012-09-06 07:03:33 -04:00
Timothy Wall 7200f90633 fix native jar propagation 2012-09-06 07:02:39 -04:00
Daniel Doubrovkine (dB.) 861e4cc3bc Update www/Contributing.md
Updated link to Windows Development Environment.
2012-09-05 11:46:33 -03:00
phailwhale22 c2c1f81ea5 fix for issue #116 (continued)
Some stuff that was missing from my previous commit. Sorry for the
hurdles, this is my first time contributing to a project. Updated the
appropriate unit test and CHANGES.md for version 3.4.3.
2012-09-04 19:00:17 -04:00
phailwhale22 14481ee346 fix for issue #116 2012-09-04 18:07:13 -04:00
Timothy Wall a92256bc72 keep native builds separate from dist; copy on dist 2012-09-03 09:13:07 -04:00
Timothy Wall be42dda63d update javadoc 2012-09-03 08:27:53 -04:00
Timothy Wall 7313da6156 bump version to 3.4.2 2012-08-31 09:17:01 -04:00
Timothy Wall b7d94d6a14 fix minor javadoc, compile bugs 2012-08-31 08:12:41 -04:00
Timothy Wall 782b11f201 fix issue #107 2012-08-27 23:23:34 -04:00
Timothy Wall aea387ce02 fix failing tests in StructureTest (avoid returning self when sharing memory) 2012-08-22 16:38:21 -04:00
Timothy Wall 4ddad49369 save function field offsets instead of actual function pointers, which may change 2012-08-21 21:43:17 -04:00
Timothy Wall 224f18fef4 fix file perms 2012-08-21 19:29:43 -04:00
Timothy Wall 2390543445 add dll callbacks, tests, explicit flags for dlopen 2012-08-21 19:28:40 -04:00
Timothy Wall 473d48b39b fix up Netapi32Test to match DS_DOMAIN_TRUSTS changes elsewhere; I vaguely recall db saying something about removing a related test entirely for duplication of effort, perhaps this was missed checking in? 2012-08-11 22:27:44 -04:00
Timothy Wall a947dfdac5 address issue #84 2012-08-11 18:03:27 -04:00
Timothy Wall b83e977839 ensure memory always initialized when calling useMemory, even if layout is unknown 2012-08-03 07:10:06 -04:00
Timothy Wall ab2d5a72e7 enforce declaration of structure field order 2012-08-02 07:28:30 -04:00
Timothy Wall bc5855e900 Merge branch 'master' of github.com:twall/jna 2012-08-02 07:08:47 -04:00
twall 2c5993d680 simplify env settings 2012-07-27 07:52:29 -03:00
Timothy Wall 2cc7fe3272 Merge branch 'master' of github.com:twall/jna 2012-07-27 06:39:38 -04:00
twall 958ecde56b Update www/WindowsDevelopmentEnvironment.md 2012-07-26 22:37:05 -03:00
twall 0a9a4c926a Update www/WindowsDevelopmentEnvironment.md 2012-07-26 22:36:20 -03:00
Daniel Doubrovkine a0b50515e2 Moved windows development environment to www. 2012-07-26 21:15:49 -04:00
Daniel Doubrovkine (dB.) edf2dacfac Made instructions prettier. 2012-07-26 22:13:06 -03:00
Timothy Wall d65bd51895 add windows build notes 2012-07-26 20:17:17 -04:00
Timothy Wall e0bd677ffc update win64 build to work with MSVS C++ Express 10 and cygwin+mingw64 2012-07-26 19:58:59 -04:00
Timothy Wall c7123cf59b add change note 2012-07-19 06:39:00 -04:00
Timothy Wall 187fcdc2fb use a more applicable return type 2012-07-19 06:37:42 -04:00
Timothy Wall a064b2a0e1 add android link 2012-07-17 07:38:50 -04:00
Daniel Doubrovkine (dB.) 777406eb7b Merge pull request #98 from trejkaz/master
Third attempt at fixing Netapi32Util.getDomainTrusts()
2012-07-13 15:31:19 -07:00
twall 37f108fa51 Merge pull request #70 from jglick/master
Warnings reported by FindBugs et al.
2012-07-13 04:47:37 -07:00
Daniel Doubrovkine (dB.) f0817a3e75 Update master 2012-07-13 08:35:18 -03:00
Daniel Doubrovkine (dB.) 0eb9636bdf Prettified CHANGES, more consistent between w32 and win32. 2012-07-13 08:34:29 -03:00
Timothy Wall 3f3872974e closes #100 2012-07-13 07:32:34 -04:00
Timothy Wall 99533d2052 more unsigned fixes 2012-07-13 07:21:17 -04:00
Timothy Wall dce035056a fix some unsigned pointer-aliasing types, platform/win32 2012-07-13 07:12:47 -04:00
Trejkaz (pen name) 53cb504e90 Use Structure.toArray() instead of domains.getTrusts() 2012-07-13 10:46:39 +10:00
Daniel Doubrovkine 2162f14786 Moved Kernel32 definitions into Kernel32.java, added GetEnvironmentVariable. 2012-07-12 19:48:48 -04:00
Trejkaz (pen name) bd7fdf2438 Third attempt at fixing Netapi32Util.getDomainTrusts(). 2012-07-13 09:13:46 +10:00
Daniel Doubrovkine cc399eca28 Fixed testReadFile, not always null-terminated. 2012-07-12 16:08:40 -04:00
Daniel Doubrovkine adb048c01a Don't use NativeLong, equivalent to int on Windows. 2012-07-12 15:54:19 -04:00
Daniel Doubrovkine 738900d840 Using int and IntByReference for ULONG, also added ULONG. 2012-07-12 14:25:26 -04:00
Timothy Wall 3755747fda update notes 2012-07-12 08:45:48 -04:00
twall 36020c6d33 Merge pull request #95 from buckensens/master
Check for null-ness in initializeFields() before overwriting a field.
2012-07-12 03:33:01 -07:00
Patrik Burkhalter b64e24691b Properly getting fields in initializeFields() 2012-07-12 09:33:37 +02:00
Patrik Burkhalter a97377bb4a Merge remote branch 'upstream/master' 2012-07-12 09:12:16 +02:00
Daniel Doubrovkine (dB.) b661a7ecbd Update master 2012-07-12 01:53:27 -03:00
Daniel Doubrovkine (dB.) 2f3807d9a4 Merge pull request #96 from trejkaz/master
Fixing crash in Netapi32Util (or anyone who calls DsEnumerateDomainTrusts)
2012-07-11 21:31:56 -07:00
Trejkaz (pen name) 9932ce345e Updating changelog for my fixes 2012-07-12 14:05:01 +10:00
Trejkaz (pen name) b254399c02 NetApiBufferFree was freeing the pointer we were passing in rather than the pointer to what DsEnumerateDomainTrusts allocated. 2012-07-12 14:00:28 +10:00
Trejkaz (pen name) 5c08bfcd5c Some DS_DOMAIN_TRUSTS fields were mapping ULONG to NativeLong instead of int. 2012-07-12 11:09:24 +10:00
Trejkaz (pen name) fcd4cafe8a Second attempt at fixing the crash in Netapi32Util.
This time we change the definition of Netapi32.DsEnumerateDomainTrusts. Crash is still not happening and this fix is more likely to be correct.
2012-07-12 09:02:44 +10:00
Trejkaz (pen name) cd6a1f48c8 Merge branch 'master' of https://github.com/twall/jna 2012-07-12 08:38:16 +10:00
Patrik Burkhalter 2996d99914 Test for null on fields in initializeFields(). 2012-07-11 16:38:53 +02:00
Timothy Wall 785173f106 Avoid overwriting string fields within structures when unnecessary; fix failing direct mode tests 2012-07-10 07:30:53 -04:00
Trejkaz (pen name) bf66cb55d6 Fixing a crash when trying to free the wrong pointer in Netapi32Util. 2012-07-10 15:56:15 +10:00
Daniel Doubrovkine (dB.) 9ce2f894c3 Update master 2012-07-09 19:59:12 -03:00
Daniel Doubrovkine (dB.) 436e842faa Update master 2012-07-09 19:58:59 -03:00
Daniel Doubrovkine (dB.) adf4a382a3 Update master 2012-07-09 12:53:10 -03:00
Daniel Doubrovkine d4ba6b3575 Updated CHANGES. 2012-07-09 11:49:53 -04:00
Daniel Doubrovkine 6439e36464 Fix: platform.win32.Secur32.AcquireCredentialsHandle, InitializeSecurityContext and AcceptSecurityContext. 2012-07-09 11:49:10 -04:00
Timothy Wall 57ded8d803 android tweaks 2012-07-09 07:39:10 -04:00
Timothy Wall aa5fc9b3d8 tweak resource path for android 2012-07-09 07:14:54 -04:00
Reini Urban 6d6f711080 cygwin/mingw shared libs need libtool LDFLAGS = -no-undefined
otherwise only static libs are created.
2012-07-07 12:52:02 -05:00
Timothy Wall afb3a7cc84 fix path to strip 2012-07-06 17:25:00 -04:00
Timothy Wall e14201201d remove superflous section marker 2012-06-26 21:15:31 -04:00
Timothy Wall 92b5085dd8 remove superflous section marker 2012-06-26 21:14:44 -04:00
Timothy Wall 4c814e7700 auto-sync memory for struct** arguments, add tests 2012-06-24 15:17:05 -04:00
twall fb6d9e6908 !@#$% magic links 2012-06-13 08:25:40 -03:00
twall 1398a5764b fix download links 2012-06-13 08:24:17 -03:00
twall e66bea10d4 Update master 2012-06-12 08:28:08 -03:00
twall 8ba666dfe0 Update master 2012-06-12 08:19:17 -03:00
twall 882bd3dd11 Update master 2012-06-12 08:14:54 -03:00
twall 317d41e1df Update master 2012-06-12 08:13:26 -03:00
twall 02bd142758 Update master 2012-06-12 08:00:18 -03:00
Daniel Doubrovkine 5f2620944f Made prettier. 2012-06-09 16:37:56 -04:00
Daniel Doubrovkine 0405f305f9 Updated changelog. 2012-06-09 16:37:09 -04:00
Daniel Doubrovkine 501dc9054a Fix: #78 NPE platform.win32.Netapi32Util.getDomainTrusts. 2012-06-09 16:33:07 -04:00
Timothy Wall b2c3c585db bump version 2012-06-08 09:27:55 -04:00
Timothy Wall 481010d0b3 Merge branch 'master' of github.com:twall/jna 2012-06-08 09:26:58 -04:00
Timothy Wall 4f79bd12e1 fix javadoc error 2012-06-08 09:26:36 -04:00
Timothy Wall 0bfd959bcb fix OSGI entries (closes issue #71 and issue #63) 2012-06-08 09:26:16 -04:00
twall d7845899b4 update javadoc links 2012-06-06 22:39:41 -03:00
Timothy Wall 307bf2600b update jar files 2012-06-06 21:25:30 -04:00
Timothy Wall 04f7f25563 update file download links 2012-06-06 21:22:01 -04:00
twall de33b60d87 Make javadoc more prominent. 2012-05-31 10:54:15 -03:00
twall 6e0914b1c9 Add link to dependency walker 2012-05-24 12:20:05 -03:00
twall f7f4b349e9 fix site doc link 2012-05-24 12:17:45 -03:00
twall 3c2f3115e0 add links to type mapping pages 2012-05-24 12:14:17 -03:00
twall 2df1b3675c add link to jnaerator 2012-05-24 12:09:15 -03:00
Timothy Wall 76f7b189fa add closures patch from auris 2012-05-22 08:13:17 -04:00
Daniel Doubrovkine 8c2d495e1c Updated CHANGES with SID and Netapi32Util.getUserInfo fixes. 2012-05-15 08:02:05 -04:00
Daniel Doubrovkine 42c9dea2c2 Updated tests: skip when not joined to a DC and check returned SID. 2012-05-15 07:44:36 -04:00
Daniel Doubrovkine c52599b6d9 Merge branch 'master' of github.com:twall/jna into trejkaz 2012-05-15 07:43:41 -04:00
Daniel Doubrovkine (dB.) ec90593be8 Merge pull request #74 from trejkaz/master
Fixing Netapi32Util.getUserInfo(String, String)
2012-05-15 04:43:27 -07:00
Daniel Doubrovkine 382d0098af Merge branch 'master' of git://github.com/trejkaz/jna into trejkaz 2012-05-15 07:31:15 -04:00
Trejkaz (pen name) 4c14dddec3 Commenting out Netapi32UtilTest.testGetUserInfo
The default behaviour of getUserInfo() in the absence of a domain name seems to be to fail, but this
was already occurring without my fix.
2012-05-15 16:32:24 +10:00
Trejkaz c2ce8be50f Tests for Netspi32Util.getUserInfo 2012-05-15 07:44:24 +10:00
Trejkaz a7717e5933 Ignore .DS_Store metadata files 2012-05-15 07:44:07 +10:00
Trejkaz (pen name) 9b255071f2 Make Netapi32Utils.getUserInfo(String,String) work.
Netapi32Utils.getUserInfo was ignoring the parameter for the domain name, which caused it to fail when the "domain" name was not actually a domain controller.

On fixing that, I got an error about the SID being in an invalid format. It seems like JNA's "PSID" is actually just the SID, so to get PSID you have to use "PSID.ByReference".
 This is bound to confuse someone else in the future so it might be worth renaming PSID to SID?
2012-05-14 12:39:25 +10:00
Daniel Doubrovkine (dB.) 70bb54e13f Merge pull request #73 from trejkaz/master
Making fields on USER_INFO_23 public
2012-05-13 18:10:18 -07:00
Trejkaz (pen name) 4461ca926c Making fields on USER_INFO_23 public so that it might actually be possible to use it 2012-05-14 10:15:20 +10:00
Nicolas Lelong d330f19292 iOS build fixes. 2012-05-05 09:37:02 -04:00
Timothy Wall b14ccb8eab update jna.jar 2012-05-04 07:28:06 -04:00
Timothy Wall d873f6f6be add android binary 2012-05-04 07:27:25 -04:00
Timothy Wall 7f0d465e98 set all structure fields, add android as a recognized platform 2012-05-04 07:24:00 -04:00
Jesse Glick 7855615a9d FindBugs has some other suggestions about nested classes which could be static.
In the case of LayoutInfo, this is especially important because otherwise
the layoutInfo WeakHashMap leaks references (compare issue #40).
2012-05-03 17:12:40 -04:00
Timothy Wall 9889489355 successful compilation/link of android 2012-05-03 08:09:54 -04:00
Anthony Green 09b23cfc1d Update README with Blackfin/uClinux support 2012-04-27 08:29:48 -04:00
Anthony Green 213ed15c70 Add blackfin supprt from Alexandre Keunecke. 2012-04-27 01:34:15 -04:00
Jesse Glick 6f7ece8603 FindBugs points out that StructField could be static. 2012-04-20 18:31:38 -04:00
Jesse Glick 5d44e011b9 API error in Structure.getFieldTypeInfo: StructField is not accessible outside this package,
so the method could not possibly be overridden outside it either.
Revealed by SigTest run on JNA 3.4.0:
Hidden class found: com.sun.jna.Structure$StructField in method protected com.sun.jna.Pointer com.sun.jna.Structure.getFieldTypeInfo(com.sun.jna.Structure$StructField) in class com.sun.jna.Structure
2012-04-20 18:29:04 -04:00
twall 0a190774b4 Add link to javadoc overview. 2012-04-12 13:19:40 -03:00
twall a09b116a9c Merge pull request #58 from tivv/master
JNA initialization fails with PermissionDenied
2012-03-19 07:52:44 -07:00
twall f351facdf4 Merge pull request #59 from SitChenNam/master
JNA port for AIX PowerPC
2012-03-19 07:46:55 -07:00
Vitalii Tymchyshyn 2143c18459 Fix for permission denied 2012-03-12 14:03:19 +02:00
SIT chen nam 8c0df63844 JNA AIX port on PowerPC
distribuable binary.
2012-03-12 12:00:25 +01:00
SIT chen nam 121430dac1 JNA port for AIX on PowerPC
The port has been made with GCC v4.6.2 on AIX 6.1 PowerPC.
Both aix-ppc and aix-ppc64 have been generated.

All JUNIT test runs successfuly, except DirectTest.registerMethod(),
because the standard /usr/libm.a is a static library.
You can install GCC libmpc.so.2 for AIX, and use it instead of libm.a, if
you want to run this test.
2012-03-12 11:53:30 +01:00
SIT chen nam 71163d3b9a FIX libffi (aix) error.
aix_closure.S: Invalid computed offset for register r3, wchen returning
from ffi_closure_helper_DARWIN().

ffi_darwin.c: add missing "break;" in "case FFI_AIX:"
              return FFI_BAD_ABI when unknown ABI is encountered.
2012-03-12 11:40:00 +01:00
Daniel Doubrovkine (dB.) 3c916775ee Merge pull request #55 from joval/master
Some fixes and additions
2012-02-22 15:22:47 -08:00
David A. Solin 5ba54ed055 Note changes to log. 2012-02-21 19:24:19 -06:00
David A. Solin bd5b7fb376 Improved fix for empty string array registry types. 2012-02-21 14:30:41 -06:00
David A. Solin 05ed5c68bf Post-merge fixes. 2012-02-20 16:56:27 -06:00
David A. Solin b8dd54f99b Merge remote-tracking branch 'upstream/master'
Conflicts:
	contrib/platform/src/com/sun/jna/platform/win32/Kernel32.java
2012-02-20 16:21:14 -06:00
Daniel Doubrovkine (dB.) e20d384f9d Merge pull request #54 from chatellier/master
Add to platform.win32.User32 : GetLastInputInfo
2012-02-20 13:51:22 -08:00
David A. Solin bd63a56975 MULTI_SZ registry values take the form String1\0String2\0\0. The final \0 does not mean that there is a String3, but signals the termination of the value. This commit corrects the misinterpretation, making it possible for JNA to correctly retrieve MULTI_SZ values. 2012-02-20 13:58:16 -06:00
Eric Chatellier 1f10720f6e Fix code style and update CHANGES.md 2012-02-14 16:07:09 +01:00
Eric Chatellier 1ef26f6227 Remove useless import 2012-02-14 11:31:49 +01:00
Eric Chatellier 7d59645a67 Add to platform.win32.User32 : GetLastInputInfo 2012-02-14 09:56:55 +01:00
Eric Chatellier 70e7b8f1f9 Add to platform.win32.User32 : GetLastInputInfo 2012-02-09 16:57:51 +01:00
Eric Chatellier 9e9b898452 Add to platform.win32.User32 : GetLastInputInfo 2012-02-09 15:57:55 +01:00
Timothy Wall 00e3608c54 Clarify some javadoc 2012-01-29 12:57:11 -05:00
David A. Solin af6bd86757 Added GetDriveType. 2012-01-27 15:43:52 -06:00
David A. Solin 0952ce45c1 Added support for GetFileType. 2012-01-27 11:49:56 -06:00
Timothy Wall 040e67b637 bump version 2012-01-27 09:46:39 -05:00
Timothy Wall cd6fe24df5 update platform jar 2012-01-27 09:43:57 -05:00
Timothy Wall 42d2fb8607 Merge branch 'master' of github.com:twall/jna 2012-01-27 09:37:10 -05:00
Timothy Wall 241028bbd8 link linux x86/amd64 against older glibc versions (2.1.3 and 2.2.5 respectively) 2012-01-27 09:36:47 -05:00
Timothy Wall 0c58f7cb59 revise comment for accuracy 2012-01-27 09:19:06 -05:00
twall 47887c1d95 Merge pull request #50 from biggunbenny/master
Pull request on issue #49 as requested.  Properly read native data on first entry of array of printer info structs.
2012-01-24 08:14:03 -08:00
unknown cbc16d2a48 Fixed bug in WinspoolUtil.getPrinterInfo1() and WinspoolUtil.getPrinterInfo4() where the first element's fields was never populated 2012-01-18 09:18:24 +01:00
Timothy Wall 636b01b95c fix pom update path, maven javadoc path 2011-12-24 08:49:11 -05:00
Timothy Wall 41683e76bb don't delete 'dist' dir on clean 2011-12-23 22:52:55 -05:00
Timothy Wall 4030e1c015 use -mno-cygwin only on gcc < 4 2011-12-23 11:00:33 -05:00
Timothy Wall db6a8e7cda remove inadvertent build directory override 2011-12-22 18:08:16 -05:00
Kristian Rosenvold dd93afa50e Made build work clean as well 2011-12-21 23:25:20 +01:00
Kristian Rosenvold 822d49087b Maven central deployment 2011-12-21 22:50:59 +01:00
twall e463de8cc8 from Guillaume Cottenceau <gcottenc_AT_gmail_DOT_com> 2011-12-21 14:40:01 -05:00
twall 0c060dbaaa Merge pull request #40 from jglick/master
Accepted fix for memory leak
2011-12-14 07:15:56 -08:00
Timothy Wall 0fec165454 remove superfluous javah headers 2011-12-14 10:08:29 -05:00
Timothy Wall 504460458c ensure consistent JNI checksum 2011-12-14 09:36:22 -05:00
Timothy Wall 2fba190dde Merge branch 'master' of github.com:twall/jna 2011-12-12 09:41:25 -05:00
Timothy Wall b8fb3290b2 Allow for 'unsigned' IntegerType 2011-12-12 09:41:04 -05:00
David A. Solin 2e0c0a670f Fixed exception thrown when querying for the existence of a REG_QWORD. 2011-12-07 09:16:32 -06:00
Jesse Glick 9473f51d7b "Leaking WeakHashMap" canned analysis from NB Profiler turns up:
NativeMappedConverter.converters: java.util.WeakHashMap#116 is wrong: key java.lang.Class#5600 is reachable from value com.sun.jna.NativeMappedConverter#3
Indeed the value type strongly refers to the key type so a WeakHashMap is a potentially major memory leak.
Since Java lacks ephemerons, need to either eliminate the cache, or make the values be soft references.
2011-12-05 18:50:37 -05:00
Jesse Glick de857048a2 Merge branch 'master' of https://github.com/twall/jna 2011-12-05 18:36:24 -05:00
twall 83ec260e09 fix list formatting 2011-12-02 16:24:35 -05:00
Timothy Wall cbf8b37734 fix javadoc comment for field ordering 2011-12-01 13:52:43 -05:00
Timothy Wall e81f46ecf5 update download references 2011-11-26 08:53:53 -05:00
Timothy Wall c2089f5275 update download references 2011-11-26 08:53:09 -05:00
Timothy Wall e9da3c61c1 update jars for 3.4.0 2011-11-26 08:17:49 -05:00
Timothy Wall 01ff3f1d86 fix keyhook demo jar generation 2011-11-23 13:49:00 -05:00
Timothy Wall 931deeef94 fix javadoc warnings, move interface method definitions to WinNT from WinBase 2011-11-23 12:34:36 -05:00
Timothy Wall 5caa17a994 Separate NIO buffer mappings between Kernel32 and CoreDLL 2011-11-23 11:58:48 -05:00
Timothy Wall ecbfaa4b2d fix shell32 alignment on win64 2011-11-23 11:50:25 -05:00
Timothy Wall 0d273fefc6 fix keyhook build 2011-11-23 11:44:01 -05:00
Timothy Wall 9c4232b6e2 clean up w32 platform sources 2011-11-23 10:01:03 -05:00
Timothy Wall 79c2aaaebb correct mappings causing failure on win64 2011-11-23 09:36:45 -05:00
Timothy Wall 7141c7a612 Merge branch 'master' of github.com:twall/jna 2011-11-22 11:02:33 -05:00
Timothy Wall cd420e3e33 update docs 2011-11-22 10:24:05 -05:00
Timothy Wall ef2cc89023 fix build using mingw64 2011-11-21 14:58:56 -05:00
Timothy Wall 2beeabb17b fix struct layout cacheing in Union 2011-11-21 10:50:19 -05:00
Timothy Wall d83dde09a7 Merge branch 'master' of github.com:twall/jna 2011-11-19 11:43:19 -05:00
Timothy Wall 3ca38481c7 cache structure layout results 2011-11-19 11:41:10 -05:00
twall 288a5157be Merge pull request #38 from joval/master
Changes logged to CHANGES.md
2011-11-18 15:44:51 -08:00
David A. Solin f5bde32616 Changes logged to CHANGES.md 2011-11-18 17:14:21 -06:00
Timothy Wall bffbc30c3d Merge branch 'master' of github.com:twall/jna 2011-11-18 17:38:28 -05:00
Timothy Wall 9ca125ddc4 fix/cleanup platform tests 2011-11-18 17:29:12 -05:00
Timothy Wall df2721c0ce Implement mac move to trash 2011-11-18 17:13:38 -05:00
David A. Solin 961e41be26 Additional changes per twall 2011-11-18 13:17:14 -06:00
David A. Solin 1332fbbcb0 Additional changes per twall 2011-11-17 20:30:41 -06:00
David A. Solin 8325f7cd82 Merge remote-tracking branch 'upstream/master' 2011-11-16 16:06:33 -06:00
David A. Solin 86f7b9788d File security and registry QWORD changes merged by samuel-aubin. 2011-11-16 16:02:53 -06:00
Timothy Wall b23411bc2b update w32 native 2011-11-15 11:22:44 -05:00
Timothy Wall 7c43abaf4e include error string in LastErrorException, if available, update wince native 2011-11-15 10:30:36 -05:00
Timothy Wall d7c106d08b fix JIRA issue 188 2011-11-14 13:48:54 -05:00
Timothy Wall fdf9bbcc31 fix bug with aliasing buffers in Memory ByteBuffer tracking 2011-11-11 08:38:57 -05:00
Timothy Wall 65385d2ac6 v3.4.0rc all natives updated 2011-11-09 16:28:59 -05:00
Timothy Wall 133d956592 Merge branch 'master' of github.com:twall/jna 2011-11-09 13:13:48 -08:00
Timothy Wall 245dcb0f4a enable ppc builds on ppc64 2011-11-09 13:13:12 -08:00
Timothy Wall 6b19aa7ec9 avoid attempts to write to final fields on J2ME 2011-11-09 09:47:51 -05:00
Timothy Wall c5cbdbb1e8 rebuild for wince target 2011-11-09 08:56:40 -05:00
Timothy Wall cbf16d3f82 fix 2 failing w32ce tests 2011-11-09 08:46:53 -05:00
Timothy Wall df6ab34e5b Merge branch 'master' of github.com:twall/jna 2011-11-09 07:56:50 -05:00
Timothy Wall 816317b8a6 re-enable WCE failing tests, fixes to allow proper phoneME operation w/r/t AWT classes 2011-11-09 07:30:18 -05:00
Timothy Wall 521aa2dad0 don't set LD_PRELOAD if libjsig is unavailable 2011-11-07 16:30:52 -05:00
Timothy Wall 6e439ca778 fix compiler longjmp warnings in getChar/setChar 2011-11-07 11:02:25 -05:00
Timothy Wall d66e9e98b7 avoid crash with really long strings 2011-11-07 09:15:14 -05:00
Timothy Wall a3994e009d update sunos-x86/amd64 natives 2011-11-05 08:33:48 -04:00
Timothy Wall 062afd1773 fix contrib test runs on win64 2011-11-04 11:38:43 -04:00
Timothy Wall 8d2d8086b1 add linux x86/amd64 natives, w64 native, fix w64 compiler warnings 2011-11-04 09:18:31 -04:00
Timothy Wall cf71299f3b Merge branch 'master' of github.com:twall/jna 2011-11-03 11:00:31 -04:00
Timothy Wall 36dad4738a update freebsd natives 2011-11-03 11:00:03 -04:00
Timothy Wall fb744c65bd update sparc natives 2011-11-03 10:58:23 -04:00
Timothy Wall a9949b3fe0 update win32-x86 native 2011-11-03 10:14:32 -04:00
Timothy Wall a72d5b473b update linux-arm native 2011-11-03 13:56:58 +00:00
Timothy Wall 201931d2f8 update linux-ia64 native 2011-11-03 14:28:13 +01:00
Timothy Wall c58c5260a0 fix clobber warning 2011-11-03 09:08:14 -04:00
Timothy Wall e25dcd7c5f update osx/darwin native 2011-11-03 08:55:36 -04:00
Timothy Wall 04e36d1560 merge wince branch into master 2011-11-03 08:53:33 -04:00
Timothy Wall 681e840d97 add osgi for linux-ia64 2011-11-02 22:05:35 -04:00
Timothy Wall 59b44d532c rebuild ia64-linux 2011-11-03 03:03:26 +01:00
Timothy Wall 04a6806957 remove redundant src in javac 2011-11-02 18:56:04 -07:00
Timothy Wall 6041c067a5 incorporate linux-arm|ppc|ppc64 natives into main 2011-11-02 21:46:58 -04:00
Timothy Wall 9b9e6510ac build linux-ppc64 2011-11-02 18:42:53 -07:00
Timothy Wall 489d797df5 update note on winCE 2011-11-02 18:39:48 -04:00
Timothy Wall 9df51dd4d8 add change note for w32ce-arm 2011-11-02 16:41:46 -04:00
Timothy Wall 6ffbf31eda down to two failing tests on w32ce-arm 2011-11-02 16:37:43 -04:00
Timothy Wall 7ea92aa923 ensure separated buffer tests still work 2011-11-02 15:34:45 -04:00
Timothy Wall 1d481a7050 remove redundant message 2011-10-28 09:34:19 -04:00
Timothy Wall 76781972a2 update change log, account for NIO buffer position 2011-10-28 09:31:53 -04:00
Timothy Wall 2953b46a3c use Buffer position when it's backed by an array 2011-10-28 08:25:58 -04:00
Timothy Wall aae0c47f5c Merge branch 'master', remote-tracking branch 'origin' into wince 2011-10-27 15:22:25 -04:00
Timothy Wall 6d83a71bdd update natives (osx) 2011-10-27 13:03:40 -04:00
Timothy Wall 7b515a7dc8 merge master ARM changes into wince branch 2011-10-27 13:00:57 -04:00
Timothy Wall 8c06f5762f structure alignment fixes for ARM 2011-10-27 16:45:38 +00:00
Timothy Wall 1d96ae4ab2 fix missing import 2011-10-19 21:24:02 -04:00
Timothy Wall c1b875ff38 Merge branch 'wince' of github.com:twall/jna into wince 2011-10-19 20:34:38 -04:00
Timothy Wall 5b15ee4ae3 Merge branch 'master' of github.com:twall/jna into wince 2011-10-19 20:34:29 -04:00
Timothy Wall 92d3c433c4 Add a little explanatory info to balloon tips demo 2011-10-19 20:33:31 -04:00
Timothy Wall 79ff2f7a93 Merge branch 'master' of github.com:twall/jna 2011-10-19 20:32:57 -04:00
Timothy Wall b78618dca1 add wince basic mapping to platform.jar 2011-10-19 20:32:06 -04:00
Timothy Wall 0967615734 add wince basic mapping to platform.jar 2011-10-19 20:31:58 -04:00
twall 9eb51ebaba Update README.md 2011-10-17 15:20:59 -03:00
Timothy Wall d9c887c0d4 Merge branch 'master' of github.com:twall/jna 2011-10-12 09:40:14 -04:00
Timothy Wall 6e6d761f2b Merge branch callback-threads into master 2011-10-12 09:36:50 -04:00
Timothy Wall 7865bb46ad fix signal chaining link 2011-10-11 12:27:01 -04:00
Timothy Wall c6ad9adbe0 Boolean.parseBoolean not available on wce 2011-10-11 12:23:51 -04:00
Timothy Wall 907e2eb411 add docs for lasterror, fix last error failure 2011-10-11 12:09:25 -04:00
Timothy Wall e1ed265df7 all direct tests pass 2011-10-11 11:35:27 -04:00
Timothy Wall 1466833fb7 fixed tests related to 64-bit alignment 2011-10-11 09:39:24 -04:00
Timothy Wall ebf08cfede update docs re: JNA loading 2011-10-11 09:38:58 -04:00
Timothy Wall fc703cadb8 strip and explicitly link 2011-10-11 09:03:22 -04:00
Timothy Wall bb69e3d099 fix errors in libffi build 2011-10-11 08:46:13 -04:00
Timothy Wall 08e6f64a64 copy native bits *before* generating full jar file 2011-10-10 18:54:14 -04:00
Timothy Wall d9193f4442 fix more tests 2011-10-10 18:39:35 -04:00
Timothy Wall e658538926 fix some more failing tests 2011-10-10 17:00:33 -04:00
Timothy Wall b55b60cff4 fix load from current module 2011-10-10 14:57:21 -04:00
Timothy Wall ac272df5d3 down to 24 failures (4 crashes) on w32ce-arm 2011-10-10 14:40:16 -04:00
Timothy Wall b61e701298 NativeTest passes 2011-10-10 11:45:42 -04:00
Timothy Wall 7e2f27fe42 w32ce-arm library load on wince 5 (WM6.1) 2011-10-10 09:04:52 -04:00
Timothy Wall 078763cb92 Merge branch 'master' of github.com:twall/jna into callback-threads 2011-10-06 09:25:17 -04:00
Timothy Wall 2f66bb2b77 use default vm attach options 2011-10-06 09:24:42 -04:00
Timothy Wall b3de77c961 bump native version 2011-10-06 09:17:16 -04:00
Timothy Wall 60184e16f5 remove debug output 2011-10-05 19:35:50 -04:00
Timothy Wall 3e71e6cb3e Merge branch 'master' of github.com:twall/jna into callback-threads 2011-10-05 19:33:13 -04:00
Timothy Wall f0b5b01a5f avoid negative interactions with system install of JNA 2011-10-05 17:30:52 -04:00
Timothy Wall 877af01713 add direct method declaration in callbacks test 2011-09-30 16:11:24 -04:00
Timothy Wall 39ce53e6c9 clean up before merge 2011-09-30 10:47:43 -04:00
Timothy Wall 3d60203509 Merge branch 'master' of github.com:twall/jna into callback-threads 2011-09-22 11:54:22 -04:00
Timothy Wall ed3da68670 Merge branch 'master' of github.com:twall/jna 2011-09-22 11:53:38 -04:00
Timothy Wall a0cf56bdac Clean up javadoc parameters 2011-09-22 11:53:09 -04:00
Jesse Glick 26b8fad3c1 Merge branch 'master' of https://github.com/twall/jna 2011-09-21 17:36:21 -04:00
twall 6f9c712b22 Add link to JNAerator. 2011-09-14 10:31:54 -03:00
twall b95bcb2b63 Note existence of Pointer(long) ctor 2011-09-14 10:25:45 -03:00
twall 67fb8d11c2 Merge pull request #27 from bhamail/macPPC
1.5-level source compliance (Mac ppc) (via branch)
2011-09-13 04:34:32 -07:00
Timothy Wall e1f846df99 Fix default ABI used in prep_cif call 2011-09-12 09:12:51 -04:00
Dan Rollo b8cba40e84 change javac source/target props from 1.6 to 1.5 (allows build on mac ppc). 2011-09-10 16:15:13 -04:00
Dan Rollo 0d9dede3c4 comment out Override annotation to be 1.5 compliant. 2011-09-10 15:49:58 -04:00
Timothy Wall bb2888f670 remove tmp files 2011-09-10 11:42:39 -04:00
Timothy Wall 1cb727a62a enable callback threads on windows 2011-09-10 11:41:49 -04:00
Timothy Wall 77419e2808 clean up 2011-09-10 08:47:08 -04:00
Timothy Wall 6b42585e82 Merge branch 'master' of github.com:twall/jna into callback-threads 2011-09-09 10:25:39 -04:00
Timothy Wall 2841c3aaf1 functional detach switch from callback 2011-09-09 10:17:30 -04:00
Timothy Wall 72871bbd4c Merge branch 'master' of github.com:twall/jna 2011-09-09 07:38:18 -04:00
Timothy Wall 697e024936 fix javadoc link 2011-09-09 07:38:02 -04:00
Jesse Glick c7603bffa8 Ignore the doc directory; it is a build product. 2011-09-06 14:25:44 -04:00
twall 366296743b Merge pull request #26 from jglick/master
Pull request #22 cleanup
2011-09-06 10:34:19 -07:00
Jesse Glick a48f90067e Removing stray references to nbproject. 2011-09-06 12:08:41 -04:00
twall 8e6b046ee0 Merge pull request #22 from jglick/master
Sundry build script fixes
2011-09-06 07:41:08 -07:00
Jesse Glick af9c4e6cb9 Pass jna.builddir as an absolute path.
Otherwise various tests fail when the CWD used to invoke Ant is not the project basedir.
2011-08-16 13:26:34 -04:00
Jesse Glick 1af26d22fd <sysproperty key="k" value="v"/> more natural than <jvmarg value="-Dk=v"/>. 2011-08-16 12:34:28 -04:00
Jesse Glick f9c9e0ef41 <formatter type="brief" usefile="false"/> has similar command-line behavior to printsummary="yes" but allows Ant listeners like NetBeans to track progress. 2011-08-16 12:14:04 -04:00
Jesse Glick 06060b7dff Should specify tempdir prop to <junit> so as not to pollute versioned dir with junit*.properties after aborted tests. 2011-08-16 12:07:50 -04:00
Jesse Glick 6b9d964e36 Correcting confused paths: classpaths should not include source roots. 2011-08-16 11:47:13 -04:00
Jesse Glick 43752710f8 Move misleading project metadata out of the way.
Should be friendlier to the NetBeans IDE.

1. A project should not have a "pom.xml" at top level (or preferably anywhere)
   unless it is really a Maven-based project and pom.xml gives all relevant
   information about the sources, which is certainly not the case here.

2. nbproject/project.xml was that of an IDE-managed project, which is
   inappropriate here where there is a complex build.xml that does not (and
   cannot) conform to the expectations of that project type (e.g. different Java
   source levels for src/ and test/ dirs). Could use the "freeform" project type
   for such cases, but http://wiki.netbeans.org/AutomaticProjects should do just
   as well, with no IDE-specific metadata or administration.
2011-08-16 11:17:15 -04:00
Timothy Wall c397a0a4e3 add callback thread initializer 2011-08-11 15:45:13 -04:00
Timothy Wall 5a674bf44b Merge branch 'master' into callback-threads 2011-08-11 11:35:26 -04:00
Timothy Wall cea1743630 Merge branch 'master' of github.com:twall/jna 2011-08-11 11:34:20 -04:00
Timothy Wall 2666f05790 update .gitignore 2011-08-11 11:34:13 -04:00
Timothy Wall 53822961b9 update .gitignore 2011-08-11 11:33:19 -04:00
Timothy Wall 0574c76c4f add full native list for OSGI Bundle-NativeCode manifest attribute 2011-08-11 11:27:12 -04:00
twall 6941166a71 Fix JavaDoc warning 2011-08-11 12:02:56 -03:00
Timothy Wall 34ab92f0fb initial callback behavior flags setup and test harness 2011-08-11 09:51:21 -04:00
twall b5dbe3bb94 Added basic build instructions for w32/w64. 2011-08-09 12:31:58 -03:00
twall 542b9c47ed Merge pull request #19 from dblock/contributing
Added a contributing section and links to JavaDoc.
2011-08-08 06:59:41 -07:00
Timothy Wall bf6a58c9b7 fix reported file path for platform test results 2011-08-06 14:28:28 -04:00
Timothy Wall a7182710cc avoid deleting native library when it already exists as a file in the classpath 2011-08-06 14:26:12 -04:00
Timothy Wall cd238a0800 ensure temporary/unpacked files are marked for deletion; attempt deletion immediately after load 2011-08-06 13:39:46 -04:00
Timothy Wall 3e6f098b34 Add option to avoid automatic jar unpacking, with test 2011-08-06 10:21:22 -04:00
Timothy Wall 244dd4296b update jna website address 2011-08-06 10:20:47 -04:00
Timothy Wall c7ef8c3223 update main website in javadoc overview 2011-08-06 10:19:57 -04:00
Daniel Doubrovkine 34b5f2f206 Moved javadoc one level back. 2011-08-06 08:58:26 -04:00
Timothy Wall ae4c442077 fix incorrect comment 2011-08-05 18:08:21 -04:00
dblock 1da72d973d Reformatted. 2011-08-05 12:29:26 -04:00
dblock 8ef79fb6a6 Try without spaces. 2011-08-05 12:27:45 -04:00
dblock 15e8e58f67 Lets try again. 2011-08-05 12:27:10 -04:00
dblock c082e4813d One more tab. 2011-08-05 12:26:18 -04:00
dblock fc2c75c7df Added link to JavaDoc. 2011-08-05 12:24:52 -04:00
dblock d033c4c5a9 More contributing. 2011-08-05 12:22:25 -04:00
dblock 04e4a24664 Merge branch 'master' of github.com:twall/jna into contributing 2011-08-05 12:20:29 -04:00
Daniel Doubrovkine (dB.) 2a7ecd3847 Merge pull request #18 from dblock/javadoc
Regenerated 3.3.0 javadocs into www.
2011-08-05 09:20:06 -07:00
dblock 727c8a47d1 Updated Javadoc. 2011-08-05 12:09:54 -04:00
dblock 37630b17c3 Added contributing. 2011-08-05 12:07:49 -04:00
Daniel Doubrovkine (dB.) 1ec856379d Merge pull request #15 from tulskiy/master
Mapping functions required for global hotkeys
2011-07-27 11:48:58 -07:00
tulskiy 8d43c5cabf Updated CHANGES.md with new functions for global hotkeys 2011-07-28 00:39:56 +06:00
Denis Tulskiy 0fae5813f6 [osx] added Carbon library mapping with functions required for global hotkeys functionality 2011-07-28 00:31:44 +06:00
Denis Tulskiy 62242cd708 [x11] added mappings to XGrabKey and XUngrabKey functions used for Global Hotkeys and XSetErrorHanler used to handle program errors without exiting 2011-07-28 00:31:43 +06:00
Denis Tulskiy 5c758d3baf [user32] added mappings to RegisterHotKey and UnregisterHotKey functions used for Global Hotkeys 2011-07-28 00:31:43 +06:00
Daniel Doubrovkine (dB.) 1f495f5fec Merge pull request #16 from tmyroadctfig/master
Updated changes.md as per code review comments.
2011-07-27 05:02:52 -07:00
Luke Quinane 9e6ebd4c8e Update changes.md - move new functions to correct sub-heading and expand the added list. 2011-07-27 09:12:53 +10:00
twall dd323edec4 Merge pull request #14 from bhamail/master
first attempt at a pull request...
2011-07-21 17:44:11 -07:00
Dan Rollo 53006d6ff4 replace non-UTF8 character 2011-07-21 19:51:51 -04:00
Daniel Doubrovkine (dB.) 94097d4656 Merge pull request #11 from tmyroadctfig/master
Code review changes.
2011-07-13 04:23:37 -07:00
Luke Quinane 033ef99663 Update changes.md. 2011-07-13 15:46:50 +10:00
Luke Quinane c82e2b01a4 Code review changes - remove ANSI comments and make all functions Unicode. 2011-07-12 08:58:52 +10:00
Luke Quinane b25bc96eb7 Code review changes - move some constants. 2011-07-12 08:47:13 +10:00
Timothy Wall 00c79242fe closes #10 2011-07-11 13:05:18 -04:00
Timothy Wall 46dac8226a Merge branch 'JNA-184' of https://github.com/kohsuke/jna into kohsuke-10 2011-07-11 12:42:49 -04:00
Daniel Doubrovkine (dB.) 8e919e7298 Merge pull request #2 from tmyroadctfig/master
Added some more Win32 platform calls.
2011-07-11 05:28:34 -07:00
Luke Quinane 499b115a01 Merge remote-tracking branch 'upstream/master' 2011-07-11 10:15:06 +10:00
Kohsuke Kawaguchi 75c0885a5b Integrating the fix for JNA-184 as submitted in http://java.net/jira/browse/JNA-184 2011-07-10 10:57:47 -07:00
Timothy Wall 1cec02f2d8 add linux/ppc failure notes 2011-07-08 09:23:54 -04:00
Timothy Wall b05e7835c6 add linux/ppc native 2011-07-08 15:22:30 +02:00
Timothy Wall 62201ceba0 fix structure alignment issues on linux/ppc 2011-07-08 14:32:54 +02:00
Timothy Wall 7d28dd8114 move osgi entries to the proper location 2011-07-08 07:32:08 -04:00
Luke Quinane 6d3f003133 Add version docs and test. 2011-07-08 10:11:33 +10:00
Luke Quinane 167d6bcbb7 Move more values into the correct Java file. 2011-07-07 11:19:54 +10:00
Luke Quinane fac681cfa2 Move another value into the correct Java file. 2011-07-07 11:11:30 +10:00
Luke Quinane a1643fcdc2 Move another value into the correct Java file. 2011-07-07 11:10:42 +10:00
Luke Quinane d1d7f2eb2b Add documentation for some more structures / values. 2011-07-07 11:05:06 +10:00
Luke Quinane 605ab234d7 Add documentation for the SetupApi interface. 2011-07-07 10:47:15 +10:00
Luke Quinane d10c7c922e Add tests and documentation for the MSI interface. Add some licence details to new files. 2011-07-07 10:10:31 +10:00
Luke Quinane 1c82657c0c Add unit tests for new kernel32 functions. Move out bits declared in other header files. 2011-07-06 14:53:09 +10:00
Luke Quinane a4a7faba40 Move new win32 structures into the correct Java files. Migrate new win32 interfaces still in the old project structure. 2011-07-06 13:31:28 +10:00
Luke Quinane ffa4cc6ac9 Merge remote-tracking branch 'upstream/master' 2011-07-06 12:44:52 +10:00
Timothy Wall 0cdc7ff542 use java.io.tmpdir as a fallback if can't create jna tmpdir 2011-06-23 10:07:25 -04:00
Timothy Wall 71de662675 revise temporary file cleanup on win32 2011-06-23 08:34:08 -04:00
Timothy Wall a18e453686 move jnalib up to top level 2011-06-22 07:34:11 -04:00
Daniel Doubrovkine (dB.) 6e99ab0184 Merge pull request #3 from notnoop/master
Correct the Callback documentation
2011-06-21 08:37:59 -07:00
notnoop 4b8d91084b correct C equivalence of Callback documentation 2011-06-21 15:29:57 +00:00
dblock ed900e2b31 Fixed link. 2011-06-20 08:14:19 -04:00
dblock e2e67eac9f Added links to download. 2011-06-20 08:13:39 -04:00
Luke Quinane 7ce94ed58e Restore original imports. 2011-06-20 11:34:33 +10:00
Luke Quinane 57d44c3c36 Revert some removed upstream changes. 2011-06-20 11:31:39 +10:00
Luke Quinane 3a86a62865 Whitespace fixes. 2011-06-20 11:27:56 +10:00
Luke Quinane 65d5d4303d Added some missing javadocs. 2011-06-20 11:20:52 +10:00
Luke Quinane 8d7256ef08 Whitespace fixes. 2011-06-20 11:20:38 +10:00
Luke Quinane fd16cfc67a Revert further duplicated changes. 2011-06-20 10:22:29 +10:00
Luke Quinane e7bd55637a Remove duplicated structures. 2011-06-20 10:11:57 +10:00
Luke Quinane 0f459174c8 Fix compilation errors. 2011-06-20 10:05:47 +10:00
Luke Quinane 1d19323026 Copy changes into Github checkout. 2011-06-20 09:29:58 +10:00
Timothy Wall ed1cc99506 update CHANGES with current version 2011-06-17 10:36:51 -04:00
twall f66cb26c58 Merge pull request #1 from dblock/master
Initial documentation in markdown format.
2011-06-17 07:30:49 -07:00
dblock 707412d1b6 Merge branch 'master' of github.com:twall/jna 2011-06-07 20:25:46 -04:00
dblock a7ebdc5453 Sync with svn, 3.3.0 release. 2011-06-07 20:22:40 -04:00
dblock dc35957f63 Updating revisions 1197 and 1998 from svn. 2011-05-30 15:30:38 -04:00
dblock 0711483bb7 Updated readme. 2011-05-23 11:26:05 -04:00
dblock f4f5ff1887 Fixed table. 2011-05-23 11:24:30 -04:00
dblock 33a4fa3203 Changes are in markdown format. 2011-05-23 11:20:46 -04:00
dblock 8b22412e55 The rest of the documentation. 2011-05-23 11:19:40 -04:00
dblock 92d721d9d0 Started porting docs into markdown. 2011-05-23 10:47:24 -04:00
dblock 0f06d0b8ce Added top-level build.xml. 2011-05-23 09:37:48 -04:00
dblock e321ec4c6f Updated classpaths to jnalib, default Eclipse import. 2011-05-23 09:13:09 -04:00
dblock 2f2892ff08 Updated classpaths to match default Eclipse import (jnalib). 2011-05-23 09:11:44 -04:00
dblock 1dd559e80e Added .gitignore. 2011-05-23 08:47:12 -04:00
Timothy Wall b7fb1b7e5a update sparc jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1196 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-05-17 14:24:16 +00:00
Timothy Wall eb60877793 update native jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1195 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-05-16 17:10:05 +00:00
Timothy Wall 5907ce0a02 import libffi 3.0.10-rc8
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1194 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-04-30 21:54:20 +00:00
Timothy Wall 5a1d431e51 fix javadoc warnings
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1193 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-03-12 22:21:17 +00:00
Timothy Wall 0552c4a001 fix javadoc warning
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1192 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-03-12 22:20:48 +00:00
Timothy Wall 96d017869a move all native functions into Native class, reduce JNI crossings where possible
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1191 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-03-03 14:29:29 +00:00
Timothy Wall ddc2688af8 update release notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1190 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-03-03 14:26:47 +00:00
Timothy Wall baa60b6198 fix invalid PPC relocation types
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1189 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-03-03 12:15:51 +00:00
Timothy Wall 8abdddf11a avoid ant warning
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1188 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-03-03 12:13:02 +00:00
Timothy Wall 9141018b27 partial repair of osx build
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1187 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-02-28 23:04:20 +00:00
Timothy Wall 3370fecdf2 make Memory easier to extend, use synchronized map to track buffers
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1186 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-02-28 22:19:33 +00:00
Daniel Doubrovkine 5e91f76f0f Added Kernel32.GetFileAttributes and Kernel32Util.getFileAttributes.
Patch by cdanninger.
http://java.net/jira/browse/JNA-175


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1185 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-02-28 01:33:47 +00:00
Timothy Wall 557b3e1c93 allow multiple fields of same type in union
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1184 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-02-26 02:51:01 +00:00
Daniel Doubrovkine 3f65e56ccd Moved release notes to www. Modified HTML to fit Kenai website.
To upload to Kenai use Webdav to jna.java.net (w/SSL), the path is /website/jna/. 
Results at http://jna.java.net/. 

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1183 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-02-15 18:09:05 +00:00
nguillaumin 5bd2cba2c2 Added platform.win32.Advapi32.ImpersonateSelf
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1182 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-02-03 04:04:12 +00:00
nguillaumin 3de7eb58a7 Added platform.win32.Advapi32.AdjustTokenPrivileges, platform.win32.Advapi32.LookupPrivilegeName, platform.win32.Advapi32.LookupPrivilegeValue + tests.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1181 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-01-30 22:31:15 +00:00
nguillaumin 41eb294ce6 [issue #169] Added new Win32 platform function mappings related to process creation. SECURITY_ATTRIBUTES structure has been moved to WinBase to reflect latest MSDN doco.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1180 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-01-16 22:17:34 +00:00
Timothy Wall ba94f2ebe0 add platform.jar to maven package
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1179 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-01-12 14:34:21 +00:00
Timothy Wall 7912248950 add platform.jar to maven package
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1178 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2011-01-12 14:24:50 +00:00
Daniel Doubrovkine 5d27c255b3 Killed link to forum. Forum RIP.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1177 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-12-22 04:56:38 +00:00
Eugine Lev 80e86e3b83 Bug: fix issues with starting/stopping services, caused by the service resetting progress checkpoint to 0.
Add getters for service handle and service manager handle in W32Service and W32ServiceManager respectively.

CR: dBlock

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1176 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-12-14 19:28:19 +00:00
Daniel Doubrovkine 3a759f1eea Fix platform.win32.Netapi32Util.getDC AV on Win64
https://jna.dev.java.net/issues/show_bug.cgi?id=167
Fix Advapi32Test.testGetTokenOwnerInformation AV.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1175 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-12-13 18:35:21 +00:00
Timothy Wall a09e503f19 fix Structure(Pointer) array field init bugs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1174 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-11-24 22:59:12 +00:00
Timothy Wall da4524b05c partially fix build on OSX 10.6 (omits ppc build)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1173 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-11-24 21:59:42 +00:00
Timothy Wall 1a98283709 Fix NPE in array element initialization
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1172 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-11-24 21:50:09 +00:00
Timothy Wall acca8c5ac9 add two (failing) tests based on Samuel Audet's reports on lack of field initialization in Structure with Pointer ctors
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1171 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-11-24 20:25:03 +00:00
Timothy Wall 55eabb84e4 fix Structure.StructureSet.Iterator bug
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1170 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-11-24 20:15:45 +00:00
Daniel Doubrovkine 90ba9fce2a Added EventLogRecord.getData() and getStrings().
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1169 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-13 23:57:22 +00:00
Daniel Doubrovkine 76b3982ddd Fixed Javadoc warnings.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1168 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-06 21:35:28 +00:00
Daniel Doubrovkine c946f80d5b Fixed Javadoc warnings.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1167 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-06 21:34:20 +00:00
Eugine Lev 8d350c7d99 Add platform.win32.W32ServiceManager and W32Service.
Add platform.win32.Kernel32.GetTickCount.
CR: dBlock

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1166 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-06 21:18:43 +00:00
Daniel Doubrovkine 7cd7fb8d6c Add REG_BINARY, REG_EXPAND_SZ and REG_MULTI_SZ support to Advapi32Util.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1165 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-06 14:26:31 +00:00
Daniel Doubrovkine b12e563340 Build break: fixed service name in Advapi32Test.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1164 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-06 03:39:51 +00:00
Daniel Doubrovkine 9c0aadce1e Added REG_BINARY support to Advapi32Util registry functions.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1163 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-06 01:03:30 +00:00
Daniel Doubrovkine b8d538b1b4 Removed unused functions in NTService demo, equivalents have long been ported to platform.win32.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1162 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-06 01:02:18 +00:00
Daniel Doubrovkine 0219cd71b9 Fix platform.win32.Kernel32.GetNativeSystemInfo and GetSystemInfo AV on Win64.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1161 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-06 00:03:25 +00:00
Eugine Lev 899fcbdfcc Add Win32 Service functions to platform.win32.Advapi32
CR: dBlock

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1160 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-05 23:51:34 +00:00
Daniel Doubrovkine 79fed6e32f Updated projects using JNA to be a link to a forum where people can post themselves.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1159 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-10-03 20:42:48 +00:00
Daniel Doubrovkine 55263ca11d Documented EVENTLOGRECORD.
Added flags to iterate forwards and backwards.
Collapsed record ID using the value in the structure.
Shortened tests.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1158 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-30 20:04:58 +00:00
Daniel Doubrovkine fe1f4a3bac Add EventLogIterator to Advapi32Util.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1157 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-30 15:08:26 +00:00
Daniel Doubrovkine dd4fda55b5 Re-oredered test report for JNA to run after tests to avoid merging wrong results.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1156 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-29 14:03:56 +00:00
Daniel Doubrovkine 2aae506110 Added xml test report, generating in jnalib\contrib\platform\build\test\results\TESTS-TestSuites.xml.
Shortened runtime of testReadEventLogEntries.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1155 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-29 14:01:56 +00:00
Daniel Doubrovkine aae54a6f41 Added WinspoolUtil.getPrinterInfo4.
Not expecting failure in spool tests on the first call: when no printers are installed the function succeeds and returns 0 bytes required and 0 printers returned.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1154 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-29 12:18:31 +00:00
Daniel Doubrovkine 89da58adec Added PRINTER_INFO_4.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1153 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-29 02:41:40 +00:00
Daniel Doubrovkine 57ef003eb9 Added Advapi32.GetOldestEventLogRecord.
Added WinNT.EVENTLOGRECORD.
Bug: ReadEventLog broken, added full test.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1152 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-29 01:24:56 +00:00
Daniel Doubrovkine d378a64096 Hopefully fixed the WinspoolTest for when there're no printers installed.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1151 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-29 00:17:01 +00:00
Daniel Doubrovkine 58ac91bc10 Fixed spool tests for cases where no printers are available.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1150 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-28 23:43:19 +00:00
Daniel Doubrovkine 97602c0bf8 Fixed a number if UNUSED warnings.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1149 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-28 19:42:46 +00:00
Daniel Doubrovkine 8523c487c1 platform.win32.Advapi32Util.registryCreateKey returns true if key was created, false if it already exists.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1148 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-28 15:47:03 +00:00
Daniel Doubrovkine 3580b58bf6 Add platform.win32.Kernel32.DeleteFile and com.sun.jna.platform.win32.deleteFile.
Add Event Logging functions to platform.win32.Advapi32.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1147 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-09-27 23:51:27 +00:00
Timothy Wall 9b26a4d5ce add omitted field type which might use current value if available
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1146 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-29 15:46:00 +00:00
Timothy Wall c43fc68bc8 fix potential NPE
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1145 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-29 15:43:44 +00:00
Timothy Wall df07539331 fix unused parameter warnings under gcc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1144 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-29 15:22:22 +00:00
Timothy Wall 563931750b fix compiler error
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1143 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-29 15:22:02 +00:00
Timothy Wall 6b090de7b1 avoid potential overflow
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1142 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-29 14:28:54 +00:00
Timothy Wall d8863ef95f fulfill hashCode contract for Function
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1141 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-29 14:28:21 +00:00
Timothy Wall 36f9595ce7 make memory clear intent obvious
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1140 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-29 14:26:53 +00:00
Timothy Wall 48565e6305 integrate platform javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1139 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-22 15:08:26 +00:00
Timothy Wall 3727f9583b remove extraneous stuff from source archives
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1137 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-21 14:48:27 +00:00
Timothy Wall 4a6bbf0b3c update javadoc (version change)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1136 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-21 03:17:25 +00:00
Timothy Wall 7513a7157f ensure source properly synched with binaries
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1135 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-21 03:11:04 +00:00
Timothy Wall e7dbdb6ead tweak BITMAPINFO structure
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1134 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-21 01:39:21 +00:00
Timothy Wall db5f101bfc tweak BITMAPINFO structure
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1133 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-21 01:39:00 +00:00
Timothy Wall 3c06e8b6fd add GDI test
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1132 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-21 01:33:44 +00:00
Timothy Wall 28f94cbd0b simplify and clean up contrib hierarchy, fix contrib builds on 64-bit platforms
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1131 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-20 02:30:38 +00:00
Timothy Wall 6f37cbd946 update platform.jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1128 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-20 01:39:22 +00:00
Timothy Wall 396281263b update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1126 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 20:44:33 +00:00
Timothy Wall a00e8ac201 tweak version on main jar file
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1125 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 20:31:04 +00:00
Timothy Wall b1772a89c1 bump version in release notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1124 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 20:15:58 +00:00
Timothy Wall 58f07ff045 update jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1123 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 19:56:16 +00:00
Timothy Wall 12f99d4fc7 update native lib to 3.2.2
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1122 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 19:40:26 +00:00
Timothy Wall 05da0a6877 update native jar to 3.2.2
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1121 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 19:21:05 +00:00
Timothy Wall 46ce871f34 update copyright notices
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1120 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 19:20:51 +00:00
Timothy Wall 4b22c2f044 update release notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1119 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 19:10:54 +00:00
Timothy Wall 4014828eff add some GDI32 functions
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1118 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 19:09:53 +00:00
Timothy Wall bc87a62d59 update native lib to 3.2.2
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1117 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 15:40:33 +00:00
Timothy Wall f6862442d3 update native lib to 3.2.2
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1116 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 15:22:42 +00:00
Timothy Wall bff7f57eb8 update native lib to 3.2.2
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1115 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 15:17:21 +00:00
Timothy Wall e19024ca0d update native to 3.2.2
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1114 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 15:07:25 +00:00
Timothy Wall 73997e4799 update native libs to 3.2.2
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1113 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 13:28:35 +00:00
Timothy Wall ffa97aa438 update native lib (w/ correct version)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1112 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 13:22:00 +00:00
Timothy Wall d08244dfd8 properly patch Makefile with native version
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1111 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 13:15:14 +00:00
Timothy Wall 2e0d367045 update native code
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1110 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 13:09:12 +00:00
Timothy Wall 0f1fb2e6a1 Bump native code bug revision
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1109 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 13:05:17 +00:00
Timothy Wall 672e362ed8 add pointer peer accessor
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1108 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-19 13:04:05 +00:00
Daniel Doubrovkine bcae16c441 Native.loadLibrary can now load .drv files.
Add platform.win32.Winspool.GetPrinterInfo.
Add platform.win32.WinspoolUtil.getPrinterInfo1.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1107 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-18 16:51:39 +00:00
Timothy Wall 19b8f5cb59 clarify FAQ entry
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1106 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-16 14:41:05 +00:00
Timothy Wall 68b37156d8 update FAQ
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1105 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-16 14:13:28 +00:00
Timothy Wall d9237b64c0 update FAQ
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1104 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-07-16 14:05:56 +00:00
Scott Palmer da037b38e3 Updated release notes.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1103 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-06-28 13:20:15 +00:00
Scott Palmer 62f864f4ab Added SHGetDesktopFolder.
It obtains a COM interface, so this is just to prepare
for Com4JNA support (will need to get a COM interface
to test Com4JNA).



git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1102 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-06-25 19:13:56 +00:00
Daniel Doubrovkine bf89f1d37d Add Kernel32.GetDiskFreeSpaceEx, GetLogicalDriveStrings, GlobalMemoryStatusEx.
Add Kernel32Util.getLogicalDriveStrings.
Add WinDef ULONGLONG and DWORDLONG.
Refactor WinNT.LARGE_INTEGER into a union.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1101 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-06-23 00:55:05 +00:00
Daniel Doubrovkine 3dc986e609 Added VER* constants.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1100 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-06-22 17:05:38 +00:00
Daniel Doubrovkine 2f5e874201 Add com.sun.jna.platform.win32.BaseTSD.DWORD_PTR.
Add com.sun.jna.platform.win32.WinBase.SYSTEM_INFO.
Add com.sun.jna.platform.win32.WinNT.OSVERSIONINFOEX.
Add Kernel32 GetVersionEx, GetSystemInfo, GetNativeSystemInfo and IsWow64Process.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1099 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-06-22 14:46:07 +00:00
Daniel Doubrovkine 05291932f8 Add com.sun.jna.platform.win32.Kernel32.GetVersion and GetVersionEx.
Add com.sun.jna.platform.win32.User32.GetSystemMetrics.
Refactor constants from com.sun.jna.platform.win32.GDI32 into WinGDI, matching Windows SDK headers.
Refactor constants from com.sun.jna.platform.win32.User32 into WinUser, matching Windows SDK headers.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1098 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-06-22 02:39:37 +00:00
Timothy Wall 72aa450ecb Provide String.replace for 1.4 compatibility
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1097 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-06-18 11:07:10 +00:00
Daniel Doubrovkine 926ea21fe0 Added Advapi32Util.isWellKnownSid.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1096 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-06-16 12:10:45 +00:00
Daniel Doubrovkine 657a077cdb Add com.sun.jna.platform.win32.WinNT.WELL_KNOWN_SID_TYPE, SECURITY_MAX_SID_SIZE and other related SID-related constants.
Add com.sun.jna.platform.win32.Advapi32.CreateWellKnownSid and IsWellKnownSid. 

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1095 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-06-15 14:41:44 +00:00
Daniel Doubrovkine 9a90f56845 Fixed incorrect comments on autoread/write.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1094 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-06-02 17:24:45 +00:00
Daniel Doubrovkine 7d36e0d63b Fix error not reported properly in getTokenGroups/getTokenAccount.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1093 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-28 23:29:55 +00:00
Daniel Doubrovkine 865d5ed7a1 Updated copyright notices so that Tim doesn't go to jail for my bugs (also makes my company legal happy).
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1092 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-28 21:27:01 +00:00
Daniel Doubrovkine 9dd91ee17e Deleting the wrong pointer.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1091 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-28 21:08:34 +00:00
Daniel Doubrovkine 425ea821d7 Add platform.win32.Secur32.ImpersonateSecurityContext and RevertSecurityContext.
Fix platform.win32.Secur32.QuerySecurityContextToken take a CtxtHandle, avoid indirection.
Updated release notes with win32 changes so far.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1090 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-28 14:58:27 +00:00
Scott Palmer bea5049a2f Updated release notes to reflect new behavior of jna.library.path.
Fixed invalid HTML in the Release 3.0 notes.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1089 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-20 18:54:54 +00:00
Scott Palmer eae1e34696 Re-evaluate jna.library.path on each library load instead of caching the value.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1088 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-20 14:21:59 +00:00
Scott Palmer e63b6b00bc Added ObjBase.java for constant definitions. Modified unit test to use constants from ObjBase.java
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1087 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-19 13:26:45 +00:00
Daniel Doubrovkine e5b3ed226b Bug: read() of uninitialized memory in getTokenGroups/getTokenAccount.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1086 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-16 22:33:28 +00:00
Daniel Doubrovkine d5ce354c87 Added missing docs.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1085 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-14 16:50:11 +00:00
Timothy Wall e280838989 fix typo in comment
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1084 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-14 13:38:15 +00:00
Timothy Wall 2309054b1f address issue 156
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1083 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-14 13:10:56 +00:00
Timothy Wall 9dcc44a76b addrss issue 154
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1082 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-14 13:08:13 +00:00
Scott Palmer 7a417c6d3b Moved CLSCTX_* definitions to WTypes.java
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1081 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-13 20:51:44 +00:00
Scott Palmer 425ab15ae1 Added CoInitializeEx, CoUninitialize, and CoCreateInstance, with unit tests.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1080 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-13 18:47:54 +00:00
Daniel Doubrovkine c75ff4f118 Minor doc/comment changes.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1079 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-12 20:14:26 +00:00
Daniel Doubrovkine 75d3dd19ec Added Scott Palmer's oleaut32.dll interface + tests.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1078 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-12 20:11:41 +00:00
Timothy Wall 4cd556555e add note on win32 gcc version
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1077 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-05-12 13:30:03 +00:00
Daniel Doubrovkine feebe921af Fixed all the trivial warnings. Down to about 30 or so.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1076 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-28 00:38:42 +00:00
Daniel Doubrovkine 92929308bd Refactor com.sun.jna.platform.win32.WINBASE into WinDef, WinNT and BaseTSD, matching Windows SDK headers.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1075 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-27 02:10:00 +00:00
Timothy Wall ca4f14b555 fix issue 152
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1074 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-25 20:05:14 +00:00
Timothy Wall a7bcfacbd9 fix issue 151
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1073 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-15 13:22:45 +00:00
Timothy Wall e097b4820d fix deprecation warnings
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1072 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-13 21:22:45 +00:00
Timothy Wall 566ec7974c split contrib jars into its own target
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1071 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-13 17:37:45 +00:00
Timothy Wall c735d6c420 avoid deprecated function
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1070 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-13 17:31:21 +00:00
Timothy Wall cf54ca9551 fix issue 133
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1069 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-13 17:04:04 +00:00
Timothy Wall 9f1da1b562 sync libffi
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1068 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-10 16:36:02 +00:00
Timothy Wall f5a3dbf82b add OSX 10.6 SDK
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1067 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-10 16:34:00 +00:00
Daniel Doubrovkine 89f83e796a Collapsing accounts and groups, all of those are just windows accounts.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1066 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-07 19:27:20 +00:00
Daniel Doubrovkine 977a9e49c5 Extended Group to include FQN and domain.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1065 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-07 16:33:19 +00:00
Daniel Doubrovkine 7ee0a4b39f Added 3.2.5 javadoc, fixed links in index.html.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1064 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-06 16:27:46 +00:00
Daniel Doubrovkine 4268e3a1d2 Release 3.2.5.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1062 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-06 15:32:21 +00:00
Daniel Doubrovkine 860b9a266a Fixed demo builds to make .jar files double-clickable.
Added eclipse project to www.
Documented platform.jar in site.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1061 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-06 15:14:53 +00:00
Daniel Doubrovkine c39d752ccb Added Netapi32.DsGetDcName, DsGetForestTrustInformation and DsEnumerateDomainTrusts.
Ported some of DsGetDC.h and NTSecApi.h.
Bug: Netapi32Util.getDCName returns wrong value.
Bug: Netapi32Util.getCurrentUserLocalGroups doesn't work for a user logged onto a domain.
Added WinNT.LARGE_INTEGER.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1060 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-02 17:05:27 +00:00
Daniel Doubrovkine 15db1cf385 Updated release notes with all the win32/platform changes.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1059 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-01 15:47:49 +00:00
Daniel Doubrovkine 38d684d1e6 Used generics for several existing utility classes, fixing warnings (platform is built with Java 1.5+). Split FileUtils into win32, mac specifics so we can write os-based unit tests just like W32FileMinotorTest.
Fixed exception in W32FileMonitor which throws an unhandled exception when disposing because the watched handle is closed.
Modified W32FileUtils and ShellAPI's SHFILEOPSTRUCT to support unicode paths.
Fixed ShellApi structure alignment introduced in a previous check-in.
Readded LastErrorException string constructor.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1058 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-04-01 12:59:08 +00:00
Daniel Doubrovkine ccb1bc514b Split FileMonitor and W32FileMinitor into different namespaces, removed isWindows hack in the tests.
Added Kernel32.GetTempPath and Kernel32Util.getTempPath.
Added missing copyright notices.
Divided Shell32 into ShellApi (ported from ShellApi.h), ShlObj (ported from ShlObj.h).
Added Shell32Util.getFolderPath.
Added WinDef (ported from Windef.h) with MAX_PATH.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1057 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-31 15:47:04 +00:00
Daniel Doubrovkine 27c46a2c8e Added Kernel32Util.FormatMessageFromLastError and FormatMessageFromHR.
Added Win32Exception that properly maps system error messages, to be used in Win32 util classes instead of LastErrorException that's a cross-platform version that doesn't try to format the string error.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1056 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-31 14:08:25 +00:00
Daniel Doubrovkine ff2f1d237a Added Ole32.CoCreateGuid, StringFromGUID2 and IIDFromString.
Added Ole32Util.getGUIDFromString, getStringFromGUID and generateGUID.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1055 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-30 23:09:26 +00:00
Daniel Doubrovkine 402f4c162c Added Secur32.QuerySecurityContextToken.
Added Sspi.PSecHandle.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1054 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-30 21:45:14 +00:00
Daniel Doubrovkine 81013a98b4 Added Secur32.EnumerateSecurityPackages and FreeContextBuffer.
Added Secur32Util.getSecurityPackages.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1053 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-29 17:51:58 +00:00
Daniel Doubrovkine 971dd622c7 Added Sspi.java, ported from sspi.h.
Added Secur32.AcquireCredentialsHandle, InitializeSecurityContext, DeleteSecurityContext, AcceptSecurityContext.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1052 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-26 13:11:30 +00:00
Daniel Doubrovkine 0045d31e2d Added Crypt32.CryptProtectData and CryptUnprotectData.
Added WinCrypt, ported from WinCrypt.h.
Added Crypt32Util.cryptProtectData and cryptUnprotectData.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1051 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-24 14:44:30 +00:00
Daniel Doubrovkine caef8f4ebc Added Advapi32Util.registryGetKeys and registryGetValues.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1050 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-24 11:51:53 +00:00
Daniel Doubrovkine 6116c1ae71 Moved definitions from Kernel32 into WinNT where they belong.
Added Advapi32.RegOpenKeyEx, RegQueryValueEx, RegCloseKey, RegDeleteValue, RegSetValueEx, RegCreateKeyEx, RegDeleteKey, RegEnumKeyEx, RegEnumValue, RegQueryInfoKey.
Added Advapi32Util.registryKeyExists, registryValueExists, registryGetStringValue, registryGetIntValue, registryCreateKey, registrySetIntValue, registrySetStringValue, registryDeleteKey, registryDeleteValue.
Added missing documentation in Kernel32.
Added Wdm, NtDll.ZwQueryKey and NtDllUtil.getKeyName.
Added WinReg and REG* definitions from WinNT.h.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1049 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-23 18:05:45 +00:00
Timothy Wall 03ecf2b0bb use 1.4-compatible URI generation
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1048 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-23 02:43:55 +00:00
Daniel Doubrovkine d4a5005273 Wrong comment.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1047 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-21 15:17:32 +00:00
Daniel Doubrovkine 7522f29f0a Commented out impersonation test. Wild guess on which one's failing.
Fixed warnings with function parameter names.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1046 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-21 14:59:18 +00:00
Daniel Doubrovkine 09f0a2e4a6 Added Advapi32.ImpersonateLoggedOnUser and RevertToSelf.
Added Advapi32Util.GetTokenGroups, GetTokenAccount.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1045 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-18 03:52:45 +00:00
Daniel Doubrovkine aa846929f3 Added LMAccess GROUP_USERS_INFO_*, LOCALGROUP_USERS_INFO_*, GROUP_INFO_* and USE_PRIV* masks.
Added Netapi32.NetGroupEnum, NetUserEnum, NetUserGetGroups, NetUserGetLocalGroups, NetUserAdd, NetUserDel and NetUserChangePassword.
Added Netapi32Util.getGlobalGroups, getUsers, getUserLocalGroups, getCurrentUserGroups, getUserGroups.
Fixed tmp location to try to get windows tmp for File monitor test.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1044 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-16 21:59:16 +00:00
Daniel Doubrovkine b378af7cb1 Refactored Advapi32Util getAccount* functions to getAccountByName and getAccountBySid returning an Account structure.
Added Advapi32Util.getCurrentUserGroups.
Added LMAccess LOCALGROUP_INFO_1, USER_INFO_0 and USER_INFO_1.
Refactored Netapi32Util.getLocalGroups to return a Group structure.
Added WinNT TOKEN_GROUPS, SID_NAME_USE and SID_AND_ATTRIBUTES.
 

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1043 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-16 12:19:14 +00:00
Daniel Doubrovkine 8b549a487f Replaced SID references by PSID, PSIDByReference and PSID.ByReference.
Added Advapi32.IsValidSid, OpenProcessToken, DuplicateToken and GetTokenInformation.
Added WinNT.SECURITY_IMPERSONATION_LEVEL, TOKEN_INFORMATION_CLASS, SID_AND_ATTRIBUTES, TOKEN_OWNER, PSID, PSID_BY_REFERENCE, TOKEN_USER.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1042 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-12 23:11:17 +00:00
Daniel Doubrovkine 005f659eaa Renamed jnacontrib-*.jars to demo-*.jar for demos.
Added Advapi32.OpenThreadToken.
Added Kernel32.OpenThread, OpenProcess and some documentation for tested functions.
Added WinNT.java, ported from winnt.h for thread and token access defitions.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1041 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-10 17:09:03 +00:00
Daniel Doubrovkine a5aad94f24 Build break: chicken-and-egg problem of depending on dist/jna.jar.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1040 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-10 14:41:48 +00:00
Daniel Doubrovkine 52a6926da3 Added eclipse and ANT projects for all contrib folders. All build and run.
JnaContrib projects drop a jnacontrib-*.jar into dist.
Deleted leftover private settings in ntservice.
Added Advapi32.LogonUser.
Removed throws Exception in Advapi32Util.
Got rid of obsolete w32util.jar.


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1039 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-10 14:12:28 +00:00
Daniel Doubrovkine b3c0f003bb Don't run win32 tests on unix.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1038 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-09 23:48:54 +00:00
Daniel Doubrovkine 3d2360bc56 Merged platformutil and jna.platform into a contrib/platform package.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1037 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-09 23:17:55 +00:00
Daniel Doubrovkine 1267f51d8c Fixed typo in build.xml.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1036 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-09 18:15:34 +00:00
Daniel Doubrovkine e7328001a4 Got rid of w32util and moved its code to platformutil...win32.
Now platformutil is all of specific and cross-platform APIs.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1035 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-09 18:12:14 +00:00
Daniel Doubrovkine fc7b53e809 Got rid of examples.jar, split into several packages.
# platform apis - com.sun.jna.platform.*, part of jna.jar.
# platform wrappers and utilities (FileMonitor, KeyboardUtils, etc.) - contrib/com.sun.jna.platformutil, new platformutil.jar.
# demo and sample code - contrib/<new project for each demo>


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1034 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-09 17:56:58 +00:00
Daniel Doubrovkine 50637cb3c2 - Advapi32Util.getAccountName now always returns a fully qualified name.
- Added Kernel32Util with getComputerName.
- Added Netapi32Util.getDCName and getJoinStatus.
- Added Kernel32.GetComputerName
- Doc-ed some functions in Kernel32
- Added Netapi32.NetGetDCName
- Added Winbase with MAX_COMPUTER_NAME
- Added Kernel32.WaitForMultipleObjects

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1033 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-03-09 12:31:25 +00:00
Daniel Doubrovkine 11b4203874 Fixed w32util.jar distribution.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1032 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-02-24 22:37:53 +00:00
Daniel Doubrovkine 60beb432eb Running tests on windows only.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1031 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-02-24 21:00:21 +00:00
Daniel Doubrovkine 64331c9cf0 - Fixed eclipse build by adding an eclipse .project for contrib/src/w32util.
- Added W32util standalone build.xml, invoked from jna build.xml.
- Made all example.win32-s UNICODE.
- Ported Advapi32.LookupAccountName, LookupAccountSid from the NT service example to examples.win32 (pinvoke) and contrib.win32util (wrappers). Added tests for both pinvoke functions and wrappers.
- Renamed utility functions to lowercase for consistency in contrib.w32util.
- Added w32util.getAccountSid, getAccountName, convertSidStringToSid, 
convertSidToStringSid, etc. Fixed a crash in the converts.
- Added Netapi32Util.getLocalGroups.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1030 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-02-24 19:59:16 +00:00
Timothy Wall 00088d4093 add 'int' version of Pointer.createConstant
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1029 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-02-23 20:16:19 +00:00
Timothy Wall 472f3660e0 add test for INVALID_HANDLE_VALUE, add explicit long value
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1028 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-02-23 20:11:50 +00:00
Daniel Doubrovkine 3c13cc8c4d Added contrib folder to build, moved source into src and added test. Tests run in test targets.
Added w32util jar.
Fixed crash in Netapi32Test.
Fixed comment in Advapi32.java.
Moved baloontips into a package.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1027 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-02-23 16:01:30 +00:00
Timothy Wall 0792ac8eee fix INVALID_HANDLE_VALUE (64-bit)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1026 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-02-23 14:17:13 +00:00
Timothy Wall 4952af4ffe Fix INVALID_HANDLE_VALUE
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1025 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-02-23 14:14:54 +00:00
Daniel Doubrovkine 3fcca7ef56 Tentative fix for the broken Secur32Test UT: looks like on some OSs GetUserNAmeEx returns true when passed a null buffer and a size? Also fixed documentation warnings.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1024 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-02-22 23:50:01 +00:00
Daniel Doubrovkine e93244fef2 Advapi32:
GetUserNameW
 LookupAccountNameW
 ConvertSidToStringSidW
 ConvertStringSidToSidW
 GetLengthSid

Netapi32:
 NetGetJoinInformation
 NetApiBufferFree

Secur32:
 GetUserNameExW

W32Errors:
 Almost full port of winerror.h

Advapi32Util:
 GetUserName
 LookupAccountName
 ConvertSidToStringSid

Netapi32Util:
 GetDomainName

Secur32Util
 GetUserNameEx

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1023 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-02-22 22:54:09 +00:00
Timothy Wall acf75ce7fe fix read of NIO Buffer fields within structure
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1022 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2010-01-05 01:46:27 +00:00
philke 7560b6e53d added import java.util.Date;
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1021 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-12-21 18:57:12 +00:00
philke f5346bbec2 Removed @Override annotation to comply with 1.4 source code level
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1020 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-12-21 17:31:22 +00:00
philke 41958889fb Added FILETIME
Added functions for File Mapping
Added functions for Event handling
Added LocalAlloc

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1019 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-12-21 16:48:44 +00:00
Timothy Wall d439a7811d avoid auto-allocating structure memory if memory already provided
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1018 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-12-18 15:55:59 +00:00
Timothy Wall 4951c00d23 Ensure inherited structure fields are properly ordered
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1017 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-12-04 14:38:19 +00:00
Timothy Wall 202cd0d45e update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1015 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-11-20 13:57:19 +00:00
Timothy Wall 1502db6095 build 3.2.4
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1014 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-11-20 13:55:41 +00:00
Timothy Wall e8eea9e68e Fix issue 135
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1013 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-29 13:24:51 +00:00
Timothy Wall 396eb9f283 add linux/ia64
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1012 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-29 13:15:22 +00:00
Dan Rollo 378f400226 increase ServerSocket timeout again. Further testing on pokey machine shows jnlp download time ~30secs, and verify/launch time also ~30secs. Two minutes should be plenty, even on the worst of days.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1011 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-25 01:23:06 +00:00
Dan Rollo 37e02dfbd5 increase ServerSocket timeout in attempt to make test tolerant of very slow machine.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1010 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-25 00:31:11 +00:00
Dan Rollo dce66ec8ec remove unused variables and unused imports
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1009 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-25 00:29:53 +00:00
Timothy Wall 2fef67a08d provide easier mapping from native pointer to Function object
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1008 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-24 15:43:53 +00:00
Timothy Wall 50a17583c7 include clover.jar in full source zip
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1007 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-20 14:54:18 +00:00
Timothy Wall bfe2c7df83 add COM to FAQ
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1006 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-16 13:08:02 +00:00
Timothy Wall b3186dde12 update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1005 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-08 19:14:59 +00:00
Timothy Wall 628a33eb76 update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1004 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-08 19:12:24 +00:00
Timothy Wall 4373e66b1e 3.2.3 release
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1002 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-08 19:03:44 +00:00
Timothy Wall 2e67b0ad9f update netbeans project
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1001 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-08 18:54:59 +00:00
Timothy Wall a4cbe0635f ensure version information is always available
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1000 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-08 18:54:07 +00:00
Timothy Wall 8563419280 note OSX
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@999 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-07 12:43:19 +00:00
Timothy Wall 0974bd4a90 properly include Java sources in maven source zip
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@998 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-07 12:39:28 +00:00
Timothy Wall e1d47adc99 add note for OSX under JNLP
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@997 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-07 12:33:02 +00:00
Timothy Wall e5e171d913 fix TrayIcon mouseover exception in WindowUtils
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@996 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-04 01:01:54 +00:00
Timothy Wall 1e313227b8 remove apple-specific reference
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@995 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-03 23:42:01 +00:00
Timothy Wall 8d45a9e0cd fix transparent window toggle on OSX
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@994 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-02 20:02:00 +00:00
Timothy Wall 95568d76d3 fix win32 bug toggling windows transparent/opaque
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@993 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-02 18:51:03 +00:00
Timothy Wall d4a3442468 avoid overwriting unmodified Pointer objects
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@992 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-10-02 17:55:11 +00:00
Timothy Wall e262de22ea fix type declarations
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@991 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-09-29 20:30:15 +00:00
Timothy Wall 49243f1891 fix web start native library loading bugs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@990 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-09-21 17:10:56 +00:00
Timothy Wall 1a099ba549 no need to set layers transparent on osx
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@989 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-09-20 21:39:39 +00:00
Timothy Wall 2367133b4f move double buffer handling to a more appropriate location
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@988 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-09-17 13:15:12 +00:00
Timothy Wall c648a1933d fix double buffering bug on transparent windows
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@987 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-09-17 12:55:14 +00:00
Timothy Wall 598acf08da fix bug reading Structure.ByReference fields
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@986 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-09-14 12:46:08 +00:00
Timothy Wall 208a8dee90 fix email address
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@985 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-09-14 12:37:18 +00:00
Timothy Wall e9fb299565 fix comments/javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@984 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-08-20 12:10:30 +00:00
Timothy Wall 17a514ecd0 avoid writing final Structure fields
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@983 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-08-07 14:18:32 +00:00
Timothy Wall 38ac62cedd build 3.2.2
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@981 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-08-05 17:14:24 +00:00
Timothy Wall ce280731af only set javawebstart.version if not already set
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@980 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-08-05 14:17:37 +00:00
Timothy Wall 751fb57f71 fix web start test under NetX
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@979 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-08-05 14:07:41 +00:00
Timothy Wall be7d90abbf add length-specified Pointer.getStringArray()
update sunos-amd64.jar native
remove debug output

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@978 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-08-05 12:15:01 +00:00
Timothy Wall d59585dd4f update natives to 3.2.1
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@977 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-08-04 15:49:17 +00:00
Timothy Wall 7a695707a2 avoid potential error if dispatch fails due to bad arguments
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@976 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-08-04 14:01:06 +00:00
Timothy Wall 4e590c9450 fix issue 125
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@975 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-08-04 13:55:59 +00:00
Timothy Wall b069d1c9e9 add direct version of struct by value tests
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@974 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-08-04 13:22:44 +00:00
Timothy Wall 9fa1f7b981 fix bug writing null-valued ByReference structure fields
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@973 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-31 20:57:57 +00:00
Timothy Wall 4a68e4cd9d canonicalize auto-sync of structure arrays
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@972 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-31 16:58:15 +00:00
Timothy Wall 8320b6fd7c add missing direct mappings for new tests
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@971 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-31 16:44:29 +00:00
Timothy Wall e40cf0a1c4 synch callback structure args on callback return
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@970 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-28 20:00:13 +00:00
Timothy Wall 19106985d7 remove debug output
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@969 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-27 22:40:33 +00:00
Timothy Wall 3d817c54da add array wrapping tests
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@968 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-27 22:38:35 +00:00
Timothy Wall ca31877107 find proper c library automatically, avoids ubuntu crash
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@967 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-27 13:41:16 +00:00
Timothy Wall f5f9afefb0 avoid Structure.equals in read/write
reduce overhead of Structure.toString when struct contents aren't actually used

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@966 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-27 01:33:15 +00:00
Timothy Wall d42863603e fix Structure equals/hashcode
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@964 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-26 16:53:26 +00:00
Timothy Wall 2c19cf3e31 fix definition of HWND_BROADCAST
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@963 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-25 14:42:35 +00:00
Timothy Wall e7dc918c6a use non-null conversion context
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@962 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-21 14:02:58 +00:00
Timothy Wall 64c9e8212a update docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@961 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-21 13:45:43 +00:00
Timothy Wall 499c39f13d build linux/i386 against older glibc (2.3.4) for compatibility
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@959 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-17 18:12:48 +00:00
Timothy Wall bccdae735b rename native method according to Java class rename
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@958 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-17 02:52:47 +00:00
Timothy Wall 58120730a5 update notes on direct mapping
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@957 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-16 20:08:09 +00:00
Timothy Wall 5b8db8a680 add direct mapping note
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@956 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-15 13:50:54 +00:00
Timothy Wall 0acfd583c8 add jnaerator note
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@955 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-15 13:40:27 +00:00
Timothy Wall 402b7ef67e add marc strapetz' patch
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@954 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-15 13:05:36 +00:00
Timothy Wall 6944871c42 fix issue #121
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@953 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-15 13:03:53 +00:00
Timothy Wall b60da35689 update direct mapping info
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@952 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-14 19:24:16 +00:00
Timothy Wall 5204feddb1 update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@951 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-14 18:10:29 +00:00
Timothy Wall 68156df66b update native libraries
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@949 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-14 18:03:48 +00:00
Timothy Wall a9e8b27285 ensure proper method selection when java callback returns NativeMapped
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@948 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-14 17:46:01 +00:00
Timothy Wall b8f470ddbd fix compilation warnings/errors on win64
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@947 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-14 15:28:36 +00:00
Timothy Wall 9d075dd1d1 revert configury changes, incompatible w/ windows build
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@946 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-14 13:30:49 +00:00
Timothy Wall 4b802c6f60 update configury
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@945 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-13 20:50:27 +00:00
Timothy Wall 8ce9344dd0 update from libffi CVS (local patches applied upstream)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@944 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-13 14:15:02 +00:00
Timothy Wall cb2b386791 document getProcess usage
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@943 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-08 01:25:01 +00:00
Timothy Wall 7ee4681c10 enable accessing current process on w32
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@942 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-07 16:37:27 +00:00
Timothy Wall 82c0ea9df2 add test for NativeLibrary.getProcess()
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@941 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-07 15:39:16 +00:00
Timothy Wall 9070d80880 re-throw errors as errors
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@940 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-07 12:57:18 +00:00
Timothy Wall 45c53caf94 increase JWS timeout
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@939 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-07 11:56:17 +00:00
Timothy Wall c4947618c1 distinguish expected web start error from other errors
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@938 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-07 11:28:05 +00:00
Timothy Wall 941ed59c37 make structure read/write recursion detection thread-local
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@937 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-07 11:13:32 +00:00
Timothy Wall d76bbec1ab fix web start test for IBM J9
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@936 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-07 10:54:37 +00:00
Timothy Wall f5a1d98cf9 ensure clover.jar is signed
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@935 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-06 23:56:57 +00:00
Timothy Wall b0e6d837f0 provide toByteArray with String encoding option
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@934 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-06 13:28:28 +00:00
Timothy Wall b1cfb1b733 fix web start test on linux
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@933 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-06 13:15:04 +00:00
Timothy Wall 26a1212546 bump version, md5
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@932 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-06 10:49:59 +00:00
Timothy Wall 03b05aaae9 add test for callbacks w/type mapper w/differently-sized return types
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@931 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-06 10:29:59 +00:00
Timothy Wall f41c87d7c9 fix failing test on osx
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@930 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-06 10:21:13 +00:00
Timothy Wall b74deb5e35 narrow direct callback test failure
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@929 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-06 02:36:34 +00:00
Timothy Wall 240e2db637 improve test coverage, structure field error messages
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@928 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-06 01:09:07 +00:00
Timothy Wall 441947b6a4 ensure direct library mappings used in direct tests
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@927 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-06 01:06:40 +00:00
Timothy Wall 194bdaffcd add unicode equivalents
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@926 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-02 12:23:00 +00:00
Timothy Wall db6e9ff4c6 fix compiler warnings
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@925 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-01 15:47:09 +00:00
Timothy Wall 57261a1164 more performance notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@924 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-07-01 12:25:53 +00:00
Timothy Wall 0b116bb409 throw call errors *after* any cleanup
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@923 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-30 19:00:47 +00:00
Timothy Wall a5ad2e5de2 enable web start test on windows
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@922 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-26 20:06:25 +00:00
Timothy Wall b6928ff6c0 add test for auto-write of Structure.ByReference arrays
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@921 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-26 18:17:12 +00:00
Timothy Wall 4b03dd321c fix placement of exception throw
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@920 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-26 02:48:09 +00:00
Timothy Wall f7eefbd3d7 avoid making JNI calls after thrown exceptions
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@919 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-25 22:49:15 +00:00
Timothy Wall b23f7f9b27 fix setjmp/longjmp compiler warnings
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@918 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-25 15:41:37 +00:00
Timothy Wall b95bc7e4c4 remove redundant (and unreliable) test
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@917 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-25 15:29:27 +00:00
Timothy Wall 1593c0c347 add IBM J9 notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@916 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-25 15:26:13 +00:00
Timothy Wall c154663455 fix tests on windows
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@915 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-25 15:24:00 +00:00
Timothy Wall 13bc1901dc merge direct branch to trunk
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@913 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-25 13:58:15 +00:00
Timothy Wall 4f28322ac2 add ignores, update eclipse classpath
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@909 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-25 13:07:34 +00:00
Timothy Wall 756e2ced8b add web-start tests and test support
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@908 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-25 13:06:16 +00:00
Timothy Wall 1dc78b5209 fix typo
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@907 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-24 21:45:49 +00:00
Timothy Wall 3464093273 fix exception type
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@905 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-23 18:51:11 +00:00
Timothy Wall 4487214494 attempt to delete temporary native library in test
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@901 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-22 17:49:09 +00:00
Timothy Wall 6d7e222946 add direct mapping note
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@900 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-22 17:27:15 +00:00
Timothy Wall d12a6a3178 improve test coverage
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@899 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-21 19:50:29 +00:00
Timothy Wall ed9d609c35 provide more info in test failures
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@898 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-20 19:04:06 +00:00
Timothy Wall b86f359d93 Fix memory test on IBM J9
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@897 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-20 02:01:36 +00:00
Timothy Wall 02080dfcf8 fix tests on IBM J9 (windows) VM
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@896 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-20 01:54:37 +00:00
Timothy Wall 2768d25884 Fix test failures on IBM J9
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@895 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-20 00:11:21 +00:00
Timothy Wall 7bdf9896d2 Fix test failures on IBM J9
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@894 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-20 00:08:59 +00:00
Timothy Wall 3b4f84ded8 allow NativeMapped[] as function arguments
respect autoread/write structure setting in direct calls

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@893 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-19 17:05:57 +00:00
Timothy Wall 69abc52731 make tests independent of load order
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@892 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-19 01:40:43 +00:00
Timothy Wall 1671b1fb8b allow types derived from Buffer as Structure fields
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@891 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-18 21:26:24 +00:00
Timothy Wall 8735f4ef5c fix kernel32 function lookup
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@890 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-18 18:55:46 +00:00
Timothy Wall 86967b5786 fix w32 compilation errors
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@889 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-18 16:23:32 +00:00
Timothy Wall ca8ceeb130 remove debug output
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@888 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-18 15:15:24 +00:00
Timothy Wall 41d6f8eeea add last error exception for direct calls
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@887 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-18 14:34:57 +00:00
Timothy Wall 27b7805608 Handle last error as an exception if declared
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@886 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-18 14:12:18 +00:00
Timothy Wall fef39f7013 replace atexit example
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@885 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-16 10:31:24 +00:00
Timothy Wall b414b54c6b fix callback example
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@884 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-15 20:19:46 +00:00
Timothy Wall ccdbb20ad0 facilitate struct members pointing to arrays of struct
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@877 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-10 13:26:57 +00:00
Timothy Wall eb7e47bf29 doc various structure type mappings
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@876 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-10 13:23:53 +00:00
Timothy Wall 53988c7184 update clover library
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@874 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-08 13:45:15 +00:00
Timothy Wall 9092b2bdc5 add VM information to build output
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@873 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-07 12:19:29 +00:00
Timothy Wall 068353aa5b ensure temp test unicode-named library deleted
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@872 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-07 12:07:27 +00:00
Timothy Wall 95a17ddbf0 attempt to find cause of w32 cleanup failure
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@869 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-06 11:45:09 +00:00
Timothy Wall 6c8c455f5b fix compiler warnings
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@868 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-06 00:31:18 +00:00
Timothy Wall 282032e178 give FS more time to delete native lib
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@867 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-05 22:31:54 +00:00
Timothy Wall af63e6a80d account for VM implementations returning 'null' as a classloader
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@866 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-05 19:52:06 +00:00
Timothy Wall a46ba0da29 restrict installation of shudown hook
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@865 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-05 19:37:56 +00:00
Timothy Wall f7738bf65b Add tests for library unloading and loading from jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@864 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-05 17:18:08 +00:00
Timothy Wall bb11d1fe37 unload native library unpacked from jar if Native class unloaded
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@863 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-05 15:33:51 +00:00
Timothy Wall d02a2deb52 update front page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@859 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-04 14:52:04 +00:00
Timothy Wall 46105d849d add link to IAXClient applet
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@854 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-06-02 16:09:09 +00:00
Timothy Wall f16b6c3482 Omit JNA+AWT load test on headless systems
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@849 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-28 16:55:23 +00:00
Timothy Wall a9cb497045 allow callbacks in direct mappings
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@848 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-28 16:12:39 +00:00
Timothy Wall d529a34ecb revert last change
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@847 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-28 13:31:45 +00:00
Timothy Wall 5394029dc5 dynamically load libjsig if available
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@846 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-28 13:07:04 +00:00
Timothy Wall 28247737ca fix typo
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@845 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-27 20:01:14 +00:00
Timothy Wall 6448c2d8fb pass options to native library at interface definition
update javadoc to include direct mapping info

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@844 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-27 20:00:02 +00:00
Timothy Wall 4460ccc8ec fix SIGBUS/SIGSEGV on sparc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@843 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-27 13:02:46 +00:00
Timothy Wall 2b02a3c533 fix direct struct by value mapping
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@842 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-27 12:57:07 +00:00
Timothy Wall 6705513b86 add structure, string, NIO Buffer and primitive array support to direct type mapping
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@841 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-26 20:09:05 +00:00
Timothy Wall 4bd8d12481 use more appropriate exception types
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@840 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-26 19:55:15 +00:00
Timothy Wall ccaf3c283b avoid premature GC of Memory with NIO Buffers extant
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@839 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-26 19:54:26 +00:00
Timothy Wall ce4276a0cb fix layout
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@838 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 17:17:27 +00:00
Timothy Wall 709e316e56 fix layout
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@837 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 17:16:30 +00:00
Timothy Wall e46635d6ab fix layout
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@836 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 17:15:57 +00:00
Timothy Wall 0af8677ba4 fix layout
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@835 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 17:13:40 +00:00
Timothy Wall 9ab13daf09 fix layout
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@834 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 17:04:42 +00:00
Timothy Wall 17977fbabc fix layout
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@833 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 17:02:42 +00:00
xylo 83854047b7 reverted inadvertently adding another file in last commit
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@832 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 14:27:04 +00:00
xylo 28e56fd587 added a note that Xevie has been removed from xserver
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@831 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 14:21:49 +00:00
Timothy Wall 29fc6308b8 doc tweaks
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@830 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 13:35:23 +00:00
Timothy Wall 14a7df128d add missing header
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@829 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 13:27:15 +00:00
Timothy Wall dd4ef89d0a update main page w/direct calling info
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@828 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-21 13:23:33 +00:00
Timothy Wall 830ec91cbf update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@826 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 21:16:37 +00:00
Timothy Wall aee2d55fab update natives, jna.jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@825 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 21:12:55 +00:00
Timothy Wall 89ed7982e7 update native lib
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@824 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 21:04:04 +00:00
Timothy Wall 9f702c89ab update native libs (sunos)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@823 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 20:55:33 +00:00
Timothy Wall 2f76efd0f6 update native lib
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@822 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 20:09:26 +00:00
Timothy Wall fae18c72c3 update native lib
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@821 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 19:54:05 +00:00
Timothy Wall 1586f6ee2b update native libs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@820 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 19:45:19 +00:00
Timothy Wall 4ce6214526 update native lib
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@819 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 14:36:45 +00:00
Timothy Wall e370e4b65e update native jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@818 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 14:08:14 +00:00
Timothy Wall 944de2d3f5 update native jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@817 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 13:50:29 +00:00
Timothy Wall f32146368d prep for 3.1 release
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@816 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-20 13:49:42 +00:00
Timothy Wall 8d45e9b016 add notes to setProtected javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@815 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-19 14:23:56 +00:00
Timothy Wall 70227861ff use libjsig.so if available
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@814 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-19 14:15:13 +00:00
Timothy Wall 20e542516b make gc more robust on sparc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@813 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-19 13:35:29 +00:00
Timothy Wall 73ad21df73 add link to windows mobile implementation
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@812 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-19 11:02:52 +00:00
Timothy Wall a67fe7e43d %0@& windows
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@811 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-19 10:36:10 +00:00
Timothy Wall a15ddd9f88 blank checksum between releases
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@810 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-19 10:22:00 +00:00
Timothy Wall b27f9bf930 fix docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@809 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-19 10:13:54 +00:00
Timothy Wall d5c28f98f1 fix javadoc errors
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@808 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-19 10:10:10 +00:00
Timothy Wall 16b283ed00 add raw call convention notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@807 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-19 10:04:41 +00:00
Timothy Wall 97b43889a1 add raw calling convention
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@806 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-19 09:54:12 +00:00
Timothy Wall 05efa12411 make callback gc test more robust
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@805 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-18 21:11:41 +00:00
Timothy Wall 3e60495232 clean up win64 patch
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@804 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-18 20:44:36 +00:00
Timothy Wall 45522b0710 win32 tweaks, update native jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@803 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-18 16:08:52 +00:00
Timothy Wall d67d25eb7b remove extraneous output
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@802 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-18 15:47:06 +00:00
Timothy Wall 2538690fb4 unions require a structure-based ffi_type
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@801 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-18 15:31:12 +00:00
Timothy Wall 4c23b2518e protect old x86 code from win64 changes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@800 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-18 15:22:07 +00:00
Timothy Wall 9daade9816 fix compiler warning in 'sizeof'
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@799 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-14 18:43:11 +00:00
Timothy Wall 5f925f0070 correct OVERLAPPED types
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@798 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-14 18:40:36 +00:00
Timothy Wall 38b0cd7780 provide sizeof native function, update checksum
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@797 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-12 17:32:24 +00:00
Timothy Wall e46391042b regenerated config files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@796 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-12 14:33:50 +00:00
Timothy Wall 553a03b05f ensure sufficient space allocated for win64 ffi_call stack
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@795 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-11 21:27:01 +00:00
Timothy Wall 24c1cc4efe fix 1 byte struct by value return
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@794 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-11 15:19:09 +00:00
Timothy Wall f6eabe7b58 down to 2 failing tests
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@793 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-11 14:49:18 +00:00
Timothy Wall de2de1fdc7 fix win64 fp return
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@792 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-11 01:08:05 +00:00
Timothy Wall 8184ac8843 more win64 fixes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@791 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-09 04:22:30 +00:00
Timothy Wall a57d82d4cd mark more xfail (no long double)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@790 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-09 02:20:30 +00:00
Timothy Wall a266ef7337 fix some win64 bugs with structure handling
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@789 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-09 01:59:31 +00:00
Timothy Wall b30ca23180 fix a few win64 tests
use ffi_closure_alloc everywhere

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@788 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-08 22:10:53 +00:00
Timothy Wall db5c8f00fc make union test more reliable for 64-bit
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@787 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-05-08 14:14:47 +00:00
Timothy Wall d1bbacb06e fix docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@786 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-04-20 19:17:40 +00:00
Timothy Wall bff4e3b0fd optionally allow Java objects in native calls
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@785 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-04-20 15:27:29 +00:00
Timothy Wall 14248ddbd9 update Union ctor signatures
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@784 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-04-17 15:47:04 +00:00
Timothy Wall 391f39d291 fix issue 111
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@783 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-04-15 02:45:40 +00:00
Timothy Wall b4354efa8b set binary mime type
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@782 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-04-13 17:53:37 +00:00
Timothy Wall 686588a6e5 fix typo
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@781 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-04-06 13:15:09 +00:00
Timothy Wall 294267a605 Remove non-functional and superfluous size-based Structure ctors
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@780 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-04-06 13:11:29 +00:00
Timothy Wall 7b53b9108b fix unused parameter warnings
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@779 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-31 20:14:35 +00:00
Timothy Wall 15be9ab501 fix compiler warning
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@778 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-30 22:17:18 +00:00
Timothy Wall 7cfcd2daef Allow direct Buffer as structure field
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@777 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-30 21:06:03 +00:00
Timothy Wall 6070429eec tests for union by value fix
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@776 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-30 19:18:53 +00:00
Timothy Wall b5f41ef6c7 fix cacheing of union type information
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@775 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-28 13:02:02 +00:00
ochafik 716588a8fb Added mention to JNAerator's author
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@774 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-26 20:06:56 +00:00
Timothy Wall 95bc92f005 add some projects
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@773 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-26 17:19:13 +00:00
Timothy Wall 23425abe9d add tests to check for proper base addresses for structure/union fields
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@772 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-25 17:35:07 +00:00
Timothy Wall 3bab5e1e78 set RTLD_GLOBAL flag
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@771 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-18 13:44:57 +00:00
Timothy Wall 79ed7e81b1 update maven2 repo url (see http://weblogs.java.net/blog/kohsuke/archive/2009/03/changes_to_the.html)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@770 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-10 01:43:03 +00:00
Timothy Wall a59e58cc94 Allow handling of uncaught callback exceptions
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@769 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-03-09 13:52:16 +00:00
Timothy Wall 72bd12e394 note fix for issue #98
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@768 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-02-24 22:08:43 +00:00
Timothy Wall 2c667ca016 fix issue #104
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@767 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-02-24 22:04:22 +00:00
Timothy Wall 209c4d724f make Memory less restrictive
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@766 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-02-24 22:01:59 +00:00
Timothy Wall 95cf641f50 add w64 testsuite patches
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@765 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-02-24 17:50:07 +00:00
Wayne Meissner 85750fd065 Small optimization of NativeString constructor - do the String writing
here instead of via Pointer#setString(), to avoid converting the String
to bytes twice.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@764 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-02-16 09:33:33 +00:00
Wayne Meissner 402b5c7f81 Bump JNI version for the native change in previous commit
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@763 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-02-13 00:50:10 +00:00
Wayne Meissner be6f52b796 Apply patch from issue #98 - support opening current process on Unix
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@762 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-02-13 00:39:13 +00:00
Timothy Wall f4e6c6ad94 Provide pointer-based ctor for Structure
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@761 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-02-02 16:11:16 +00:00
Timothy Wall 99fe59cee9 update release notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@760 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-02-02 14:40:58 +00:00
Timothy Wall 0e80ba8b91 fix contents of maven source zip
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@759 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-02-02 14:39:57 +00:00
Timothy Wall 8965efdce1 update MSVC note
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@758 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-01-25 21:50:27 +00:00
Timothy Wall 1393a94804 fix win64 setup
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@757 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-01-17 03:06:05 +00:00
Timothy Wall 52e558d877 apply patch for issue #95
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@756 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-01-14 00:34:32 +00:00
Timothy Wall d9948105f1 fix issue #51
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@755 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-01-14 00:28:10 +00:00
Timothy Wall 87c91c1c04 use direct path to resource compiler
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@754 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-01-07 22:10:50 +00:00
Timothy Wall f15e471371 fix compile under msvc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@753 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-01-07 22:01:56 +00:00
Timothy Wall fc0a83933d Synch to libffi 1.0.8
Add win64 patches from Kai Tietz

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@752 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-01-07 15:56:48 +00:00
Timothy Wall f1cf2fe218 use stdint types
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@751 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-01-07 15:52:00 +00:00
Timothy Wall 7a5679cb65 fix misleading error message
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@750 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2009-01-06 22:22:22 +00:00
xylo 571b4604db added a comment on contrib/x11 to the release notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@749 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-12-21 14:17:16 +00:00
xylo 29e15a40db in contrib/x11: tidy up build.xml
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@748 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-12-20 18:04:23 +00:00
xylo 6fb2286fa4 added a build.xml
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@747 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-12-20 17:53:43 +00:00
xylo ab2f78c7b4 add the "x11" contribution containing an object oriented interface to X11
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@746 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-12-20 16:22:21 +00:00
Timothy Wall f9b918a05b synch with libffi 3.0.6 CVS - affects darwin, freebsd
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@745 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-12-16 15:42:55 +00:00
Timothy Wall a46cde174a clean up release notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@744 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-11-13 17:17:23 +00:00
Timothy Wall 6eee0f8741 clean up relnotes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@743 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-11-03 13:46:17 +00:00
Timothy Wall 28d31bb9f6 add small struct return by value test
Fix issue #94

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@742 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-11-03 13:42:03 +00:00
xylo 23128be17f in X11: added some methods related to key handling of the X server and added the XTest library/extension
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@741 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-11-02 18:35:59 +00:00
Wayne Meissner 130885fda7 3.0.9 release
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@739 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-30 20:22:28 +00:00
Wayne Meissner c4fc42f8f4 Bump version to 3.0.9 and update release-notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@738 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-30 20:17:14 +00:00
Wayne Meissner 21e73c5fb9 Fix for issue #93 and JRUBY-3084.
This alters the library search algorithm slightly:
1) Searches jna.library.path and any custom (per-library) paths for a
   matching library.
2) If that fails, tries to load the mapped library name, using
   dlopen/LoadLibrary.
3) If that fails, add all paths back into the search path and try to locate
   the library in jna.platform.library.path with all the normal fallbacks.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@737 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-29 00:30:54 +00:00
Wayne Meissner b635bf5591 Build 3.0.8
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@735 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-18 21:01:42 +00:00
Timothy Wall be594bb1f6 provide String->primitive array conversion
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@734 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-17 17:29:32 +00:00
Timothy Wall 543e3fca98 add more return types
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@733 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-15 02:56:51 +00:00
Wayne Meissner b385d76dc6 Add support for jna.boot.library.path property. This is a list of paths to attempt to load the jna stub library from. Its needed by JRuby and possibly Jython, to load the stub library from the file system, as they both put jna.jar in -Xbootclasspath, and java.library.path/LD_LIBRARY_PATH are ignored in that situation.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@732 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-12 06:02:31 +00:00
Timothy Wall 2adc88fec3 fix build of dependent test library on w32-x86
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@731 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-08 12:33:58 +00:00
Timothy Wall 2a9e2ceb61 support notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@730 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-07 11:13:40 +00:00
Timothy Wall 47fa804469 bump version
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@728 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-01 13:44:23 +00:00
Timothy Wall f70c01eee7 fix broken link
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@727 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-01 13:37:10 +00:00
Timothy Wall eb4ea07a2d update win32 natives
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@726 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-10-01 13:37:01 +00:00
Timothy Wall 55cd72baaa Fix class cast exception
read all TYPE_MAPPERs regardless of access

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@725 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-29 12:20:56 +00:00
Timothy Wall 940076d101 update demo files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@724 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-26 00:41:56 +00:00
Timothy Wall 93ebb9f7a9 improve win32 dependent library loading
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@723 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-22 15:55:59 +00:00
Timothy Wall 1a17ea52d8 add win64 target
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@718 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-17 18:14:49 +00:00
Timothy Wall 68bc0c0c7c add win64 target
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@717 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-17 18:09:40 +00:00
Timothy Wall 0e7dd6b350 note Memory vs primitive array usage
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@716 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-17 12:21:23 +00:00
Timothy Wall b3b0bf3845 note Memory vs primitive array usage
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@715 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-17 12:17:58 +00:00
Timothy Wall ddc32f1e43 update main page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@714 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-16 18:25:25 +00:00
Timothy Wall c9de508a2c 3.0.6 build
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@712 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-16 18:15:53 +00:00
Timothy Wall fac68bca4e update native
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@711 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-14 20:11:57 +00:00
Timothy Wall eaf250c3c6 struct/union improvements
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@710 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-12 14:05:07 +00:00
Timothy Wall 8b99772d29 clean up field type checking
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@709 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-11 18:34:54 +00:00
Timothy Wall 862a32e97e Fix pointer field read bug
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@708 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-11 17:23:48 +00:00
Timothy Wall 6cfb84d6ee more mingw-64 fixes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@707 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-11 14:01:49 +00:00
xylo 2fda7ca6f6 in Union: added methods getTypedValue() and setTypedValue() as abridgment for the commands u.setType(), u.read(), x = u.field; also added corresonding tests to class UnionTest
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@706 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-11 05:48:17 +00:00
Timothy Wall f2aecb53bc fix configure/build with mingw-64 (tests still fail)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@705 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-11 03:19:41 +00:00
Timothy Wall 05fdc2f17a update native
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@704 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-10 17:21:11 +00:00
xylo b9868b993c take X11 from x11-addons branch
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@703 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-10 17:16:22 +00:00
Wayne Meissner 573d8eefd1 Updated i386-OpenBSD build
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@702 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-10 15:28:33 +00:00
Timothy Wall 51d64f29e6 clean up some libffi bits
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@700 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-09 15:08:58 +00:00
Timothy Wall a39ab60ae5 update natives
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@698 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-08 15:30:23 +00:00
Timothy Wall ba9671fae5 update natives
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@697 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-08 15:21:04 +00:00
Timothy Wall a9340f354d update native
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@696 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-08 14:59:09 +00:00
Timothy Wall f9d6b069f7 update native
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@695 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-08 14:50:59 +00:00
Timothy Wall c363d5790d update native
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@694 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-08 14:38:54 +00:00
Timothy Wall 15a50d2a26 update native
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@693 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-08 14:29:43 +00:00
Timothy Wall bffc188151 bump revision
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@692 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-08 13:06:41 +00:00
Timothy Wall e78205430c update native
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@691 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-08 13:05:23 +00:00
Timothy Wall 4ef76d4f85 Allow arbitrary callback method names
Allow specification of callback type mapper with TYPE_MAPPER
Allow write with uninitialized boxed primitives in Structure
Fix memory leak with callbacks called from native threads w/no java context
Fix Structure derived classes to allow setting TypeMapper

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@690 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-08 12:56:04 +00:00
Timothy Wall 967da46793 Fix memory leak in callbacks
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@689 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-07 17:32:02 +00:00
xylo 46899503bd take X11 from x11-addons branch
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@686 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-06 17:24:37 +00:00
Timothy Wall 2dcf0f774c add win64 note
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@685 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-04 15:34:24 +00:00
Timothy Wall d669db0cab update jars with win64 build
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@684 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-04 15:29:52 +00:00
Timothy Wall f8aabcc50a merge win64 branch
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@683 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-04 15:04:34 +00:00
Timothy Wall 4bb3ece8dc Fix transparent window error on win2k
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@669 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-09-01 19:33:56 +00:00
Timothy Wall 495a7765d2 include LICENSE.txt in src.zip
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@648 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-26 13:39:46 +00:00
Timothy Wall 225296f253 avoid more content dragging on OSX, or warn
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@647 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-22 14:35:27 +00:00
Timothy Wall 52e6900e7a fix typo
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@645 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-14 14:56:01 +00:00
Timothy Wall 557bff1465 update doc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@644 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-14 14:53:14 +00:00
Timothy Wall add32ac107 bump version
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@643 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-14 14:52:56 +00:00
Timothy Wall f7699b98fb release 3.0.5
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@641 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-14 14:47:41 +00:00
Timothy Wall 05a8ec1fec add java.net maven repo plumbing
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@640 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-14 14:33:01 +00:00
Timothy Wall 004e63c433 allow String[] as callback argument/return
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@639 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-13 14:17:40 +00:00
Timothy Wall 898f41b95a avoid reallocating Integer objects
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@638 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-13 13:51:59 +00:00
Timothy Wall 859a6a75aa apply patch #81
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@637 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-09 12:10:11 +00:00
Timothy Wall b90dae6448 add sunos-sparc build compatible with solaris 8
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@636 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-08 04:45:14 +00:00
Timothy Wall dc1ddf4cff add usb for java
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@635 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-08 04:37:37 +00:00
Timothy Wall 46ef5d86c3 add usb for java
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@634 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-08 04:36:27 +00:00
Timothy Wall ac63a6b125 fix field access
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@633 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-07 12:25:26 +00:00
Timothy Wall 72778c97df Allow explicit setting of structure field order
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@632 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-07 11:11:07 +00:00
Timothy Wall b4b86081f9 address issue #79, optionally omit jnilib
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@631 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-08-05 17:16:02 +00:00
Timothy Wall e4a47a4ca5 update relnotes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@630 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-31 16:17:51 +00:00
Timothy Wall 79c60f6d4e Fix cursor tracking on alpha-masked windows
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@629 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-31 16:17:10 +00:00
Timothy Wall 4c4d55e0dc add backup in case pkg-config fails
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@628 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-31 16:03:24 +00:00
Timothy Wall 9504416beb Allow link against system libffi with 'ant -Ddynlink.native=true'
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@627 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-29 14:55:59 +00:00
Timothy Wall 99586d9b3f Provide src.zip for linux builds, old version now src-full.zip
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@626 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-29 13:50:45 +00:00
Timothy Wall 65b19cbbd3 Fix 32/64-bit library lookup where both arch versions exist
Try 'lib' prefix on w32

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@625 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-29 00:00:40 +00:00
Wayne Meissner 7b64f4443d More OpenBSD build changes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@624 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-26 05:49:53 +00:00
Wayne Meissner abb2e857be Revert md5 sum now that OpenBSD is fixed up
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@623 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-26 05:47:47 +00:00
Wayne Meissner df10745963 Use ggrep for OpenBSD. Not strictly correct, but grep -A1 on OpenBSD does not print out a '--' separator between matches. Strangely, -B1 does ...
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@622 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-26 05:47:30 +00:00
Wayne Meissner 3d729595d1 i386-OpenBSD port
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@621 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-26 05:47:12 +00:00
Timothy Wall 96a38d1895 Fix division by zero on OSX/ppc calculating struct size
Fix overwriting of already-initialized NativeMapped field in struct when calculating struct size

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@620 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-13 18:53:49 +00:00
Timothy Wall b4c1390af8 Work around OSX transparent window dragging bug
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@619 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-08 14:32:52 +00:00
Timothy Wall e9604ac212 update to 3.0.4
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@617 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-05 18:55:32 +00:00
Timothy Wall ea3a4b34ea update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@616 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-05 12:17:08 +00:00
Timothy Wall 79a0d92161 update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@615 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-05 12:16:07 +00:00
Timothy Wall b10c40260c enable NativeMapped array fields in Structure read/write
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@614 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-03 19:33:25 +00:00
xylo 9e056d2097 in StructureTest.testReadWriteStructure: test constancy of references after reading structure from memory
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@610 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-03 09:49:08 +00:00
Timothy Wall 8a250c5994 Look up proper library on Linux where arch=x86_64
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@607 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-07-01 14:17:56 +00:00
xylo e311ac3269 in StructureTest.testReadWriteStructure: tabs replaced by spaces
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@604 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-28 14:03:24 +00:00
xylo 28078a2d0c in StructureTest.testReadWriteStructure: compare content of arrays after write/read structure
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@603 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-28 13:51:43 +00:00
xylo 7def8c1bbf in X11: remove tailing spaces in comments
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@602 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-28 12:11:26 +00:00
xylo 24ca11387e in Pointer: remove unnecessary spaces in comments
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@601 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-28 12:05:29 +00:00
xylo bccc9583c1 in X11: return Atom constants when calling Atom.fromNative(...)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@600 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-28 08:42:26 +00:00
xylo 9643747b17 in X11: added some native functions
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@599 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-27 17:51:45 +00:00
xylo c695848092 in X11: added remaining Atom constants (from 9 to 68)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@595 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-26 18:49:52 +00:00
Dan Rollo 5011613e4c Add GetDriveType() to Kernerl32 examples. Patch by Marc Strapetz.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@585 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-24 03:18:22 +00:00
Timothy Wall 6cc7f69a59 Make X11.XID NativeLong
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@583 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-23 22:48:37 +00:00
Timothy Wall db6678637b Ensure struct allocated when calling Union.setType
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@582 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-23 22:47:19 +00:00
Timothy Wall 93892e12a2 Fix incorrect solaris/x86 native library
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@581 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-23 19:01:07 +00:00
Timothy Wall c196aab89d remove trailing comment close
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@580 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-22 12:04:07 +00:00
Timothy Wall 54a7718b88 clean up X headers
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@579 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-22 12:03:20 +00:00
Timothy Wall cec6e6175a Use the actual parameter type in Function invocations if no paramter type information is available (whether method is missing or untyped varargs).
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@578 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-22 11:30:57 +00:00
Timothy Wall bc5036bd34 auto-write Structure.ByReference fields
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@577 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-21 21:00:37 +00:00
Timothy Wall 021826eb1b update release notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@576 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-21 20:42:23 +00:00
Timothy Wall facd071967 Handle arrays of NativeMapped in Structure fields
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@575 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-06-21 20:40:33 +00:00
Timothy Wall 486e81ad77 upgrade to 2.x clover
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@574 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-29 14:42:11 +00:00
Timothy Wall 872cd3d7c0 Apply xylo's library load patch, fix versioned name checking tests
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@573 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-27 13:59:06 +00:00
Timothy Wall ca9851b311 Fix linux library load bug
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@572 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-23 14:22:08 +00:00
Timothy Wall 2fa0940d45 update jna.jar with updated linux builds
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@569 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-22 20:48:04 +00:00
Timothy Wall 3485338386 update linux-amd64 to 3.0.4 (native)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@568 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-22 20:33:43 +00:00
Timothy Wall 786a821f3f update linux-i386 jar to 3.0.4 (native)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@567 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-22 20:30:19 +00:00
Timothy Wall da1c9c5ea5 remove erroneous comment
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@565 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-22 17:04:23 +00:00
Timothy Wall 93d8cce7ac post 3.0.3 build
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@564 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-22 17:03:51 +00:00
Timothy Wall 5086ba2a3b include project files in source zip
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@563 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-22 16:32:12 +00:00
Timothy Wall 4cf8611dcd add note
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@562 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-20 15:42:41 +00:00
Timothy Wall 101e9d705a Add more win32 type examples
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@561 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-20 15:10:57 +00:00
Timothy Wall 7d8bfa1b62 Fix NPE in NativeMappedConverter
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@560 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-20 15:09:48 +00:00
Timothy Wall 5dcf9e2f41 update perf info
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@559 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-14 14:49:13 +00:00
Timothy Wall cdf18b6c4d ensure memory is initialized before Structure.read() - avoid NPE
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@558 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-09 15:21:55 +00:00
Timothy Wall 609ce3b6e0 ensure memory is initialized before Structure.read() - avoid NPE
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@557 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-09 15:21:05 +00:00
Timothy Wall 3ba8be2e21 improve package/version information in code and manifest
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@556 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-05 23:58:48 +00:00
Timothy Wall 6b13a97ce4 fix jnlp links
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@555 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-02 20:49:20 +00:00
Dan Rollo 130e40957e Fix issue# 68 - File monitor thread terminates on any removeWatch call.
kludge: fix intermittent failures on slow W2K box.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@554 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-02 03:56:38 +00:00
Dan Rollo a7b28317d7 Fix issue# 68 - File monitor thread terminates on any removeWatch call. Change W32FileMonitor.dispose() to unwatch any remaining files in map, allows watcher thread to exit.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@553 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-02 03:29:13 +00:00
Dan Rollo 29fcd0fdcf Fix issue# 68 - File monitor thread terminates on any removeWatch call. (only formatting and debug info changes)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@552 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-02 02:04:58 +00:00
Dan Rollo 9d5f63e543 Fix issue# 68 - File monitor thread terminates on any removeWatch call.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@551 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-02 01:20:59 +00:00
Timothy Wall 208c28ead2 add entry for native long mapping
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@550 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-05-01 15:16:55 +00:00
Timothy Wall 447d5ee94b Allow 'final' modifier in Structure fields
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@549 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-25 13:43:06 +00:00
Dan Rollo bb443add17 Fix for Jira issue: 67 - FileMonitor incorrectly handles FILE_DELETED notification mask. Added a unit test and committed fix.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@548 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-24 03:33:39 +00:00
Timothy Wall cb954773ed Fix bug in ByValue structs using NativeMapped
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@547 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-15 16:51:35 +00:00
Timothy Wall 89749c7eb1 update native builds
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@546 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-11 20:22:06 +00:00
Timothy Wall 30146f8744 fix callback allocation on freebsd
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@545 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-11 19:48:27 +00:00
Timothy Wall a623f374b1 enable mmap closures on solaris
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@544 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-11 18:33:17 +00:00
Dan Rollo b41584feb3 fix test failures on amd64 with 64-bit jvm. Classloader/path was using "build" instead of "build-d64".
NOTE: I considered changing and re-using the ["vmopt.arch" value="-d64" else="-Dignore"] already defined in build.xml for this, but I wasn't sure what the "-Dignore" case was intended for.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@543 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-11 07:34:41 +00:00
Timothy Wall 77d5bbb767 Fix typo
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@542 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-11 01:55:21 +00:00
Timothy Wall 171d428d3a Improve StdCallFunctionMapper
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@541 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-10 14:35:35 +00:00
Timothy Wall 61254c6cc4 Fix callbacks when DEP is enabled
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@540 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-10 02:39:51 +00:00
Timothy Wall 44b3a8952e fix typos
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@539 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-08 17:54:21 +00:00
Timothy Wall 0fc8c5e7e9 add videolan project
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@538 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-08 12:45:16 +00:00
Timothy Wall 6d969eb92f improve X11 window masking performance
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@537 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-08 09:29:02 +00:00
Timothy Wall 26ea0f81ca only set vm arch option for 64-bit vms
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@536 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-03 15:19:43 +00:00
Timothy Wall dc45e38f11 fix relocation errors on sunos-amd64
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@535 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-03 14:40:42 +00:00
Timothy Wall 9d5db40d3f enable ibm j9 build/run
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@534 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-03 00:57:47 +00:00
Timothy Wall 9e25d52679 improve w32 window masking
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@533 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-01 16:09:56 +00:00
Timothy Wall 1f98d4f6ff improve performance of window masking
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@532 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-04-01 00:59:12 +00:00
Timothy Wall b73883ce1d Refine test for IBM's J9 VM
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@531 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-31 14:26:32 +00:00
Timothy Wall 7af42da5d2 partial fix for aix/ppc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@530 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-31 13:18:29 +00:00
Timothy Wall cf75057b67 fix bug where struct is incorrectly passed by value instead of by reference
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@529 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-13 17:27:15 +00:00
Timothy Wall e5b1841030 Check entire linux version, not just last digit
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@528 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-11 04:48:27 +00:00
Dan Rollo 57325a22a5 refactor common code
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@527 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-09 05:31:48 +00:00
Dan Rollo c640166cf8 remove unused import, make unchanging member vars final.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@526 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-09 05:19:14 +00:00
Dan Rollo 4b4c362c03 remove unused imports
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@525 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-09 05:15:47 +00:00
Dan Rollo c71bfb1602 fix testMultipleWatches() by clearing prior events.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@524 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-09 00:43:35 +00:00
Dan Rollo 022e6349c1 make Kernel32/Test work on Win2k.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@523 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-09 00:42:00 +00:00
Timothy Wall 917671ac9a use frames link for javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@522 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-07 15:29:24 +00:00
Timothy Wall a108975d78 link to javadoc sans dev.java.net navigation
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@521 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-07 15:28:22 +00:00
Timothy Wall 62d31c5902 Fix NPE
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@520 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-04 16:28:36 +00:00
Timothy Wall 5d28314ee3 Add Emmanuel's Lego Mindstorm NXT driver
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@519 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-01 12:41:26 +00:00
Timothy Wall 1b22109f95 update platform list, support notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@518 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-03-01 12:35:53 +00:00
Timothy Wall e5c05bfd66 fix constant usage
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@517 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-29 16:07:38 +00:00
Timothy Wall 62e97858d7 tweak main page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@516 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-29 15:54:56 +00:00
Timothy Wall b9da9b977e tweak main page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@515 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-29 15:54:09 +00:00
Timothy Wall f121b6c039 tweak
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@513 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 19:51:55 +00:00
Timothy Wall c48b13bc0a update examples jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@512 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 19:36:20 +00:00
Timothy Wall 26abb9beb9 update examples jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@511 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 19:34:44 +00:00
Timothy Wall 02cc7d53b7 update demos
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@510 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 19:28:35 +00:00
Timothy Wall 67136b5986 update linux-amd64 native
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@509 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 13:50:40 +00:00
Timothy Wall 58d5175fde fix w32 api type mapper bug exposed by last round of changes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@508 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 13:43:23 +00:00
Timothy Wall c511c4063e use 'JNI_FALSE' rather than 'false'
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@507 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 04:43:23 +00:00
Timothy Wall 6429611b3c include sunos-amd64
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@506 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 04:32:45 +00:00
Timothy Wall 3cea53ddca bump version on jna.jar to 3.0.2
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@505 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 04:29:50 +00:00
Timothy Wall d661e58fc3 bump version, include new architectures
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@504 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 04:28:13 +00:00
Timothy Wall e140b6e4e2 Disable inapplicable test on OSX
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@503 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 04:19:47 +00:00
Timothy Wall e1025d9337 Use UTF8 encoding for OSX library names
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@502 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 04:15:06 +00:00
Timothy Wall f1acc483c3 Disable manual WindowUtils test
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@501 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 03:49:23 +00:00
Timothy Wall 0e25e979a2 Fix window alpha compositing on X11
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@500 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 03:21:31 +00:00
Timothy Wall 0c129ff02e Fix NPE when using NativeMapped within Structure (https://jna.dev.java.net/issues/show_bug.cgi?id=54)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@499 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-28 03:15:06 +00:00
Timothy Wall 05234082a9 add rococoa
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@498 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-26 14:35:12 +00:00
Timothy Wall bdc44962a1 update javadoc for 3.0.1
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@497 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-26 14:19:37 +00:00
Timothy Wall e96a59965e add FAQ topics
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@496 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-26 14:06:05 +00:00
Timothy Wall 507f3fc74b add sunos-amd64
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@495 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-25 14:59:24 +00:00
Timothy Wall 22d997fcd9 add freebsd-amd64
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@494 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-25 14:21:59 +00:00
Timothy Wall 89a98ca51b remove obsolete comment
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@493 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-14 14:58:00 +00:00
Timothy Wall 9834abe3ab Fix X11 mappings for 64-bit
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@492 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-14 03:56:59 +00:00
Timothy Wall 54ffc2c138 enable x86_64 builds on OS X
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@491 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-11 21:06:13 +00:00
Timothy Wall 4785c4f11e finalize is more thorough than unload
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@490 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-11 21:04:47 +00:00
Timothy Wall 9d5b0deb61 Add explicit test for matching linux versioned libs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@489 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-11 21:04:00 +00:00
Timothy Wall 9c0b540ddc Add explicit test for matching linux versioned libs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@488 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-11 21:01:14 +00:00
Timothy Wall c124a9f2b8 Fix OSX window transparency for 1.5+/Leopard
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@487 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-08 18:18:23 +00:00
Timothy Wall 8b0e08f9df Attempt to force the VM to unload the jnidispatch native lib before deleting it (w32)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@486 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-06 13:53:02 +00:00
Timothy Wall 9ee115d1a0 allocate minimal space for invocation args, instead of MAX_NARGS
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@485 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-06 13:46:22 +00:00
Timothy Wall a7ebf431a8 fix release notes link
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@484 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-05 14:21:40 +00:00
Timothy Wall d85330d54a remove svn:executable from html files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@483 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-05 14:21:07 +00:00
Timothy Wall f8f93c7351 Set mime type
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@482 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-05 14:18:16 +00:00
Timothy Wall ee1fd4944f add folder icon
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@481 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-05 14:15:59 +00:00
Timothy Wall 5117fa06b8 reformat release notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@480 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-05 14:15:25 +00:00
Timothy Wall 2ac1552bf7 add athena backup
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@479 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-05 13:55:10 +00:00
Timothy Wall 94c2647d25 update sunos jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@477 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-01 00:24:36 +00:00
Timothy Wall 6b2f067435 Ensure manifest is included in dist/jna.jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@476 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-02-01 00:23:44 +00:00
Timothy Wall 3e2471d0a0 Ensure tests run under appropriate VM for sparcv9
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@475 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-31 21:57:35 +00:00
Timothy Wall f0b1d33398 enable memory access protection on solaris
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@474 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-31 14:43:47 +00:00
Timothy Wall bae955f7c5 update jars to 3.0.1
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@473 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-31 02:20:34 +00:00
Timothy Wall b747e71583 clean up symbols for freebsd
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@472 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-31 00:29:59 +00:00
Timothy Wall 48160da4b7 update examples jar (WindowUtils)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@471 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-30 12:41:13 +00:00
Timothy Wall d17df6a9db Allow window masks to be set on heavyweight components (at least on w32 and x11)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@470 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-28 16:10:38 +00:00
Timothy Wall df7a9ec977 make graphics test run only if not headless
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@469 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-28 15:08:55 +00:00
Timothy Wall f2157420f2 use ffi_prep_closure_loc, not ffi_prep_closure
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@468 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-28 14:55:31 +00:00
Timothy Wall ae9c56416f Use closure alloc from libffi
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@467 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-28 14:23:23 +00:00
Timothy Wall 1dec6a541a Fix linux library name mapping (sans regexp)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@466 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-24 18:04:18 +00:00
Timothy Wall c75157ffd8 Fix javadoc warnings
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@465 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-24 17:45:29 +00:00
Timothy Wall fa77d03fea Provide explicit dispose on NativeLibrary
Cache NativeMappedConverter instances for improved performance
Preliminary support for wince (improve backwards compatibility for older VMs)
Provide 'synch after call' interface for arguments that need to perform some sort of synchronization after a native call

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@464 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-24 17:33:12 +00:00
Timothy Wall 618f4c533c Fix non-w32 compilation
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@463 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-24 16:26:59 +00:00
Timothy Wall 9b77631dd5 update project files (netbeans/eclipse)
use setjmp/longjmp to recover from w32 faults instead of simply setting SP
embed version resource information in w32 dll
don't update last error if ffi_call faults

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@462 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-24 16:19:02 +00:00
Timothy Wall 7aa22df1e2 Use XImage instead of XDrawRectangle point by point
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@461 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-24 15:45:39 +00:00
Timothy Wall ee0ff79820 Fix bug in Pointer.setChar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@460 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-23 23:03:30 +00:00
Timothy Wall ca772e8a9c add missing import
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@459 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-23 17:01:01 +00:00
Timothy Wall 8af05c14be Avoid creating too many windows when setting window mask
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@458 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-23 16:37:24 +00:00
Timothy Wall 20f230e910 fix md5 calculation on sunos
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@457 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-22 20:54:54 +00:00
Timothy Wall 8af51875b6 Improve test output
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@456 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-22 20:42:23 +00:00
Timothy Wall a4ead757f6 Fix bug in STructure.toArray w/nested struct arrays
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@455 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-22 13:56:31 +00:00
Timothy Wall 0cc6bc9e2e Improve transparent window drawing performance on w32
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@454 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-22 13:35:14 +00:00
Timothy Wall 00a551d2b1 fix html typo
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@453 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-19 22:28:02 +00:00
Timothy Wall b6f1652aab update main page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@452 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-15 16:55:33 +00:00
Timothy Wall b304555389 Ensure initialized nested structure arrays use the right memory
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@451 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-14 19:43:41 +00:00
Timothy Wall 456af457bb Ensure initialized nested structure arrays use the right memory
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@450 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-14 19:42:08 +00:00
Timothy Wall e9cb67844d off_t size varies by platform
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@449 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-14 18:50:29 +00:00
Timothy Wall ff12099078 update jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@446 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-14 18:25:46 +00:00
Timothy Wall 4068c6da1a Fix bug in nested struct array read/write
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@445 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-14 17:56:16 +00:00
Timothy Wall 2f839a41c0 update jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@444 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-14 17:27:22 +00:00
Timothy Wall d9c13aefe3 update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@443 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-14 17:26:28 +00:00
Timothy Wall 7bfa1c27bf improve javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@442 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-14 17:25:03 +00:00
Timothy Wall f6986352ee improve javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@441 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-14 17:20:33 +00:00
Timothy Wall 2eb51bbb13 Improve error messages when illegal argument/return types are used
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@440 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-14 16:59:37 +00:00
Timothy Wall 77ef1e75c8 Fix bug in callback proxy.equals (wolfgang.roekelein)
Clean up some javadoc

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@439 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-04 13:48:42 +00:00
Timothy Wall ae11a9d77c Fix JNLP class loader method lookup
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@438 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-04 05:01:30 +00:00
Timothy Wall 30648be2ed fix FFIType.size_t ctor signatore
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@437 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-03 19:00:57 +00:00
Timothy Wall e5958a2a15 Fix bug in stdcall function mapping when using struct by value
Defer size_t/off_t definition, for now

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@436 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2008-01-03 18:37:38 +00:00
Timothy Wall 8d3b41ea4d Consolidate Structure.ByReference reads
Cache native library options as well as alignments/type mappers
Ensure library options are passed to callbacks
Add protection around remaining Pointer read/write calls
Consolidate wide character reads/writes
Avoid stack overflow reading self-referential structures or loops
More prettification of Structure.toString
Add size_t/off_t standard types

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@435 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-27 15:53:49 +00:00
Timothy Wall 2d7f82af75 Fix NPE when sizing struct with a struct array field
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@434 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-21 15:25:05 +00:00
Timothy Wall 9c93a94834 Update linux-amd64 native
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@433 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-21 02:25:15 +00:00
Timothy Wall 13a9861d18 Avoid NPE in toString
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@432 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-20 21:16:27 +00:00
Timothy Wall f7d1a91aad Allow array of struct by reference as argument
Pretty-print structure info in toString

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@431 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-20 21:08:14 +00:00
Timothy Wall 121b8e0a64 Fix VM crash running test under linux-amd64
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@430 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-20 14:44:25 +00:00
Timothy Wall 36ebf4a034 Properly handle default boolean mapping (int) in Structure read/write
Provide Pointer.share(offset) (allow omission of 'size')

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@429 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-19 17:02:45 +00:00
Timothy Wall 0a752616b7 Fix arg/result handling for callback values in callbacks
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@428 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-18 15:51:53 +00:00
Timothy Wall edd21a959b update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@427 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-18 04:02:41 +00:00
Timothy Wall dfe9779401 update jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@426 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-18 04:02:11 +00:00
Timothy Wall d64bc68562 Move w32 JAWT load into native code
Fix Structure.ByValue for callback arg/return
Perform better type checking on callback arg/return types
Propagate library/symbol lookup error messages
Enable loading of libraries with non-ascii names
Tighten type checking in native code

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@425 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-18 03:30:35 +00:00
Timothy Wall f29a57ceb2 update with w32 JAWT workaround
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@424 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-16 12:01:42 +00:00
Timothy Wall 529c8e36f2 reinstate w32 JAWT workaround; tests work without it, but demo code doesn't
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@423 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-16 12:00:57 +00:00
Timothy Wall 108abcdec4 update jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@422 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-16 11:48:10 +00:00
Timothy Wall 1ae7d8373f Consolidate structure ffi type info initialization and avoid premature GC
Enable union by-value by using largest field's type info
Explicitly throw IllegalArgument on bad type info
Throw IllegalState on missing type info
Explicitly write version/md5 info into Makefile from ant (to avoid platform-specific variances in sed)
Make Structure.ByValue/ByReference public to allow client code comparisons
Consolidate Structure field get/set operations
Avoid extra Pointer peer lookup from native code (wmeissner)

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@421 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-16 11:04:12 +00:00
Timothy Wall 8eb4860ec6 Add explicit test for JNA load under headless environment
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@420 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-12 21:46:18 +00:00
Timothy Wall 7ae188c42b update w32 jar and universal jar (defer toolkit load)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@419 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-12 21:29:48 +00:00
Timothy Wall 125a65ee8a defer AWT toolkit initialization until actual JAWT use
Make w32 dynamically load JAWT to avoid forcing toolkit init on JNA load

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@418 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-12 21:26:37 +00:00
Timothy Wall 98c3353a07 update jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@417 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-12 16:26:16 +00:00
Timothy Wall 683ba59fae update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@416 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-12 16:17:58 +00:00
Timothy Wall 38abd739d3 update jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@415 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-12 16:15:47 +00:00
Timothy Wall df58c84b5a Embed version and checksum into native library
Print version information for 'java -jar jna.jar'

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@414 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-12 15:59:28 +00:00
Timothy Wall 513bb215db Close JAWT library if it's been opened
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@413 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-12 15:35:57 +00:00
Timothy Wall 77be329ed0 Avoid error loading JAWT when running headless
Use primary colors in window shape test (Dan)

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@412 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-12 15:30:27 +00:00
Timothy Wall 1f223fbe13 Auto-include web start lib path if jnidispatch is a <nativelib>
Invalidate platform jars when native API changes

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@411 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-10 15:28:26 +00:00
Timothy Wall c6a21ab661 update jar, doc, src
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@410 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-09 17:42:55 +00:00
Timothy Wall 6d59f0bd3f provide memory alignment to Memory if requested
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@409 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-09 17:32:57 +00:00
Timothy Wall 74972e267a fix typos
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@408 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-09 16:36:35 +00:00
Timothy Wall 6c2134ba0e clean up typos
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@407 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-09 16:05:25 +00:00
Timothy Wall 7bf53b0588 update docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@406 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-09 15:46:41 +00:00
Timothy Wall eaff635df5 clean up JavaDoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@405 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-09 15:41:59 +00:00
Timothy Wall 88ad275b44 Provide for tweaking of invocation handling between interface and native
Add test for annotation preservation in proxy methods
Add explicit global variable lookup
Add utility method to determine Web Start native library location

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@404 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-09 04:33:00 +00:00
Timothy Wall fe6143ca49 Fix Memory ctor signature
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@403 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-08 14:58:07 +00:00
Timothy Wall 724432aa02 fix broken anchor
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@402 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-04 15:23:43 +00:00
Wayne Meissner 9686a4b1bd Add a hack for OpenJDK (Soylatte) on macosx - System.mapLibraryName() returns a .dylib extension now, not .jnilib.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@401 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-03 23:45:10 +00:00
Timothy Wall 7f8fab8ec0 update dist files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@400 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-03 07:15:14 +00:00
Timothy Wall 5a985a143b update
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@399 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-02 15:39:55 +00:00
Timothy Wall f9154f8c2e update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@398 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-01 06:44:10 +00:00
Timothy Wall 287879a7f5 add struct by value notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@397 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-01 06:18:30 +00:00
Timothy Wall 3c82302545 make color-checking on OSX more robust
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@396 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-01 06:09:02 +00:00
Timothy Wall b331783c01 implement struct by value
add missing Pointer char function

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@395 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-12-01 05:45:36 +00:00
Timothy Wall 1882210db4 Remove obsolete target
Canonicalize x86 ARCH settings
FreeBSD no longer needs pthread linkage

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@394 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-29 13:50:28 +00:00
Timothy Wall 12bd185a9b Fix clover target
Omit embedded timestamp from javadoc
Set ARCH flag for amd64 build (Dan/bha)

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@393 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-29 13:49:13 +00:00
Timothy Wall 3dbaa7984f Use simpler workaround for loading AWT/JAWT on X11-based platforms
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@392 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-28 19:48:14 +00:00
Timothy Wall 40f00b1dcb Fix bug checking IntegerType limits
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@391 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-28 17:27:42 +00:00
Timothy Wall 98bb38cb03 clean up kernel32 handling
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@390 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-28 02:38:48 +00:00
Timothy Wall e1b4c8d616 update main page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@389 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-27 17:05:54 +00:00
Timothy Wall 5d7c015348 fix non-universal builds on darwin
keep warning flags for mingw32 builds

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@388 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-27 14:25:23 +00:00
Timothy Wall a90e7c82b3 synch libffi with http://gcc.gnu.org/svn/gcc/trunk/libffi@130462 (adds mingw32ce support)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@387 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-27 07:17:11 +00:00
Timothy Wall 6c0c9e7d7c ensure JNA library can be unloaded
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@384 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-26 20:26:51 +00:00
Timothy Wall 461b35f6ef update platform jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@383 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-15 06:51:35 +00:00
Timothy Wall 81ca040918 fix indexOf return value
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@382 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-15 06:25:36 +00:00
Timothy Wall 5dc6bfb195 use long offsets and sizes for pointer arithmetic
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@381 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-15 04:51:16 +00:00
Timothy Wall b0d3657e56 clean up new libffi files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@380 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-15 04:47:49 +00:00
Timothy Wall 822913c85f remove obsolete native files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@379 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-15 04:45:20 +00:00
Timothy Wall ce0ac250e1 update ignored files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@378 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-15 04:43:58 +00:00
Timothy Wall 22e98986e5 set mime type
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@377 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-13 18:16:07 +00:00
Timothy Wall 3f7fc39362 Add expect test for stdcall closures
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@376 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-08 23:08:48 +00:00
Timothy Wall 024c845d06 update examples jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@375 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-08 19:35:19 +00:00
Timothy Wall 4bb1e29cf3 Add w32 keyboard hook to contrib
Add more w32 API (user32)

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@374 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-08 19:34:06 +00:00
Timothy Wall fa7bdc4fcd Add explicit check for correct stdcall stack pointer
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@373 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-08 19:00:18 +00:00
Timothy Wall ab0708340c update w32 native bits
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@372 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-08 18:41:22 +00:00
Timothy Wall 34723a2e17 update change log
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@371 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-08 18:40:00 +00:00
Timothy Wall d4c4d2bb13 Fix stdcall callbacks
catch all exceptions when invoking callback

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@370 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-08 18:38:24 +00:00
Timothy Wall 80090df8e4 Fix NPE on non-windows platforms
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@369 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-07 01:15:30 +00:00
Timothy Wall 05dc68db7b fix obsolete import
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@368 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-06 04:49:12 +00:00
Timothy Wall 1bcde2cbf2 Allow constant pointer definition
Add multiple watches to file monitor test

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@367 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-05 17:19:28 +00:00
Timothy Wall 9a5f5851ba Perform additionl null pointer checks
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@366 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-05 15:39:52 +00:00
Timothy Wall 8c7152bb9f enable crash protection on freebsd
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@365 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-01 20:35:07 +00:00
Timothy Wall 5580e39447 update Structure.toArray usage
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@364 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-01 13:40:22 +00:00
Timothy Wall f29d58c0f0 Update toArray usage
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@363 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-01 13:39:00 +00:00
Timothy Wall d69e62363e remove jnlp files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@362 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-01 13:32:16 +00:00
Timothy Wall 0e0af9dcaa dev.java.net won't serve jar files properly
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@361 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-01 13:29:35 +00:00
Timothy Wall 85fee142b3 Fix jnlp links
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@360 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-01 13:26:08 +00:00
Timothy Wall a1b5a934f4 Use proper server link
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@359 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-01 13:06:41 +00:00
Timothy Wall 996b533634 Fix demo server link
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@358 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-11-01 13:06:08 +00:00
Timothy Wall 11fab2e58e update demos
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@357 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-30 19:12:28 +00:00
Timothy Wall 437df3b6d4 fix projects list
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@356 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-30 15:15:05 +00:00
Timothy Wall 663c2fdbac update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@355 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-30 14:59:05 +00:00
Timothy Wall 4eb0e9f8aa more javadoc tweaks
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@354 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-30 14:57:53 +00:00
Timothy Wall 00a17b60f8 update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@353 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-30 14:48:30 +00:00
Timothy Wall fb5f00db61 update docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@352 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-30 14:38:43 +00:00
Timothy Wall 0105055c3e Don't keep a strong reference to the library proxy
Keep a mapping for the proxy on calls to loadLibrary
Don't fail if no alpha on shaped window demo
Clean up a few comments

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@351 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-30 14:32:31 +00:00
Timothy Wall efe147b731 update structure/union notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@350 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-30 14:28:51 +00:00
Timothy Wall 9585302dc5 clean up symmetry on ToNative/FromNative contexts
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@349 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-29 15:11:01 +00:00
Timothy Wall 7432c0775b Clean up ant build script targets
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@348 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-29 14:35:02 +00:00
Timothy Wall 8666ac7b85 Clean up temp files on w32
Avoid empty paths in search list
Add canonical 'out-of-date' jar
Clean up ant build script targets

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@347 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-29 14:34:10 +00:00
Timothy Wall 827cbfd03c disable out-of-date native bits
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@346 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-29 13:25:44 +00:00
Timothy Wall 64a5e8f236 Don't need new specs under mingw; was due to faulty installation
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@345 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-29 13:23:28 +00:00
Timothy Wall 6a60315011 build with glibc 2.3.5 (from Red Hat FC4)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@344 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-28 21:30:01 +00:00
Timothy Wall a234334f69 Fix javadoc error
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@343 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-27 22:24:04 +00:00
Timothy Wall d71acbd909 update jnlp files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@342 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-27 22:20:07 +00:00
Timothy Wall 33e672d135 add platform notes
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@341 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-27 16:35:57 +00:00
Timothy Wall a26a696e34 Allow ByReference types in callbacks
Clean up some Structure field error messages

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@340 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-26 14:51:24 +00:00
Wayne Meissner c63827d5a0 Updated i386-freebsd build
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@339 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-20 12:09:38 +00:00
Timothy Wall 998f9f6ad0 add notes for loadLibrary options map
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@338 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-19 01:51:03 +00:00
Timothy Wall 0e188d3bff Show drop shadow on OSX BalloonManager
Fix NPE on OSX BalloonManager

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@337 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-17 13:27:37 +00:00
Timothy Wall 4a0867c5f2 add comments on library loading
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@336 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-17 12:41:16 +00:00
Timothy Wall 4fb1955303 Attempt load using System.loadLibrary before extracting
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@335 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-17 12:40:32 +00:00
Timothy Wall ef202cd8b8 update w32 files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@334 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-16 14:28:50 +00:00
Timothy Wall 3648b4539b fix failure messages in demo
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@333 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-16 14:28:18 +00:00
Timothy Wall b78ac9355a Allocate executable memory for callbacks on w32
Synchronize on java callback allocation methods to avoid more complex native synchronization

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@332 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-16 14:28:00 +00:00
Timothy Wall f023994074 library suffix required on w32
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@331 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-16 14:20:31 +00:00
Timothy Wall a47e77bdf9 skip trash test if system has no apparent trash
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@330 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-16 13:12:35 +00:00
Timothy Wall 13773c267d update linux-i386 components (glibc 2.3.6)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@329 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-16 13:09:41 +00:00
Timothy Wall deccbf6d9a extract integer type with platform-specific size
remove temporary file suffix altogether

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@328 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-16 12:57:11 +00:00
Timothy Wall ec1f92c16a update test to proper native signature
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@327 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-15 21:25:48 +00:00
Timothy Wall 5436e605b0 Fix wchar_t* return when null
Allow Pointer[] as function argument
Fix window utils test on osx to avoid os-cast shadows

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@326 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-11 22:42:14 +00:00
Timothy Wall 949ae6a7aa add missing files
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@325 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-11 19:27:43 +00:00
Timothy Wall b957c563c6 update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@324 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-11 19:24:43 +00:00
Timothy Wall 36c73e1d64 make memory share public
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@323 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-05 20:28:30 +00:00
Timothy Wall d8f0925466 auto-copy native library into eclipse build area
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@322 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-04 17:15:58 +00:00
Timothy Wall 77d1b2f648 Remove unused code
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@321 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-04 14:37:57 +00:00
Timothy Wall 7a82dd3baf Fix X11 keyboard test (XQueryKeymap result is not documented)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@320 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-04 14:35:31 +00:00
Timothy Wall 7c5573199f Add explicit license file
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@319 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-03 19:18:03 +00:00
Timothy Wall 55146b70bd name license by specific version
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@318 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-03 19:17:37 +00:00
Timothy Wall c2a26458e8 Fix test failure if default encoding doesn't support extended ASCII (fall back to testing just ASCII)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@317 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-02 13:42:38 +00:00
Timothy Wall 6be895f83c change contact address for contributions
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@316 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-10-01 00:55:02 +00:00
Timothy Wall fcae79eb9a Show proper mapping for w32 function which accepts either integer or pointer types in a given argument
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@315 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-30 00:32:13 +00:00
Timothy Wall 9a342d979f Allow lookup of OSX framework libraries by name
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@314 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-30 00:29:38 +00:00
Timothy Wall a48a7c321d Throw UnsupportedOperationException when alpha not available and explain why, if possible
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@313 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-30 00:28:01 +00:00
Timothy Wall fd167bc19f Fix swing threading violation in test
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@312 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-30 00:13:55 +00:00
Timothy Wall 11f794c9df Clean up Structure.toArray usage
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@311 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-30 00:12:56 +00:00
Timothy Wall 30b353fabe Make test build target fail if any tests fail
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@310 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-26 12:50:46 +00:00
Timothy Wall 61590a115c Remove unused locals
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@309 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-26 00:02:26 +00:00
Timothy Wall 982dfbdd61 Use specific structure type in toArray
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@308 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-25 23:59:31 +00:00
Timothy Wall 9a5605f5de update main page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@307 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-23 02:12:12 +00:00
Timothy Wall 5d62055838 Fix compilation error in file monitor example
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@306 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-20 19:51:49 +00:00
Timothy Wall 3e886a8a5b Provide optional library synchronization
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@305 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-20 19:27:57 +00:00
Timothy Wall eb1d4736b0 clean up w32 libs to use HANDLE instead of Pointer
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@304 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-19 02:00:59 +00:00
Timothy Wall affcdf49f9 Fix crash in service stop, fix callback signature
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@303 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-18 09:32:30 +00:00
Timothy Wall 06a4a3f8af Fix failing argument marshal test
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@302 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-16 06:23:20 +00:00
Timothy Wall eb58d23656 update darwin components
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@301 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-15 18:26:52 +00:00
Timothy Wall ed2ee11af8 update w32 jars
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@300 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-15 18:13:39 +00:00
Timothy Wall 6ed833bf28 Fix GetLastError bug
Make ByReference derive from Memory

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@299 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-15 18:12:05 +00:00
Timothy Wall 196e8af786 File missed in last patch
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@298 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-14 18:52:00 +00:00
Timothy Wall 17aafbc595 Allow Pointer[] as field in Structure
Clean up error messages when Structure size calculation fails

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@297 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-14 15:48:28 +00:00
Timothy Wall 1dcf8cf36c update ntservice README
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@296 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-13 20:35:08 +00:00
Timothy Wall 3fc6bc7e53 Don't wrap null pointers in PointerType
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@295 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-13 00:40:44 +00:00
Timothy Wall fce337b823 Fix 1.4 compile error
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@294 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-13 00:39:42 +00:00
Timothy Wall 6e3c4a856c Add NT service implementation from boerkel
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@293 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-12 15:51:31 +00:00
Timothy Wall 05f44f3c62 Ensure TCHAR*[] gets encoded properly on w32, wchar_t*[] on others
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@292 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-12 15:13:13 +00:00
Timothy Wall d609eed733 include build.xml in source zip
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@291 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-11 01:49:27 +00:00
Timothy Wall 65c4e6ad94 fix stdcall stack sizing for NativeMapped
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@290 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-11 01:49:14 +00:00
Timothy Wall 6fc11568c0 Add docs/src zips
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@289 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-10 18:10:41 +00:00
Timothy Wall 494aa6e090 Fix html formatting
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@288 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-10 15:23:43 +00:00
Timothy Wall abab91748c Add projects list
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@287 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-10 15:22:24 +00:00
Timothy Wall f86ef41980 update jars for darwin, linux, w32
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@286 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-10 14:56:20 +00:00
Timothy Wall a22191c1fb clean up type mapping table
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@285 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-10 14:39:31 +00:00
Timothy Wall db2a6b239e clarify contributions on web page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@284 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-10 14:25:02 +00:00
Timothy Wall 25726a3df9 Enable callback return values (e.g. sig_t signal(int sig, sig_t f))
Move native function proxy wrapping to CallbackReference from Structure

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@283 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-07 23:49:44 +00:00
Timothy Wall a95c4d673d Fix string decoding bug, add tests
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@282 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-07 20:10:34 +00:00
Wayne Meissner b6b53d7b83 Fix solaris build
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@281 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-07 01:43:59 +00:00
Timothy Wall 573a5c6a53 update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@280 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-06 18:07:54 +00:00
Timothy Wall 7db8868043 Enable VM crash protection on w32, linux
Move native library init from Pointer to Native
Fix Pointer.setNativeLong bug
Make library initialization explicit in Pointer/NativeLibrary
Javadoc cleanup

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@279 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-06 17:36:33 +00:00
Timothy Wall 7ee89a6e1d Remove ^Z from keyboard test, since it may suspend the test
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@278 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-06 15:48:53 +00:00
Timothy Wall 5e22b1cd27 Remove check for Library interface in Library.Handler
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@277 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-05 14:21:36 +00:00
Wayne Meissner 2e5eee5092 Native.loadLibrary() no longer requires interface classes to extend Library.
If this breaks anything, blame Charles Nutter :-)


git-svn-id: https://svn.java.net/svn/jna~svn/trunk@276 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-05 06:33:11 +00:00
Wayne Meissner b341608130 Missed during ToNativeConverter modifications
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@275 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-05 03:30:17 +00:00
Wayne Meissner e6e8ffb1c3 Updated build
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@274 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-05 02:37:02 +00:00
Wayne Meissner 60c851972e Start on issue #38. Main thing I wanted to do was get the second parameter to ToNativeConverter.toNative() in there so we don't have future API breakage by adding it later.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@273 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-05 01:45:18 +00:00
Wayne Meissner dcfc552254 Build on Ubuntu 6.06.1 with glibc-2.3.6
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@272 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-05 00:41:28 +00:00
Timothy Wall 8bb92f5c19 Use type-safe pointers for w32 APIs
Simplify type-safe pointer declarations

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@271 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-04 16:17:10 +00:00
Timothy Wall 0ca338ade0 clarify intro
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@270 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-04 13:44:49 +00:00
Timothy Wall 272424d379 Fix javadoc link (frames don't show up)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@269 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-04 13:26:38 +00:00
Wayne Meissner 6d72f33da7 Revert r266 - Integer.valueOf() and friends are 1.5+ features, so it
breaks 1.4 support



git-svn-id: https://svn.java.net/svn/jna~svn/trunk@268 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-04 12:45:58 +00:00
Wayne Meissner c0fab06356 Use the full path to /usr/bin/libtool - macports installs GNU libtool in the path before /usr/bin/libtool.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@267 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-04 06:01:54 +00:00
Wayne Meissner 1423a7ce91 Implement (most of) the fixes from issue #35.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@266 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-04 04:26:22 +00:00
Wayne Meissner 053a432804 Fixup library searching for 32bit VM on 64bit OS scenarios
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@265 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 12:08:50 +00:00
Wayne Meissner f50129baa3 Build for FreeBSD/i386
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@264 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 09:17:18 +00:00
Wayne Meissner 9150e8f188 Don't try to use the library extension as the suffix. System.load()
doesn't appear to care what the library you tell it to load is called.

Could be a possible source of why it won't load on multi-byte charsets 
under windows.



git-svn-id: https://svn.java.net/svn/jna~svn/trunk@263 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 08:26:29 +00:00
Wayne Meissner b637ab3ceb Pass the Method of the Library subclass that invoked the Function, to the FromNativeConverter.
Also optimized the code in Library.Handler so only one Map lookup per function invoke is needed.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@262 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 08:09:06 +00:00
Wayne Meissner 32d38dd876 Native build for Solaris/sparc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@261 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 08:05:26 +00:00
Wayne Meissner a04f4bd4b2 Unbreak 64bit sparc support
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@260 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 07:32:44 +00:00
Wayne Meissner ad68219568 Ensure the NativeLibrary does not get prematurely garbage collected when using something like:
Function f = NativeLibrary.getInstance("c").getFunction("printf");



git-svn-id: https://svn.java.net/svn/jna~svn/trunk@259 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 06:25:46 +00:00
Timothy Wall af117d810d Clean up tests
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@258 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 03:53:34 +00:00
Timothy Wall 5d764abdc6 Add auto-conversion for custom types
Fix X11 lib for 64-bit use

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@257 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 01:20:52 +00:00
Timothy Wall a9e9c69265 Update webpage and javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@256 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 01:15:30 +00:00
Wayne Meissner 461e86eb82 64bit fixes, and add local queue.h for solaris builds
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@255 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-03 00:49:44 +00:00
Wayne Meissner 7e87ffa0fd Fix int32 definition for 64bit arches
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@254 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-02 23:34:14 +00:00
Timothy Wall 7bfa698796 update docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@253 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-01 07:34:20 +00:00
Timothy Wall 285f64ed62 update docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@252 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-01 07:28:26 +00:00
Timothy Wall b13b1d7b70 update docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@251 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-01 07:23:58 +00:00
Timothy Wall 212e0cd812 update docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@250 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-09-01 07:23:14 +00:00
Timothy Wall 589a8e101d update main page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@249 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-31 18:52:34 +00:00
Timothy Wall b8b4169b1a update main page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@248 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-31 18:33:06 +00:00
Timothy Wall e8aac64083 update main page
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@247 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-31 18:27:50 +00:00
Timothy Wall 8e3ae9bb85 Update TODO
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@246 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-31 18:18:19 +00:00
Timothy Wall 14a549928f Fix build on darwin-i386
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@245 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-31 18:06:03 +00:00
Timothy Wall 83e1fb715e Fix UnsatisfiedLinkError calling toString on a Library interface
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@244 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-31 16:44:43 +00:00
Timothy Wall aeeac8e343 Add callback tests for smaller int types
Copy generic java.nio.Buffer support from v3 branch + tests
Copy missed sparc-isms from v3 branch for building sunos variants
Add stubs for platform-specific jars
Include libffi testsuite
Remove /lib64 references as per v3 branch
Auto-generate os prefix from os.name (as per v3 branch) to automatically handle new targets
Update overview to include Buffer, function pointer info
Include src.zip and doc.zip in dist generation

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@243 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-31 14:05:06 +00:00
Timothy Wall 5fc6d50486 Avoid wrapping a native callback proxy with a CallbackReference proxy
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@242 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-30 16:17:21 +00:00
Timothy Wall edc7c111cb Clean up varargs
Add per-field Structure read/write
Avoid automatic writes to 'volatile' structure fields
Read/wrap function pointers in Structure fields
Disallow Memory/Function as declared Structure fields

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@241 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-30 16:04:01 +00:00
Timothy Wall 05a754bc92 Use libffi instead of custom assembly (tested for darwin (universal), linux-i386, win32-x86
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@240 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-29 20:19:39 +00:00
Timothy Wall dff58c56fb Remove superfluous exception checks, enable peer access on OSX
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@239 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-28 14:54:07 +00:00
Timothy Wall 58709a1d32 Support mingw32 builds
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@238 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-28 13:27:22 +00:00
Timothy Wall 554567fa82 Copy issue #25 fix from v3 branch
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@237 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-28 13:22:50 +00:00
Timothy Wall 3ad51db9c2 Copy fix for issue #32 from v3 branch
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@236 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-08-28 13:07:04 +00:00
Timothy Wall 007d74ee23 Fix OSX link option
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@188 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-30 23:09:50 +00:00
Timothy Wall cd15214d77 Fix javadoc comments
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@187 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-30 20:45:43 +00:00
Timothy Wall 32eca24468 Clean up OSX build options
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@186 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-30 20:45:13 +00:00
Timothy Wall a96e25ef5d fix broken link
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@185 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-24 18:36:05 +00:00
Timothy Wall 5087fb1904 update doc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@184 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-24 18:26:12 +00:00
Timothy Wall 2c4af20cb0 update javadoc for build 2.5
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@183 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-24 18:11:27 +00:00
Timothy Wall 78cdc63b76 update libraries and docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@181 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-24 17:31:25 +00:00
Timothy Wall 6ef191563a Fix VM crash in Structure.toArray by clearing memory prior to read
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@180 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-18 19:08:01 +00:00
Timothy Wall daf616be22 jna.encoding controls native encoding, if set.
Remove superfluous comparison cruft from NativeString.
Update overview doc.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@176 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-18 01:26:09 +00:00
Timothy Wall 278dc84bb9 Fix reading WString into a Structure
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@174 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-17 12:25:01 +00:00
Timothy Wall 686a2931e6 Add test for proper Kernel32.GetLastError operation
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@173 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-16 20:33:37 +00:00
Timothy Wall 5be5a0e417 Enhance javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@172 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-16 20:32:30 +00:00
Timothy Wall cd2d1dbb76 Avoid potential errors converting native byte[]/char[] to String
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@171 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-16 20:31:43 +00:00
Timothy Wall 68a92623d0 Write memory for initialized structure array arguments
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@170 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-16 20:30:16 +00:00
tweea 81b3255577 Organize imports.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@158 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-11 09:42:19 +00:00
Timothy Wall fc33a22f27 Add union support
Fix bug clearing OSX window mask
Add access to ByteBuffer direct address as Pointer

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@157 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-07-11 02:57:04 +00:00
Timothy Wall 5267c76580 part of last commit
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@150 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-27 20:59:54 +00:00
Timothy Wall 2908b993a3 Enable type mapping for callbacks
Avoid static instance variables in tests
Fill out wide character support
Fix osx/ppc struct alignment bug

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@149 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-27 20:58:59 +00:00
Timothy Wall 1c172bf513 Fix sporadic exception on X11
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@148 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-25 18:49:09 +00:00
Timothy Wall aa037e4a0c Fix sporadic exception on X11
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@147 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-25 18:46:27 +00:00
Timothy Wall 10dd04e03c Update demo with optimized, shaped windows
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@146 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-25 18:23:40 +00:00
Timothy Wall 560f75c755 Elaborate callback example
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@145 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-25 18:22:07 +00:00
Timothy Wall f2ce65fb84 Add optimization for window shape masks (ochafik/cdecker)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@144 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-25 16:09:48 +00:00
Timothy Wall eb1d463889 fix editor droppings
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@143 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-18 14:07:46 +00:00
Timothy Wall 8d021cb29c Use proper array typing
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@142 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-18 14:06:25 +00:00
Timothy Wall 70faac1b6a Copy proper varargs handling/test from v3 branch
Handle void callback return type in native code
Do not use java.library.path for JNA library lookups (from v3)
Make some internal Function methods private instead of public
Clean up Function.invokeString variants

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@141 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-18 14:04:41 +00:00
Timothy Wall abaf425a36 fix typo in field name comparison (nik)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@138 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-15 14:08:37 +00:00
Timothy Wall 95a0333057 Fix issue 22; validate structure member ordering
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@137 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-12 16:04:57 +00:00
Timothy Wall a49bba636a update front page/javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@136 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-11 18:31:25 +00:00
Timothy Wall e252ef2cb2 reinstate invokeXXX methods (for extra-Java convenience)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@135 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-11 18:30:00 +00:00
Timothy Wall 4ca6be8892 update javadoc
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@133 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-11 17:59:30 +00:00
Timothy Wall 29227a2c9e update jars, fix javadoc errors
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@132 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-11 17:52:22 +00:00
Timothy Wall be4326eb83 Fix structure alignment under GNUC; remove superfluous alignment calculation
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@131 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-11 17:18:34 +00:00
Timothy Wall 72cc002d5a Add contrib directory for user contributions
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@130 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-11 15:47:04 +00:00
Timothy Wall 0efce8e9b4 Eclipse SVN cratered on these files; part of previous commit (128).
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@129 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-11 15:46:20 +00:00
Timothy Wall 398b12f176 Allow customization of mapping between java and native types (wmeissner). Type mapping is applied on function calls and structure read/write.
Allow global specification of a library's native structure alignment.
Allow more extensive customization of function name mapping.
Provide default type/alignment/function mappings for w32 APIs (including stdcall decoration).  W32 examples have been updated to use the unicode version of functions by default (the w32.ascii system property may be set true to use ASCII versions instead).
Support packed structures.
Fix linux wide character support.

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@128 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-11 15:40:29 +00:00
Timothy Wall 4ca2eaaeda Support char*[] arguments (write-only)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@127 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-10 13:16:53 +00:00
Timothy Wall 8711ab4738 update
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@126 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-06-08 14:10:46 +00:00
Timothy Wall d58faad8de fix formatting
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@121 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-31 23:15:45 +00:00
Timothy Wall 8f44698c58 add array/pointer info
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@120 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-31 18:36:16 +00:00
Timothy Wall 14b2f05881 update feature list
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@115 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-30 15:23:54 +00:00
Timothy Wall 663071fbb8 update docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@112 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-26 15:36:24 +00:00
Timothy Wall 098e79c301 update docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@111 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-26 15:35:16 +00:00
Timothy Wall 5f18808f7d Add native long by reference
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@110 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-25 15:05:00 +00:00
Timothy Wall cb19b706d5 Simplify varargs handling, fix arg copy bug
Clean up javah handling

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@109 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-25 15:04:28 +00:00
Timothy Wall e2ed1db1e1 Auto-append NULL to vararg lists
Ensure structure memory is properly read back when using varargs

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@106 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-24 17:30:37 +00:00
Timothy Wall fc748c6a8b Fix deferred size calculation in Structure
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@99 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-23 02:01:02 +00:00
Timothy Wall 294f136297 Add tests for issue #17
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@98 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-23 02:00:36 +00:00
Timothy Wall f3fc29497e Allow array-based ByteBuffer args (issue #17) (wmeissner)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@97 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-23 01:41:19 +00:00
Timothy Wall 6e01d29355 Fix NPE when null structure is returned
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@93 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-22 14:51:43 +00:00
Timothy Wall 749725adba Preserve window alpha level when window is transparent (w32)
Account for window insets when painting transparent window (w32)

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@88 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-22 04:25:20 +00:00
Timothy Wall 5538031da1 Merge varargs support from wmeissner-jnalib (issue #13)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@85 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-21 17:57:54 +00:00
Timothy Wall dd0153f4e3 Add native long support (issue #12) from wmeissner branch
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@84 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-21 16:57:13 +00:00
Timothy Wall 690cf60b8c Copy fix for issue #15 (callbacks in struct) from wmeissner-jnalib branch
Add release notes

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@83 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-21 14:48:30 +00:00
Timothy Wall cce40a97f2 Copy fix for issue #3 from wmeissner-jnalib branch
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@82 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-21 14:46:27 +00:00
Timothy Wall ed0d95ae1f Copy fix for issue #3 from wmeissner-jnalib branch
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@81 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-21 14:08:00 +00:00
Timothy Wall 1e28ec4a6a Fix bug in Structure.toArray
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@80 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-21 13:47:27 +00:00
Timothy Wall 6b4daa5f16 Fix typo
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@79 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-21 04:10:06 +00:00
Timothy Wall 3075fd0cf5 Add examples to overview
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@78 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-21 03:42:40 +00:00
Timothy Wall b7470fd09f Fix javadoc error
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@77 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-21 03:32:27 +00:00
Timothy Wall 4b8bf1149e Validate initialized structure array arguments
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@76 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-21 03:25:52 +00:00
Timothy Wall d9567609de Handle array of structure arguments (issue #16)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@75 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-21 03:02:39 +00:00
Timothy Wall 9944e202c8 update link to overview
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@74 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-21 03:00:17 +00:00
Timothy Wall 923b59e2a0 Include native bits for previous commit
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@73 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-21 02:49:12 +00:00
Timothy Wall bd7d13136f Use appropriate library suffixes on OSX
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@72 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-21 00:02:32 +00:00
Timothy Wall a08aa84884 Copy Function.invoke refactoring from wmeissner-jnalib branch to facilitate direct invocation (w/o proxy)
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@71 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-20 22:44:55 +00:00
Timothy Wall 5be48aaae8 Disallow explicit free of memory and structures
Add memory GC test
Make library proxy generator use NativeLibrary cache

git-svn-id: https://svn.java.net/svn/jna~svn/trunk@70 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-20 20:37:36 +00:00
Timothy Wall 8530ec12b7 Ensure libraries loaded only once
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@69 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-20 18:29:57 +00:00
Timothy Wall d777506b74 fix blockquote formatting
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@42 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-11 13:05:59 +00:00
Timothy Wall 6e9a57421e fix blockquote formatting
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@41 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-11 13:04:44 +00:00
Timothy Wall c6d47a49cd add history
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@40 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-11 13:02:23 +00:00
Timothy Wall 13c48da980 Fix broken download link
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@31 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-10 15:58:03 +00:00
Timothy Wall df0658406c Add rss links to mailing lists
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@30 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-10 15:56:28 +00:00
Wayne Meissner ea548c34cf Fix issue #9 - CallbacksTest can fail randomly
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@26 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-10 14:24:12 +00:00
Wayne Meissner 28824d4b6f Fix for Issue #4
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@19 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-10 04:40:53 +00:00
Timothy Wall 341a1e3810 Fix https://jna.dev.java.net/issues/show_bug.cgi?id=5
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@18 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-10 03:57:28 +00:00
Timothy Wall dcf4a926f6 Fix w32 awt library loading bug
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@14 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-10 03:23:34 +00:00
Timothy Wall c12bdbb8a1 Update docs
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@12 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-09 20:46:53 +00:00
Timothy Wall 261706d808 Update links
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@11 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-09 20:41:44 +00:00
Timothy Wall 904c3f4072 kill more svn:executable props
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@10 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-09 20:22:10 +00:00
Timothy Wall 4a885ac56e Add junit jar
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@9 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-09 20:18:05 +00:00
Timothy Wall a51745868d Kill bogus svn:executable props
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@8 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-09 20:16:50 +00:00
Timothy Wall 9dd2d6c18c Jump ahead to current codebase
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@7 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-09 20:10:52 +00:00
Timothy Wall 8aae405584 Restore state of CVS HEAD
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@5 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-09 19:51:37 +00:00
Timothy Wall 4a119e6012 Committed through web interface.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@4 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-09 19:03:10 +00:00
Timothy Wall e3041177c7 auto commit for alm editor.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@3 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-09 19:03:07 +00:00
Timothy Wall 607f83cf96 auto commit for alm editor.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@2 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-09 19:03:00 +00:00
Timothy Wall 2c1fd46e24 Initial data for the jna project.
git-svn-id: https://svn.java.net/svn/jna~svn/trunk@1 2f8a963e-d2e4-e7d0-97bf-ccb7fcea9d80
2007-05-09 19:02:45 +00:00
1533 arquivos alterados com 490750 adições e 227301 exclusões
+9
Ver Arquivo
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" output="build.eclipse/test-classes" path="test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
<classpathentry kind="lib" path="lib/test/reflections-0.9.8.jar"/>
<classpathentry kind="output" path="build.eclipse/classes"/>
</classpath>
+22 -22
Ver Arquivo
@@ -1,23 +1,23 @@
.libs
.deps
*.o
*.lo
.dirstamp
*.la
Makefile
config.log
config.status
build
build-d64
build.eclipse
build.number
build.clover
.metadata
.DS_Store
bin
contrib/ntservice/dist
contrib/platform/dist
doc
*~
fficonfig.h
include/ffi.h
include/ffitarget.h
libffi.pc
libtool
stamp-h1
libffi*gz
autom4te.cache
libffi.xcodeproj/xcuserdata
libffi.xcodeproj/project.xcworkspace
ios/
osx/
build_*/
**/*~
dist/*.asc
dist/*-sources.jar
dist/*-javadoc.jar
dist/src-mvn.zip
dist/out-of-date.jar
perf*.txt
native/libffi/doc/libffi.info
junit-*
pom-jna.xml.asc
pom-jna-platform.xml.asc
-1
Ver Arquivo
@@ -1 +0,0 @@
2
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
-457
Ver Arquivo
@@ -1,457 +0,0 @@
/* -----------------------------------------------------------------*-C-*-
libffi @VERSION@ - Copyright (c) 2011 Anthony Green
- Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the ``Software''), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */
/* -------------------------------------------------------------------
The basic API is described in the README file.
The raw API is designed to bypass some of the argument packing
and unpacking on architectures for which it can be avoided.
The closure API allows interpreted functions to be packaged up
inside a C function pointer, so that they can be called as C functions,
with no understanding on the client side that they are interpreted.
It can also be used in other cases in which it is necessary to package
up a user specified parameter and a function pointer as a single
function pointer.
The closure API must be implemented in order to get its functionality,
e.g. for use by gij. Routines are provided to emulate the raw API
if the underlying platform doesn't allow faster implementation.
More details on the raw and cloure API can be found in:
http://gcc.gnu.org/ml/java/1999-q3/msg00138.html
and
http://gcc.gnu.org/ml/java/1999-q3/msg00174.html
-------------------------------------------------------------------- */
#ifndef LIBFFI_H
#define LIBFFI_H
#ifdef __cplusplus
extern "C" {
#endif
/* Specify which architecture libffi is configured for. */
#ifndef @TARGET@
#define @TARGET@
#endif
/* ---- System configuration information --------------------------------- */
#include <ffitarget.h>
#ifndef LIBFFI_ASM
#ifdef _MSC_VER
#define __attribute__(X)
#endif
#include <stddef.h>
#include <limits.h>
/* LONG_LONG_MAX is not always defined (not if STRICT_ANSI, for example).
But we can find it either under the correct ANSI name, or under GNU
C's internal name. */
#define FFI_64_BIT_MAX 9223372036854775807
#ifdef LONG_LONG_MAX
# define FFI_LONG_LONG_MAX LONG_LONG_MAX
#else
# ifdef LLONG_MAX
# define FFI_LONG_LONG_MAX LLONG_MAX
# ifdef _AIX52 /* or newer has C99 LLONG_MAX */
# undef FFI_64_BIT_MAX
# define FFI_64_BIT_MAX 9223372036854775807LL
# endif /* _AIX52 or newer */
# else
# ifdef __GNUC__
# define FFI_LONG_LONG_MAX __LONG_LONG_MAX__
# endif
# ifdef _AIX /* AIX 5.1 and earlier have LONGLONG_MAX */
# ifndef __PPC64__
# if defined (__IBMC__) || defined (__IBMCPP__)
# define FFI_LONG_LONG_MAX LONGLONG_MAX
# endif
# endif /* __PPC64__ */
# undef FFI_64_BIT_MAX
# define FFI_64_BIT_MAX 9223372036854775807LL
# endif
# endif
#endif
/* The closure code assumes that this works on pointers, i.e. a size_t */
/* can hold a pointer. */
typedef struct _ffi_type
{
size_t size;
unsigned short alignment;
unsigned short type;
struct _ffi_type **elements;
} ffi_type;
#ifndef LIBFFI_HIDE_BASIC_TYPES
#if SCHAR_MAX == 127
# define ffi_type_uchar ffi_type_uint8
# define ffi_type_schar ffi_type_sint8
#else
#error "char size not supported"
#endif
#if SHRT_MAX == 32767
# define ffi_type_ushort ffi_type_uint16
# define ffi_type_sshort ffi_type_sint16
#elif SHRT_MAX == 2147483647
# define ffi_type_ushort ffi_type_uint32
# define ffi_type_sshort ffi_type_sint32
#else
#error "short size not supported"
#endif
#if INT_MAX == 32767
# define ffi_type_uint ffi_type_uint16
# define ffi_type_sint ffi_type_sint16
#elif INT_MAX == 2147483647
# define ffi_type_uint ffi_type_uint32
# define ffi_type_sint ffi_type_sint32
#elif INT_MAX == 9223372036854775807
# define ffi_type_uint ffi_type_uint64
# define ffi_type_sint ffi_type_sint64
#else
#error "int size not supported"
#endif
#if LONG_MAX == 2147483647
# if FFI_LONG_LONG_MAX != FFI_64_BIT_MAX
#error "no 64-bit data type supported"
# endif
#elif LONG_MAX != FFI_64_BIT_MAX
#error "long size not supported"
#endif
#if LONG_MAX == 2147483647
# define ffi_type_ulong ffi_type_uint32
# define ffi_type_slong ffi_type_sint32
#elif LONG_MAX == FFI_64_BIT_MAX
# define ffi_type_ulong ffi_type_uint64
# define ffi_type_slong ffi_type_sint64
#else
#error "long size not supported"
#endif
/* Need minimal decorations for DLLs to works on Windows. */
/* GCC has autoimport and autoexport. Rely on Libtool to */
/* help MSVC export from a DLL, but always declare data */
/* to be imported for MSVC clients. This costs an extra */
/* indirection for MSVC clients using the static version */
/* of the library, but don't worry about that. Besides, */
/* as a workaround, they can define FFI_BUILDING if they */
/* *know* they are going to link with the static library. */
#if defined _MSC_VER && !defined FFI_BUILDING
#define FFI_EXTERN extern __declspec(dllimport)
#else
#define FFI_EXTERN extern
#endif
/* These are defined in types.c */
FFI_EXTERN ffi_type ffi_type_void;
FFI_EXTERN ffi_type ffi_type_uint8;
FFI_EXTERN ffi_type ffi_type_sint8;
FFI_EXTERN ffi_type ffi_type_uint16;
FFI_EXTERN ffi_type ffi_type_sint16;
FFI_EXTERN ffi_type ffi_type_uint32;
FFI_EXTERN ffi_type ffi_type_sint32;
FFI_EXTERN ffi_type ffi_type_uint64;
FFI_EXTERN ffi_type ffi_type_sint64;
FFI_EXTERN ffi_type ffi_type_float;
FFI_EXTERN ffi_type ffi_type_double;
FFI_EXTERN ffi_type ffi_type_pointer;
#if @HAVE_LONG_DOUBLE@
FFI_EXTERN ffi_type ffi_type_longdouble;
#else
#define ffi_type_longdouble ffi_type_double
#endif
#endif /* LIBFFI_HIDE_BASIC_TYPES */
typedef enum {
FFI_OK = 0,
FFI_BAD_TYPEDEF,
FFI_BAD_ABI
} ffi_status;
typedef unsigned FFI_TYPE;
typedef struct {
ffi_abi abi;
unsigned nargs;
ffi_type **arg_types;
ffi_type *rtype;
unsigned bytes;
unsigned flags;
#ifdef FFI_EXTRA_CIF_FIELDS
FFI_EXTRA_CIF_FIELDS;
#endif
} ffi_cif;
/* Used internally, but overridden by some architectures */
ffi_status ffi_prep_cif_core(ffi_cif *cif,
ffi_abi abi,
unsigned int isvariadic,
unsigned int nfixedargs,
unsigned int ntotalargs,
ffi_type *rtype,
ffi_type **atypes);
/* ---- Definitions for the raw API -------------------------------------- */
#ifndef FFI_SIZEOF_ARG
# if LONG_MAX == 2147483647
# define FFI_SIZEOF_ARG 4
# elif LONG_MAX == FFI_64_BIT_MAX
# define FFI_SIZEOF_ARG 8
# endif
#endif
#ifndef FFI_SIZEOF_JAVA_RAW
# define FFI_SIZEOF_JAVA_RAW FFI_SIZEOF_ARG
#endif
typedef union {
ffi_sarg sint;
ffi_arg uint;
float flt;
char data[FFI_SIZEOF_ARG];
void* ptr;
} ffi_raw;
#if FFI_SIZEOF_JAVA_RAW == 4 && FFI_SIZEOF_ARG == 8
/* This is a special case for mips64/n32 ABI (and perhaps others) where
sizeof(void *) is 4 and FFI_SIZEOF_ARG is 8. */
typedef union {
signed int sint;
unsigned int uint;
float flt;
char data[FFI_SIZEOF_JAVA_RAW];
void* ptr;
} ffi_java_raw;
#else
typedef ffi_raw ffi_java_raw;
#endif
void ffi_raw_call (ffi_cif *cif,
void (*fn)(void),
void *rvalue,
ffi_raw *avalue);
void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
size_t ffi_raw_size (ffi_cif *cif);
/* This is analogous to the raw API, except it uses Java parameter */
/* packing, even on 64-bit machines. I.e. on 64-bit machines */
/* longs and doubles are followed by an empty 64-bit word. */
void ffi_java_raw_call (ffi_cif *cif,
void (*fn)(void),
void *rvalue,
ffi_java_raw *avalue);
void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw);
void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_java_raw *raw, void **args);
size_t ffi_java_raw_size (ffi_cif *cif);
/* ---- Definitions for closures ----------------------------------------- */
#if FFI_CLOSURES
#ifdef _MSC_VER
__declspec(align(8))
#endif
typedef struct {
char tramp[FFI_TRAMPOLINE_SIZE];
ffi_cif *cif;
void (*fun)(ffi_cif*,void*,void**,void*);
void *user_data;
#ifdef __GNUC__
} ffi_closure __attribute__((aligned (8)));
#else
} ffi_closure;
# ifdef __sgi
# pragma pack 0
# endif
#endif
void *ffi_closure_alloc (size_t size, void **code);
void ffi_closure_free (void *);
ffi_status
ffi_prep_closure (ffi_closure*,
ffi_cif *,
void (*fun)(ffi_cif*,void*,void**,void*),
void *user_data);
ffi_status
ffi_prep_closure_loc (ffi_closure*,
ffi_cif *,
void (*fun)(ffi_cif*,void*,void**,void*),
void *user_data,
void*codeloc);
#ifdef __sgi
# pragma pack 8
#endif
typedef struct {
char tramp[FFI_TRAMPOLINE_SIZE];
ffi_cif *cif;
#if !FFI_NATIVE_RAW_API
/* if this is enabled, then a raw closure has the same layout
as a regular closure. We use this to install an intermediate
handler to do the transaltion, void** -> ffi_raw*. */
void (*translate_args)(ffi_cif*,void*,void**,void*);
void *this_closure;
#endif
void (*fun)(ffi_cif*,void*,ffi_raw*,void*);
void *user_data;
} ffi_raw_closure;
typedef struct {
char tramp[FFI_TRAMPOLINE_SIZE];
ffi_cif *cif;
#if !FFI_NATIVE_RAW_API
/* if this is enabled, then a raw closure has the same layout
as a regular closure. We use this to install an intermediate
handler to do the transaltion, void** -> ffi_raw*. */
void (*translate_args)(ffi_cif*,void*,void**,void*);
void *this_closure;
#endif
void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*);
void *user_data;
} ffi_java_raw_closure;
ffi_status
ffi_prep_raw_closure (ffi_raw_closure*,
ffi_cif *cif,
void (*fun)(ffi_cif*,void*,ffi_raw*,void*),
void *user_data);
ffi_status
ffi_prep_raw_closure_loc (ffi_raw_closure*,
ffi_cif *cif,
void (*fun)(ffi_cif*,void*,ffi_raw*,void*),
void *user_data,
void *codeloc);
ffi_status
ffi_prep_java_raw_closure (ffi_java_raw_closure*,
ffi_cif *cif,
void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
void *user_data);
ffi_status
ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*,
ffi_cif *cif,
void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
void *user_data,
void *codeloc);
#endif /* FFI_CLOSURES */
/* ---- Public interface definition -------------------------------------- */
ffi_status ffi_prep_cif(ffi_cif *cif,
ffi_abi abi,
unsigned int nargs,
ffi_type *rtype,
ffi_type **atypes);
ffi_status ffi_prep_cif_var(ffi_cif *cif,
ffi_abi abi,
unsigned int nfixedargs,
unsigned int ntotalargs,
ffi_type *rtype,
ffi_type **atypes);
void ffi_call(ffi_cif *cif,
void (*fn)(void),
void *rvalue,
void **avalue);
/* Useful for eliminating compiler warnings */
#define FFI_FN(f) ((void (*)(void))f)
/* ---- Definitions shared with assembly code ---------------------------- */
#endif
/* If these change, update src/mips/ffitarget.h. */
#define FFI_TYPE_VOID 0
#define FFI_TYPE_INT 1
#define FFI_TYPE_FLOAT 2
#define FFI_TYPE_DOUBLE 3
#if @HAVE_LONG_DOUBLE@
#define FFI_TYPE_LONGDOUBLE 4
#else
#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE
#endif
#define FFI_TYPE_UINT8 5
#define FFI_TYPE_SINT8 6
#define FFI_TYPE_UINT16 7
#define FFI_TYPE_SINT16 8
#define FFI_TYPE_UINT32 9
#define FFI_TYPE_SINT32 10
#define FFI_TYPE_UINT64 11
#define FFI_TYPE_SINT64 12
#define FFI_TYPE_STRUCT 13
#define FFI_TYPE_POINTER 14
/* This should always refer to the last type code (for sanity checks) */
#define FFI_TYPE_LAST FFI_TYPE_POINTER
#ifdef __cplusplus
}
#endif
#endif
-505
Ver Arquivo
@@ -1,505 +0,0 @@
/* -----------------------------------------------------------------------
sysv.S - Copyright (c) 1998, 2008, 2011 Red Hat, Inc.
Copyright (c) 2011 Plausible Labs Cooperative, Inc.
ARM Foreign Function Interface
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
``Software''), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */
#define LIBFFI_ASM
#include <fficonfig.h>
#include <ffi.h>
#ifdef HAVE_MACHINE_ASM_H
#include <machine/asm.h>
#else
#ifdef __USER_LABEL_PREFIX__
#define CONCAT1(a, b) CONCAT2(a, b)
#define CONCAT2(a, b) a ## b
/* Use the right prefix for global labels. */
#define CNAME(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
#else
#define CNAME(x) x
#endif
#ifdef __APPLE__
#define ENTRY(x) .globl CNAME(x); CNAME(x):
#else
#define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x):
#endif /* __APPLE__ */
#endif
#ifdef __ELF__
#define LSYM(x) .x
#else
#define LSYM(x) x
#endif
/* Use the SOFTFP return value ABI on Mac OS X, as per the iOS ABI
Function Call Guide */
#ifdef __APPLE__
#define __SOFTFP__
#endif
/* We need a better way of testing for this, but for now, this is all
we can do. */
@ This selects the minimum architecture level required.
#define __ARM_ARCH__ 3
#if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__)
# undef __ARM_ARCH__
# define __ARM_ARCH__ 4
#endif
#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) \
|| defined(__ARM_ARCH_5E__) || defined(__ARM_ARCH_5TE__) \
|| defined(__ARM_ARCH_5TEJ__)
# undef __ARM_ARCH__
# define __ARM_ARCH__ 5
#endif
#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \
|| defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) \
|| defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) \
|| defined(__ARM_ARCH_6M__)
# undef __ARM_ARCH__
# define __ARM_ARCH__ 6
#endif
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \
|| defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) \
|| defined(__ARM_ARCH_7EM__)
# undef __ARM_ARCH__
# define __ARM_ARCH__ 7
#endif
#if __ARM_ARCH__ >= 5
# define call_reg(x) blx x
#elif defined (__ARM_ARCH_4T__)
# define call_reg(x) mov lr, pc ; bx x
# if defined(__thumb__) || defined(__THUMB_INTERWORK__)
# define __INTERWORKING__
# endif
#else
# define call_reg(x) mov lr, pc ; mov pc, x
#endif
/* Conditionally compile unwinder directives. */
#ifdef __ARM_EABI__
#define UNWIND
#else
#define UNWIND @
#endif
#if defined(__thumb__) && !defined(__THUMB_INTERWORK__)
.macro ARM_FUNC_START name
.text
.align 0
.thumb
.thumb_func
#ifdef __APPLE__
ENTRY($0)
#else
ENTRY(\name)
#endif
bx pc
nop
.arm
UNWIND .fnstart
/* A hook to tell gdb that we've switched to ARM mode. Also used to call
directly from other local arm routines. */
#ifdef __APPLE__
_L__$0:
#else
_L__\name:
#endif
.endm
#else
.macro ARM_FUNC_START name
.text
.align 0
.arm
#ifdef __APPLE__
ENTRY($0)
#else
ENTRY(\name)
#endif
UNWIND .fnstart
.endm
#endif
.macro RETLDM regs=, cond=, dirn=ia
#if defined (__INTERWORKING__)
.ifc "\regs",""
ldr\cond lr, [sp], #4
.else
ldm\cond\dirn sp!, {\regs, lr}
.endif
bx\cond lr
#else
.ifc "\regs",""
ldr\cond pc, [sp], #4
.else
ldm\cond\dirn sp!, {\regs, pc}
.endif
#endif
.endm
@ r0: ffi_prep_args
@ r1: &ecif
@ r2: cif->bytes
@ r3: fig->flags
@ sp+0: ecif.rvalue
@ This assumes we are using gas.
ARM_FUNC_START ffi_call_SYSV
@ Save registers
stmfd sp!, {r0-r3, fp, lr}
UNWIND .save {r0-r3, fp, lr}
mov fp, sp
UNWIND .setfp fp, sp
@ Make room for all of the new args.
sub sp, fp, r2
@ Place all of the ffi_prep_args in position
mov r0, sp
@ r1 already set
@ Call ffi_prep_args(stack, &ecif)
bl ffi_prep_args
@ move first 4 parameters in registers
ldmia sp, {r0-r3}
@ and adjust stack
sub lr, fp, sp @ cif->bytes == fp - sp
ldr ip, [fp] @ load fn() in advance
cmp lr, #16
movhs lr, #16
add sp, sp, lr
@ call (fn) (...)
call_reg(ip)
@ Remove the space we pushed for the args
mov sp, fp
@ Load r2 with the pointer to storage for the return value
ldr r2, [sp, #24]
@ Load r3 with the return type code
ldr r3, [sp, #12]
@ If the return value pointer is NULL, assume no return value.
cmp r2, #0
beq LSYM(Lepilogue)
@ return INT
cmp r3, #FFI_TYPE_INT
#if defined(__SOFTFP__) || defined(__ARM_EABI__)
cmpne r3, #FFI_TYPE_FLOAT
#endif
streq r0, [r2]
beq LSYM(Lepilogue)
@ return INT64
cmp r3, #FFI_TYPE_SINT64
#if defined(__SOFTFP__) || defined(__ARM_EABI__)
cmpne r3, #FFI_TYPE_DOUBLE
#endif
stmeqia r2, {r0, r1}
#if !defined(__SOFTFP__) && !defined(__ARM_EABI__)
beq LSYM(Lepilogue)
@ return FLOAT
cmp r3, #FFI_TYPE_FLOAT
stfeqs f0, [r2]
beq LSYM(Lepilogue)
@ return DOUBLE or LONGDOUBLE
cmp r3, #FFI_TYPE_DOUBLE
stfeqd f0, [r2]
#endif
LSYM(Lepilogue):
#if defined (__INTERWORKING__)
ldmia sp!, {r0-r3,fp, lr}
bx lr
#else
ldmia sp!, {r0-r3,fp, pc}
#endif
.ffi_call_SYSV_end:
UNWIND .fnend
#ifdef __ELF__
.size CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV)
#endif
/*
unsigned int FFI_HIDDEN
ffi_closure_SYSV_inner (closure, respp, args)
ffi_closure *closure;
void **respp;
void *args;
*/
ARM_FUNC_START ffi_closure_SYSV
UNWIND .pad #16
add ip, sp, #16
stmfd sp!, {ip, lr}
UNWIND .save {r0, lr}
add r2, sp, #8
UNWIND .pad #16
sub sp, sp, #16
str sp, [sp, #8]
add r1, sp, #8
bl CNAME(ffi_closure_SYSV_inner)
cmp r0, #FFI_TYPE_INT
beq .Lretint
cmp r0, #FFI_TYPE_FLOAT
#if defined(__SOFTFP__) || defined(__ARM_EABI__)
beq .Lretint
#else
beq .Lretfloat
#endif
cmp r0, #FFI_TYPE_DOUBLE
#if defined(__SOFTFP__) || defined(__ARM_EABI__)
beq .Lretlonglong
#else
beq .Lretdouble
#endif
cmp r0, #FFI_TYPE_LONGDOUBLE
#if defined(__SOFTFP__) || defined(__ARM_EABI__)
beq .Lretlonglong
#else
beq .Lretlongdouble
#endif
cmp r0, #FFI_TYPE_SINT64
beq .Lretlonglong
.Lclosure_epilogue:
add sp, sp, #16
ldmfd sp, {sp, pc}
.Lretint:
ldr r0, [sp]
b .Lclosure_epilogue
.Lretlonglong:
ldr r0, [sp]
ldr r1, [sp, #4]
b .Lclosure_epilogue
#if !defined(__SOFTFP__) && !defined(__ARM_EABI__)
.Lretfloat:
ldfs f0, [sp]
b .Lclosure_epilogue
.Lretdouble:
ldfd f0, [sp]
b .Lclosure_epilogue
.Lretlongdouble:
ldfd f0, [sp]
b .Lclosure_epilogue
#endif
.ffi_closure_SYSV_end:
UNWIND .fnend
#ifdef __ELF__
.size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
#endif
/* Below are VFP hard-float ABI call and closure implementations.
Add VFP FPU directive here. This is only compiled into the library
under EABI. */
#ifdef __ARM_EABI__
.fpu vfp
@ r0: fn
@ r1: &ecif
@ r2: cif->bytes
@ r3: fig->flags
@ sp+0: ecif.rvalue
ARM_FUNC_START ffi_call_VFP
@ Save registers
stmfd sp!, {r0-r3, fp, lr}
UNWIND .save {r0-r3, fp, lr}
mov fp, sp
UNWIND .setfp fp, sp
@ Make room for all of the new args.
sub sp, sp, r2
@ Make room for loading VFP args
sub sp, sp, #64
@ Place all of the ffi_prep_args in position
mov r0, sp
@ r1 already set
sub r2, fp, #64 @ VFP scratch space
@ Call ffi_prep_args(stack, &ecif, vfp_space)
bl ffi_prep_args
@ Load VFP register args if needed
cmp r0, #0
beq LSYM(Lbase_args)
@ Load only d0 if possible
cmp r0, #3
sub ip, fp, #64
flddle d0, [ip]
fldmiadgt ip, {d0-d7}
LSYM(Lbase_args):
@ move first 4 parameters in registers
ldmia sp, {r0-r3}
@ and adjust stack
sub lr, ip, sp @ cif->bytes == (fp - 64) - sp
ldr ip, [fp] @ load fn() in advance
cmp lr, #16
movhs lr, #16
add sp, sp, lr
@ call (fn) (...)
call_reg(ip)
@ Remove the space we pushed for the args
mov sp, fp
@ Load r2 with the pointer to storage for
@ the return value
ldr r2, [sp, #24]
@ Load r3 with the return type code
ldr r3, [sp, #12]
@ If the return value pointer is NULL,
@ assume no return value.
cmp r2, #0
beq LSYM(Lepilogue_vfp)
cmp r3, #FFI_TYPE_INT
streq r0, [r2]
beq LSYM(Lepilogue_vfp)
cmp r3, #FFI_TYPE_SINT64
stmeqia r2, {r0, r1}
beq LSYM(Lepilogue_vfp)
cmp r3, #FFI_TYPE_FLOAT
fstseq s0, [r2]
beq LSYM(Lepilogue_vfp)
cmp r3, #FFI_TYPE_DOUBLE
fstdeq d0, [r2]
beq LSYM(Lepilogue_vfp)
cmp r3, #FFI_TYPE_STRUCT_VFP_FLOAT
cmpne r3, #FFI_TYPE_STRUCT_VFP_DOUBLE
fstmiadeq r2, {d0-d3}
LSYM(Lepilogue_vfp):
RETLDM "r0-r3,fp"
.ffi_call_VFP_end:
UNWIND .fnend
.size CNAME(ffi_call_VFP),.ffi_call_VFP_end-CNAME(ffi_call_VFP)
ARM_FUNC_START ffi_closure_VFP
fstmfdd sp!, {d0-d7}
@ r0-r3, then d0-d7
UNWIND .pad #80
add ip, sp, #80
stmfd sp!, {ip, lr}
UNWIND .save {r0, lr}
add r2, sp, #72
add r3, sp, #8
UNWIND .pad #72
sub sp, sp, #72
str sp, [sp, #64]
add r1, sp, #64
bl ffi_closure_SYSV_inner
cmp r0, #FFI_TYPE_INT
beq .Lretint_vfp
cmp r0, #FFI_TYPE_FLOAT
beq .Lretfloat_vfp
cmp r0, #FFI_TYPE_DOUBLE
cmpne r0, #FFI_TYPE_LONGDOUBLE
beq .Lretdouble_vfp
cmp r0, #FFI_TYPE_SINT64
beq .Lretlonglong_vfp
cmp r0, #FFI_TYPE_STRUCT_VFP_FLOAT
beq .Lretfloat_struct_vfp
cmp r0, #FFI_TYPE_STRUCT_VFP_DOUBLE
beq .Lretdouble_struct_vfp
.Lclosure_epilogue_vfp:
add sp, sp, #72
ldmfd sp, {sp, pc}
.Lretfloat_vfp:
flds s0, [sp]
b .Lclosure_epilogue_vfp
.Lretdouble_vfp:
fldd d0, [sp]
b .Lclosure_epilogue_vfp
.Lretint_vfp:
ldr r0, [sp]
b .Lclosure_epilogue_vfp
.Lretlonglong_vfp:
ldmia sp, {r0, r1}
b .Lclosure_epilogue_vfp
.Lretfloat_struct_vfp:
fldmiad sp, {d0-d1}
b .Lclosure_epilogue_vfp
.Lretdouble_struct_vfp:
fldmiad sp, {d0-d3}
b .Lclosure_epilogue_vfp
.ffi_closure_VFP_end:
UNWIND .fnend
.size CNAME(ffi_closure_VFP),.ffi_closure_VFP_end-CNAME(ffi_closure_VFP)
#endif
ENTRY(ffi_arm_trampoline)
stmfd sp!, {r0-r3}
ldr r0, [pc]
ldr pc, [pc]
#if defined __ELF__ && defined __linux__
.section .note.GNU-stack,"",%progbits
#endif
-841
Ver Arquivo
@@ -1,841 +0,0 @@
/* -----------------------------------------------------------------------
ffi.c - Copyright (c) 1996, 1998, 1999, 2001, 2007, 2008 Red Hat, Inc.
Copyright (c) 2002 Ranjit Mathew
Copyright (c) 2002 Bo Thorsen
Copyright (c) 2002 Roger Sayle
Copyright (C) 2008, 2010 Free Software Foundation, Inc.
x86 Foreign Function Interface
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
``Software''), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */
#if !defined(__x86_64__) || defined(_WIN64)
#ifdef _WIN64
#include <windows.h>
#endif
#include <ffi.h>
#include <ffi_common.h>
#include <stdlib.h>
/* ffi_prep_args is called by the assembly routine once stack space
has been allocated for the function's arguments */
void ffi_prep_args(char *stack, extended_cif *ecif)
{
register unsigned int i;
register void **p_argv;
register char *argp;
register ffi_type **p_arg;
#ifdef X86_WIN32
size_t p_stack_args[2];
void *p_stack_data[2];
char *argp2 = stack;
int stack_args_count = 0;
int cabi = ecif->cif->abi;
#endif
argp = stack;
if ((ecif->cif->flags == FFI_TYPE_STRUCT
|| ecif->cif->flags == FFI_TYPE_MS_STRUCT)
#ifdef X86_WIN64
&& (ecif->cif->rtype->size != 1 && ecif->cif->rtype->size != 2
&& ecif->cif->rtype->size != 4 && ecif->cif->rtype->size != 8)
#endif
)
{
*(void **) argp = ecif->rvalue;
#ifdef X86_WIN32
/* For fastcall/thiscall this is first register-passed
argument. */
if (cabi == FFI_THISCALL || cabi == FFI_FASTCALL)
{
p_stack_args[stack_args_count] = sizeof (void*);
p_stack_data[stack_args_count] = argp;
++stack_args_count;
}
#endif
argp += sizeof(void*);
}
p_argv = ecif->avalue;
for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
i != 0;
i--, p_arg++)
{
size_t z;
/* Align if necessary */
if ((sizeof(void*) - 1) & (size_t) argp)
argp = (char *) ALIGN(argp, sizeof(void*));
z = (*p_arg)->size;
#ifdef X86_WIN64
if (z > sizeof(ffi_arg)
|| ((*p_arg)->type == FFI_TYPE_STRUCT
&& (z != 1 && z != 2 && z != 4 && z != 8))
#if FFI_TYPE_DOUBLE != FFI_TYPE_LONGDOUBLE
|| ((*p_arg)->type == FFI_TYPE_LONGDOUBLE)
#endif
)
{
z = sizeof(ffi_arg);
*(void **)argp = *p_argv;
}
else if ((*p_arg)->type == FFI_TYPE_FLOAT)
{
memcpy(argp, *p_argv, z);
}
else
#endif
if (z < sizeof(ffi_arg))
{
z = sizeof(ffi_arg);
switch ((*p_arg)->type)
{
case FFI_TYPE_SINT8:
*(ffi_sarg *) argp = (ffi_sarg)*(SINT8 *)(* p_argv);
break;
case FFI_TYPE_UINT8:
*(ffi_arg *) argp = (ffi_arg)*(UINT8 *)(* p_argv);
break;
case FFI_TYPE_SINT16:
*(ffi_sarg *) argp = (ffi_sarg)*(SINT16 *)(* p_argv);
break;
case FFI_TYPE_UINT16:
*(ffi_arg *) argp = (ffi_arg)*(UINT16 *)(* p_argv);
break;
case FFI_TYPE_SINT32:
*(ffi_sarg *) argp = (ffi_sarg)*(SINT32 *)(* p_argv);
break;
case FFI_TYPE_UINT32:
*(ffi_arg *) argp = (ffi_arg)*(UINT32 *)(* p_argv);
break;
case FFI_TYPE_STRUCT:
*(ffi_arg *) argp = *(ffi_arg *)(* p_argv);
break;
default:
FFI_ASSERT(0);
}
}
else
{
memcpy(argp, *p_argv, z);
}
#ifdef X86_WIN32
/* For thiscall/fastcall convention register-passed arguments
are the first two none-floating-point arguments with a size
smaller or equal to sizeof (void*). */
if ((cabi == FFI_THISCALL && stack_args_count < 1)
|| (cabi == FFI_FASTCALL && stack_args_count < 2))
{
if (z <= 4
&& ((*p_arg)->type != FFI_TYPE_FLOAT
&& (*p_arg)->type != FFI_TYPE_STRUCT))
{
p_stack_args[stack_args_count] = z;
p_stack_data[stack_args_count] = argp;
++stack_args_count;
}
}
#endif
p_argv++;
#ifdef X86_WIN64
argp += (z + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
#else
argp += z;
#endif
}
#ifdef X86_WIN32
/* We need to move the register-passed arguments for thiscall/fastcall
on top of stack, so that those can be moved to registers ecx/edx by
call-handler. */
if (stack_args_count > 0)
{
size_t zz = (p_stack_args[0] + 3) & ~3;
char *h;
/* Move first argument to top-stack position. */
if (p_stack_data[0] != argp2)
{
h = alloca (zz + 1);
memcpy (h, p_stack_data[0], zz);
memmove (argp2 + zz, argp2,
(size_t) ((char *) p_stack_data[0] - (char*)argp2));
memcpy (argp2, h, zz);
}
argp2 += zz;
--stack_args_count;
if (zz > 4)
stack_args_count = 0;
/* If we have a second argument, then move it on top
after the first one. */
if (stack_args_count > 0 && p_stack_data[1] != argp2)
{
zz = p_stack_args[1];
zz = (zz + 3) & ~3;
h = alloca (zz + 1);
h = alloca (zz + 1);
memcpy (h, p_stack_data[1], zz);
memmove (argp2 + zz, argp2, (size_t) ((char*) p_stack_data[1] - (char*)argp2));
memcpy (argp2, h, zz);
}
}
#endif
return;
}
/* Perform machine dependent cif processing */
ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
{
unsigned int i;
ffi_type **ptr;
/* Set the return type flag */
switch (cif->rtype->type)
{
case FFI_TYPE_VOID:
case FFI_TYPE_UINT8:
case FFI_TYPE_UINT16:
case FFI_TYPE_SINT8:
case FFI_TYPE_SINT16:
#ifdef X86_WIN64
case FFI_TYPE_UINT32:
case FFI_TYPE_SINT32:
#endif
case FFI_TYPE_SINT64:
case FFI_TYPE_FLOAT:
case FFI_TYPE_DOUBLE:
#ifndef X86_WIN64
#if FFI_TYPE_DOUBLE != FFI_TYPE_LONGDOUBLE
case FFI_TYPE_LONGDOUBLE:
#endif
#endif
cif->flags = (unsigned) cif->rtype->type;
break;
case FFI_TYPE_UINT64:
#ifdef X86_WIN64
case FFI_TYPE_POINTER:
#endif
cif->flags = FFI_TYPE_SINT64;
break;
case FFI_TYPE_STRUCT:
#ifndef X86
if (cif->rtype->size == 1)
{
cif->flags = FFI_TYPE_SMALL_STRUCT_1B; /* same as char size */
}
else if (cif->rtype->size == 2)
{
cif->flags = FFI_TYPE_SMALL_STRUCT_2B; /* same as short size */
}
else if (cif->rtype->size == 4)
{
#ifdef X86_WIN64
cif->flags = FFI_TYPE_SMALL_STRUCT_4B;
#else
cif->flags = FFI_TYPE_INT; /* same as int type */
#endif
}
else if (cif->rtype->size == 8)
{
cif->flags = FFI_TYPE_SINT64; /* same as int64 type */
}
else
#endif
{
if (cif->abi == FFI_MS_CDECL)
cif->flags = FFI_TYPE_MS_STRUCT;
else
cif->flags = FFI_TYPE_STRUCT;
/* allocate space for return value pointer */
cif->bytes += ALIGN(sizeof(void*), FFI_SIZEOF_ARG);
}
break;
default:
#ifdef X86_WIN64
cif->flags = FFI_TYPE_SINT64;
break;
case FFI_TYPE_INT:
cif->flags = FFI_TYPE_SINT32;
#else
cif->flags = FFI_TYPE_INT;
#endif
break;
}
for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++)
{
if (((*ptr)->alignment - 1) & cif->bytes)
cif->bytes = ALIGN(cif->bytes, (*ptr)->alignment);
cif->bytes += ALIGN((*ptr)->size, FFI_SIZEOF_ARG);
}
#ifdef X86_WIN64
/* ensure space for storing four registers */
cif->bytes += 4 * sizeof(ffi_arg);
#endif
#ifdef X86_DARWIN
cif->bytes = (cif->bytes + 15) & ~0xF;
#endif
return FFI_OK;
}
#ifdef X86_WIN64
extern int
ffi_call_win64(void (*)(char *, extended_cif *), extended_cif *,
unsigned, unsigned, unsigned *, void (*fn)(void));
#elif defined(X86_WIN32)
extern void
ffi_call_win32(void (*)(char *, extended_cif *), extended_cif *,
unsigned, unsigned, unsigned, unsigned *, void (*fn)(void));
#else
extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *,
unsigned, unsigned, unsigned *, void (*fn)(void));
#endif
void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
{
extended_cif ecif;
ecif.cif = cif;
ecif.avalue = avalue;
/* If the return value is a struct and we don't have a return */
/* value address then we need to make one */
#ifdef X86_WIN64
if (rvalue == NULL
&& cif->flags == FFI_TYPE_STRUCT
&& cif->rtype->size != 1 && cif->rtype->size != 2
&& cif->rtype->size != 4 && cif->rtype->size != 8)
{
ecif.rvalue = alloca((cif->rtype->size + 0xF) & ~0xF);
}
#else
if (rvalue == NULL
&& (cif->flags == FFI_TYPE_STRUCT
|| cif->flags == FFI_TYPE_MS_STRUCT))
{
ecif.rvalue = alloca(cif->rtype->size);
}
#endif
else
ecif.rvalue = rvalue;
switch (cif->abi)
{
#ifdef X86_WIN64
case FFI_WIN64:
ffi_call_win64(ffi_prep_args, &ecif, cif->bytes,
cif->flags, ecif.rvalue, fn);
break;
#elif defined(X86_WIN32)
case FFI_SYSV:
case FFI_STDCALL:
case FFI_MS_CDECL:
ffi_call_win32(ffi_prep_args, &ecif, cif->abi, cif->bytes, cif->flags,
ecif.rvalue, fn);
break;
case FFI_THISCALL:
case FFI_FASTCALL:
{
unsigned int abi = cif->abi;
unsigned int i, passed_regs = 0;
if (cif->flags == FFI_TYPE_STRUCT)
++passed_regs;
for (i=0; i < cif->nargs && passed_regs < 2;i++)
{
size_t sz;
if (cif->arg_types[i]->type == FFI_TYPE_FLOAT
|| cif->arg_types[i]->type == FFI_TYPE_STRUCT)
continue;
sz = (cif->arg_types[i]->size + 3) & ~3;
if (sz == 0 || sz > 4)
continue;
++passed_regs;
}
if (passed_regs < 2 && abi == FFI_FASTCALL)
abi = FFI_THISCALL;
if (passed_regs < 1 && abi == FFI_THISCALL)
abi = FFI_STDCALL;
ffi_call_win32(ffi_prep_args, &ecif, abi, cif->bytes, cif->flags,
ecif.rvalue, fn);
}
break;
#else
case FFI_SYSV:
ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue,
fn);
break;
#endif
default:
FFI_ASSERT(0);
break;
}
}
/** private members **/
/* The following __attribute__((regparm(1))) decorations will have no effect
on MSVC - standard cdecl convention applies. */
static void ffi_prep_incoming_args_SYSV (char *stack, void **ret,
void** args, ffi_cif* cif);
void FFI_HIDDEN ffi_closure_SYSV (ffi_closure *)
__attribute__ ((regparm(1)));
unsigned int FFI_HIDDEN ffi_closure_SYSV_inner (ffi_closure *, void **, void *)
__attribute__ ((regparm(1)));
void FFI_HIDDEN ffi_closure_raw_SYSV (ffi_raw_closure *)
__attribute__ ((regparm(1)));
#ifdef X86_WIN32
void FFI_HIDDEN ffi_closure_raw_THISCALL (ffi_raw_closure *)
__attribute__ ((regparm(1)));
void FFI_HIDDEN ffi_closure_STDCALL (ffi_closure *)
__attribute__ ((regparm(1)));
void FFI_HIDDEN ffi_closure_THISCALL (ffi_closure *)
__attribute__ ((regparm(1)));
#endif
#ifdef X86_WIN64
void FFI_HIDDEN ffi_closure_win64 (ffi_closure *);
#endif
/* This function is jumped to by the trampoline */
#ifdef X86_WIN64
void * FFI_HIDDEN
ffi_closure_win64_inner (ffi_closure *closure, void *args) {
ffi_cif *cif;
void **arg_area;
void *result;
void *resp = &result;
cif = closure->cif;
arg_area = (void**) alloca (cif->nargs * sizeof (void*));
/* this call will initialize ARG_AREA, such that each
* element in that array points to the corresponding
* value on the stack; and if the function returns
* a structure, it will change RESP to point to the
* structure return address. */
ffi_prep_incoming_args_SYSV(args, &resp, arg_area, cif);
(closure->fun) (cif, resp, arg_area, closure->user_data);
/* The result is returned in rax. This does the right thing for
result types except for floats; we have to 'mov xmm0, rax' in the
caller to correct this.
TODO: structure sizes of 3 5 6 7 are returned by reference, too!!!
*/
return cif->rtype->size > sizeof(void *) ? resp : *(void **)resp;
}
#else
unsigned int FFI_HIDDEN __attribute__ ((regparm(1)))
ffi_closure_SYSV_inner (ffi_closure *closure, void **respp, void *args)
{
/* our various things... */
ffi_cif *cif;
void **arg_area;
cif = closure->cif;
arg_area = (void**) alloca (cif->nargs * sizeof (void*));
/* this call will initialize ARG_AREA, such that each
* element in that array points to the corresponding
* value on the stack; and if the function returns
* a structure, it will change RESP to point to the
* structure return address. */
ffi_prep_incoming_args_SYSV(args, respp, arg_area, cif);
(closure->fun) (cif, *respp, arg_area, closure->user_data);
return cif->flags;
}
#endif /* !X86_WIN64 */
static void
ffi_prep_incoming_args_SYSV(char *stack, void **rvalue, void **avalue,
ffi_cif *cif)
{
register unsigned int i;
register void **p_argv;
register char *argp;
register ffi_type **p_arg;
argp = stack;
#ifdef X86_WIN64
if (cif->rtype->size > sizeof(ffi_arg)
|| (cif->flags == FFI_TYPE_STRUCT
&& (cif->rtype->size != 1 && cif->rtype->size != 2
&& cif->rtype->size != 4 && cif->rtype->size != 8))) {
*rvalue = *(void **) argp;
argp += sizeof(void *);
}
#else
if ( cif->flags == FFI_TYPE_STRUCT
|| cif->flags == FFI_TYPE_MS_STRUCT ) {
*rvalue = *(void **) argp;
argp += sizeof(void *);
}
#endif
p_argv = avalue;
for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++)
{
size_t z;
/* Align if necessary */
if ((sizeof(void*) - 1) & (size_t) argp) {
argp = (char *) ALIGN(argp, sizeof(void*));
}
#ifdef X86_WIN64
if ((*p_arg)->size > sizeof(ffi_arg)
|| ((*p_arg)->type == FFI_TYPE_STRUCT
&& ((*p_arg)->size != 1 && (*p_arg)->size != 2
&& (*p_arg)->size != 4 && (*p_arg)->size != 8)))
{
z = sizeof(void *);
*p_argv = *(void **)argp;
}
else
#endif
{
z = (*p_arg)->size;
/* because we're little endian, this is what it turns into. */
*p_argv = (void*) argp;
}
p_argv++;
#ifdef X86_WIN64
argp += (z + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
#else
argp += z;
#endif
}
return;
}
#define FFI_INIT_TRAMPOLINE_WIN64(TRAMP,FUN,CTX,MASK) \
{ unsigned char *__tramp = (unsigned char*)(TRAMP); \
void* __fun = (void*)(FUN); \
void* __ctx = (void*)(CTX); \
*(unsigned char*) &__tramp[0] = 0x41; \
*(unsigned char*) &__tramp[1] = 0xbb; \
*(unsigned int*) &__tramp[2] = MASK; /* mov $mask, %r11 */ \
*(unsigned char*) &__tramp[6] = 0x48; \
*(unsigned char*) &__tramp[7] = 0xb8; \
*(void**) &__tramp[8] = __ctx; /* mov __ctx, %rax */ \
*(unsigned char *) &__tramp[16] = 0x49; \
*(unsigned char *) &__tramp[17] = 0xba; \
*(void**) &__tramp[18] = __fun; /* mov __fun, %r10 */ \
*(unsigned char *) &__tramp[26] = 0x41; \
*(unsigned char *) &__tramp[27] = 0xff; \
*(unsigned char *) &__tramp[28] = 0xe2; /* jmp %r10 */ \
}
/* How to make a trampoline. Derived from gcc/config/i386/i386.c. */
#define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \
{ unsigned char *__tramp = (unsigned char*)(TRAMP); \
unsigned int __fun = (unsigned int)(FUN); \
unsigned int __ctx = (unsigned int)(CTX); \
unsigned int __dis = __fun - (__ctx + 10); \
*(unsigned char*) &__tramp[0] = 0xb8; \
*(unsigned int*) &__tramp[1] = __ctx; /* movl __ctx, %eax */ \
*(unsigned char *) &__tramp[5] = 0xe9; \
*(unsigned int*) &__tramp[6] = __dis; /* jmp __fun */ \
}
#define FFI_INIT_TRAMPOLINE_THISCALL(TRAMP,FUN,CTX,SIZE) \
{ unsigned char *__tramp = (unsigned char*)(TRAMP); \
unsigned int __fun = (unsigned int)(FUN); \
unsigned int __ctx = (unsigned int)(CTX); \
unsigned int __dis = __fun - (__ctx + 49); \
unsigned short __size = (unsigned short)(SIZE); \
*(unsigned int *) &__tramp[0] = 0x8324048b; /* mov (%esp), %eax */ \
*(unsigned int *) &__tramp[4] = 0x4c890cec; /* sub $12, %esp */ \
*(unsigned int *) &__tramp[8] = 0x04890424; /* mov %ecx, 4(%esp) */ \
*(unsigned char*) &__tramp[12] = 0x24; /* mov %eax, (%esp) */ \
*(unsigned char*) &__tramp[13] = 0xb8; \
*(unsigned int *) &__tramp[14] = __size; /* mov __size, %eax */ \
*(unsigned int *) &__tramp[18] = 0x08244c8d; /* lea 8(%esp), %ecx */ \
*(unsigned int *) &__tramp[22] = 0x4802e8c1; /* shr $2, %eax ; dec %eax */ \
*(unsigned short*) &__tramp[26] = 0x0b74; /* jz 1f */ \
*(unsigned int *) &__tramp[28] = 0x8908518b; /* 2b: mov 8(%ecx), %edx */ \
*(unsigned int *) &__tramp[32] = 0x04c18311; /* mov %edx, (%ecx) ; add $4, %ecx */ \
*(unsigned char*) &__tramp[36] = 0x48; /* dec %eax */ \
*(unsigned short*) &__tramp[37] = 0xf575; /* jnz 2b ; 1f: */ \
*(unsigned char*) &__tramp[39] = 0xb8; \
*(unsigned int*) &__tramp[40] = __ctx; /* movl __ctx, %eax */ \
*(unsigned char *) &__tramp[44] = 0xe8; \
*(unsigned int*) &__tramp[45] = __dis; /* call __fun */ \
*(unsigned char*) &__tramp[49] = 0xc2; /* ret */ \
*(unsigned short*) &__tramp[50] = (__size + 8); /* ret (__size + 8) */ \
}
#define FFI_INIT_TRAMPOLINE_STDCALL(TRAMP,FUN,CTX,SIZE) \
{ unsigned char *__tramp = (unsigned char*)(TRAMP); \
unsigned int __fun = (unsigned int)(FUN); \
unsigned int __ctx = (unsigned int)(CTX); \
unsigned int __dis = __fun - (__ctx + 10); \
unsigned short __size = (unsigned short)(SIZE); \
*(unsigned char*) &__tramp[0] = 0xb8; \
*(unsigned int*) &__tramp[1] = __ctx; /* movl __ctx, %eax */ \
*(unsigned char *) &__tramp[5] = 0xe8; \
*(unsigned int*) &__tramp[6] = __dis; /* call __fun */ \
*(unsigned char *) &__tramp[10] = 0xc2; \
*(unsigned short*) &__tramp[11] = __size; /* ret __size */ \
}
/* the cif must already be prep'ed */
ffi_status
ffi_prep_closure_loc (ffi_closure* closure,
ffi_cif* cif,
void (*fun)(ffi_cif*,void*,void**,void*),
void *user_data,
void *codeloc)
{
#ifdef X86_WIN64
#define ISFLOAT(IDX) (cif->arg_types[IDX]->type == FFI_TYPE_FLOAT || cif->arg_types[IDX]->type == FFI_TYPE_DOUBLE)
#define FLAG(IDX) (cif->nargs>(IDX)&&ISFLOAT(IDX)?(1<<(IDX)):0)
if (cif->abi == FFI_WIN64)
{
int mask = FLAG(0)|FLAG(1)|FLAG(2)|FLAG(3);
FFI_INIT_TRAMPOLINE_WIN64 (&closure->tramp[0],
&ffi_closure_win64,
codeloc, mask);
/* make sure we can execute here */
}
#else
if (cif->abi == FFI_SYSV)
{
FFI_INIT_TRAMPOLINE (&closure->tramp[0],
&ffi_closure_SYSV,
(void*)codeloc);
}
#ifdef X86_WIN32
else if (cif->abi == FFI_THISCALL)
{
FFI_INIT_TRAMPOLINE_THISCALL (&closure->tramp[0],
&ffi_closure_THISCALL,
(void*)codeloc,
cif->bytes);
}
else if (cif->abi == FFI_STDCALL)
{
FFI_INIT_TRAMPOLINE_STDCALL (&closure->tramp[0],
&ffi_closure_STDCALL,
(void*)codeloc, cif->bytes);
}
else if (cif->abi == FFI_MS_CDECL)
{
FFI_INIT_TRAMPOLINE (&closure->tramp[0],
&ffi_closure_SYSV,
(void*)codeloc);
}
#endif /* X86_WIN32 */
#endif /* !X86_WIN64 */
else
{
return FFI_BAD_ABI;
}
closure->cif = cif;
closure->user_data = user_data;
closure->fun = fun;
return FFI_OK;
}
/* ------- Native raw API support -------------------------------- */
#if !FFI_NO_RAW_API
ffi_status
ffi_prep_raw_closure_loc (ffi_raw_closure* closure,
ffi_cif* cif,
void (*fun)(ffi_cif*,void*,ffi_raw*,void*),
void *user_data,
void *codeloc)
{
int i;
if (cif->abi != FFI_SYSV) {
#ifdef X86_WIN32
if (cif->abi != FFI_THISCALL)
#endif
return FFI_BAD_ABI;
}
/* we currently don't support certain kinds of arguments for raw
closures. This should be implemented by a separate assembly
language routine, since it would require argument processing,
something we don't do now for performance. */
for (i = cif->nargs-1; i >= 0; i--)
{
FFI_ASSERT (cif->arg_types[i]->type != FFI_TYPE_STRUCT);
FFI_ASSERT (cif->arg_types[i]->type != FFI_TYPE_LONGDOUBLE);
}
#ifdef X86_WIN32
if (cif->abi == FFI_SYSV)
{
#endif
FFI_INIT_TRAMPOLINE (&closure->tramp[0], &ffi_closure_raw_SYSV,
codeloc);
#ifdef X86_WIN32
}
else if (cif->abi == FFI_THISCALL)
{
FFI_INIT_TRAMPOLINE_THISCALL (&closure->tramp[0], &ffi_closure_raw_THISCALL,
codeloc, cif->bytes);
}
#endif
closure->cif = cif;
closure->user_data = user_data;
closure->fun = fun;
return FFI_OK;
}
static void
ffi_prep_args_raw(char *stack, extended_cif *ecif)
{
memcpy (stack, ecif->avalue, ecif->cif->bytes);
}
/* we borrow this routine from libffi (it must be changed, though, to
* actually call the function passed in the first argument. as of
* libffi-1.20, this is not the case.)
*/
void
ffi_raw_call(ffi_cif *cif, void (*fn)(void), void *rvalue, ffi_raw *fake_avalue)
{
extended_cif ecif;
void **avalue = (void **)fake_avalue;
ecif.cif = cif;
ecif.avalue = avalue;
/* If the return value is a struct and we don't have a return */
/* value address then we need to make one */
if (rvalue == NULL
&& (cif->flags == FFI_TYPE_STRUCT
|| cif->flags == FFI_TYPE_MS_STRUCT))
{
ecif.rvalue = alloca(cif->rtype->size);
}
else
ecif.rvalue = rvalue;
switch (cif->abi)
{
#ifdef X86_WIN32
case FFI_SYSV:
case FFI_STDCALL:
case FFI_MS_CDECL:
ffi_call_win32(ffi_prep_args_raw, &ecif, cif->abi, cif->bytes, cif->flags,
ecif.rvalue, fn);
break;
case FFI_THISCALL:
case FFI_FASTCALL:
{
unsigned int abi = cif->abi;
unsigned int i, passed_regs = 0;
if (cif->flags == FFI_TYPE_STRUCT)
++passed_regs;
for (i=0; i < cif->nargs && passed_regs < 2;i++)
{
size_t sz;
if (cif->arg_types[i]->type == FFI_TYPE_FLOAT
|| cif->arg_types[i]->type == FFI_TYPE_STRUCT)
continue;
sz = (cif->arg_types[i]->size + 3) & ~3;
if (sz == 0 || sz > 4)
continue;
++passed_regs;
}
if (passed_regs < 2 && abi == FFI_FASTCALL)
cif->abi = abi = FFI_THISCALL;
if (passed_regs < 1 && abi == FFI_THISCALL)
cif->abi = abi = FFI_STDCALL;
ffi_call_win32(ffi_prep_args_raw, &ecif, abi, cif->bytes, cif->flags,
ecif.rvalue, fn);
}
break;
#else
case FFI_SYSV:
ffi_call_SYSV(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags,
ecif.rvalue, fn);
break;
#endif
default:
FFI_ASSERT(0);
break;
}
}
#endif
#endif /* !__x86_64__ || X86_WIN64 */
-19
Ver Arquivo
@@ -1,19 +0,0 @@
stand-alone
aix-fix
mint
win32
win32_tests
vararg_float_test_fix
vfp-eabi
msvc-changes
win32-return-sign
apple-fixes
dist-tests
icc128
x32libtool
arm-test-fix
xcode
darwin-missing-semi
xcode-improvements
update-disty
v3_0_11
Ver Arquivo
@@ -1,64 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Test doubles passed in variable argument lists.
Limitations: none.
PR: none.
Originator: Blake Chaffin 6/6/2007 */
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
/* { dg-output "" { xfail avr32*-*-* } } */
/* { dg-output "" { xfail mips-sgi-irix6* } } PR libffi/46660 */
/* { dg-skip-if "" arm*-*-* { "-mfloat-abi=hard" } { "" } } */
#include "ffitest.h"
static void
cls_double_va_fn(ffi_cif* cif __UNUSED__, void* resp,
void** args, void* userdata __UNUSED__)
{
char* format = *(char**)args[0];
double doubleValue = *(double*)args[1];
*(ffi_arg*)resp = printf(format, doubleValue);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args[3];
ffi_type* arg_types[3];
char* format = "%.1f\n";
double doubleArg = 7;
ffi_arg res = 0;
arg_types[0] = &ffi_type_pointer;
arg_types[1] = &ffi_type_double;
arg_types[2] = NULL;
/* This printf call is variadic */
CHECK(ffi_prep_cif_var(&cif, FFI_DEFAULT_ABI, 1, 2, &ffi_type_sint,
arg_types) == FFI_OK);
args[0] = &format;
args[1] = &doubleArg;
args[2] = NULL;
ffi_call(&cif, FFI_FN(printf), &res, args);
// { dg-output "7.0" }
printf("res: %d\n", (int) res);
// { dg-output "\nres: 4" }
/* The call to cls_double_va_fn is static, so have to use a normal prep_cif */
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &ffi_type_sint, arg_types) == FFI_OK);
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_double_va_fn, NULL, code) == FFI_OK);
res = ((int(*)(char*, double))(code))(format, doubleArg);
// { dg-output "\n7.0" }
printf("res: %d\n", (int) res);
// { dg-output "\nres: 4" }
exit(0);
}
@@ -1,65 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Test long doubles passed in variable argument lists.
Limitations: none.
PR: none.
Originator: Blake Chaffin 6/6/2007 */
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
/* { dg-output "" { xfail avr32*-*-* x86_64-*-mingw* } } */
/* { dg-output "" { xfail mips-sgi-irix6* } } PR libffi/46660 */
/* { dg-skip-if "" arm*-*-* { "-mfloat-abi=hard" } { "" } } */
#include "ffitest.h"
static void
cls_longdouble_va_fn(ffi_cif* cif __UNUSED__, void* resp,
void** args, void* userdata __UNUSED__)
{
char* format = *(char**)args[0];
long double ldValue = *(long double*)args[1];
*(ffi_arg*)resp = printf(format, ldValue);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args[3];
ffi_type* arg_types[3];
char* format = "%.1Lf\n";
long double ldArg = 7;
ffi_arg res = 0;
arg_types[0] = &ffi_type_pointer;
arg_types[1] = &ffi_type_longdouble;
arg_types[2] = NULL;
/* This printf call is variadic */
CHECK(ffi_prep_cif_var(&cif, FFI_DEFAULT_ABI, 1, 2, &ffi_type_sint,
arg_types) == FFI_OK);
args[0] = &format;
args[1] = &ldArg;
args[2] = NULL;
ffi_call(&cif, FFI_FN(printf), &res, args);
// { dg-output "7.0" }
printf("res: %d\n", (int) res);
// { dg-output "\nres: 4" }
/* The call to cls_longdouble_va_fn is static, so have to use a normal prep_cif */
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &ffi_type_sint,
arg_types) == FFI_OK);
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_longdouble_va_fn, NULL, code) == FFI_OK);
res = ((int(*)(char*, long double))(code))(format, ldArg);
// { dg-output "\n7.0" }
printf("res: %d\n", (int) res);
// { dg-output "\nres: 4" }
exit(0);
}
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
-80
Ver Arquivo
@@ -1,80 +0,0 @@
## Process this file with automake to produce Makefile.in.
AUTOMAKE_OPTIONS = foreign dejagnu
# Setup the testing framework, if you have one
EXPECT = `if [ -f $(top_builddir)/../expect/expect ] ; then \
echo $(top_builddir)/../expect/expect ; \
else echo expect ; fi`
RUNTEST = `if [ -f $(top_srcdir)/../dejagnu/runtest ] ; then \
echo $(top_srcdir)/../dejagnu/runtest ; \
else echo runtest; fi`
AM_RUNTESTFLAGS =
CLEANFILES = *.exe core* *.log *.sum
EXTRA_DIST = libffi.special/special.exp \
libffi.special/unwindtest_ffi_call.cc libffi.special/unwindtest.cc \
libffi.special/ffitestcxx.h config/default.exp lib/target-libpath.exp \
lib/libffi.exp lib/wrapper.exp libffi.call/float.c \
libffi.call/cls_multi_schar.c libffi.call/float3.c \
libffi.call/cls_3_1byte.c libffi.call/stret_large2.c \
libffi.call/cls_5_1_byte.c libffi.call/stret_medium.c \
libffi.call/promotion.c libffi.call/cls_dbls_struct.c \
libffi.call/nested_struct.c libffi.call/closure_fn1.c \
libffi.call/cls_4_1byte.c libffi.call/cls_float.c \
libffi.call/cls_2byte.c libffi.call/closure_fn4.c \
libffi.call/return_fl2.c libffi.call/nested_struct7.c \
libffi.call/cls_uint.c libffi.call/cls_align_sint64.c \
libffi.call/float1.c libffi.call/cls_19byte.c \
libffi.call/nested_struct1.c libffi.call/cls_4byte.c \
libffi.call/return_fl1.c libffi.call/cls_align_pointer.c \
libffi.call/nested_struct4.c libffi.call/nested_struct3.c \
libffi.call/struct7.c libffi.call/nested_struct9.c \
libffi.call/cls_sshort.c libffi.call/cls_ulonglong.c \
libffi.call/cls_pointer_stack.c libffi.call/cls_multi_uchar.c \
libffi.call/testclosure.c libffi.call/cls_3byte1.c \
libffi.call/struct6.c libffi.call/return_uc.c libffi.call/return_ll1.c \
libffi.call/cls_ushort.c libffi.call/stret_medium2.c \
libffi.call/cls_multi_ushortchar.c libffi.call/return_dbl2.c \
libffi.call/closure_loc_fn0.c libffi.call/return_sc.c \
libffi.call/nested_struct8.c libffi.call/cls_7_1_byte.c \
libffi.call/return_ll.c libffi.call/cls_pointer.c \
libffi.call/err_bad_abi.c libffi.call/return_dbl1.c \
libffi.call/call.exp libffi.call/ffitest.h libffi.call/strlen.c \
libffi.call/return_sl.c libffi.call/cls_1_1byte.c \
libffi.call/struct1.c libffi.call/cls_64byte.c libffi.call/return_ul.c \
libffi.call/cls_double.c libffi.call/many_win32.c \
libffi.call/cls_16byte.c libffi.call/cls_align_double.c \
libffi.call/cls_align_uint16.c libffi.call/cls_9byte1.c \
libffi.call/cls_multi_sshortchar.c libffi.call/cls_multi_ushort.c \
libffi.call/closure_stdcall.c libffi.call/return_fl.c \
libffi.call/strlen_win32.c libffi.call/return_ldl.c \
libffi.call/cls_align_float.c libffi.call/struct3.c \
libffi.call/cls_uchar.c libffi.call/cls_sint.c libffi.call/float2.c \
libffi.call/cls_align_longdouble_split.c \
libffi.call/cls_longdouble_va.c libffi.call/cls_multi_sshort.c \
libffi.call/stret_large.c libffi.call/cls_align_sint16.c \
libffi.call/nested_struct6.c libffi.call/cls_5byte.c \
libffi.call/return_dbl.c libffi.call/cls_20byte.c \
libffi.call/cls_8byte.c libffi.call/pyobjc-tc.c \
libffi.call/cls_24byte.c libffi.call/cls_align_longdouble_split2.c \
libffi.call/cls_6_1_byte.c libffi.call/cls_schar.c \
libffi.call/cls_18byte.c libffi.call/closure_fn3.c \
libffi.call/err_bad_typedef.c libffi.call/closure_fn2.c \
libffi.call/struct2.c libffi.call/cls_3byte2.c \
libffi.call/cls_align_longdouble.c libffi.call/cls_20byte1.c \
libffi.call/return_fl3.c libffi.call/cls_align_uint32.c \
libffi.call/problem1.c libffi.call/float4.c \
libffi.call/cls_align_uint64.c libffi.call/struct9.c \
libffi.call/closure_fn5.c libffi.call/cls_align_sint32.c \
libffi.call/closure_fn0.c libffi.call/closure_fn6.c \
libffi.call/struct4.c libffi.call/nested_struct2.c \
libffi.call/cls_6byte.c libffi.call/cls_7byte.c libffi.call/many.c \
libffi.call/struct8.c libffi.call/negint.c libffi.call/struct5.c \
libffi.call/cls_12byte.c libffi.call/cls_double_va.c \
libffi.call/cls_longdouble.c libffi.call/cls_9byte2.c \
libffi.call/nested_struct10.c libffi.call/nested_struct5.c \
libffi.call/huge_struct.c
-500
Ver Arquivo
@@ -1,500 +0,0 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = testsuite
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/asmcfi.m4 \
$(top_srcdir)/m4/ax_cc_maxopt.m4 \
$(top_srcdir)/m4/ax_cflags_warn_all.m4 \
$(top_srcdir)/m4/ax_compiler_vendor.m4 \
$(top_srcdir)/m4/ax_configure_args.m4 \
$(top_srcdir)/m4/ax_enable_builddir.m4 \
$(top_srcdir)/m4/ax_gcc_archflag.m4 \
$(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/fficonfig.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
DEJATOOL = $(PACKAGE)
RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AM_LTLDFLAGS = @AM_LTLDFLAGS@
AM_RUNTESTFLAGS =
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCAS = @CCAS@
CCASDEPMODE = @CCASDEPMODE@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FFI_EXEC_TRAMPOLINE_TABLE = @FFI_EXEC_TRAMPOLINE_TABLE@
FGREP = @FGREP@
GREP = @GREP@
HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PRTDIAG = @PRTDIAG@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
TARGET = @TARGET@
TARGETDIR = @TARGETDIR@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
ax_enable_builddir_sed = @ax_enable_builddir_sed@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sys_symbol_underscore = @sys_symbol_underscore@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
toolexecdir = @toolexecdir@
toolexeclibdir = @toolexeclibdir@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign dejagnu
# Setup the testing framework, if you have one
EXPECT = `if [ -f $(top_builddir)/../expect/expect ] ; then \
echo $(top_builddir)/../expect/expect ; \
else echo expect ; fi`
RUNTEST = `if [ -f $(top_srcdir)/../dejagnu/runtest ] ; then \
echo $(top_srcdir)/../dejagnu/runtest ; \
else echo runtest; fi`
CLEANFILES = *.exe core* *.log *.sum
EXTRA_DIST = libffi.special/special.exp \
libffi.special/unwindtest_ffi_call.cc libffi.special/unwindtest.cc \
libffi.special/ffitestcxx.h config/default.exp lib/target-libpath.exp \
lib/libffi.exp lib/wrapper.exp libffi.call/float.c \
libffi.call/cls_multi_schar.c libffi.call/float3.c \
libffi.call/cls_3_1byte.c libffi.call/stret_large2.c \
libffi.call/cls_5_1_byte.c libffi.call/stret_medium.c \
libffi.call/promotion.c libffi.call/cls_dbls_struct.c \
libffi.call/nested_struct.c libffi.call/closure_fn1.c \
libffi.call/cls_4_1byte.c libffi.call/cls_float.c \
libffi.call/cls_2byte.c libffi.call/closure_fn4.c \
libffi.call/return_fl2.c libffi.call/nested_struct7.c \
libffi.call/cls_uint.c libffi.call/cls_align_sint64.c \
libffi.call/float1.c libffi.call/cls_19byte.c \
libffi.call/nested_struct1.c libffi.call/cls_4byte.c \
libffi.call/return_fl1.c libffi.call/cls_align_pointer.c \
libffi.call/nested_struct4.c libffi.call/nested_struct3.c \
libffi.call/struct7.c libffi.call/nested_struct9.c \
libffi.call/cls_sshort.c libffi.call/cls_ulonglong.c \
libffi.call/cls_pointer_stack.c libffi.call/cls_multi_uchar.c \
libffi.call/testclosure.c libffi.call/cls_3byte1.c \
libffi.call/struct6.c libffi.call/return_uc.c libffi.call/return_ll1.c \
libffi.call/cls_ushort.c libffi.call/stret_medium2.c \
libffi.call/cls_multi_ushortchar.c libffi.call/return_dbl2.c \
libffi.call/closure_loc_fn0.c libffi.call/return_sc.c \
libffi.call/nested_struct8.c libffi.call/cls_7_1_byte.c \
libffi.call/return_ll.c libffi.call/cls_pointer.c \
libffi.call/err_bad_abi.c libffi.call/return_dbl1.c \
libffi.call/call.exp libffi.call/ffitest.h libffi.call/strlen.c \
libffi.call/return_sl.c libffi.call/cls_1_1byte.c \
libffi.call/struct1.c libffi.call/cls_64byte.c libffi.call/return_ul.c \
libffi.call/cls_double.c libffi.call/many_win32.c \
libffi.call/cls_16byte.c libffi.call/cls_align_double.c \
libffi.call/cls_align_uint16.c libffi.call/cls_9byte1.c \
libffi.call/cls_multi_sshortchar.c libffi.call/cls_multi_ushort.c \
libffi.call/closure_stdcall.c libffi.call/return_fl.c \
libffi.call/strlen_win32.c libffi.call/return_ldl.c \
libffi.call/cls_align_float.c libffi.call/struct3.c \
libffi.call/cls_uchar.c libffi.call/cls_sint.c libffi.call/float2.c \
libffi.call/cls_align_longdouble_split.c \
libffi.call/cls_longdouble_va.c libffi.call/cls_multi_sshort.c \
libffi.call/stret_large.c libffi.call/cls_align_sint16.c \
libffi.call/nested_struct6.c libffi.call/cls_5byte.c \
libffi.call/return_dbl.c libffi.call/cls_20byte.c \
libffi.call/cls_8byte.c libffi.call/pyobjc-tc.c \
libffi.call/cls_24byte.c libffi.call/cls_align_longdouble_split2.c \
libffi.call/cls_6_1_byte.c libffi.call/cls_schar.c \
libffi.call/cls_18byte.c libffi.call/closure_fn3.c \
libffi.call/err_bad_typedef.c libffi.call/closure_fn2.c \
libffi.call/struct2.c libffi.call/cls_3byte2.c \
libffi.call/cls_align_longdouble.c libffi.call/cls_20byte1.c \
libffi.call/return_fl3.c libffi.call/cls_align_uint32.c \
libffi.call/problem1.c libffi.call/float4.c \
libffi.call/cls_align_uint64.c libffi.call/struct9.c \
libffi.call/closure_fn5.c libffi.call/cls_align_sint32.c \
libffi.call/closure_fn0.c libffi.call/closure_fn6.c \
libffi.call/struct4.c libffi.call/nested_struct2.c \
libffi.call/cls_6byte.c libffi.call/cls_7byte.c libffi.call/many.c \
libffi.call/struct8.c libffi.call/negint.c libffi.call/struct5.c \
libffi.call/cls_12byte.c libffi.call/cls_double_va.c \
libffi.call/cls_longdouble.c libffi.call/cls_9byte2.c \
libffi.call/nested_struct10.c libffi.call/nested_struct5.c \
libffi.call/huge_struct.c
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign testsuite/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign testsuite/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
check-DEJAGNU: site.exp
srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \
EXPECT=$(EXPECT); export EXPECT; \
runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
then :; else exit_status=1; fi; \
done; \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi; \
exit $$exit_status
site.exp: Makefile
@echo 'Making a new site.exp file...'
@echo '## these variables are automatically generated by make ##' >site.tmp
@echo '# Do not edit here. If you wish to override these values' >>site.tmp
@echo '# edit the last section' >>site.tmp
@echo 'set srcdir $(srcdir)' >>site.tmp
@echo "set objdir `pwd`" >>site.tmp
@echo 'set build_alias "$(build_alias)"' >>site.tmp
@echo 'set build_triplet $(build_triplet)' >>site.tmp
@echo 'set host_alias "$(host_alias)"' >>site.tmp
@echo 'set host_triplet $(host_triplet)' >>site.tmp
@echo 'set target_alias "$(target_alias)"' >>site.tmp
@echo 'set target_triplet $(target_triplet)' >>site.tmp
@echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
@test ! -f site.exp || \
sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
@-rm -f site.bak
@test ! -f site.exp || mv site.exp site.bak
@mv site.tmp site.exp
distclean-DEJAGNU:
-rm -f site.exp site.bak
-l='$(DEJATOOL)'; for tool in $$l; do \
rm -f $$tool.sum $$tool.log; \
done
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-DEJAGNU distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: check-am install-am install-strip
.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \
clean-libtool distclean distclean-DEJAGNU distclean-generic \
distclean-libtool distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
-637
Ver Arquivo
@@ -1,637 +0,0 @@
/* -----------------------------------------------------------------------
ffi64.c - Copyright (c) 20011 Anthony Green
Copyright (c) 2008, 2010 Red Hat, Inc.
Copyright (c) 2002, 2007 Bo Thorsen <bo@suse.de>
x86-64 Foreign Function Interface
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
``Software''), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */
#include <ffi.h>
#include <ffi_common.h>
#include <stdlib.h>
#include <stdarg.h>
#ifdef __x86_64__
#define MAX_GPR_REGS 6
#define MAX_SSE_REGS 8
struct register_args
{
/* Registers for argument passing. */
UINT64 gpr[MAX_GPR_REGS];
__int128_t sse[MAX_SSE_REGS];
};
extern void ffi_call_unix64 (void *args, unsigned long bytes, unsigned flags,
void *raddr, void (*fnaddr)(void), unsigned ssecount);
/* All reference to register classes here is identical to the code in
gcc/config/i386/i386.c. Do *not* change one without the other. */
/* Register class used for passing given 64bit part of the argument.
These represent classes as documented by the PS ABI, with the
exception of SSESF, SSEDF classes, that are basically SSE class,
just gcc will use SF or DFmode move instead of DImode to avoid
reformatting penalties.
Similary we play games with INTEGERSI_CLASS to use cheaper SImode moves
whenever possible (upper half does contain padding). */
enum x86_64_reg_class
{
X86_64_NO_CLASS,
X86_64_INTEGER_CLASS,
X86_64_INTEGERSI_CLASS,
X86_64_SSE_CLASS,
X86_64_SSESF_CLASS,
X86_64_SSEDF_CLASS,
X86_64_SSEUP_CLASS,
X86_64_X87_CLASS,
X86_64_X87UP_CLASS,
X86_64_COMPLEX_X87_CLASS,
X86_64_MEMORY_CLASS
};
#define MAX_CLASSES 4
#define SSE_CLASS_P(X) ((X) >= X86_64_SSE_CLASS && X <= X86_64_SSEUP_CLASS)
/* x86-64 register passing implementation. See x86-64 ABI for details. Goal
of this code is to classify each 8bytes of incoming argument by the register
class and assign registers accordingly. */
/* Return the union class of CLASS1 and CLASS2.
See the x86-64 PS ABI for details. */
static enum x86_64_reg_class
merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2)
{
/* Rule #1: If both classes are equal, this is the resulting class. */
if (class1 == class2)
return class1;
/* Rule #2: If one of the classes is NO_CLASS, the resulting class is
the other class. */
if (class1 == X86_64_NO_CLASS)
return class2;
if (class2 == X86_64_NO_CLASS)
return class1;
/* Rule #3: If one of the classes is MEMORY, the result is MEMORY. */
if (class1 == X86_64_MEMORY_CLASS || class2 == X86_64_MEMORY_CLASS)
return X86_64_MEMORY_CLASS;
/* Rule #4: If one of the classes is INTEGER, the result is INTEGER. */
if ((class1 == X86_64_INTEGERSI_CLASS && class2 == X86_64_SSESF_CLASS)
|| (class2 == X86_64_INTEGERSI_CLASS && class1 == X86_64_SSESF_CLASS))
return X86_64_INTEGERSI_CLASS;
if (class1 == X86_64_INTEGER_CLASS || class1 == X86_64_INTEGERSI_CLASS
|| class2 == X86_64_INTEGER_CLASS || class2 == X86_64_INTEGERSI_CLASS)
return X86_64_INTEGER_CLASS;
/* Rule #5: If one of the classes is X87, X87UP, or COMPLEX_X87 class,
MEMORY is used. */
if (class1 == X86_64_X87_CLASS
|| class1 == X86_64_X87UP_CLASS
|| class1 == X86_64_COMPLEX_X87_CLASS
|| class2 == X86_64_X87_CLASS
|| class2 == X86_64_X87UP_CLASS
|| class2 == X86_64_COMPLEX_X87_CLASS)
return X86_64_MEMORY_CLASS;
/* Rule #6: Otherwise class SSE is used. */
return X86_64_SSE_CLASS;
}
/* Classify the argument of type TYPE and mode MODE.
CLASSES will be filled by the register class used to pass each word
of the operand. The number of words is returned. In case the parameter
should be passed in memory, 0 is returned. As a special case for zero
sized containers, classes[0] will be NO_CLASS and 1 is returned.
See the x86-64 PS ABI for details.
*/
static int
classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
size_t byte_offset)
{
switch (type->type)
{
case FFI_TYPE_UINT8:
case FFI_TYPE_SINT8:
case FFI_TYPE_UINT16:
case FFI_TYPE_SINT16:
case FFI_TYPE_UINT32:
case FFI_TYPE_SINT32:
case FFI_TYPE_UINT64:
case FFI_TYPE_SINT64:
case FFI_TYPE_POINTER:
{
int size = byte_offset + type->size;
if (size <= 4)
{
classes[0] = X86_64_INTEGERSI_CLASS;
return 1;
}
else if (size <= 8)
{
classes[0] = X86_64_INTEGER_CLASS;
return 1;
}
else if (size <= 12)
{
classes[0] = X86_64_INTEGER_CLASS;
classes[1] = X86_64_INTEGERSI_CLASS;
return 2;
}
else if (size <= 16)
{
classes[0] = classes[1] = X86_64_INTEGERSI_CLASS;
return 2;
}
else
FFI_ASSERT (0);
}
case FFI_TYPE_FLOAT:
if (!(byte_offset % 8))
classes[0] = X86_64_SSESF_CLASS;
else
classes[0] = X86_64_SSE_CLASS;
return 1;
case FFI_TYPE_DOUBLE:
classes[0] = X86_64_SSEDF_CLASS;
return 1;
case FFI_TYPE_LONGDOUBLE:
classes[0] = X86_64_X87_CLASS;
classes[1] = X86_64_X87UP_CLASS;
return 2;
case FFI_TYPE_STRUCT:
{
const int UNITS_PER_WORD = 8;
int words = (type->size + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
ffi_type **ptr;
int i;
enum x86_64_reg_class subclasses[MAX_CLASSES];
/* If the struct is larger than 32 bytes, pass it on the stack. */
if (type->size > 32)
return 0;
for (i = 0; i < words; i++)
classes[i] = X86_64_NO_CLASS;
/* Zero sized arrays or structures are NO_CLASS. We return 0 to
signalize memory class, so handle it as special case. */
if (!words)
{
classes[0] = X86_64_NO_CLASS;
return 1;
}
/* Merge the fields of structure. */
for (ptr = type->elements; *ptr != NULL; ptr++)
{
int num;
byte_offset = ALIGN (byte_offset, (*ptr)->alignment);
num = classify_argument (*ptr, subclasses, byte_offset % 8);
if (num == 0)
return 0;
for (i = 0; i < num; i++)
{
int pos = byte_offset / 8;
classes[i + pos] =
merge_classes (subclasses[i], classes[i + pos]);
}
byte_offset += (*ptr)->size;
}
if (words > 2)
{
/* When size > 16 bytes, if the first one isn't
X86_64_SSE_CLASS or any other ones aren't
X86_64_SSEUP_CLASS, everything should be passed in
memory. */
if (classes[0] != X86_64_SSE_CLASS)
return 0;
for (i = 1; i < words; i++)
if (classes[i] != X86_64_SSEUP_CLASS)
return 0;
}
/* Final merger cleanup. */
for (i = 0; i < words; i++)
{
/* If one class is MEMORY, everything should be passed in
memory. */
if (classes[i] == X86_64_MEMORY_CLASS)
return 0;
/* The X86_64_SSEUP_CLASS should be always preceded by
X86_64_SSE_CLASS or X86_64_SSEUP_CLASS. */
if (classes[i] == X86_64_SSEUP_CLASS
&& classes[i - 1] != X86_64_SSE_CLASS
&& classes[i - 1] != X86_64_SSEUP_CLASS)
{
/* The first one should never be X86_64_SSEUP_CLASS. */
FFI_ASSERT (i != 0);
classes[i] = X86_64_SSE_CLASS;
}
/* If X86_64_X87UP_CLASS isn't preceded by X86_64_X87_CLASS,
everything should be passed in memory. */
if (classes[i] == X86_64_X87UP_CLASS
&& (classes[i - 1] != X86_64_X87_CLASS))
{
/* The first one should never be X86_64_X87UP_CLASS. */
FFI_ASSERT (i != 0);
return 0;
}
}
return words;
}
default:
FFI_ASSERT(0);
}
return 0; /* Never reached. */
}
/* Examine the argument and return set number of register required in each
class. Return zero iff parameter should be passed in memory, otherwise
the number of registers. */
static int
examine_argument (ffi_type *type, enum x86_64_reg_class classes[MAX_CLASSES],
_Bool in_return, int *pngpr, int *pnsse)
{
int i, n, ngpr, nsse;
n = classify_argument (type, classes, 0);
if (n == 0)
return 0;
ngpr = nsse = 0;
for (i = 0; i < n; ++i)
switch (classes[i])
{
case X86_64_INTEGER_CLASS:
case X86_64_INTEGERSI_CLASS:
ngpr++;
break;
case X86_64_SSE_CLASS:
case X86_64_SSESF_CLASS:
case X86_64_SSEDF_CLASS:
nsse++;
break;
case X86_64_NO_CLASS:
case X86_64_SSEUP_CLASS:
break;
case X86_64_X87_CLASS:
case X86_64_X87UP_CLASS:
case X86_64_COMPLEX_X87_CLASS:
return in_return != 0;
default:
abort ();
}
*pngpr = ngpr;
*pnsse = nsse;
return n;
}
/* Perform machine dependent cif processing. */
ffi_status
ffi_prep_cif_machdep (ffi_cif *cif)
{
int gprcount, ssecount, i, avn, n, ngpr, nsse, flags;
enum x86_64_reg_class classes[MAX_CLASSES];
size_t bytes;
gprcount = ssecount = 0;
flags = cif->rtype->type;
if (flags != FFI_TYPE_VOID)
{
n = examine_argument (cif->rtype, classes, 1, &ngpr, &nsse);
if (n == 0)
{
/* The return value is passed in memory. A pointer to that
memory is the first argument. Allocate a register for it. */
gprcount++;
/* We don't have to do anything in asm for the return. */
flags = FFI_TYPE_VOID;
}
else if (flags == FFI_TYPE_STRUCT)
{
/* Mark which registers the result appears in. */
_Bool sse0 = SSE_CLASS_P (classes[0]);
_Bool sse1 = n == 2 && SSE_CLASS_P (classes[1]);
if (sse0 && !sse1)
flags |= 1 << 8;
else if (!sse0 && sse1)
flags |= 1 << 9;
else if (sse0 && sse1)
flags |= 1 << 10;
/* Mark the true size of the structure. */
flags |= cif->rtype->size << 12;
}
}
/* Go over all arguments and determine the way they should be passed.
If it's in a register and there is space for it, let that be so. If
not, add it's size to the stack byte count. */
for (bytes = 0, i = 0, avn = cif->nargs; i < avn; i++)
{
if (examine_argument (cif->arg_types[i], classes, 0, &ngpr, &nsse) == 0
|| gprcount + ngpr > MAX_GPR_REGS
|| ssecount + nsse > MAX_SSE_REGS)
{
long align = cif->arg_types[i]->alignment;
if (align < 8)
align = 8;
bytes = ALIGN (bytes, align);
bytes += cif->arg_types[i]->size;
}
else
{
gprcount += ngpr;
ssecount += nsse;
}
}
if (ssecount)
flags |= 1 << 11;
cif->flags = flags;
cif->bytes = ALIGN (bytes, 8);
return FFI_OK;
}
void
ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
{
enum x86_64_reg_class classes[MAX_CLASSES];
char *stack, *argp;
ffi_type **arg_types;
int gprcount, ssecount, ngpr, nsse, i, avn;
_Bool ret_in_memory;
struct register_args *reg_args;
/* Can't call 32-bit mode from 64-bit mode. */
FFI_ASSERT (cif->abi == FFI_UNIX64);
/* If the return value is a struct and we don't have a return value
address then we need to make one. Note the setting of flags to
VOID above in ffi_prep_cif_machdep. */
ret_in_memory = (cif->rtype->type == FFI_TYPE_STRUCT
&& (cif->flags & 0xff) == FFI_TYPE_VOID);
if (rvalue == NULL && ret_in_memory)
rvalue = alloca (cif->rtype->size);
/* Allocate the space for the arguments, plus 4 words of temp space. */
stack = alloca (sizeof (struct register_args) + cif->bytes + 4*8);
reg_args = (struct register_args *) stack;
argp = stack + sizeof (struct register_args);
gprcount = ssecount = 0;
/* If the return value is passed in memory, add the pointer as the
first integer argument. */
if (ret_in_memory)
reg_args->gpr[gprcount++] = (unsigned long) rvalue;
avn = cif->nargs;
arg_types = cif->arg_types;
for (i = 0; i < avn; ++i)
{
size_t size = arg_types[i]->size;
int n;
n = examine_argument (arg_types[i], classes, 0, &ngpr, &nsse);
if (n == 0
|| gprcount + ngpr > MAX_GPR_REGS
|| ssecount + nsse > MAX_SSE_REGS)
{
long align = arg_types[i]->alignment;
/* Stack arguments are *always* at least 8 byte aligned. */
if (align < 8)
align = 8;
/* Pass this argument in memory. */
argp = (void *) ALIGN (argp, align);
memcpy (argp, avalue[i], size);
argp += size;
}
else
{
/* The argument is passed entirely in registers. */
char *a = (char *) avalue[i];
int j;
for (j = 0; j < n; j++, a += 8, size -= 8)
{
switch (classes[j])
{
case X86_64_INTEGER_CLASS:
case X86_64_INTEGERSI_CLASS:
reg_args->gpr[gprcount] = 0;
memcpy (&reg_args->gpr[gprcount], a, size < 8 ? size : 8);
gprcount++;
break;
case X86_64_SSE_CLASS:
case X86_64_SSEDF_CLASS:
reg_args->sse[ssecount++] = *(UINT64 *) a;
break;
case X86_64_SSESF_CLASS:
reg_args->sse[ssecount++] = *(UINT32 *) a;
break;
default:
abort();
}
}
}
}
ffi_call_unix64 (stack, cif->bytes + sizeof (struct register_args),
cif->flags, rvalue, fn, ssecount);
}
extern void ffi_closure_unix64(void);
ffi_status
ffi_prep_closure_loc (ffi_closure* closure,
ffi_cif* cif,
void (*fun)(ffi_cif*, void*, void**, void*),
void *user_data,
void *codeloc)
{
volatile unsigned short *tramp;
/* Sanity check on the cif ABI. */
{
int abi = cif->abi;
if (UNLIKELY (! (abi > FFI_FIRST_ABI && abi < FFI_LAST_ABI)))
return FFI_BAD_ABI;
}
tramp = (volatile unsigned short *) &closure->tramp[0];
tramp[0] = 0xbb49; /* mov <code>, %r11 */
*((unsigned long long * volatile) &tramp[1])
= (unsigned long) ffi_closure_unix64;
tramp[5] = 0xba49; /* mov <data>, %r10 */
*((unsigned long long * volatile) &tramp[6])
= (unsigned long) codeloc;
/* Set the carry bit iff the function uses any sse registers.
This is clc or stc, together with the first byte of the jmp. */
tramp[10] = cif->flags & (1 << 11) ? 0x49f9 : 0x49f8;
tramp[11] = 0xe3ff; /* jmp *%r11 */
closure->cif = cif;
closure->fun = fun;
closure->user_data = user_data;
return FFI_OK;
}
int
ffi_closure_unix64_inner(ffi_closure *closure, void *rvalue,
struct register_args *reg_args, char *argp)
{
ffi_cif *cif;
void **avalue;
ffi_type **arg_types;
long i, avn;
int gprcount, ssecount, ngpr, nsse;
int ret;
cif = closure->cif;
avalue = alloca(cif->nargs * sizeof(void *));
gprcount = ssecount = 0;
ret = cif->rtype->type;
if (ret != FFI_TYPE_VOID)
{
enum x86_64_reg_class classes[MAX_CLASSES];
int n = examine_argument (cif->rtype, classes, 1, &ngpr, &nsse);
if (n == 0)
{
/* The return value goes in memory. Arrange for the closure
return value to go directly back to the original caller. */
rvalue = (void *) (unsigned long) reg_args->gpr[gprcount++];
/* We don't have to do anything in asm for the return. */
ret = FFI_TYPE_VOID;
}
else if (ret == FFI_TYPE_STRUCT && n == 2)
{
/* Mark which register the second word of the structure goes in. */
_Bool sse0 = SSE_CLASS_P (classes[0]);
_Bool sse1 = SSE_CLASS_P (classes[1]);
if (!sse0 && sse1)
ret |= 1 << 8;
else if (sse0 && !sse1)
ret |= 1 << 9;
}
}
avn = cif->nargs;
arg_types = cif->arg_types;
for (i = 0; i < avn; ++i)
{
enum x86_64_reg_class classes[MAX_CLASSES];
int n;
n = examine_argument (arg_types[i], classes, 0, &ngpr, &nsse);
if (n == 0
|| gprcount + ngpr > MAX_GPR_REGS
|| ssecount + nsse > MAX_SSE_REGS)
{
long align = arg_types[i]->alignment;
/* Stack arguments are *always* at least 8 byte aligned. */
if (align < 8)
align = 8;
/* Pass this argument in memory. */
argp = (void *) ALIGN (argp, align);
avalue[i] = argp;
argp += arg_types[i]->size;
}
/* If the argument is in a single register, or two consecutive
integer registers, then we can use that address directly. */
else if (n == 1
|| (n == 2 && !(SSE_CLASS_P (classes[0])
|| SSE_CLASS_P (classes[1]))))
{
/* The argument is in a single register. */
if (SSE_CLASS_P (classes[0]))
{
avalue[i] = &reg_args->sse[ssecount];
ssecount += n;
}
else
{
avalue[i] = &reg_args->gpr[gprcount];
gprcount += n;
}
}
/* Otherwise, allocate space to make them consecutive. */
else
{
char *a = alloca (16);
int j;
avalue[i] = a;
for (j = 0; j < n; j++, a += 8)
{
if (SSE_CLASS_P (classes[j]))
memcpy (a, &reg_args->sse[ssecount++], 8);
else
memcpy (a, &reg_args->gpr[gprcount++], 8);
}
}
}
/* Invoke the closure. */
closure->fun (cif, rvalue, avalue, closure->user_data);
/* Tell assembly how to perform return type promotions. */
return ret;
}
#endif /* __x86_64__ */
Ver Arquivo
-4833
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
-353
Ver Arquivo
@@ -1,353 +0,0 @@
Status
======
libffi-3.0.11 was released on *****************. Check the libffi web
page for updates: <URL:http://sourceware.org/libffi/>.
What is libffi?
===============
Compilers for high level languages generate code that follow certain
conventions. These conventions are necessary, in part, for separate
compilation to work. One such convention is the "calling
convention". The "calling convention" is essentially a set of
assumptions made by the compiler about where function arguments will
be found on entry to a function. A "calling convention" also specifies
where the return value for a function is found.
Some programs may not know at the time of compilation what arguments
are to be passed to a function. For instance, an interpreter may be
told at run-time about the number and types of arguments used to call
a given function. Libffi can be used in such programs to provide a
bridge from the interpreter program to compiled code.
The libffi library provides a portable, high level programming
interface to various calling conventions. This allows a programmer to
call any function specified by a call interface description at run
time.
FFI stands for Foreign Function Interface. A foreign function
interface is the popular name for the interface that allows code
written in one language to call code written in another language. The
libffi library really only provides the lowest, machine dependent
layer of a fully featured foreign function interface. A layer must
exist above libffi that handles type conversions for values passed
between the two languages.
Supported Platforms
===================
Libffi has been ported to many different platforms.
For specific configuration details and testing status, please
refer to the wiki page here:
http://www.moxielogic.org/wiki/index.php?title=Libffi_3.0.11
At the time of release, the following basic configurations have been
tested:
|--------------+------------------|
| Architecture | Operating System |
|--------------+------------------|
| Alpha | Linux |
| Alpha | Tru64 |
| ARM | Linux |
| ARM | iOS |
| AVR32 | Linux |
| HPPA | HPUX |
| IA-64 | Linux |
| M68K | RTEMS |
| MIPS | IRIX |
| MIPS | Linux |
| MIPS | RTEMS |
| MIPS64 | Linux |
| PowerPC | AMIGA |
| PowerPC | Linux |
| PowerPC | Mac OSX |
| PowerPC | FreeBSD |
| PowerPC64 | Linux |
| S390 | Linux |
| S390X | Linux |
| SPARC | Linux |
| SPARC | Solaris |
| SPARC64 | Linux |
| SPARC64 | FreeBSD |
| X86 | FreeBSD |
| X86 | Interix |
| X86 | kFreeBSD |
| X86 | Linux |
| X86 | Linux/x32 |
| X86 | Mac OSX |
| X86 | OpenBSD |
| X86 | OS/2 |
| X86 | Solaris |
| X86 | Windows/Cygwin |
| X86 | Windows/MingW |
| X86-64 | FreeBSD |
| X86-64 | Linux |
| X86-64 | OpenBSD |
| X86-64 | Windows/MingW |
|--------------+------------------|
Please send additional platform test results to
libffi-discuss@sourceware.org and feel free to update the wiki page
above.
Installing libffi
=================
First you must configure the distribution for your particular
system. Go to the directory you wish to build libffi in and run the
"configure" program found in the root directory of the libffi source
distribution.
You may want to tell configure where to install the libffi library and
header files. To do that, use the --prefix configure switch. Libffi
will install under /usr/local by default.
If you want to enable extra run-time debugging checks use the the
--enable-debug configure switch. This is useful when your program dies
mysteriously while using libffi.
Another useful configure switch is --enable-purify-safety. Using this
will add some extra code which will suppress certain warnings when you
are using Purify with libffi. Only use this switch when using
Purify, as it will slow down the library.
It's also possible to build libffi on Windows platforms with
Microsoft's Visual C++ compiler. In this case, use the msvcc.sh
wrapper script during configuration like so:
path/to/configure CC=path/to/msvcc.sh LD=link CPP=\"cl -nologo -EP\"
For 64-bit Windows builds, use CC="path/to/msvcc.sh -m64".
You may also need to specify --build appropriately. When building with MSVC
under a MingW environment, you may need to remove the line in configure
that sets 'fix_srcfile_path' to a 'cygpath' command. ('cygpath' is not
present in MingW, and is not required when using MingW-style paths.)
For iOS builds, refer to the build-ios.sh script for guidance.
Configure has many other options. Use "configure --help" to see them all.
Once configure has finished, type "make". Note that you must be using
GNU make. You can ftp GNU make from prep.ai.mit.edu:/pub/gnu.
To ensure that libffi is working as advertised, type "make check".
This will require that you have DejaGNU installed.
To install the library and header files, type "make install".
History
=======
See the ChangeLog files for details.
3.0.11 MMM-DD-YY
Add support for variadic functions (ffi_prep_cif_var).
Add Linux/x32 support.
Add thiscall, fastcall and MSVC cdecl support on Windows.
Add Amiga and newer MacOS support.
Fix Octeon and MC68881 support.
Fix code pessimizations.
Lots of build fixes.
3.0.10 Aug-23-11
Add support for Apple's iOS.
Add support for ARM VFP ABI.
Add RTEMS support for MIPS and M68K.
Fix instruction cache clearing problems on
ARM and SPARC.
Fix the N64 build on mips-sgi-irix6.5.
Enable builds with Microsoft's compiler.
Enable x86 builds with Oracle's Solaris compiler.
Fix support for calling code compiled with Oracle's Sparc
Solaris compiler.
Testsuite fixes for Tru64 Unix.
Additional platform support.
3.0.9 Dec-31-09
Add AVR32 and win64 ports. Add ARM softfp support.
Many fixes for AIX, Solaris, HP-UX, *BSD.
Several PowerPC and x86-64 bug fixes.
Build DLL for windows.
3.0.8 Dec-19-08
Add *BSD, BeOS, and PA-Linux support.
3.0.7 Nov-11-08
Fix for ppc FreeBSD.
(thanks to Andreas Tobler)
3.0.6 Jul-17-08
Fix for closures on sh.
Mark the sh/sh64 stack as non-executable.
(both thanks to Kaz Kojima)
3.0.5 Apr-3-08
Fix libffi.pc file.
Fix #define ARM for IcedTea users.
Fix x86 closure bug.
3.0.4 Feb-24-08
Fix x86 OpenBSD configury.
3.0.3 Feb-22-08
Enable x86 OpenBSD thanks to Thomas Heller, and
x86-64 FreeBSD thanks to Björn König and Andreas Tobler.
Clean up test instruction in README.
3.0.2 Feb-21-08
Improved x86 FreeBSD support.
Thanks to Björn König.
3.0.1 Feb-15-08
Fix instruction cache flushing bug on MIPS.
Thanks to David Daney.
3.0.0 Feb-15-08
Many changes, mostly thanks to the GCC project.
Cygnus Solutions is now Red Hat.
[10 years go by...]
1.20 Oct-5-98
Raffaele Sena produces ARM port.
1.19 Oct-5-98
Fixed x86 long double and long long return support.
m68k bug fixes from Andreas Schwab.
Patch for DU assembler compatibility for the Alpha from Richard
Henderson.
1.18 Apr-17-98
Bug fixes and MIPS configuration changes.
1.17 Feb-24-98
Bug fixes and m68k port from Andreas Schwab. PowerPC port from
Geoffrey Keating. Various bug x86, Sparc and MIPS bug fixes.
1.16 Feb-11-98
Richard Henderson produces Alpha port.
1.15 Dec-4-97
Fixed an n32 ABI bug. New libtool, auto* support.
1.14 May-13-97
libtool is now used to generate shared and static libraries.
Fixed a minor portability problem reported by Russ McManus
<mcmanr@eq.gs.com>.
1.13 Dec-2-96
Added --enable-purify-safety to keep Purify from complaining
about certain low level code.
Sparc fix for calling functions with < 6 args.
Linux x86 a.out fix.
1.12 Nov-22-96
Added missing ffi_type_void, needed for supporting void return
types. Fixed test case for non MIPS machines. Cygnus Support
is now Cygnus Solutions.
1.11 Oct-30-96
Added notes about GNU make.
1.10 Oct-29-96
Added configuration fix for non GNU compilers.
1.09 Oct-29-96
Added --enable-debug configure switch. Clean-ups based on LCLint
feedback. ffi_mips.h is always installed. Many configuration
fixes. Fixed ffitest.c for sparc builds.
1.08 Oct-15-96
Fixed n32 problem. Many clean-ups.
1.07 Oct-14-96
Gordon Irlam rewrites v8.S again. Bug fixes.
1.06 Oct-14-96
Gordon Irlam improved the sparc port.
1.05 Oct-14-96
Interface changes based on feedback.
1.04 Oct-11-96
Sparc port complete (modulo struct passing bug).
1.03 Oct-10-96
Passing struct args, and returning struct values works for
all architectures/calling conventions. Expanded tests.
1.02 Oct-9-96
Added SGI n32 support. Fixed bugs in both o32 and Linux support.
Added "make test".
1.01 Oct-8-96
Fixed float passing bug in mips version. Restructured some
of the code. Builds cleanly with SGI tools.
1.00 Oct-7-96
First release. No public announcement.
Authors & Credits
=================
libffi was originally written by Anthony Green <green@redhat.com>.
The developers of the GNU Compiler Collection project have made
innumerable valuable contributions. See the ChangeLog file for
details.
Some of the ideas behind libffi were inspired by Gianni Mariani's free
gencall library for Silicon Graphics machines.
The closure mechanism was designed and implemented by Kresten Krab
Thorup.
Major processor architecture ports were contributed by the following
developers:
alpha Richard Henderson
arm Raffaele Sena
cris Simon Posnjak, Hans-Peter Nilsson
frv Anthony Green
ia64 Hans Boehm
m32r Kazuhiro Inaoka
m68k Andreas Schwab
mips Anthony Green, Casey Marshall
mips64 David Daney
pa Randolph Chung, Dave Anglin, Andreas Tobler
powerpc Geoffrey Keating, Andreas Tobler,
David Edelsohn, John Hornkvist
powerpc64 Jakub Jelinek
s390 Gerhard Tonn, Ulrich Weigand
sh Kaz Kojima
sh64 Kaz Kojima
sparc Anthony Green, Gordon Irlam
x86 Anthony Green, Jon Beniston
x86-64 Bo Thorsen
Jesper Skov and Andrew Haley both did more than their fair share of
stepping through the code and tracking down bugs.
Thanks also to Tom Tromey for bug fixes, documentation and
configuration help.
Thanks to Jim Blandy, who provided some useful feedback on the libffi
interface.
Andreas Tobler has done a tremendous amount of work on the testsuite.
Alex Oliva solved the executable page problem for SElinux.
The list above is almost certainly incomplete and inaccurate. I'm
happy to make corrections or additions upon request.
If you have a problem, or have found a bug, please send a note to the
author at green@moxielogic.com, or the project mailing list at
libffi-discuss@sourceware.org.
-289
Ver Arquivo
@@ -1,289 +0,0 @@
/* -----------------------------------------------------------------------
ffi.c
m68k Foreign Function Interface
----------------------------------------------------------------------- */
#include <ffi.h>
#include <ffi_common.h>
#include <stdlib.h>
#include <unistd.h>
#ifdef __rtems__
void rtems_cache_flush_multiple_data_lines( const void *, size_t );
#else
#include <sys/syscall.h>
#include <asm/cachectl.h>
#endif
void ffi_call_SYSV (extended_cif *,
unsigned, unsigned,
void *, void (*fn) ());
void *ffi_prep_args (void *stack, extended_cif *ecif);
void ffi_closure_SYSV (ffi_closure *);
void ffi_closure_struct_SYSV (ffi_closure *);
unsigned int ffi_closure_SYSV_inner (ffi_closure *closure,
void *resp, void *args);
/* ffi_prep_args is called by the assembly routine once stack space has
been allocated for the function's arguments. */
void *
ffi_prep_args (void *stack, extended_cif *ecif)
{
unsigned int i;
void **p_argv;
char *argp;
ffi_type **p_arg;
void *struct_value_ptr;
argp = stack;
if (ecif->cif->rtype->type == FFI_TYPE_STRUCT
&& !ecif->cif->flags)
struct_value_ptr = ecif->rvalue;
else
struct_value_ptr = NULL;
p_argv = ecif->avalue;
for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
i != 0;
i--, p_arg++)
{
size_t z;
z = (*p_arg)->size;
if (z < sizeof (int))
{
switch ((*p_arg)->type)
{
case FFI_TYPE_SINT8:
*(signed int *) argp = (signed int) *(SINT8 *) *p_argv;
break;
case FFI_TYPE_UINT8:
*(unsigned int *) argp = (unsigned int) *(UINT8 *) *p_argv;
break;
case FFI_TYPE_SINT16:
*(signed int *) argp = (signed int) *(SINT16 *) *p_argv;
break;
case FFI_TYPE_UINT16:
*(unsigned int *) argp = (unsigned int) *(UINT16 *) *p_argv;
break;
case FFI_TYPE_STRUCT:
memcpy (argp + sizeof (int) - z, *p_argv, z);
break;
default:
FFI_ASSERT (0);
}
z = sizeof (int);
}
else
{
memcpy (argp, *p_argv, z);
/* Align if necessary. */
if ((sizeof(int) - 1) & z)
z = ALIGN(z, sizeof(int));
}
p_argv++;
argp += z;
}
return struct_value_ptr;
}
#define CIF_FLAGS_INT 1
#define CIF_FLAGS_DINT 2
#define CIF_FLAGS_FLOAT 4
#define CIF_FLAGS_DOUBLE 8
#define CIF_FLAGS_LDOUBLE 16
#define CIF_FLAGS_POINTER 32
#define CIF_FLAGS_STRUCT1 64
#define CIF_FLAGS_STRUCT2 128
/* Perform machine dependent cif processing */
ffi_status
ffi_prep_cif_machdep (ffi_cif *cif)
{
/* Set the return type flag */
switch (cif->rtype->type)
{
case FFI_TYPE_VOID:
cif->flags = 0;
break;
case FFI_TYPE_STRUCT:
switch (cif->rtype->size)
{
case 1:
cif->flags = CIF_FLAGS_STRUCT1;
break;
case 2:
cif->flags = CIF_FLAGS_STRUCT2;
break;
case 4:
cif->flags = CIF_FLAGS_INT;
break;
case 8:
cif->flags = CIF_FLAGS_DINT;
break;
default:
cif->flags = 0;
break;
}
break;
case FFI_TYPE_FLOAT:
cif->flags = CIF_FLAGS_FLOAT;
break;
case FFI_TYPE_DOUBLE:
cif->flags = CIF_FLAGS_DOUBLE;
break;
#if (FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE)
case FFI_TYPE_LONGDOUBLE:
cif->flags = CIF_FLAGS_LDOUBLE;
break;
#endif
case FFI_TYPE_POINTER:
cif->flags = CIF_FLAGS_POINTER;
break;
case FFI_TYPE_SINT64:
case FFI_TYPE_UINT64:
cif->flags = CIF_FLAGS_DINT;
break;
default:
cif->flags = CIF_FLAGS_INT;
break;
}
return FFI_OK;
}
void
ffi_call (ffi_cif *cif, void (*fn) (), void *rvalue, void **avalue)
{
extended_cif ecif;
ecif.cif = cif;
ecif.avalue = avalue;
/* If the return value is a struct and we don't have a return value
address then we need to make one. */
if (rvalue == NULL
&& cif->rtype->type == FFI_TYPE_STRUCT
&& cif->rtype->size > 8)
ecif.rvalue = alloca (cif->rtype->size);
else
ecif.rvalue = rvalue;
switch (cif->abi)
{
case FFI_SYSV:
ffi_call_SYSV (&ecif, cif->bytes, cif->flags,
ecif.rvalue, fn);
break;
default:
FFI_ASSERT (0);
break;
}
}
static void
ffi_prep_incoming_args_SYSV (char *stack, void **avalue, ffi_cif *cif)
{
unsigned int i;
void **p_argv;
char *argp;
ffi_type **p_arg;
argp = stack;
p_argv = avalue;
for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++)
{
size_t z;
z = (*p_arg)->size;
if (z <= 4)
{
*p_argv = (void *) (argp + 4 - z);
z = 4;
}
else
{
*p_argv = (void *) argp;
/* Align if necessary */
if ((sizeof(int) - 1) & z)
z = ALIGN(z, sizeof(int));
}
p_argv++;
argp += z;
}
}
unsigned int
ffi_closure_SYSV_inner (ffi_closure *closure, void *resp, void *args)
{
ffi_cif *cif;
void **arg_area;
cif = closure->cif;
arg_area = (void**) alloca (cif->nargs * sizeof (void *));
ffi_prep_incoming_args_SYSV(args, arg_area, cif);
(closure->fun) (cif, resp, arg_area, closure->user_data);
return cif->flags;
}
ffi_status
ffi_prep_closure_loc (ffi_closure* closure,
ffi_cif* cif,
void (*fun)(ffi_cif*,void*,void**,void*),
void *user_data,
void *codeloc)
{
if (cif->abi != FFI_SYSV)
return FFI_BAD_ABI;
*(unsigned short *)closure->tramp = 0x207c;
*(void **)(closure->tramp + 2) = codeloc;
*(unsigned short *)(closure->tramp + 6) = 0x4ef9;
if (cif->rtype->type == FFI_TYPE_STRUCT
&& !cif->flags)
*(void **)(closure->tramp + 8) = ffi_closure_struct_SYSV;
else
*(void **)(closure->tramp + 8) = ffi_closure_SYSV;
#ifdef __rtems__
rtems_cache_flush_multiple_data_lines( codeloc, FFI_TRAMPOLINE_SIZE );
#else
syscall(SYS_cacheflush, codeloc, FLUSH_SCOPE_LINE,
FLUSH_CACHE_BOTH, FFI_TRAMPOLINE_SIZE);
#endif
closure->cif = cif;
closure->user_data = user_data;
closure->fun = fun;
return FFI_OK;
}
-270
Ver Arquivo
@@ -1,270 +0,0 @@
/* -----------------------------------------------------------------------
sysv.S - Copyright (c) 1998, 2012 Andreas Schwab
Copyright (c) 2008 Red Hat, Inc.
m68k Foreign Function Interface
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
``Software''), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */
#define LIBFFI_ASM
#include <fficonfig.h>
#include <ffi.h>
#ifdef HAVE_AS_CFI_PSEUDO_OP
#define CFI_STARTPROC() .cfi_startproc
#define CFI_OFFSET(reg,off) .cfi_offset reg,off
#define CFI_DEF_CFA(reg,off) .cfi_def_cfa reg,off
#define CFI_ENDPROC() .cfi_endproc
#else
#define CFI_STARTPROC()
#define CFI_OFFSET(reg,off)
#define CFI_DEF_CFA(reg,off)
#define CFI_ENDPROC()
#endif
.text
.globl ffi_call_SYSV
.type ffi_call_SYSV,@function
.align 4
ffi_call_SYSV:
CFI_STARTPROC()
link %fp,#0
CFI_OFFSET(14,-8)
CFI_DEF_CFA(14,8)
move.l %d2,-(%sp)
CFI_OFFSET(2,-12)
| Make room for all of the new args.
sub.l 12(%fp),%sp
| Call ffi_prep_args
move.l 8(%fp),-(%sp)
pea 4(%sp)
#if !defined __PIC__
jsr ffi_prep_args
#else
bsr.l ffi_prep_args@PLTPC
#endif
addq.l #8,%sp
| Pass pointer to struct value, if any
move.l %a0,%a1
| Call the function
move.l 24(%fp),%a0
jsr (%a0)
| Remove the space we pushed for the args
add.l 12(%fp),%sp
| Load the pointer to storage for the return value
move.l 20(%fp),%a1
| Load the return type code
move.l 16(%fp),%d2
| If the return value pointer is NULL, assume no return value.
| NOTE: On the mc68000, tst on an address register is not supported.
#if !defined(__mc68020__) && !defined(__mc68030__) && !defined(__mc68040__) && !defined(__mc68060__) && !defined(__mcoldfire__)
cmp.w #0, %a1
#else
tst.l %a1
#endif
jbeq noretval
btst #0,%d2
jbeq retlongint
move.l %d0,(%a1)
jbra epilogue
retlongint:
btst #1,%d2
jbeq retfloat
move.l %d0,(%a1)
move.l %d1,4(%a1)
jbra epilogue
retfloat:
btst #2,%d2
jbeq retdouble
#if defined(__MC68881__) || defined(__HAVE_68881__)
fmove.s %fp0,(%a1)
#else
move.l %d0,(%a1)
#endif
jbra epilogue
retdouble:
btst #3,%d2
jbeq retlongdouble
#if defined(__MC68881__) || defined(__HAVE_68881__)
fmove.d %fp0,(%a1)
#else
move.l %d0,(%a1)+
move.l %d1,(%a1)
#endif
jbra epilogue
retlongdouble:
btst #4,%d2
jbeq retpointer
#if defined(__MC68881__) || defined(__HAVE_68881__)
fmove.x %fp0,(%a1)
#else
move.l %d0,(%a1)+
move.l %d1,(%a1)+
move.l %d2,(%a1)
#endif
jbra epilogue
retpointer:
btst #5,%d2
jbeq retstruct1
move.l %a0,(%a1)
jbra epilogue
retstruct1:
btst #6,%d2
jbeq retstruct2
move.b %d0,(%a1)
jbra epilogue
retstruct2:
btst #7,%d2
jbeq noretval
move.w %d0,(%a1)
noretval:
epilogue:
move.l (%sp)+,%d2
unlk %fp
rts
CFI_ENDPROC()
.size ffi_call_SYSV,.-ffi_call_SYSV
.globl ffi_closure_SYSV
.type ffi_closure_SYSV, @function
.align 4
ffi_closure_SYSV:
CFI_STARTPROC()
link %fp,#-12
CFI_OFFSET(14,-8)
CFI_DEF_CFA(14,8)
move.l %sp,-12(%fp)
pea 8(%fp)
pea -12(%fp)
move.l %a0,-(%sp)
#if !defined __PIC__
jsr ffi_closure_SYSV_inner
#else
bsr.l ffi_closure_SYSV_inner@PLTPC
#endif
lsr.l #1,%d0
jne 1f
jcc .Lcls_epilogue
move.l -12(%fp),%d0
.Lcls_epilogue:
unlk %fp
rts
1:
lea -12(%fp),%a0
lsr.l #2,%d0
jne 1f
jcs .Lcls_ret_float
move.l (%a0)+,%d0
move.l (%a0),%d1
jra .Lcls_epilogue
.Lcls_ret_float:
#if defined(__MC68881__) || defined(__HAVE_68881__)
fmove.s (%a0),%fp0
#else
move.l (%a0),%d0
#endif
jra .Lcls_epilogue
1:
lsr.l #2,%d0
jne 1f
jcs .Lcls_ret_ldouble
#if defined(__MC68881__) || defined(__HAVE_68881__)
fmove.d (%a0),%fp0
#else
move.l (%a0)+,%d0
move.l (%a0),%d1
#endif
jra .Lcls_epilogue
.Lcls_ret_ldouble:
#if defined(__MC68881__) || defined(__HAVE_68881__)
fmove.x (%a0),%fp0
#else
move.l (%a0)+,%d0
move.l (%a0)+,%d1
move.l (%a0),%d2
#endif
jra .Lcls_epilogue
1:
lsr.l #2,%d0
jne .Lcls_ret_struct2
jcs .Lcls_ret_struct1
move.l (%a0),%a0
move.l %a0,%d0
jra .Lcls_epilogue
.Lcls_ret_struct1:
move.b (%a0),%d0
jra .Lcls_epilogue
.Lcls_ret_struct2:
move.w (%a0),%d0
jra .Lcls_epilogue
CFI_ENDPROC()
.size ffi_closure_SYSV,.-ffi_closure_SYSV
.globl ffi_closure_struct_SYSV
.type ffi_closure_struct_SYSV, @function
.align 4
ffi_closure_struct_SYSV:
CFI_STARTPROC()
link %fp,#0
CFI_OFFSET(14,-8)
CFI_DEF_CFA(14,8)
move.l %sp,-12(%fp)
pea 8(%fp)
move.l %a1,-(%sp)
move.l %a0,-(%sp)
#if !defined __PIC__
jsr ffi_closure_SYSV_inner
#else
bsr.l ffi_closure_SYSV_inner@PLTPC
#endif
unlk %fp
rts
CFI_ENDPROC()
.size ffi_closure_struct_SYSV,.-ffi_closure_struct_SYSV
#if defined __ELF__ && defined __linux__
.section .note.GNU-stack,"",@progbits
#endif
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
-443
Ver Arquivo
@@ -1,443 +0,0 @@
/* -----------------------------------------------------------------*-C-*-
libffi @VERSION@ - Copyright (c) 2011 Anthony Green
- Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the ``Software''), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */
/* -------------------------------------------------------------------
The basic API is described in the README file.
The raw API is designed to bypass some of the argument packing
and unpacking on architectures for which it can be avoided.
The closure API allows interpreted functions to be packaged up
inside a C function pointer, so that they can be called as C functions,
with no understanding on the client side that they are interpreted.
It can also be used in other cases in which it is necessary to package
up a user specified parameter and a function pointer as a single
function pointer.
The closure API must be implemented in order to get its functionality,
e.g. for use by gij. Routines are provided to emulate the raw API
if the underlying platform doesn't allow faster implementation.
More details on the raw and cloure API can be found in:
http://gcc.gnu.org/ml/java/1999-q3/msg00138.html
and
http://gcc.gnu.org/ml/java/1999-q3/msg00174.html
-------------------------------------------------------------------- */
#ifndef LIBFFI_H
#define LIBFFI_H
#ifdef __cplusplus
extern "C" {
#endif
/* Specify which architecture libffi is configured for. */
#ifndef @TARGET@
#define @TARGET@
#endif
/* ---- System configuration information --------------------------------- */
#include <ffitarget.h>
#ifndef LIBFFI_ASM
#ifdef _MSC_VER
#define __attribute__(X)
#endif
#include <stddef.h>
#include <limits.h>
/* LONG_LONG_MAX is not always defined (not if STRICT_ANSI, for example).
But we can find it either under the correct ANSI name, or under GNU
C's internal name. */
#define FFI_64_BIT_MAX 9223372036854775807
#ifdef LONG_LONG_MAX
# define FFI_LONG_LONG_MAX LONG_LONG_MAX
#else
# ifdef LLONG_MAX
# define FFI_LONG_LONG_MAX LLONG_MAX
# ifdef _AIX52 /* or newer has C99 LLONG_MAX */
# undef FFI_64_BIT_MAX
# define FFI_64_BIT_MAX 9223372036854775807LL
# endif /* _AIX52 or newer */
# else
# ifdef __GNUC__
# define FFI_LONG_LONG_MAX __LONG_LONG_MAX__
# endif
# ifdef _AIX /* AIX 5.1 and earlier have LONGLONG_MAX */
# ifndef __PPC64__
# if defined (__IBMC__) || defined (__IBMCPP__)
# define FFI_LONG_LONG_MAX LONGLONG_MAX
# endif
# endif /* __PPC64__ */
# undef FFI_64_BIT_MAX
# define FFI_64_BIT_MAX 9223372036854775807LL
# endif
# endif
#endif
/* The closure code assumes that this works on pointers, i.e. a size_t */
/* can hold a pointer. */
typedef struct _ffi_type
{
size_t size;
unsigned short alignment;
unsigned short type;
struct _ffi_type **elements;
} ffi_type;
#ifndef LIBFFI_HIDE_BASIC_TYPES
#if SCHAR_MAX == 127
# define ffi_type_uchar ffi_type_uint8
# define ffi_type_schar ffi_type_sint8
#else
#error "char size not supported"
#endif
#if SHRT_MAX == 32767
# define ffi_type_ushort ffi_type_uint16
# define ffi_type_sshort ffi_type_sint16
#elif SHRT_MAX == 2147483647
# define ffi_type_ushort ffi_type_uint32
# define ffi_type_sshort ffi_type_sint32
#else
#error "short size not supported"
#endif
#if INT_MAX == 32767
# define ffi_type_uint ffi_type_uint16
# define ffi_type_sint ffi_type_sint16
#elif INT_MAX == 2147483647
# define ffi_type_uint ffi_type_uint32
# define ffi_type_sint ffi_type_sint32
#elif INT_MAX == 9223372036854775807
# define ffi_type_uint ffi_type_uint64
# define ffi_type_sint ffi_type_sint64
#else
#error "int size not supported"
#endif
#if LONG_MAX == 2147483647
# if FFI_LONG_LONG_MAX != FFI_64_BIT_MAX
#error "no 64-bit data type supported"
# endif
#elif LONG_MAX != FFI_64_BIT_MAX
#error "long size not supported"
#endif
#if LONG_MAX == 2147483647
# define ffi_type_ulong ffi_type_uint32
# define ffi_type_slong ffi_type_sint32
#elif LONG_MAX == FFI_64_BIT_MAX
# define ffi_type_ulong ffi_type_uint64
# define ffi_type_slong ffi_type_sint64
#else
#error "long size not supported"
#endif
/* These are defined in types.c */
extern ffi_type ffi_type_void;
extern ffi_type ffi_type_uint8;
extern ffi_type ffi_type_sint8;
extern ffi_type ffi_type_uint16;
extern ffi_type ffi_type_sint16;
extern ffi_type ffi_type_uint32;
extern ffi_type ffi_type_sint32;
extern ffi_type ffi_type_uint64;
extern ffi_type ffi_type_sint64;
extern ffi_type ffi_type_float;
extern ffi_type ffi_type_double;
extern ffi_type ffi_type_pointer;
#if @HAVE_LONG_DOUBLE@
extern ffi_type ffi_type_longdouble;
#else
#define ffi_type_longdouble ffi_type_double
#endif
#endif /* LIBFFI_HIDE_BASIC_TYPES */
typedef enum {
FFI_OK = 0,
FFI_BAD_TYPEDEF,
FFI_BAD_ABI
} ffi_status;
typedef unsigned FFI_TYPE;
typedef struct {
ffi_abi abi;
unsigned nargs;
ffi_type **arg_types;
ffi_type *rtype;
unsigned bytes;
unsigned flags;
#ifdef FFI_EXTRA_CIF_FIELDS
FFI_EXTRA_CIF_FIELDS;
#endif
} ffi_cif;
/* Used internally, but overridden by some architectures */
ffi_status ffi_prep_cif_core(ffi_cif *cif,
ffi_abi abi,
unsigned int isvariadic,
unsigned int nfixedargs,
unsigned int ntotalargs,
ffi_type *rtype,
ffi_type **atypes);
/* ---- Definitions for the raw API -------------------------------------- */
#ifndef FFI_SIZEOF_ARG
# if LONG_MAX == 2147483647
# define FFI_SIZEOF_ARG 4
# elif LONG_MAX == FFI_64_BIT_MAX
# define FFI_SIZEOF_ARG 8
# endif
#endif
#ifndef FFI_SIZEOF_JAVA_RAW
# define FFI_SIZEOF_JAVA_RAW FFI_SIZEOF_ARG
#endif
typedef union {
ffi_sarg sint;
ffi_arg uint;
float flt;
char data[FFI_SIZEOF_ARG];
void* ptr;
} ffi_raw;
#if FFI_SIZEOF_JAVA_RAW == 4 && FFI_SIZEOF_ARG == 8
/* This is a special case for mips64/n32 ABI (and perhaps others) where
sizeof(void *) is 4 and FFI_SIZEOF_ARG is 8. */
typedef union {
signed int sint;
unsigned int uint;
float flt;
char data[FFI_SIZEOF_JAVA_RAW];
void* ptr;
} ffi_java_raw;
#else
typedef ffi_raw ffi_java_raw;
#endif
void ffi_raw_call (ffi_cif *cif,
void (*fn)(void),
void *rvalue,
ffi_raw *avalue);
void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
size_t ffi_raw_size (ffi_cif *cif);
/* This is analogous to the raw API, except it uses Java parameter */
/* packing, even on 64-bit machines. I.e. on 64-bit machines */
/* longs and doubles are followed by an empty 64-bit word. */
void ffi_java_raw_call (ffi_cif *cif,
void (*fn)(void),
void *rvalue,
ffi_java_raw *avalue);
void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_java_raw *raw);
void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_java_raw *raw, void **args);
size_t ffi_java_raw_size (ffi_cif *cif);
/* ---- Definitions for closures ----------------------------------------- */
#if FFI_CLOSURES
#ifdef _MSC_VER
__declspec(align(8))
#endif
typedef struct {
char tramp[FFI_TRAMPOLINE_SIZE];
ffi_cif *cif;
void (*fun)(ffi_cif*,void*,void**,void*);
void *user_data;
#ifdef __GNUC__
} ffi_closure __attribute__((aligned (8)));
#else
} ffi_closure;
# ifdef __sgi
# pragma pack 0
# endif
#endif
void *ffi_closure_alloc (size_t size, void **code);
void ffi_closure_free (void *);
ffi_status
ffi_prep_closure (ffi_closure*,
ffi_cif *,
void (*fun)(ffi_cif*,void*,void**,void*),
void *user_data);
ffi_status
ffi_prep_closure_loc (ffi_closure*,
ffi_cif *,
void (*fun)(ffi_cif*,void*,void**,void*),
void *user_data,
void*codeloc);
#ifdef __sgi
# pragma pack 8
#endif
typedef struct {
char tramp[FFI_TRAMPOLINE_SIZE];
ffi_cif *cif;
#if !FFI_NATIVE_RAW_API
/* if this is enabled, then a raw closure has the same layout
as a regular closure. We use this to install an intermediate
handler to do the transaltion, void** -> ffi_raw*. */
void (*translate_args)(ffi_cif*,void*,void**,void*);
void *this_closure;
#endif
void (*fun)(ffi_cif*,void*,ffi_raw*,void*);
void *user_data;
} ffi_raw_closure;
typedef struct {
char tramp[FFI_TRAMPOLINE_SIZE];
ffi_cif *cif;
#if !FFI_NATIVE_RAW_API
/* if this is enabled, then a raw closure has the same layout
as a regular closure. We use this to install an intermediate
handler to do the transaltion, void** -> ffi_raw*. */
void (*translate_args)(ffi_cif*,void*,void**,void*);
void *this_closure;
#endif
void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*);
void *user_data;
} ffi_java_raw_closure;
ffi_status
ffi_prep_raw_closure (ffi_raw_closure*,
ffi_cif *cif,
void (*fun)(ffi_cif*,void*,ffi_raw*,void*),
void *user_data);
ffi_status
ffi_prep_raw_closure_loc (ffi_raw_closure*,
ffi_cif *cif,
void (*fun)(ffi_cif*,void*,ffi_raw*,void*),
void *user_data,
void *codeloc);
ffi_status
ffi_prep_java_raw_closure (ffi_java_raw_closure*,
ffi_cif *cif,
void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
void *user_data);
ffi_status
ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*,
ffi_cif *cif,
void (*fun)(ffi_cif*,void*,ffi_java_raw*,void*),
void *user_data,
void *codeloc);
#endif /* FFI_CLOSURES */
/* ---- Public interface definition -------------------------------------- */
ffi_status ffi_prep_cif(ffi_cif *cif,
ffi_abi abi,
unsigned int nargs,
ffi_type *rtype,
ffi_type **atypes);
ffi_status ffi_prep_cif_var(ffi_cif *cif,
ffi_abi abi,
unsigned int nfixedargs,
unsigned int ntotalargs,
ffi_type *rtype,
ffi_type **atypes);
void ffi_call(ffi_cif *cif,
void (*fn)(void),
void *rvalue,
void **avalue);
/* Useful for eliminating compiler warnings */
#define FFI_FN(f) ((void (*)(void))f)
/* ---- Definitions shared with assembly code ---------------------------- */
#endif
/* If these change, update src/mips/ffitarget.h. */
#define FFI_TYPE_VOID 0
#define FFI_TYPE_INT 1
#define FFI_TYPE_FLOAT 2
#define FFI_TYPE_DOUBLE 3
#if @HAVE_LONG_DOUBLE@
#define FFI_TYPE_LONGDOUBLE 4
#else
#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE
#endif
#define FFI_TYPE_UINT8 5
#define FFI_TYPE_SINT8 6
#define FFI_TYPE_UINT16 7
#define FFI_TYPE_SINT16 8
#define FFI_TYPE_UINT32 9
#define FFI_TYPE_SINT32 10
#define FFI_TYPE_UINT64 11
#define FFI_TYPE_SINT64 12
#define FFI_TYPE_STRUCT 13
#define FFI_TYPE_POINTER 14
/* This should always refer to the last type code (for sanity checks) */
#define FFI_TYPE_LAST FFI_TYPE_POINTER
#ifdef __cplusplus
}
#endif
#endif
-826
Ver Arquivo
@@ -1,826 +0,0 @@
/* -----------------------------------------------------------------------
ffi.c - Copyright (c) 1996, 1998, 1999, 2001, 2007, 2008 Red Hat, Inc.
Copyright (c) 2002 Ranjit Mathew
Copyright (c) 2002 Bo Thorsen
Copyright (c) 2002 Roger Sayle
Copyright (C) 2008, 2010 Free Software Foundation, Inc.
x86 Foreign Function Interface
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
``Software''), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */
#if !defined(__x86_64__) || defined(_WIN64)
#ifdef _WIN64
#include <windows.h>
#endif
#include <ffi.h>
#include <ffi_common.h>
#include <stdlib.h>
/* ffi_prep_args is called by the assembly routine once stack space
has been allocated for the function's arguments */
void ffi_prep_args(char *stack, extended_cif *ecif)
{
register unsigned int i;
register void **p_argv;
register char *argp;
register ffi_type **p_arg;
#ifdef X86_WIN32
size_t p_stack_args[2];
void *p_stack_data[2];
char *argp2 = stack;
int stack_args_count = 0;
int cabi = ecif->cif->abi;
#endif
argp = stack;
if (ecif->cif->flags == FFI_TYPE_STRUCT
#ifdef X86_WIN64
&& (ecif->cif->rtype->size != 1 && ecif->cif->rtype->size != 2
&& ecif->cif->rtype->size != 4 && ecif->cif->rtype->size != 8)
#endif
)
{
*(void **) argp = ecif->rvalue;
#ifdef X86_WIN32
/* For fastcall/thiscall this is first register-passed
argument. */
if (cabi == FFI_THISCALL || cabi == FFI_FASTCALL)
{
p_stack_args[stack_args_count] = sizeof (void*);
p_stack_data[stack_args_count] = argp;
++stack_args_count;
}
#endif
argp += sizeof(void*);
}
p_argv = ecif->avalue;
for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
i != 0;
i--, p_arg++)
{
size_t z;
/* Align if necessary */
if ((sizeof(void*) - 1) & (size_t) argp)
argp = (char *) ALIGN(argp, sizeof(void*));
z = (*p_arg)->size;
#ifdef X86_WIN64
if (z > sizeof(ffi_arg)
|| ((*p_arg)->type == FFI_TYPE_STRUCT
&& (z != 1 && z != 2 && z != 4 && z != 8))
#if FFI_TYPE_DOUBLE != FFI_TYPE_LONGDOUBLE
|| ((*p_arg)->type == FFI_TYPE_LONGDOUBLE)
#endif
)
{
z = sizeof(ffi_arg);
*(void **)argp = *p_argv;
}
else if ((*p_arg)->type == FFI_TYPE_FLOAT)
{
memcpy(argp, *p_argv, z);
}
else
#endif
if (z < sizeof(ffi_arg))
{
z = sizeof(ffi_arg);
switch ((*p_arg)->type)
{
case FFI_TYPE_SINT8:
*(ffi_sarg *) argp = (ffi_sarg)*(SINT8 *)(* p_argv);
break;
case FFI_TYPE_UINT8:
*(ffi_arg *) argp = (ffi_arg)*(UINT8 *)(* p_argv);
break;
case FFI_TYPE_SINT16:
*(ffi_sarg *) argp = (ffi_sarg)*(SINT16 *)(* p_argv);
break;
case FFI_TYPE_UINT16:
*(ffi_arg *) argp = (ffi_arg)*(UINT16 *)(* p_argv);
break;
case FFI_TYPE_SINT32:
*(ffi_sarg *) argp = (ffi_sarg)*(SINT32 *)(* p_argv);
break;
case FFI_TYPE_UINT32:
*(ffi_arg *) argp = (ffi_arg)*(UINT32 *)(* p_argv);
break;
case FFI_TYPE_STRUCT:
*(ffi_arg *) argp = *(ffi_arg *)(* p_argv);
break;
default:
FFI_ASSERT(0);
}
}
else
{
memcpy(argp, *p_argv, z);
}
#ifdef X86_WIN32
/* For thiscall/fastcall convention register-passed arguments
are the first two none-floating-point arguments with a size
smaller or equal to sizeof (void*). */
if ((cabi == FFI_THISCALL && stack_args_count < 1)
|| (cabi == FFI_FASTCALL && stack_args_count < 2))
{
if (z <= 4
&& ((*p_arg)->type != FFI_TYPE_FLOAT
&& (*p_arg)->type != FFI_TYPE_STRUCT))
{
p_stack_args[stack_args_count] = z;
p_stack_data[stack_args_count] = argp;
++stack_args_count;
}
}
#endif
p_argv++;
#ifdef X86_WIN64
argp += (z + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
#else
argp += z;
#endif
}
#ifdef X86_WIN32
/* We need to move the register-passed arguments for thiscall/fastcall
on top of stack, so that those can be moved to registers ecx/edx by
call-handler. */
if (stack_args_count > 0)
{
size_t zz = (p_stack_args[0] + 3) & ~3;
char *h;
/* Move first argument to top-stack position. */
if (p_stack_data[0] != argp2)
{
h = alloca (zz + 1);
memcpy (h, p_stack_data[0], zz);
memmove (argp2 + zz, argp2,
(size_t) ((char *) p_stack_data[0] - (char*)argp2));
memcpy (argp2, h, zz);
}
argp2 += zz;
--stack_args_count;
if (zz > 4)
stack_args_count = 0;
/* If we have a second argument, then move it on top
after the first one. */
if (stack_args_count > 0 && p_stack_data[1] != argp2)
{
zz = p_stack_args[1];
zz = (zz + 3) & ~3;
h = alloca (zz + 1);
h = alloca (zz + 1);
memcpy (h, p_stack_data[1], zz);
memmove (argp2 + zz, argp2, (size_t) ((char*) p_stack_data[1] - (char*)argp2));
memcpy (argp2, h, zz);
}
}
#endif
return;
}
/* Perform machine dependent cif processing */
ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
{
unsigned int i;
ffi_type **ptr;
/* Set the return type flag */
switch (cif->rtype->type)
{
case FFI_TYPE_VOID:
case FFI_TYPE_UINT8:
case FFI_TYPE_UINT16:
case FFI_TYPE_SINT8:
case FFI_TYPE_SINT16:
#ifdef X86_WIN64
case FFI_TYPE_UINT32:
case FFI_TYPE_SINT32:
#endif
case FFI_TYPE_SINT64:
case FFI_TYPE_FLOAT:
case FFI_TYPE_DOUBLE:
#ifndef X86_WIN64
#if FFI_TYPE_DOUBLE != FFI_TYPE_LONGDOUBLE
case FFI_TYPE_LONGDOUBLE:
#endif
#endif
cif->flags = (unsigned) cif->rtype->type;
break;
case FFI_TYPE_UINT64:
#ifdef X86_WIN64
case FFI_TYPE_POINTER:
#endif
cif->flags = FFI_TYPE_SINT64;
break;
case FFI_TYPE_STRUCT:
#ifndef X86
if (cif->rtype->size == 1)
{
cif->flags = FFI_TYPE_SMALL_STRUCT_1B; /* same as char size */
}
else if (cif->rtype->size == 2)
{
cif->flags = FFI_TYPE_SMALL_STRUCT_2B; /* same as short size */
}
else if (cif->rtype->size == 4)
{
#ifdef X86_WIN64
cif->flags = FFI_TYPE_SMALL_STRUCT_4B;
#else
cif->flags = FFI_TYPE_INT; /* same as int type */
#endif
}
else if (cif->rtype->size == 8)
{
cif->flags = FFI_TYPE_SINT64; /* same as int64 type */
}
else
#endif
{
cif->flags = FFI_TYPE_STRUCT;
/* allocate space for return value pointer */
cif->bytes += ALIGN(sizeof(void*), FFI_SIZEOF_ARG);
}
break;
default:
#ifdef X86_WIN64
cif->flags = FFI_TYPE_SINT64;
break;
case FFI_TYPE_INT:
cif->flags = FFI_TYPE_SINT32;
#else
cif->flags = FFI_TYPE_INT;
#endif
break;
}
for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++)
{
if (((*ptr)->alignment - 1) & cif->bytes)
cif->bytes = ALIGN(cif->bytes, (*ptr)->alignment);
cif->bytes += ALIGN((*ptr)->size, FFI_SIZEOF_ARG);
}
#ifdef X86_WIN64
/* ensure space for storing four registers */
cif->bytes += 4 * sizeof(ffi_arg);
#endif
#ifdef X86_DARWIN
cif->bytes = (cif->bytes + 15) & ~0xF;
#endif
return FFI_OK;
}
#ifdef X86_WIN64
extern int
ffi_call_win64(void (*)(char *, extended_cif *), extended_cif *,
unsigned, unsigned, unsigned *, void (*fn)(void));
#elif defined(X86_WIN32)
extern void
ffi_call_win32(void (*)(char *, extended_cif *), extended_cif *,
unsigned, unsigned, unsigned, unsigned *, void (*fn)(void));
#else
extern void ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *,
unsigned, unsigned, unsigned *, void (*fn)(void));
#endif
void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
{
extended_cif ecif;
ecif.cif = cif;
ecif.avalue = avalue;
/* If the return value is a struct and we don't have a return */
/* value address then we need to make one */
#ifdef X86_WIN64
if (rvalue == NULL
&& cif->flags == FFI_TYPE_STRUCT
&& cif->rtype->size != 1 && cif->rtype->size != 2
&& cif->rtype->size != 4 && cif->rtype->size != 8)
{
ecif.rvalue = alloca((cif->rtype->size + 0xF) & ~0xF);
}
#else
if (rvalue == NULL
&& cif->flags == FFI_TYPE_STRUCT)
{
ecif.rvalue = alloca(cif->rtype->size);
}
#endif
else
ecif.rvalue = rvalue;
switch (cif->abi)
{
#ifdef X86_WIN64
case FFI_WIN64:
ffi_call_win64(ffi_prep_args, &ecif, cif->bytes,
cif->flags, ecif.rvalue, fn);
break;
#elif defined(X86_WIN32)
case FFI_SYSV:
case FFI_STDCALL:
ffi_call_win32(ffi_prep_args, &ecif, cif->abi, cif->bytes, cif->flags,
ecif.rvalue, fn);
break;
case FFI_THISCALL:
case FFI_FASTCALL:
{
unsigned int abi = cif->abi;
unsigned int i, passed_regs = 0;
if (cif->flags == FFI_TYPE_STRUCT)
++passed_regs;
for (i=0; i < cif->nargs && passed_regs < 2;i++)
{
size_t sz;
if (cif->arg_types[i]->type == FFI_TYPE_FLOAT
|| cif->arg_types[i]->type == FFI_TYPE_STRUCT)
continue;
sz = (cif->arg_types[i]->size + 3) & ~3;
if (sz == 0 || sz > 4)
continue;
++passed_regs;
}
if (passed_regs < 2 && abi == FFI_FASTCALL)
abi = FFI_THISCALL;
if (passed_regs < 1 && abi == FFI_THISCALL)
abi = FFI_STDCALL;
ffi_call_win32(ffi_prep_args, &ecif, abi, cif->bytes, cif->flags,
ecif.rvalue, fn);
}
break;
#else
case FFI_SYSV:
ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue,
fn);
break;
#endif
default:
FFI_ASSERT(0);
break;
}
}
/** private members **/
/* The following __attribute__((regparm(1))) decorations will have no effect
on MSVC - standard cdecl convention applies. */
static void ffi_prep_incoming_args_SYSV (char *stack, void **ret,
void** args, ffi_cif* cif);
void FFI_HIDDEN ffi_closure_SYSV (ffi_closure *)
__attribute__ ((regparm(1)));
unsigned int FFI_HIDDEN ffi_closure_SYSV_inner (ffi_closure *, void **, void *)
__attribute__ ((regparm(1)));
void FFI_HIDDEN ffi_closure_raw_SYSV (ffi_raw_closure *)
__attribute__ ((regparm(1)));
#ifdef X86_WIN32
void FFI_HIDDEN ffi_closure_raw_THISCALL (ffi_raw_closure *)
__attribute__ ((regparm(1)));
void FFI_HIDDEN ffi_closure_STDCALL (ffi_closure *)
__attribute__ ((regparm(1)));
void FFI_HIDDEN ffi_closure_THISCALL (ffi_closure *)
__attribute__ ((regparm(1)));
#endif
#ifdef X86_WIN64
void FFI_HIDDEN ffi_closure_win64 (ffi_closure *);
#endif
/* This function is jumped to by the trampoline */
#ifdef X86_WIN64
void * FFI_HIDDEN
ffi_closure_win64_inner (ffi_closure *closure, void *args) {
ffi_cif *cif;
void **arg_area;
void *result;
void *resp = &result;
cif = closure->cif;
arg_area = (void**) alloca (cif->nargs * sizeof (void*));
/* this call will initialize ARG_AREA, such that each
* element in that array points to the corresponding
* value on the stack; and if the function returns
* a structure, it will change RESP to point to the
* structure return address. */
ffi_prep_incoming_args_SYSV(args, &resp, arg_area, cif);
(closure->fun) (cif, resp, arg_area, closure->user_data);
/* The result is returned in rax. This does the right thing for
result types except for floats; we have to 'mov xmm0, rax' in the
caller to correct this.
TODO: structure sizes of 3 5 6 7 are returned by reference, too!!!
*/
return cif->rtype->size > sizeof(void *) ? resp : *(void **)resp;
}
#else
unsigned int FFI_HIDDEN __attribute__ ((regparm(1)))
ffi_closure_SYSV_inner (ffi_closure *closure, void **respp, void *args)
{
/* our various things... */
ffi_cif *cif;
void **arg_area;
cif = closure->cif;
arg_area = (void**) alloca (cif->nargs * sizeof (void*));
/* this call will initialize ARG_AREA, such that each
* element in that array points to the corresponding
* value on the stack; and if the function returns
* a structure, it will change RESP to point to the
* structure return address. */
ffi_prep_incoming_args_SYSV(args, respp, arg_area, cif);
(closure->fun) (cif, *respp, arg_area, closure->user_data);
return cif->flags;
}
#endif /* !X86_WIN64 */
static void
ffi_prep_incoming_args_SYSV(char *stack, void **rvalue, void **avalue,
ffi_cif *cif)
{
register unsigned int i;
register void **p_argv;
register char *argp;
register ffi_type **p_arg;
argp = stack;
#ifdef X86_WIN64
if (cif->rtype->size > sizeof(ffi_arg)
|| (cif->flags == FFI_TYPE_STRUCT
&& (cif->rtype->size != 1 && cif->rtype->size != 2
&& cif->rtype->size != 4 && cif->rtype->size != 8))) {
*rvalue = *(void **) argp;
argp += sizeof(void *);
}
#else
if ( cif->flags == FFI_TYPE_STRUCT ) {
*rvalue = *(void **) argp;
argp += sizeof(void *);
}
#endif
p_argv = avalue;
for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++)
{
size_t z;
/* Align if necessary */
if ((sizeof(void*) - 1) & (size_t) argp) {
argp = (char *) ALIGN(argp, sizeof(void*));
}
#ifdef X86_WIN64
if ((*p_arg)->size > sizeof(ffi_arg)
|| ((*p_arg)->type == FFI_TYPE_STRUCT
&& ((*p_arg)->size != 1 && (*p_arg)->size != 2
&& (*p_arg)->size != 4 && (*p_arg)->size != 8)))
{
z = sizeof(void *);
*p_argv = *(void **)argp;
}
else
#endif
{
z = (*p_arg)->size;
/* because we're little endian, this is what it turns into. */
*p_argv = (void*) argp;
}
p_argv++;
#ifdef X86_WIN64
argp += (z + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
#else
argp += z;
#endif
}
return;
}
#define FFI_INIT_TRAMPOLINE_WIN64(TRAMP,FUN,CTX,MASK) \
{ unsigned char *__tramp = (unsigned char*)(TRAMP); \
void* __fun = (void*)(FUN); \
void* __ctx = (void*)(CTX); \
*(unsigned char*) &__tramp[0] = 0x41; \
*(unsigned char*) &__tramp[1] = 0xbb; \
*(unsigned int*) &__tramp[2] = MASK; /* mov $mask, %r11 */ \
*(unsigned char*) &__tramp[6] = 0x48; \
*(unsigned char*) &__tramp[7] = 0xb8; \
*(void**) &__tramp[8] = __ctx; /* mov __ctx, %rax */ \
*(unsigned char *) &__tramp[16] = 0x49; \
*(unsigned char *) &__tramp[17] = 0xba; \
*(void**) &__tramp[18] = __fun; /* mov __fun, %r10 */ \
*(unsigned char *) &__tramp[26] = 0x41; \
*(unsigned char *) &__tramp[27] = 0xff; \
*(unsigned char *) &__tramp[28] = 0xe2; /* jmp %r10 */ \
}
/* How to make a trampoline. Derived from gcc/config/i386/i386.c. */
#define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \
{ unsigned char *__tramp = (unsigned char*)(TRAMP); \
unsigned int __fun = (unsigned int)(FUN); \
unsigned int __ctx = (unsigned int)(CTX); \
unsigned int __dis = __fun - (__ctx + 10); \
*(unsigned char*) &__tramp[0] = 0xb8; \
*(unsigned int*) &__tramp[1] = __ctx; /* movl __ctx, %eax */ \
*(unsigned char *) &__tramp[5] = 0xe9; \
*(unsigned int*) &__tramp[6] = __dis; /* jmp __fun */ \
}
#define FFI_INIT_TRAMPOLINE_THISCALL(TRAMP,FUN,CTX,SIZE) \
{ unsigned char *__tramp = (unsigned char*)(TRAMP); \
unsigned int __fun = (unsigned int)(FUN); \
unsigned int __ctx = (unsigned int)(CTX); \
unsigned int __dis = __fun - (__ctx + 49); \
unsigned short __size = (unsigned short)(SIZE); \
*(unsigned int *) &__tramp[0] = 0x8324048b; /* mov (%esp), %eax */ \
*(unsigned int *) &__tramp[4] = 0x4c890cec; /* sub $12, %esp */ \
*(unsigned int *) &__tramp[8] = 0x04890424; /* mov %ecx, 4(%esp) */ \
*(unsigned char*) &__tramp[12] = 0x24; /* mov %eax, (%esp) */ \
*(unsigned char*) &__tramp[13] = 0xb8; \
*(unsigned int *) &__tramp[14] = __size; /* mov __size, %eax */ \
*(unsigned int *) &__tramp[18] = 0x08244c8d; /* lea 8(%esp), %ecx */ \
*(unsigned int *) &__tramp[22] = 0x4802e8c1; /* shr $2, %eax ; dec %eax */ \
*(unsigned short*) &__tramp[26] = 0x0b74; /* jz 1f */ \
*(unsigned int *) &__tramp[28] = 0x8908518b; /* 2b: mov 8(%ecx), %edx */ \
*(unsigned int *) &__tramp[32] = 0x04c18311; /* mov %edx, (%ecx) ; add $4, %ecx */ \
*(unsigned char*) &__tramp[36] = 0x48; /* dec %eax */ \
*(unsigned short*) &__tramp[37] = 0xf575; /* jnz 2b ; 1f: */ \
*(unsigned char*) &__tramp[39] = 0xb8; \
*(unsigned int*) &__tramp[40] = __ctx; /* movl __ctx, %eax */ \
*(unsigned char *) &__tramp[44] = 0xe8; \
*(unsigned int*) &__tramp[45] = __dis; /* call __fun */ \
*(unsigned char*) &__tramp[49] = 0xc2; /* ret */ \
*(unsigned short*) &__tramp[50] = (__size + 8); /* ret (__size + 8) */ \
}
#define FFI_INIT_TRAMPOLINE_STDCALL(TRAMP,FUN,CTX,SIZE) \
{ unsigned char *__tramp = (unsigned char*)(TRAMP); \
unsigned int __fun = (unsigned int)(FUN); \
unsigned int __ctx = (unsigned int)(CTX); \
unsigned int __dis = __fun - (__ctx + 10); \
unsigned short __size = (unsigned short)(SIZE); \
*(unsigned char*) &__tramp[0] = 0xb8; \
*(unsigned int*) &__tramp[1] = __ctx; /* movl __ctx, %eax */ \
*(unsigned char *) &__tramp[5] = 0xe8; \
*(unsigned int*) &__tramp[6] = __dis; /* call __fun */ \
*(unsigned char *) &__tramp[10] = 0xc2; \
*(unsigned short*) &__tramp[11] = __size; /* ret __size */ \
}
/* the cif must already be prep'ed */
ffi_status
ffi_prep_closure_loc (ffi_closure* closure,
ffi_cif* cif,
void (*fun)(ffi_cif*,void*,void**,void*),
void *user_data,
void *codeloc)
{
#ifdef X86_WIN64
#define ISFLOAT(IDX) (cif->arg_types[IDX]->type == FFI_TYPE_FLOAT || cif->arg_types[IDX]->type == FFI_TYPE_DOUBLE)
#define FLAG(IDX) (cif->nargs>(IDX)&&ISFLOAT(IDX)?(1<<(IDX)):0)
if (cif->abi == FFI_WIN64)
{
int mask = FLAG(0)|FLAG(1)|FLAG(2)|FLAG(3);
FFI_INIT_TRAMPOLINE_WIN64 (&closure->tramp[0],
&ffi_closure_win64,
codeloc, mask);
/* make sure we can execute here */
}
#else
if (cif->abi == FFI_SYSV)
{
FFI_INIT_TRAMPOLINE (&closure->tramp[0],
&ffi_closure_SYSV,
(void*)codeloc);
}
#ifdef X86_WIN32
else if (cif->abi == FFI_THISCALL)
{
FFI_INIT_TRAMPOLINE_THISCALL (&closure->tramp[0],
&ffi_closure_THISCALL,
(void*)codeloc,
cif->bytes);
}
else if (cif->abi == FFI_STDCALL)
{
FFI_INIT_TRAMPOLINE_STDCALL (&closure->tramp[0],
&ffi_closure_STDCALL,
(void*)codeloc, cif->bytes);
}
#endif /* X86_WIN32 */
#endif /* !X86_WIN64 */
else
{
return FFI_BAD_ABI;
}
closure->cif = cif;
closure->user_data = user_data;
closure->fun = fun;
return FFI_OK;
}
/* ------- Native raw API support -------------------------------- */
#if !FFI_NO_RAW_API
ffi_status
ffi_prep_raw_closure_loc (ffi_raw_closure* closure,
ffi_cif* cif,
void (*fun)(ffi_cif*,void*,ffi_raw*,void*),
void *user_data,
void *codeloc)
{
int i;
if (cif->abi != FFI_SYSV) {
#ifdef X86_WIN32
if (cif->abi != FFI_THISCALL)
#endif
return FFI_BAD_ABI;
}
/* we currently don't support certain kinds of arguments for raw
closures. This should be implemented by a separate assembly
language routine, since it would require argument processing,
something we don't do now for performance. */
for (i = cif->nargs-1; i >= 0; i--)
{
FFI_ASSERT (cif->arg_types[i]->type != FFI_TYPE_STRUCT);
FFI_ASSERT (cif->arg_types[i]->type != FFI_TYPE_LONGDOUBLE);
}
#ifdef X86_WIN32
if (cif->abi == FFI_SYSV)
{
#endif
FFI_INIT_TRAMPOLINE (&closure->tramp[0], &ffi_closure_raw_SYSV,
codeloc);
#ifdef X86_WIN32
}
else if (cif->abi == FFI_THISCALL)
{
FFI_INIT_TRAMPOLINE_THISCALL (&closure->tramp[0], &ffi_closure_raw_THISCALL,
codeloc, cif->bytes);
}
#endif
closure->cif = cif;
closure->user_data = user_data;
closure->fun = fun;
return FFI_OK;
}
static void
ffi_prep_args_raw(char *stack, extended_cif *ecif)
{
memcpy (stack, ecif->avalue, ecif->cif->bytes);
}
/* we borrow this routine from libffi (it must be changed, though, to
* actually call the function passed in the first argument. as of
* libffi-1.20, this is not the case.)
*/
void
ffi_raw_call(ffi_cif *cif, void (*fn)(void), void *rvalue, ffi_raw *fake_avalue)
{
extended_cif ecif;
void **avalue = (void **)fake_avalue;
ecif.cif = cif;
ecif.avalue = avalue;
/* If the return value is a struct and we don't have a return */
/* value address then we need to make one */
if ((rvalue == NULL) &&
(cif->rtype->type == FFI_TYPE_STRUCT))
{
ecif.rvalue = alloca(cif->rtype->size);
}
else
ecif.rvalue = rvalue;
switch (cif->abi)
{
#ifdef X86_WIN32
case FFI_SYSV:
case FFI_STDCALL:
ffi_call_win32(ffi_prep_args_raw, &ecif, cif->abi, cif->bytes, cif->flags,
ecif.rvalue, fn);
break;
case FFI_THISCALL:
case FFI_FASTCALL:
{
unsigned int abi = cif->abi;
unsigned int i, passed_regs = 0;
if (cif->flags == FFI_TYPE_STRUCT)
++passed_regs;
for (i=0; i < cif->nargs && passed_regs < 2;i++)
{
size_t sz;
if (cif->arg_types[i]->type == FFI_TYPE_FLOAT
|| cif->arg_types[i]->type == FFI_TYPE_STRUCT)
continue;
sz = (cif->arg_types[i]->size + 3) & ~3;
if (sz == 0 || sz > 4)
continue;
++passed_regs;
}
if (passed_regs < 2 && abi == FFI_FASTCALL)
cif->abi = abi = FFI_THISCALL;
if (passed_regs < 1 && abi == FFI_THISCALL)
cif->abi = abi = FFI_STDCALL;
ffi_call_win32(ffi_prep_args_raw, &ecif, abi, cif->bytes, cif->flags,
ecif.rvalue, fn);
}
break;
#else
case FFI_SYSV:
ffi_call_SYSV(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags,
ecif.rvalue, fn);
break;
#endif
default:
FFI_ASSERT(0);
break;
}
}
#endif
#endif /* !__x86_64__ || X86_WIN64 */
-134
Ver Arquivo
@@ -1,134 +0,0 @@
/* -----------------------------------------------------------------*-C-*-
ffitarget.h - Copyright (c) 2012 Anthony Green
Copyright (c) 1996-2003, 2010 Red Hat, Inc.
Copyright (C) 2008 Free Software Foundation, Inc.
Target configuration macros for x86 and x86-64.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
``Software''), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */
#ifndef LIBFFI_TARGET_H
#define LIBFFI_TARGET_H
#ifndef LIBFFI_H
#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead."
#endif
/* ---- System specific configurations ----------------------------------- */
/* For code common to all platforms on x86 and x86_64. */
#define X86_ANY
#if defined (X86_64) && defined (__i386__)
#undef X86_64
#define X86
#endif
#ifdef X86_WIN64
#define FFI_SIZEOF_ARG 8
#define USE_BUILTIN_FFS 0 /* not yet implemented in mingw-64 */
#endif
/* ---- Generic type definitions ----------------------------------------- */
#ifndef LIBFFI_ASM
#ifdef X86_WIN64
#ifdef _MSC_VER
typedef unsigned __int64 ffi_arg;
typedef __int64 ffi_sarg;
#else
typedef unsigned long long ffi_arg;
typedef long long ffi_sarg;
#endif
#else
#if defined __x86_64__ && !defined __LP64__
#define FFI_SIZEOF_ARG 8
typedef unsigned long long ffi_arg;
typedef long long ffi_sarg;
#else
typedef unsigned long ffi_arg;
typedef signed long ffi_sarg;
#endif
#endif
typedef enum ffi_abi {
FFI_FIRST_ABI = 0,
/* ---- Intel x86 Win32 ---------- */
#ifdef X86_WIN32
FFI_SYSV,
FFI_STDCALL,
FFI_THISCALL,
FFI_FASTCALL,
FFI_LAST_ABI,
/* TODO: Add fastcall support for the sake of completeness */
FFI_DEFAULT_ABI = FFI_SYSV
#elif defined(X86_WIN64)
FFI_WIN64,
FFI_LAST_ABI,
FFI_DEFAULT_ABI = FFI_WIN64
#else
/* ---- Intel x86 and AMD x86-64 - */
FFI_SYSV,
FFI_UNIX64, /* Unix variants all use the same ABI for x86-64 */
FFI_LAST_ABI,
#if defined(__i386__) || defined(__i386)
FFI_DEFAULT_ABI = FFI_SYSV
#else
FFI_DEFAULT_ABI = FFI_UNIX64
#endif
#endif
} ffi_abi;
#endif
/* ---- Definitions for closures ----------------------------------------- */
#define FFI_CLOSURES 1
#define FFI_TYPE_SMALL_STRUCT_1B (FFI_TYPE_LAST + 1)
#define FFI_TYPE_SMALL_STRUCT_2B (FFI_TYPE_LAST + 2)
#define FFI_TYPE_SMALL_STRUCT_4B (FFI_TYPE_LAST + 3)
#if defined (X86_64) || (defined (__x86_64__) && defined (X86_DARWIN))
#define FFI_TRAMPOLINE_SIZE 24
#define FFI_NATIVE_RAW_API 0
#else
#ifdef X86_WIN32
#define FFI_TRAMPOLINE_SIZE 52
#else
#ifdef X86_WIN64
#define FFI_TRAMPOLINE_SIZE 29
#define FFI_NATIVE_RAW_API 0
#define FFI_NO_RAW_API 1
#else
#define FFI_TRAMPOLINE_SIZE 10
#endif
#endif
#ifndef X86_WIN64
#define FFI_NATIVE_RAW_API 1 /* x86 has native raw api support */
#endif
#endif
#endif
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
@@ -1,64 +0,0 @@
/* Area: closure_call (stdcall convention)
Purpose: Check handling when caller expects stdcall callee
Limitations: none.
PR: none.
Originator: <twalljava@dev.java.net> */
/* { dg-do run { target i?86-*-cygwin* i?86-*-mingw* } } */
#include "ffitest.h"
static void
closure_test_stdcall(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata)
{
*(ffi_arg*)resp =
(int)*(int *)args[0] + (int)(*(int *)args[1])
+ (int)(*(int *)args[2]) + (int)(*(int *)args[3])
+ (int)(intptr_t)userdata;
printf("%d %d %d %d: %d\n",
(int)*(int *)args[0], (int)(*(int *)args[1]),
(int)(*(int *)args[2]), (int)(*(int *)args[3]),
(int)*(ffi_arg *)resp);
}
typedef int (__stdcall *closure_test_type0)(int, int, int, int);
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
ffi_type * cl_arg_types[17];
int res;
void* sp_pre;
void* sp_post;
char buf[1024];
cl_arg_types[0] = &ffi_type_uint;
cl_arg_types[1] = &ffi_type_uint;
cl_arg_types[2] = &ffi_type_uint;
cl_arg_types[3] = &ffi_type_uint;
cl_arg_types[4] = NULL;
/* Initialize the cif */
CHECK(ffi_prep_cif(&cif, FFI_STDCALL, 4,
&ffi_type_sint, cl_arg_types) == FFI_OK);
CHECK(ffi_prep_closure_loc(pcl, &cif, closure_test_stdcall,
(void *) 3 /* userdata */, code) == FFI_OK);
asm volatile (" movl %%esp,%0" : "=g" (sp_pre));
res = (*(closure_test_type0)code)(0, 1, 2, 3);
asm volatile (" movl %%esp,%0" : "=g" (sp_post));
/* { dg-output "0 1 2 3: 9" } */
printf("res: %d\n",res);
/* { dg-output "\nres: 9" } */
sprintf(buf, "mismatch: pre=%p vs post=%p", sp_pre, sp_post);
printf("stack pointer %s\n", (sp_pre == sp_post ? "match" : buf));
/* { dg-output "\nstack pointer match" } */
exit(0);
}
@@ -1,64 +0,0 @@
/* Area: closure_call (thiscall convention)
Purpose: Check handling when caller expects thiscall callee
Limitations: none.
PR: none.
Originator: <ktietz@redhat.com> */
/* { dg-do run { target i?86-*-cygwin* i?86-*-mingw* } } */
#include "ffitest.h"
static void
closure_test_thiscall(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata)
{
*(ffi_arg*)resp =
(int)*(int *)args[0] + (int)(*(int *)args[1])
+ (int)(*(int *)args[2]) + (int)(*(int *)args[3])
+ (int)(intptr_t)userdata;
printf("%d %d %d %d: %d\n",
(int)*(int *)args[0], (int)(*(int *)args[1]),
(int)(*(int *)args[2]), (int)(*(int *)args[3]),
(int)*(ffi_arg *)resp);
}
typedef int (__thiscall *closure_test_type0)(int, int, int, int);
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
ffi_type * cl_arg_types[17];
int res;
void* sp_pre;
void* sp_post;
char buf[1024];
cl_arg_types[0] = &ffi_type_uint;
cl_arg_types[1] = &ffi_type_uint;
cl_arg_types[2] = &ffi_type_uint;
cl_arg_types[3] = &ffi_type_uint;
cl_arg_types[4] = NULL;
/* Initialize the cif */
CHECK(ffi_prep_cif(&cif, FFI_THISCALL, 4,
&ffi_type_sint, cl_arg_types) == FFI_OK);
CHECK(ffi_prep_closure_loc(pcl, &cif, closure_test_thiscall,
(void *) 3 /* userdata */, code) == FFI_OK);
asm volatile (" movl %%esp,%0" : "=g" (sp_pre));
res = (*(closure_test_type0)code)(0, 1, 2, 3);
asm volatile (" movl %%esp,%0" : "=g" (sp_post));
/* { dg-output "0 1 2 3: 9" } */
printf("res: %d\n",res);
/* { dg-output "\nres: 9" } */
sprintf(buf, "mismatch: pre=%p vs post=%p", sp_pre, sp_post);
printf("stack pointer %s\n", (sp_pre == sp_post ? "match" : buf));
/* { dg-output "\nstack pointer match" } */
exit(0);
}
@@ -1,94 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030828 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_12byte {
int a;
int b;
int c;
} cls_struct_12byte;
cls_struct_12byte cls_struct_12byte_fn(struct cls_struct_12byte b1,
struct cls_struct_12byte b2)
{
struct cls_struct_12byte result;
result.a = b1.a + b2.a;
result.b = b1.b + b2.b;
result.c = b1.c + b2.c;
printf("%d %d %d %d %d %d: %d %d %d\n", b1.a, b1.b, b1.c, b2.a, b2.b, b2.c,
result.a, result.b, result.c);
return result;
}
static void cls_struct_12byte_gn(ffi_cif* cif __UNUSED__, void* resp,
void** args , void* userdata __UNUSED__)
{
struct cls_struct_12byte b1, b2;
b1 = *(struct cls_struct_12byte*)(args[0]);
b2 = *(struct cls_struct_12byte*)(args[1]);
*(cls_struct_12byte*)resp = cls_struct_12byte_fn(b1, b2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_12byte h_dbl = { 7, 4, 9 };
struct cls_struct_12byte j_dbl = { 1, 5, 3 };
struct cls_struct_12byte res_dbl;
cls_struct_fields[0] = &ffi_type_sint;
cls_struct_fields[1] = &ffi_type_sint;
cls_struct_fields[2] = &ffi_type_sint;
cls_struct_fields[3] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &h_dbl;
args_dbl[1] = &j_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_12byte_fn), &res_dbl, args_dbl);
/* { dg-output "7 4 9 1 5 3: 8 9 12" } */
printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 8 9 12" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_12byte_gn, NULL, code) == FFI_OK);
res_dbl.a = 0;
res_dbl.b = 0;
res_dbl.c = 0;
res_dbl = ((cls_struct_12byte(*)(cls_struct_12byte, cls_struct_12byte))(code))(h_dbl, j_dbl);
/* { dg-output "\n7 4 9 1 5 3: 8 9 12" } */
printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 8 9 12" } */
exit(0);
}
@@ -1,95 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Depending on the ABI. Check overlapping.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030828 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_16byte {
int a;
double b;
int c;
} cls_struct_16byte;
cls_struct_16byte cls_struct_16byte_fn(struct cls_struct_16byte b1,
struct cls_struct_16byte b2)
{
struct cls_struct_16byte result;
result.a = b1.a + b2.a;
result.b = b1.b + b2.b;
result.c = b1.c + b2.c;
printf("%d %g %d %d %g %d: %d %g %d\n", b1.a, b1.b, b1.c, b2.a, b2.b, b2.c,
result.a, result.b, result.c);
return result;
}
static void cls_struct_16byte_gn(ffi_cif* cif __UNUSED__, void* resp,
void** args, void* userdata __UNUSED__)
{
struct cls_struct_16byte b1, b2;
b1 = *(struct cls_struct_16byte*)(args[0]);
b2 = *(struct cls_struct_16byte*)(args[1]);
*(cls_struct_16byte*)resp = cls_struct_16byte_fn(b1, b2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_16byte h_dbl = { 7, 8.0, 9 };
struct cls_struct_16byte j_dbl = { 1, 9.0, 3 };
struct cls_struct_16byte res_dbl;
cls_struct_fields[0] = &ffi_type_sint;
cls_struct_fields[1] = &ffi_type_double;
cls_struct_fields[2] = &ffi_type_sint;
cls_struct_fields[3] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &h_dbl;
args_dbl[1] = &j_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_16byte_fn), &res_dbl, args_dbl);
/* { dg-output "7 8 9 1 9 3: 8 17 12" } */
printf("res: %d %g %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 8 17 12" } */
res_dbl.a = 0;
res_dbl.b = 0.0;
res_dbl.c = 0;
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_16byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_16byte(*)(cls_struct_16byte, cls_struct_16byte))(code))(h_dbl, j_dbl);
/* { dg-output "\n7 8 9 1 9 3: 8 17 12" } */
printf("res: %d %g %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 8 17 12" } */
exit(0);
}
@@ -1,96 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Depending on the ABI. Double alignment check on darwin.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030915 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_18byte {
double a;
unsigned char b;
unsigned char c;
double d;
} cls_struct_18byte;
cls_struct_18byte cls_struct_18byte_fn(struct cls_struct_18byte a1,
struct cls_struct_18byte a2)
{
struct cls_struct_18byte result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
result.d = a1.d + a2.d;
printf("%g %d %d %g %g %d %d %g: %g %d %d %g\n", a1.a, a1.b, a1.c, a1.d,
a2.a, a2.b, a2.c, a2.d,
result.a, result.b, result.c, result.d);
return result;
}
static void
cls_struct_18byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_18byte a1, a2;
a1 = *(struct cls_struct_18byte*)(args[0]);
a2 = *(struct cls_struct_18byte*)(args[1]);
*(cls_struct_18byte*)resp = cls_struct_18byte_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[3];
ffi_type* cls_struct_fields[5];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[3];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_18byte g_dbl = { 1.0, 127, 126, 3.0 };
struct cls_struct_18byte f_dbl = { 4.0, 125, 124, 5.0 };
struct cls_struct_18byte res_dbl;
cls_struct_fields[0] = &ffi_type_double;
cls_struct_fields[1] = &ffi_type_uchar;
cls_struct_fields[2] = &ffi_type_uchar;
cls_struct_fields[3] = &ffi_type_double;
cls_struct_fields[4] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_18byte_fn), &res_dbl, args_dbl);
/* { dg-output "1 127 126 3 4 125 124 5: 5 252 250 8" } */
printf("res: %g %d %d %g\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d);
/* { dg-output "\nres: 5 252 250 8" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_18byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_18byte(*)(cls_struct_18byte, cls_struct_18byte))(code))(g_dbl, f_dbl);
/* { dg-output "\n1 127 126 3 4 125 124 5: 5 252 250 8" } */
printf("res: %g %d %d %g\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d);
/* { dg-output "\nres: 5 252 250 8" } */
exit(0);
}
@@ -1,102 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Depending on the ABI. Double alignment check on darwin.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030915 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_19byte {
double a;
unsigned char b;
unsigned char c;
double d;
unsigned char e;
} cls_struct_19byte;
cls_struct_19byte cls_struct_19byte_fn(struct cls_struct_19byte a1,
struct cls_struct_19byte a2)
{
struct cls_struct_19byte result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
result.d = a1.d + a2.d;
result.e = a1.e + a2.e;
printf("%g %d %d %g %d %g %d %d %g %d: %g %d %d %g %d\n",
a1.a, a1.b, a1.c, a1.d, a1.e,
a2.a, a2.b, a2.c, a2.d, a2.e,
result.a, result.b, result.c, result.d, result.e);
return result;
}
static void
cls_struct_19byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_19byte a1, a2;
a1 = *(struct cls_struct_19byte*)(args[0]);
a2 = *(struct cls_struct_19byte*)(args[1]);
*(cls_struct_19byte*)resp = cls_struct_19byte_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[3];
ffi_type* cls_struct_fields[6];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[3];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_19byte g_dbl = { 1.0, 127, 126, 3.0, 120 };
struct cls_struct_19byte f_dbl = { 4.0, 125, 124, 5.0, 119 };
struct cls_struct_19byte res_dbl;
cls_struct_fields[0] = &ffi_type_double;
cls_struct_fields[1] = &ffi_type_uchar;
cls_struct_fields[2] = &ffi_type_uchar;
cls_struct_fields[3] = &ffi_type_double;
cls_struct_fields[4] = &ffi_type_uchar;
cls_struct_fields[5] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_19byte_fn), &res_dbl, args_dbl);
/* { dg-output "1 127 126 3 120 4 125 124 5 119: 5 252 250 8 239" } */
printf("res: %g %d %d %g %d\n", res_dbl.a, res_dbl.b, res_dbl.c,
res_dbl.d, res_dbl.e);
/* { dg-output "\nres: 5 252 250 8 239" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_19byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_19byte(*)(cls_struct_19byte, cls_struct_19byte))(code))(g_dbl, f_dbl);
/* { dg-output "\n1 127 126 3 120 4 125 124 5 119: 5 252 250 8 239" } */
printf("res: %g %d %d %g %d\n", res_dbl.a, res_dbl.b, res_dbl.c,
res_dbl.d, res_dbl.e);
/* { dg-output "\nres: 5 252 250 8 239" } */
exit(0);
}
@@ -1,89 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Especially with small structures which may fit in one
register. Depending on the ABI.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030902 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_1_1byte {
unsigned char a;
} cls_struct_1_1byte;
cls_struct_1_1byte cls_struct_1_1byte_fn(struct cls_struct_1_1byte a1,
struct cls_struct_1_1byte a2)
{
struct cls_struct_1_1byte result;
result.a = a1.a + a2.a;
printf("%d %d: %d\n", a1.a, a2.a, result.a);
return result;
}
static void
cls_struct_1_1byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_1_1byte a1, a2;
a1 = *(struct cls_struct_1_1byte*)(args[0]);
a2 = *(struct cls_struct_1_1byte*)(args[1]);
*(cls_struct_1_1byte*)resp = cls_struct_1_1byte_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[2];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_1_1byte g_dbl = { 12 };
struct cls_struct_1_1byte f_dbl = { 178 };
struct cls_struct_1_1byte res_dbl;
cls_struct_fields[0] = &ffi_type_uchar;
cls_struct_fields[1] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_1_1byte_fn), &res_dbl, args_dbl);
/* { dg-output "12 178: 190" } */
printf("res: %d\n", res_dbl.a);
/* { dg-output "\nres: 190" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_1_1byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_1_1byte(*)(cls_struct_1_1byte, cls_struct_1_1byte))(code))(g_dbl, f_dbl);
/* { dg-output "\n12 178: 190" } */
printf("res: %d\n", res_dbl.a);
/* { dg-output "\nres: 190" } */
exit(0);
}
@@ -1,91 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Depending on the ABI. Check overlapping.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030828 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_20byte {
double a;
double b;
int c;
} cls_struct_20byte;
cls_struct_20byte cls_struct_20byte_fn(struct cls_struct_20byte a1,
struct cls_struct_20byte a2)
{
struct cls_struct_20byte result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
printf("%g %g %d %g %g %d: %g %g %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c,
result.a, result.b, result.c);
return result;
}
static void
cls_struct_20byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_20byte a1, a2;
a1 = *(struct cls_struct_20byte*)(args[0]);
a2 = *(struct cls_struct_20byte*)(args[1]);
*(cls_struct_20byte*)resp = cls_struct_20byte_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_20byte g_dbl = { 1.0, 2.0, 3 };
struct cls_struct_20byte f_dbl = { 4.0, 5.0, 7 };
struct cls_struct_20byte res_dbl;
cls_struct_fields[0] = &ffi_type_double;
cls_struct_fields[1] = &ffi_type_double;
cls_struct_fields[2] = &ffi_type_sint;
cls_struct_fields[3] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_20byte_fn), &res_dbl, args_dbl);
/* { dg-output "1 2 3 4 5 7: 5 7 10" } */
printf("res: %g %g %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 5 7 10" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_20byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_20byte(*)(cls_struct_20byte, cls_struct_20byte))(code))(g_dbl, f_dbl);
/* { dg-output "\n1 2 3 4 5 7: 5 7 10" } */
printf("res: %g %g %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 5 7 10" } */
exit(0);
}
@@ -1,93 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Depending on the ABI. Check overlapping.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030828 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_20byte {
int a;
double b;
double c;
} cls_struct_20byte;
cls_struct_20byte cls_struct_20byte_fn(struct cls_struct_20byte a1,
struct cls_struct_20byte a2)
{
struct cls_struct_20byte result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
printf("%d %g %g %d %g %g: %d %g %g\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c,
result.a, result.b, result.c);
return result;
}
static void
cls_struct_20byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_20byte a1, a2;
a1 = *(struct cls_struct_20byte*)(args[0]);
a2 = *(struct cls_struct_20byte*)(args[1]);
*(cls_struct_20byte*)resp = cls_struct_20byte_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[3];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[3];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_20byte g_dbl = { 1, 2.0, 3.0 };
struct cls_struct_20byte f_dbl = { 4, 5.0, 7.0 };
struct cls_struct_20byte res_dbl;
cls_struct_fields[0] = &ffi_type_sint;
cls_struct_fields[1] = &ffi_type_double;
cls_struct_fields[2] = &ffi_type_double;
cls_struct_fields[3] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_20byte_fn), &res_dbl, args_dbl);
/* { dg-output "1 2 3 4 5 7: 5 7 10" } */
printf("res: %d %g %g\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 5 7 10" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_20byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_20byte(*)(cls_struct_20byte, cls_struct_20byte))(code))(g_dbl, f_dbl);
/* { dg-output "\n1 2 3 4 5 7: 5 7 10" } */
printf("res: %d %g %g\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 5 7 10" } */
exit(0);
}
@@ -1,113 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Depending on the ABI. Check overlapping.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030828 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_24byte {
double a;
double b;
int c;
float d;
} cls_struct_24byte;
cls_struct_24byte cls_struct_24byte_fn(struct cls_struct_24byte b0,
struct cls_struct_24byte b1,
struct cls_struct_24byte b2,
struct cls_struct_24byte b3)
{
struct cls_struct_24byte result;
result.a = b0.a + b1.a + b2.a + b3.a;
result.b = b0.b + b1.b + b2.b + b3.b;
result.c = b0.c + b1.c + b2.c + b3.c;
result.d = b0.d + b1.d + b2.d + b3.d;
printf("%g %g %d %g %g %g %d %g %g %g %d %g %g %g %d %g: %g %g %d %g\n",
b0.a, b0.b, b0.c, b0.d,
b1.a, b1.b, b1.c, b1.d,
b2.a, b2.b, b2.c, b2.d,
b3.a, b3.b, b3.c, b2.d,
result.a, result.b, result.c, result.d);
return result;
}
static void
cls_struct_24byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_24byte b0, b1, b2, b3;
b0 = *(struct cls_struct_24byte*)(args[0]);
b1 = *(struct cls_struct_24byte*)(args[1]);
b2 = *(struct cls_struct_24byte*)(args[2]);
b3 = *(struct cls_struct_24byte*)(args[3]);
*(cls_struct_24byte*)resp = cls_struct_24byte_fn(b0, b1, b2, b3);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[5];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_24byte e_dbl = { 9.0, 2.0, 6, 5.0 };
struct cls_struct_24byte f_dbl = { 1.0, 2.0, 3, 7.0 };
struct cls_struct_24byte g_dbl = { 4.0, 5.0, 7, 9.0 };
struct cls_struct_24byte h_dbl = { 8.0, 6.0, 1, 4.0 };
struct cls_struct_24byte res_dbl;
cls_struct_fields[0] = &ffi_type_double;
cls_struct_fields[1] = &ffi_type_double;
cls_struct_fields[2] = &ffi_type_sint;
cls_struct_fields[3] = &ffi_type_float;
cls_struct_fields[4] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = &cls_struct_type;
dbl_arg_types[3] = &cls_struct_type;
dbl_arg_types[4] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 4, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &e_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = &g_dbl;
args_dbl[3] = &h_dbl;
args_dbl[4] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_24byte_fn), &res_dbl, args_dbl);
/* { dg-output "9 2 6 5 1 2 3 7 4 5 7 9 8 6 1 9: 22 15 17 25" } */
printf("res: %g %g %d %g\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d);
/* { dg-output "\nres: 22 15 17 25" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_24byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_24byte(*)(cls_struct_24byte,
cls_struct_24byte,
cls_struct_24byte,
cls_struct_24byte))
(code))(e_dbl, f_dbl, g_dbl, h_dbl);
/* { dg-output "\n9 2 6 5 1 2 3 7 4 5 7 9 8 6 1 9: 22 15 17 25" } */
printf("res: %g %g %d %g\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d);
/* { dg-output "\nres: 22 15 17 25" } */
exit(0);
}
@@ -1,90 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Especially with small structures which may fit in one
register. Depending on the ABI.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030828 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_2byte {
unsigned char a;
unsigned char b;
} cls_struct_2byte;
cls_struct_2byte cls_struct_2byte_fn(struct cls_struct_2byte a1,
struct cls_struct_2byte a2)
{
struct cls_struct_2byte result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
printf("%d %d %d %d: %d %d\n", a1.a, a1.b, a2.a, a2.b, result.a, result.b);
return result;
}
static void
cls_struct_2byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_2byte a1, a2;
a1 = *(struct cls_struct_2byte*)(args[0]);
a2 = *(struct cls_struct_2byte*)(args[1]);
*(cls_struct_2byte*)resp = cls_struct_2byte_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_2byte g_dbl = { 12, 127 };
struct cls_struct_2byte f_dbl = { 1, 13 };
struct cls_struct_2byte res_dbl;
cls_struct_fields[0] = &ffi_type_uchar;
cls_struct_fields[1] = &ffi_type_uchar;
cls_struct_fields[2] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_2byte_fn), &res_dbl, args_dbl);
/* { dg-output "12 127 1 13: 13 140" } */
printf("res: %d %d\n", res_dbl.a, res_dbl.b);
/* { dg-output "\nres: 13 140" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_2byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_2byte(*)(cls_struct_2byte, cls_struct_2byte))(code))(g_dbl, f_dbl);
/* { dg-output "\n12 127 1 13: 13 140" } */
printf("res: %d %d\n", res_dbl.a, res_dbl.b);
/* { dg-output "\nres: 13 140" } */
exit(0);
}
@@ -1,95 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Especially with small structures which may fit in one
register. Depending on the ABI.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030902 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_3_1byte {
unsigned char a;
unsigned char b;
unsigned char c;
} cls_struct_3_1byte;
cls_struct_3_1byte cls_struct_3_1byte_fn(struct cls_struct_3_1byte a1,
struct cls_struct_3_1byte a2)
{
struct cls_struct_3_1byte result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
printf("%d %d %d %d %d %d: %d %d %d\n", a1.a, a1.b, a1.c,
a2.a, a2.b, a2.c,
result.a, result.b, result.c);
return result;
}
static void
cls_struct_3_1byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_3_1byte a1, a2;
a1 = *(struct cls_struct_3_1byte*)(args[0]);
a2 = *(struct cls_struct_3_1byte*)(args[1]);
*(cls_struct_3_1byte*)resp = cls_struct_3_1byte_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_3_1byte g_dbl = { 12, 13, 14 };
struct cls_struct_3_1byte f_dbl = { 178, 179, 180 };
struct cls_struct_3_1byte res_dbl;
cls_struct_fields[0] = &ffi_type_uchar;
cls_struct_fields[1] = &ffi_type_uchar;
cls_struct_fields[2] = &ffi_type_uchar;
cls_struct_fields[3] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_3_1byte_fn), &res_dbl, args_dbl);
/* { dg-output "12 13 14 178 179 180: 190 192 194" } */
printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 190 192 194" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_3_1byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_3_1byte(*)(cls_struct_3_1byte, cls_struct_3_1byte))(code))(g_dbl, f_dbl);
/* { dg-output "\n12 13 14 178 179 180: 190 192 194" } */
printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 190 192 194" } */
exit(0);
}
@@ -1,90 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Especially with small structures which may fit in one
register. Depending on the ABI. Check overlapping.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030828 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_3byte {
unsigned short a;
unsigned char b;
} cls_struct_3byte;
cls_struct_3byte cls_struct_3byte_fn(struct cls_struct_3byte a1,
struct cls_struct_3byte a2)
{
struct cls_struct_3byte result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
printf("%d %d %d %d: %d %d\n", a1.a, a1.b, a2.a, a2.b, result.a, result.b);
return result;
}
static void
cls_struct_3byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_3byte a1, a2;
a1 = *(struct cls_struct_3byte*)(args[0]);
a2 = *(struct cls_struct_3byte*)(args[1]);
*(cls_struct_3byte*)resp = cls_struct_3byte_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_3byte g_dbl = { 12, 119 };
struct cls_struct_3byte f_dbl = { 1, 15 };
struct cls_struct_3byte res_dbl;
cls_struct_fields[0] = &ffi_type_ushort;
cls_struct_fields[1] = &ffi_type_uchar;
cls_struct_fields[2] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_3byte_fn), &res_dbl, args_dbl);
/* { dg-output "12 119 1 15: 13 134" } */
printf("res: %d %d\n", res_dbl.a, res_dbl.b);
/* { dg-output "\nres: 13 134" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_3byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_3byte(*)(cls_struct_3byte, cls_struct_3byte))(code))(g_dbl, f_dbl);
/* { dg-output "\n12 119 1 15: 13 134" } */
printf("res: %d %d\n", res_dbl.a, res_dbl.b);
/* { dg-output "\nres: 13 134" } */
exit(0);
}
@@ -1,90 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Especially with small structures which may fit in one
register. Depending on the ABI. Check overlapping.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030828 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_3byte_1 {
unsigned char a;
unsigned short b;
} cls_struct_3byte_1;
cls_struct_3byte_1 cls_struct_3byte_fn1(struct cls_struct_3byte_1 a1,
struct cls_struct_3byte_1 a2)
{
struct cls_struct_3byte_1 result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
printf("%d %d %d %d: %d %d\n", a1.a, a1.b, a2.a, a2.b, result.a, result.b);
return result;
}
static void
cls_struct_3byte_gn1(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_3byte_1 a1, a2;
a1 = *(struct cls_struct_3byte_1*)(args[0]);
a2 = *(struct cls_struct_3byte_1*)(args[1]);
*(cls_struct_3byte_1*)resp = cls_struct_3byte_fn1(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_3byte_1 g_dbl = { 15, 125 };
struct cls_struct_3byte_1 f_dbl = { 9, 19 };
struct cls_struct_3byte_1 res_dbl;
cls_struct_fields[0] = &ffi_type_uchar;
cls_struct_fields[1] = &ffi_type_ushort;
cls_struct_fields[2] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_3byte_fn1), &res_dbl, args_dbl);
/* { dg-output "15 125 9 19: 24 144" } */
printf("res: %d %d\n", res_dbl.a, res_dbl.b);
/* { dg-output "\nres: 24 144" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_3byte_gn1, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_3byte_1(*)(cls_struct_3byte_1, cls_struct_3byte_1))(code))(g_dbl, f_dbl);
/* { dg-output "\n15 125 9 19: 24 144" } */
printf("res: %d %d\n", res_dbl.a, res_dbl.b);
/* { dg-output "\nres: 24 144" } */
exit(0);
}
@@ -1,98 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Especially with small structures which may fit in one
register. Depending on the ABI.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030902 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_4_1byte {
unsigned char a;
unsigned char b;
unsigned char c;
unsigned char d;
} cls_struct_4_1byte;
cls_struct_4_1byte cls_struct_4_1byte_fn(struct cls_struct_4_1byte a1,
struct cls_struct_4_1byte a2)
{
struct cls_struct_4_1byte result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
result.d = a1.d + a2.d;
printf("%d %d %d %d %d %d %d %d: %d %d %d %d\n", a1.a, a1.b, a1.c, a1.d,
a2.a, a2.b, a2.c, a2.d,
result.a, result.b, result.c, result.d);
return result;
}
static void
cls_struct_4_1byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_4_1byte a1, a2;
a1 = *(struct cls_struct_4_1byte*)(args[0]);
a2 = *(struct cls_struct_4_1byte*)(args[1]);
*(cls_struct_4_1byte*)resp = cls_struct_4_1byte_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[5];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_4_1byte g_dbl = { 12, 13, 14, 15 };
struct cls_struct_4_1byte f_dbl = { 178, 179, 180, 181 };
struct cls_struct_4_1byte res_dbl;
cls_struct_fields[0] = &ffi_type_uchar;
cls_struct_fields[1] = &ffi_type_uchar;
cls_struct_fields[2] = &ffi_type_uchar;
cls_struct_fields[3] = &ffi_type_uchar;
cls_struct_fields[4] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_4_1byte_fn), &res_dbl, args_dbl);
/* { dg-output "12 13 14 15 178 179 180 181: 190 192 194 196" } */
printf("res: %d %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d);
/* { dg-output "\nres: 190 192 194 196" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_4_1byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_4_1byte(*)(cls_struct_4_1byte, cls_struct_4_1byte))(code))(g_dbl, f_dbl);
/* { dg-output "\n12 13 14 15 178 179 180 181: 190 192 194 196" } */
printf("res: %d %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d);
/* { dg-output "\nres: 190 192 194 196" } */
exit(0);
}
@@ -1,90 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Depending on the ABI. Check overlapping.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030828 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_4byte {
unsigned short a;
unsigned short b;
} cls_struct_4byte;
cls_struct_4byte cls_struct_4byte_fn(struct cls_struct_4byte a1,
struct cls_struct_4byte a2)
{
struct cls_struct_4byte result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
printf("%d %d %d %d: %d %d\n", a1.a, a1.b, a2.a, a2.b, result.a, result.b);
return result;
}
static void
cls_struct_4byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_4byte a1, a2;
a1 = *(struct cls_struct_4byte*)(args[0]);
a2 = *(struct cls_struct_4byte*)(args[1]);
*(cls_struct_4byte*)resp = cls_struct_4byte_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_4byte g_dbl = { 127, 120 };
struct cls_struct_4byte f_dbl = { 12, 128 };
struct cls_struct_4byte res_dbl;
cls_struct_fields[0] = &ffi_type_ushort;
cls_struct_fields[1] = &ffi_type_ushort;
cls_struct_fields[2] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_4byte_fn), &res_dbl, args_dbl);
/* { dg-output "127 120 12 128: 139 248" } */
printf("res: %d %d\n", res_dbl.a, res_dbl.b);
/* { dg-output "\nres: 139 248" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_4byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_4byte(*)(cls_struct_4byte, cls_struct_4byte))(code))(g_dbl, f_dbl);
/* { dg-output "\n127 120 12 128: 139 248" } */
printf("res: %d %d\n", res_dbl.a, res_dbl.b);
/* { dg-output "\nres: 139 248" } */
exit(0);
}
@@ -1,109 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Depending on the ABI. Check overlapping.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20050708 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_5byte {
unsigned char a;
unsigned char b;
unsigned char c;
unsigned char d;
unsigned char e;
} cls_struct_5byte;
cls_struct_5byte cls_struct_5byte_fn(struct cls_struct_5byte a1,
struct cls_struct_5byte a2)
{
struct cls_struct_5byte result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
result.d = a1.d + a2.d;
result.e = a1.e + a2.e;
printf("%d %d %d %d %d %d %d %d %d %d: %d %d %d %d %d\n",
a1.a, a1.b, a1.c, a1.d, a1.e,
a2.a, a2.b, a2.c, a2.d, a2.e,
result.a, result.b, result.c, result.d, result.e);
return result;
}
static void
cls_struct_5byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_5byte a1, a2;
a1 = *(struct cls_struct_5byte*)(args[0]);
a2 = *(struct cls_struct_5byte*)(args[1]);
*(cls_struct_5byte*)resp = cls_struct_5byte_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[6];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_5byte g_dbl = { 127, 120, 1, 3, 4 };
struct cls_struct_5byte f_dbl = { 12, 128, 9, 3, 4 };
struct cls_struct_5byte res_dbl = { 0, 0, 0, 0, 0 };
cls_struct_fields[0] = &ffi_type_uchar;
cls_struct_fields[1] = &ffi_type_uchar;
cls_struct_fields[2] = &ffi_type_uchar;
cls_struct_fields[3] = &ffi_type_uchar;
cls_struct_fields[4] = &ffi_type_uchar;
cls_struct_fields[5] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_5byte_fn), &res_dbl, args_dbl);
/* { dg-output "127 120 1 3 4 12 128 9 3 4: 139 248 10 6 8" } */
printf("res: %d %d %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c,
res_dbl.d, res_dbl.e);
/* { dg-output "\nres: 139 248 10 6 8" } */
res_dbl.a = 0;
res_dbl.b = 0;
res_dbl.c = 0;
res_dbl.d = 0;
res_dbl.e = 0;
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_5byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_5byte(*)(cls_struct_5byte, cls_struct_5byte))(code))(g_dbl, f_dbl);
/* { dg-output "\n127 120 1 3 4 12 128 9 3 4: 139 248 10 6 8" } */
printf("res: %d %d %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c,
res_dbl.d, res_dbl.e);
/* { dg-output "\nres: 139 248 10 6 8" } */
exit(0);
}
@@ -1,98 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Depending on the ABI. Check overlapping.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030828 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_5byte {
unsigned short a;
unsigned short b;
unsigned char c;
} cls_struct_5byte;
cls_struct_5byte cls_struct_5byte_fn(struct cls_struct_5byte a1,
struct cls_struct_5byte a2)
{
struct cls_struct_5byte result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
printf("%d %d %d %d %d %d: %d %d %d\n", a1.a, a1.b, a1.c,
a2.a, a2.b, a2.c,
result.a, result.b, result.c);
return result;
}
static void
cls_struct_5byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_5byte a1, a2;
a1 = *(struct cls_struct_5byte*)(args[0]);
a2 = *(struct cls_struct_5byte*)(args[1]);
*(cls_struct_5byte*)resp = cls_struct_5byte_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_5byte g_dbl = { 127, 120, 1 };
struct cls_struct_5byte f_dbl = { 12, 128, 9 };
struct cls_struct_5byte res_dbl = { 0, 0, 0 };
cls_struct_fields[0] = &ffi_type_ushort;
cls_struct_fields[1] = &ffi_type_ushort;
cls_struct_fields[2] = &ffi_type_uchar;
cls_struct_fields[3] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_5byte_fn), &res_dbl, args_dbl);
/* { dg-output "127 120 1 12 128 9: 139 248 10" } */
printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 139 248 10" } */
res_dbl.a = 0;
res_dbl.b = 0;
res_dbl.c = 0;
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_5byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_5byte(*)(cls_struct_5byte, cls_struct_5byte))(code))(g_dbl, f_dbl);
/* { dg-output "\n127 120 1 12 128 9: 139 248 10" } */
printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 139 248 10" } */
exit(0);
}
@@ -1,124 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Depending on the ABI. Check bigger struct which overlaps
the gp and fp register count on Darwin/AIX/ppc64.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030828 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_64byte {
double a;
double b;
double c;
double d;
double e;
double f;
double g;
double h;
} cls_struct_64byte;
cls_struct_64byte cls_struct_64byte_fn(struct cls_struct_64byte b0,
struct cls_struct_64byte b1,
struct cls_struct_64byte b2,
struct cls_struct_64byte b3)
{
struct cls_struct_64byte result;
result.a = b0.a + b1.a + b2.a + b3.a;
result.b = b0.b + b1.b + b2.b + b3.b;
result.c = b0.c + b1.c + b2.c + b3.c;
result.d = b0.d + b1.d + b2.d + b3.d;
result.e = b0.e + b1.e + b2.e + b3.e;
result.f = b0.f + b1.f + b2.f + b3.f;
result.g = b0.g + b1.g + b2.g + b3.g;
result.h = b0.h + b1.h + b2.h + b3.h;
printf("%g %g %g %g %g %g %g %g\n", result.a, result.b, result.c,
result.d, result.e, result.f, result.g, result.h);
return result;
}
static void
cls_struct_64byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_64byte b0, b1, b2, b3;
b0 = *(struct cls_struct_64byte*)(args[0]);
b1 = *(struct cls_struct_64byte*)(args[1]);
b2 = *(struct cls_struct_64byte*)(args[2]);
b3 = *(struct cls_struct_64byte*)(args[3]);
*(cls_struct_64byte*)resp = cls_struct_64byte_fn(b0, b1, b2, b3);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[9];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_64byte e_dbl = { 9.0, 2.0, 6.0, 5.0, 3.0, 4.0, 8.0, 1.0 };
struct cls_struct_64byte f_dbl = { 1.0, 2.0, 3.0, 7.0, 2.0, 5.0, 6.0, 7.0 };
struct cls_struct_64byte g_dbl = { 4.0, 5.0, 7.0, 9.0, 1.0, 1.0, 2.0, 9.0 };
struct cls_struct_64byte h_dbl = { 8.0, 6.0, 1.0, 4.0, 0.0, 3.0, 3.0, 1.0 };
struct cls_struct_64byte res_dbl;
cls_struct_fields[0] = &ffi_type_double;
cls_struct_fields[1] = &ffi_type_double;
cls_struct_fields[2] = &ffi_type_double;
cls_struct_fields[3] = &ffi_type_double;
cls_struct_fields[4] = &ffi_type_double;
cls_struct_fields[5] = &ffi_type_double;
cls_struct_fields[6] = &ffi_type_double;
cls_struct_fields[7] = &ffi_type_double;
cls_struct_fields[8] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = &cls_struct_type;
dbl_arg_types[3] = &cls_struct_type;
dbl_arg_types[4] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 4, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &e_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = &g_dbl;
args_dbl[3] = &h_dbl;
args_dbl[4] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_64byte_fn), &res_dbl, args_dbl);
/* { dg-output "22 15 17 25 6 13 19 18" } */
printf("res: %g %g %g %g %g %g %g %g\n", res_dbl.a, res_dbl.b, res_dbl.c,
res_dbl.d, res_dbl.e, res_dbl.f, res_dbl.g, res_dbl.h);
/* { dg-output "\nres: 22 15 17 25 6 13 19 18" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_64byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_64byte(*)(cls_struct_64byte,
cls_struct_64byte,
cls_struct_64byte,
cls_struct_64byte))
(code))(e_dbl, f_dbl, g_dbl, h_dbl);
/* { dg-output "\n22 15 17 25 6 13 19 18" } */
printf("res: %g %g %g %g %g %g %g %g\n", res_dbl.a, res_dbl.b, res_dbl.c,
res_dbl.d, res_dbl.e, res_dbl.f, res_dbl.g, res_dbl.h);
/* { dg-output "\nres: 22 15 17 25 6 13 19 18" } */
exit(0);
}
@@ -1,113 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Depending on the ABI. Check overlapping.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20050708 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_6byte {
unsigned char a;
unsigned char b;
unsigned char c;
unsigned char d;
unsigned char e;
unsigned char f;
} cls_struct_6byte;
cls_struct_6byte cls_struct_6byte_fn(struct cls_struct_6byte a1,
struct cls_struct_6byte a2)
{
struct cls_struct_6byte result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
result.d = a1.d + a2.d;
result.e = a1.e + a2.e;
result.f = a1.f + a2.f;
printf("%d %d %d %d %d %d %d %d %d %d %d %d: %d %d %d %d %d %d\n",
a1.a, a1.b, a1.c, a1.d, a1.e, a1.f,
a2.a, a2.b, a2.c, a2.d, a2.e, a2.f,
result.a, result.b, result.c, result.d, result.e, result.f);
return result;
}
static void
cls_struct_6byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_6byte a1, a2;
a1 = *(struct cls_struct_6byte*)(args[0]);
a2 = *(struct cls_struct_6byte*)(args[1]);
*(cls_struct_6byte*)resp = cls_struct_6byte_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[7];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_6byte g_dbl = { 127, 120, 1, 3, 4, 5 };
struct cls_struct_6byte f_dbl = { 12, 128, 9, 3, 4, 5 };
struct cls_struct_6byte res_dbl = { 0, 0, 0, 0, 0, 0 };
cls_struct_fields[0] = &ffi_type_uchar;
cls_struct_fields[1] = &ffi_type_uchar;
cls_struct_fields[2] = &ffi_type_uchar;
cls_struct_fields[3] = &ffi_type_uchar;
cls_struct_fields[4] = &ffi_type_uchar;
cls_struct_fields[5] = &ffi_type_uchar;
cls_struct_fields[6] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_6byte_fn), &res_dbl, args_dbl);
/* { dg-output "127 120 1 3 4 5 12 128 9 3 4 5: 139 248 10 6 8 10" } */
printf("res: %d %d %d %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c,
res_dbl.d, res_dbl.e, res_dbl.f);
/* { dg-output "\nres: 139 248 10 6 8 10" } */
res_dbl.a = 0;
res_dbl.b = 0;
res_dbl.c = 0;
res_dbl.d = 0;
res_dbl.e = 0;
res_dbl.f = 0;
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_6byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_6byte(*)(cls_struct_6byte, cls_struct_6byte))(code))(g_dbl, f_dbl);
/* { dg-output "\n127 120 1 3 4 5 12 128 9 3 4 5: 139 248 10 6 8 10" } */
printf("res: %d %d %d %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c,
res_dbl.d, res_dbl.e, res_dbl.f);
/* { dg-output "\nres: 139 248 10 6 8 10" } */
exit(0);
}
@@ -1,99 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Depending on the ABI. Check overlapping.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030828 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_6byte {
unsigned short a;
unsigned short b;
unsigned char c;
unsigned char d;
} cls_struct_6byte;
cls_struct_6byte cls_struct_6byte_fn(struct cls_struct_6byte a1,
struct cls_struct_6byte a2)
{
struct cls_struct_6byte result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
result.d = a1.d + a2.d;
printf("%d %d %d %d %d %d %d %d: %d %d %d %d\n", a1.a, a1.b, a1.c, a1.d,
a2.a, a2.b, a2.c, a2.d,
result.a, result.b, result.c, result.d);
return result;
}
static void
cls_struct_6byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_6byte a1, a2;
a1 = *(struct cls_struct_6byte*)(args[0]);
a2 = *(struct cls_struct_6byte*)(args[1]);
*(cls_struct_6byte*)resp = cls_struct_6byte_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[5];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_6byte g_dbl = { 127, 120, 1, 128 };
struct cls_struct_6byte f_dbl = { 12, 128, 9, 127 };
struct cls_struct_6byte res_dbl;
cls_struct_fields[0] = &ffi_type_ushort;
cls_struct_fields[1] = &ffi_type_ushort;
cls_struct_fields[2] = &ffi_type_uchar;
cls_struct_fields[3] = &ffi_type_uchar;
cls_struct_fields[4] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_6byte_fn), &res_dbl, args_dbl);
/* { dg-output "127 120 1 128 12 128 9 127: 139 248 10 255" } */
printf("res: %d %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d);
/* { dg-output "\nres: 139 248 10 255" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_6byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_6byte(*)(cls_struct_6byte, cls_struct_6byte))(code))(g_dbl, f_dbl);
/* { dg-output "\n127 120 1 128 12 128 9 127: 139 248 10 255" } */
printf("res: %d %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d);
/* { dg-output "\nres: 139 248 10 255" } */
exit(0);
}
@@ -1,117 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Depending on the ABI. Check overlapping.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20050708 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_7byte {
unsigned char a;
unsigned char b;
unsigned char c;
unsigned char d;
unsigned char e;
unsigned char f;
unsigned char g;
} cls_struct_7byte;
cls_struct_7byte cls_struct_7byte_fn(struct cls_struct_7byte a1,
struct cls_struct_7byte a2)
{
struct cls_struct_7byte result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
result.d = a1.d + a2.d;
result.e = a1.e + a2.e;
result.f = a1.f + a2.f;
result.g = a1.g + a2.g;
printf("%d %d %d %d %d %d %d %d %d %d %d %d %d %d: %d %d %d %d %d %d %d\n",
a1.a, a1.b, a1.c, a1.d, a1.e, a1.f, a1.g,
a2.a, a2.b, a2.c, a2.d, a2.e, a2.f, a2.g,
result.a, result.b, result.c, result.d, result.e, result.f, result.g);
return result;
}
static void
cls_struct_7byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_7byte a1, a2;
a1 = *(struct cls_struct_7byte*)(args[0]);
a2 = *(struct cls_struct_7byte*)(args[1]);
*(cls_struct_7byte*)resp = cls_struct_7byte_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[8];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_7byte g_dbl = { 127, 120, 1, 3, 4, 5, 6 };
struct cls_struct_7byte f_dbl = { 12, 128, 9, 3, 4, 5, 6 };
struct cls_struct_7byte res_dbl = { 0, 0, 0, 0, 0, 0, 0 };
cls_struct_fields[0] = &ffi_type_uchar;
cls_struct_fields[1] = &ffi_type_uchar;
cls_struct_fields[2] = &ffi_type_uchar;
cls_struct_fields[3] = &ffi_type_uchar;
cls_struct_fields[4] = &ffi_type_uchar;
cls_struct_fields[5] = &ffi_type_uchar;
cls_struct_fields[6] = &ffi_type_uchar;
cls_struct_fields[7] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_7byte_fn), &res_dbl, args_dbl);
/* { dg-output "127 120 1 3 4 5 6 12 128 9 3 4 5 6: 139 248 10 6 8 10 12" } */
printf("res: %d %d %d %d %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c,
res_dbl.d, res_dbl.e, res_dbl.f, res_dbl.g);
/* { dg-output "\nres: 139 248 10 6 8 10 12" } */
res_dbl.a = 0;
res_dbl.b = 0;
res_dbl.c = 0;
res_dbl.d = 0;
res_dbl.e = 0;
res_dbl.f = 0;
res_dbl.g = 0;
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_7byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_7byte(*)(cls_struct_7byte, cls_struct_7byte))(code))(g_dbl, f_dbl);
/* { dg-output "\n127 120 1 3 4 5 6 12 128 9 3 4 5 6: 139 248 10 6 8 10 12" } */
printf("res: %d %d %d %d %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c,
res_dbl.d, res_dbl.e, res_dbl.f, res_dbl.g);
/* { dg-output "\nres: 139 248 10 6 8 10 12" } */
exit(0);
}
@@ -1,97 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Depending on the ABI. Check overlapping.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030828 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_7byte {
unsigned short a;
unsigned short b;
unsigned char c;
unsigned short d;
} cls_struct_7byte;
cls_struct_7byte cls_struct_7byte_fn(struct cls_struct_7byte a1,
struct cls_struct_7byte a2)
{
struct cls_struct_7byte result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
result.d = a1.d + a2.d;
printf("%d %d %d %d %d %d %d %d: %d %d %d %d\n", a1.a, a1.b, a1.c, a1.d,
a2.a, a2.b, a2.c, a2.d,
result.a, result.b, result.c, result.d);
return result;
}
static void
cls_struct_7byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_7byte a1, a2;
a1 = *(struct cls_struct_7byte*)(args[0]);
a2 = *(struct cls_struct_7byte*)(args[1]);
*(cls_struct_7byte*)resp = cls_struct_7byte_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[5];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_7byte g_dbl = { 127, 120, 1, 254 };
struct cls_struct_7byte f_dbl = { 12, 128, 9, 255 };
struct cls_struct_7byte res_dbl;
cls_struct_fields[0] = &ffi_type_ushort;
cls_struct_fields[1] = &ffi_type_ushort;
cls_struct_fields[2] = &ffi_type_uchar;
cls_struct_fields[3] = &ffi_type_ushort;
cls_struct_fields[4] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_7byte_fn), &res_dbl, args_dbl);
/* { dg-output "127 120 1 254 12 128 9 255: 139 248 10 509" } */
printf("res: %d %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d);
/* { dg-output "\nres: 139 248 10 509" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_7byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_7byte(*)(cls_struct_7byte, cls_struct_7byte))(code))(g_dbl, f_dbl);
/* { dg-output "\n127 120 1 254 12 128 9 255: 139 248 10 509" } */
printf("res: %d %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c, res_dbl.d);
/* { dg-output "\nres: 139 248 10 509" } */
exit(0);
}
@@ -1,88 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Depending on the ABI. Check overlapping.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030828 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_8byte {
int a;
float b;
} cls_struct_8byte;
cls_struct_8byte cls_struct_8byte_fn(struct cls_struct_8byte a1,
struct cls_struct_8byte a2)
{
struct cls_struct_8byte result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
printf("%d %g %d %g: %d %g\n", a1.a, a1.b, a2.a, a2.b, result.a, result.b);
return result;
}
static void
cls_struct_8byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_8byte a1, a2;
a1 = *(struct cls_struct_8byte*)(args[0]);
a2 = *(struct cls_struct_8byte*)(args[1]);
*(cls_struct_8byte*)resp = cls_struct_8byte_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_8byte g_dbl = { 1, 2.0 };
struct cls_struct_8byte f_dbl = { 4, 5.0 };
struct cls_struct_8byte res_dbl;
cls_struct_fields[0] = &ffi_type_sint;
cls_struct_fields[1] = &ffi_type_float;
cls_struct_fields[2] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_8byte_fn), &res_dbl, args_dbl);
/* { dg-output "1 2 4 5: 5 7" } */
printf("res: %d %g\n", res_dbl.a, res_dbl.b);
/* { dg-output "\nres: 5 7" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_8byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_8byte(*)(cls_struct_8byte, cls_struct_8byte))(code))(g_dbl, f_dbl);
/* { dg-output "\n1 2 4 5: 5 7" } */
printf("res: %d %g\n", res_dbl.a, res_dbl.b);
/* { dg-output "\nres: 5 7" } */
exit(0);
}
@@ -1,90 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Depending on the ABI. Darwin/AIX do double-word
alignment of the struct if the first element is a double.
Check that it does not here.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030914 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_9byte {
int a;
double b;
} cls_struct_9byte;
cls_struct_9byte cls_struct_9byte_fn(struct cls_struct_9byte b1,
struct cls_struct_9byte b2)
{
struct cls_struct_9byte result;
result.a = b1.a + b2.a;
result.b = b1.b + b2.b;
printf("%d %g %d %g: %d %g\n", b1.a, b1.b, b2.a, b2.b,
result.a, result.b);
return result;
}
static void cls_struct_9byte_gn(ffi_cif* cif __UNUSED__, void* resp,
void** args, void* userdata __UNUSED__)
{
struct cls_struct_9byte b1, b2;
b1 = *(struct cls_struct_9byte*)(args[0]);
b2 = *(struct cls_struct_9byte*)(args[1]);
*(cls_struct_9byte*)resp = cls_struct_9byte_fn(b1, b2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[3];
ffi_type* cls_struct_fields[3];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[3];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_9byte h_dbl = { 7, 8.0};
struct cls_struct_9byte j_dbl = { 1, 9.0};
struct cls_struct_9byte res_dbl;
cls_struct_fields[0] = &ffi_type_sint;
cls_struct_fields[1] = &ffi_type_double;
cls_struct_fields[2] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &h_dbl;
args_dbl[1] = &j_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_9byte_fn), &res_dbl, args_dbl);
/* { dg-output "7 8 1 9: 8 17" } */
printf("res: %d %g\n", res_dbl.a, res_dbl.b);
/* { dg-output "\nres: 8 17" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_9byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_9byte(*)(cls_struct_9byte, cls_struct_9byte))(code))(h_dbl, j_dbl);
/* { dg-output "\n7 8 1 9: 8 17" } */
printf("res: %d %g\n", res_dbl.a, res_dbl.b);
/* { dg-output "\nres: 8 17" } */
exit(0);
}
@@ -1,91 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Depending on the ABI. Darwin/AIX do double-word
alignment of the struct if the first element is a double.
Check that it does here.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030914 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_9byte {
double a;
int b;
} cls_struct_9byte;
cls_struct_9byte cls_struct_9byte_fn(struct cls_struct_9byte b1,
struct cls_struct_9byte b2)
{
struct cls_struct_9byte result;
result.a = b1.a + b2.a;
result.b = b1.b + b2.b;
printf("%g %d %g %d: %g %d\n", b1.a, b1.b, b2.a, b2.b,
result.a, result.b);
return result;
}
static void cls_struct_9byte_gn(ffi_cif* cif __UNUSED__, void* resp,
void** args, void* userdata __UNUSED__)
{
struct cls_struct_9byte b1, b2;
b1 = *(struct cls_struct_9byte*)(args[0]);
b2 = *(struct cls_struct_9byte*)(args[1]);
*(cls_struct_9byte*)resp = cls_struct_9byte_fn(b1, b2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[3];
ffi_type* cls_struct_fields[3];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[3];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_9byte h_dbl = { 7.0, 8};
struct cls_struct_9byte j_dbl = { 1.0, 9};
struct cls_struct_9byte res_dbl;
cls_struct_fields[0] = &ffi_type_double;
cls_struct_fields[1] = &ffi_type_sint;
cls_struct_fields[2] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &h_dbl;
args_dbl[1] = &j_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_9byte_fn), &res_dbl, args_dbl);
/* { dg-output "7 8 1 9: 8 17" } */
printf("res: %g %d\n", res_dbl.a, res_dbl.b);
/* { dg-output "\nres: 8 17" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_9byte_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_9byte(*)(cls_struct_9byte, cls_struct_9byte))(code))(h_dbl, j_dbl);
/* { dg-output "\n7 8 1 9: 8 17" } */
printf("res: %g %d\n", res_dbl.a, res_dbl.b);
/* { dg-output "\nres: 8 17" } */
exit(0);
}
@@ -1,93 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure alignment of double.
Limitations: none.
PR: none.
Originator: <hos@tamanegi.org> 20031203 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_align {
unsigned char a;
double b;
unsigned char c;
} cls_struct_align;
cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
struct cls_struct_align a2)
{
struct cls_struct_align result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
printf("%d %g %d %d %g %d: %d %g %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, result.a, result.b, result.c);
return result;
}
static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_align a1, a2;
a1 = *(struct cls_struct_align*)(args[0]);
a2 = *(struct cls_struct_align*)(args[1]);
*(cls_struct_align*)resp = cls_struct_align_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_align g_dbl = { 12, 4951, 127 };
struct cls_struct_align f_dbl = { 1, 9320, 13 };
struct cls_struct_align res_dbl;
cls_struct_fields[0] = &ffi_type_uchar;
cls_struct_fields[1] = &ffi_type_double;
cls_struct_fields[2] = &ffi_type_uchar;
cls_struct_fields[3] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl);
/* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %g %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_align_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(code))(g_dbl, f_dbl);
/* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %g %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
exit(0);
}
@@ -1,91 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure alignment of float.
Limitations: none.
PR: none.
Originator: <hos@tamanegi.org> 20031203 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_align {
unsigned char a;
float b;
unsigned char c;
} cls_struct_align;
cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
struct cls_struct_align a2)
{
struct cls_struct_align result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
printf("%d %g %d %d %g %d: %d %g %d\n", a1.a, (double)a1.b, a1.c, a2.a, (double)a2.b, a2.c, result.a, (double)result.b, result.c);
return result;
}
static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_align a1, a2;
a1 = *(struct cls_struct_align*)(args[0]);
a2 = *(struct cls_struct_align*)(args[1]);
*(cls_struct_align*)resp = cls_struct_align_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_align g_dbl = { 12, 4951, 127 };
struct cls_struct_align f_dbl = { 1, 9320, 13 };
struct cls_struct_align res_dbl;
cls_struct_fields[0] = &ffi_type_uchar;
cls_struct_fields[1] = &ffi_type_float;
cls_struct_fields[2] = &ffi_type_uchar;
cls_struct_fields[3] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl);
/* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %g %d\n", res_dbl.a, (double)res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_align_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(code))(g_dbl, f_dbl);
/* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %g %d\n", res_dbl.a, (double)res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
exit(0);
}
@@ -1,92 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure alignment of long double.
Limitations: none.
PR: none.
Originator: <hos@tamanegi.org> 20031203 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_align {
unsigned char a;
long double b;
unsigned char c;
} cls_struct_align;
cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
struct cls_struct_align a2)
{
struct cls_struct_align result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
printf("%d %g %d %d %g %d: %d %g %d\n", a1.a, (double)a1.b, a1.c, a2.a, (double)a2.b, a2.c, result.a, (double)result.b, result.c);
return result;
}
static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_align a1, a2;
a1 = *(struct cls_struct_align*)(args[0]);
a2 = *(struct cls_struct_align*)(args[1]);
*(cls_struct_align*)resp = cls_struct_align_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_align g_dbl = { 12, 4951, 127 };
struct cls_struct_align f_dbl = { 1, 9320, 13 };
struct cls_struct_align res_dbl;
cls_struct_fields[0] = &ffi_type_uchar;
cls_struct_fields[1] = &ffi_type_longdouble;
cls_struct_fields[2] = &ffi_type_uchar;
cls_struct_fields[3] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl);
/* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %g %d\n", res_dbl.a, (double)res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_align_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(code))(g_dbl, f_dbl);
/* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %g %d\n", res_dbl.a, (double)res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
exit(0);
}
@@ -1,134 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure alignment of long double.
Limitations: none.
PR: none.
Originator: <hos@tamanegi.org> 20031203 */
/* { dg-excess-errors "no long double format" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
/* { dg-options -mlong-double-128 { target powerpc64*-*-linux* } } */
/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
#include "ffitest.h"
typedef struct cls_struct_align {
long double a;
long double b;
long double c;
long double d;
long double e;
long double f;
long double g;
} cls_struct_align;
cls_struct_align cls_struct_align_fn(
cls_struct_align a1,
cls_struct_align a2)
{
struct cls_struct_align r;
r.a = a1.a + a2.a;
r.b = a1.b + a2.b;
r.c = a1.c + a2.c;
r.d = a1.d + a2.d;
r.e = a1.e + a2.e;
r.f = a1.f + a2.f;
r.g = a1.g + a2.g;
printf("%Lg %Lg %Lg %Lg %Lg %Lg %Lg %Lg %Lg %Lg %Lg %Lg %Lg %Lg: "
"%Lg %Lg %Lg %Lg %Lg %Lg %Lg\n",
a1.a, a1.b, a1.c, a1.d, a1.e, a1.f, a1.g,
a2.a, a2.b, a2.c, a2.d, a2.e, a2.f, a2.g,
r.a, r.b, r.c, r.d, r.e, r.f, r.g);
return r;
}
cls_struct_align cls_struct_align_fn2(
cls_struct_align a1)
{
struct cls_struct_align r;
r.a = a1.a + 1;
r.b = a1.b + 1;
r.c = a1.c + 1;
r.d = a1.d + 1;
r.e = a1.e + 1;
r.f = a1.f + 1;
r.g = a1.g + 1;
printf("%Lg %Lg %Lg %Lg %Lg %Lg %Lg: "
"%Lg %Lg %Lg %Lg %Lg %Lg %Lg\n",
a1.a, a1.b, a1.c, a1.d, a1.e, a1.f, a1.g,
r.a, r.b, r.c, r.d, r.e, r.f, r.g);
return r;
}
static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_align a1, a2;
a1 = *(struct cls_struct_align*)(args[0]);
a2 = *(struct cls_struct_align*)(args[1]);
*(cls_struct_align*)resp = cls_struct_align_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[3];
ffi_type* cls_struct_fields[8];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[3];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_align g_dbl = { 1, 2, 3, 4, 5, 6, 7 };
struct cls_struct_align f_dbl = { 8, 9, 10, 11, 12, 13, 14 };
struct cls_struct_align res_dbl;
cls_struct_fields[0] = &ffi_type_longdouble;
cls_struct_fields[1] = &ffi_type_longdouble;
cls_struct_fields[2] = &ffi_type_longdouble;
cls_struct_fields[3] = &ffi_type_longdouble;
cls_struct_fields[4] = &ffi_type_longdouble;
cls_struct_fields[5] = &ffi_type_longdouble;
cls_struct_fields[6] = &ffi_type_longdouble;
cls_struct_fields[7] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl);
/* { dg-output "1 2 3 4 5 6 7 8 9 10 11 12 13 14: 9 11 13 15 17 19 21" } */
printf("res: %Lg %Lg %Lg %Lg %Lg %Lg %Lg\n", res_dbl.a, res_dbl.b,
res_dbl.c, res_dbl.d, res_dbl.e, res_dbl.f, res_dbl.g);
/* { dg-output "\nres: 9 11 13 15 17 19 21" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_align_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(code))(g_dbl, f_dbl);
/* { dg-output "\n1 2 3 4 5 6 7 8 9 10 11 12 13 14: 9 11 13 15 17 19 21" } */
printf("res: %Lg %Lg %Lg %Lg %Lg %Lg %Lg\n", res_dbl.a, res_dbl.b,
res_dbl.c, res_dbl.d, res_dbl.e, res_dbl.f, res_dbl.g);
/* { dg-output "\nres: 9 11 13 15 17 19 21" } */
exit(0);
}
@@ -1,117 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure alignment of long double.
Limitations: none.
PR: none.
Originator: Blake Chaffin 6/18/2007
*/
/* { dg-excess-errors "no long double format" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
/* { dg-do run { xfail strongarm*-*-* } } */
/* { dg-options -mlong-double-128 { target powerpc64*-*-linux* } } */
/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
#include "ffitest.h"
typedef struct cls_struct_align {
long double a;
long double b;
long double c;
long double d;
long double e;
double f;
long double g;
} cls_struct_align;
cls_struct_align cls_struct_align_fn(
cls_struct_align a1,
cls_struct_align a2)
{
struct cls_struct_align r;
r.a = a1.a + a2.a;
r.b = a1.b + a2.b;
r.c = a1.c + a2.c;
r.d = a1.d + a2.d;
r.e = a1.e + a2.e;
r.f = a1.f + a2.f;
r.g = a1.g + a2.g;
printf("%Lg %Lg %Lg %Lg %Lg %g %Lg %Lg %Lg %Lg %Lg %Lg %g %Lg: "
"%Lg %Lg %Lg %Lg %Lg %g %Lg\n",
a1.a, a1.b, a1.c, a1.d, a1.e, a1.f, a1.g,
a2.a, a2.b, a2.c, a2.d, a2.e, a2.f, a2.g,
r.a, r.b, r.c, r.d, r.e, r.f, r.g);
return r;
}
static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_align a1, a2;
a1 = *(struct cls_struct_align*)(args[0]);
a2 = *(struct cls_struct_align*)(args[1]);
*(cls_struct_align*)resp = cls_struct_align_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[3];
ffi_type* cls_struct_fields[8];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[3];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_align g_dbl = { 1, 2, 3, 4, 5, 6, 7 };
struct cls_struct_align f_dbl = { 8, 9, 10, 11, 12, 13, 14 };
struct cls_struct_align res_dbl;
cls_struct_fields[0] = &ffi_type_longdouble;
cls_struct_fields[1] = &ffi_type_longdouble;
cls_struct_fields[2] = &ffi_type_longdouble;
cls_struct_fields[3] = &ffi_type_longdouble;
cls_struct_fields[4] = &ffi_type_longdouble;
cls_struct_fields[5] = &ffi_type_double;
cls_struct_fields[6] = &ffi_type_longdouble;
cls_struct_fields[7] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl);
/* { dg-output "1 2 3 4 5 6 7 8 9 10 11 12 13 14: 9 11 13 15 17 19 21" } */
printf("res: %Lg %Lg %Lg %Lg %Lg %g %Lg\n", res_dbl.a, res_dbl.b,
res_dbl.c, res_dbl.d, res_dbl.e, res_dbl.f, res_dbl.g);
/* { dg-output "\nres: 9 11 13 15 17 19 21" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_align_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(code))(g_dbl, f_dbl);
/* { dg-output "\n1 2 3 4 5 6 7 8 9 10 11 12 13 14: 9 11 13 15 17 19 21" } */
printf("res: %Lg %Lg %Lg %Lg %Lg %g %Lg\n", res_dbl.a, res_dbl.b,
res_dbl.c, res_dbl.d, res_dbl.e, res_dbl.f, res_dbl.g);
/* { dg-output "\nres: 9 11 13 15 17 19 21" } */
exit(0);
}
@@ -1,95 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure alignment of pointer.
Limitations: none.
PR: none.
Originator: <hos@tamanegi.org> 20031203 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_align {
unsigned char a;
void *b;
unsigned char c;
} cls_struct_align;
cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
struct cls_struct_align a2)
{
struct cls_struct_align result;
result.a = a1.a + a2.a;
result.b = (void *)((uintptr_t)a1.b + (uintptr_t)a2.b);
result.c = a1.c + a2.c;
printf("%d %" PRIuPTR " %d %d %" PRIuPTR " %d: %d %" PRIuPTR " %d\n",
a1.a, (uintptr_t)a1.b, a1.c,
a2.a, (uintptr_t)a2.b, a2.c,
result.a, (uintptr_t)result.b,
result.c);
return result;
}
static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_align a1, a2;
a1 = *(struct cls_struct_align*)(args[0]);
a2 = *(struct cls_struct_align*)(args[1]);
*(cls_struct_align*)resp = cls_struct_align_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_align g_dbl = { 12, (void *)4951, 127 };
struct cls_struct_align f_dbl = { 1, (void *)9320, 13 };
struct cls_struct_align res_dbl;
cls_struct_fields[0] = &ffi_type_uchar;
cls_struct_fields[1] = &ffi_type_pointer;
cls_struct_fields[2] = &ffi_type_uchar;
cls_struct_fields[3] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl);
/* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %" PRIuPTR " %d\n", res_dbl.a, (uintptr_t)res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_align_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(code))(g_dbl, f_dbl);
/* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %" PRIuPTR " %d\n", res_dbl.a, (uintptr_t)res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
exit(0);
}
@@ -1,91 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure alignment of sint16.
Limitations: none.
PR: none.
Originator: <hos@tamanegi.org> 20031203 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_align {
unsigned char a;
signed short b;
unsigned char c;
} cls_struct_align;
cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
struct cls_struct_align a2)
{
struct cls_struct_align result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
printf("%d %d %d %d %d %d: %d %d %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, result.a, result.b, result.c);
return result;
}
static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_align a1, a2;
a1 = *(struct cls_struct_align*)(args[0]);
a2 = *(struct cls_struct_align*)(args[1]);
*(cls_struct_align*)resp = cls_struct_align_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_align g_dbl = { 12, 4951, 127 };
struct cls_struct_align f_dbl = { 1, 9320, 13 };
struct cls_struct_align res_dbl;
cls_struct_fields[0] = &ffi_type_uchar;
cls_struct_fields[1] = &ffi_type_sshort;
cls_struct_fields[2] = &ffi_type_uchar;
cls_struct_fields[3] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl);
/* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_align_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(code))(g_dbl, f_dbl);
/* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
exit(0);
}
@@ -1,91 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure alignment of sint32.
Limitations: none.
PR: none.
Originator: <hos@tamanegi.org> 20031203 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_align {
unsigned char a;
signed int b;
unsigned char c;
} cls_struct_align;
cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
struct cls_struct_align a2)
{
struct cls_struct_align result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
printf("%d %d %d %d %d %d: %d %d %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, result.a, result.b, result.c);
return result;
}
static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_align a1, a2;
a1 = *(struct cls_struct_align*)(args[0]);
a2 = *(struct cls_struct_align*)(args[1]);
*(cls_struct_align*)resp = cls_struct_align_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_align g_dbl = { 12, 4951, 127 };
struct cls_struct_align f_dbl = { 1, 9320, 13 };
struct cls_struct_align res_dbl;
cls_struct_fields[0] = &ffi_type_uchar;
cls_struct_fields[1] = &ffi_type_sint;
cls_struct_fields[2] = &ffi_type_uchar;
cls_struct_fields[3] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl);
/* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_align_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(code))(g_dbl, f_dbl);
/* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
exit(0);
}
@@ -1,92 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure alignment of sint64.
Limitations: none.
PR: none.
Originator: <hos@tamanegi.org> 20031203 */
/* { dg-do run } */
/* { dg-options "-Wno-format" { target alpha*-dec-osf* } } */
#include "ffitest.h"
typedef struct cls_struct_align {
unsigned char a;
signed long long b;
unsigned char c;
} cls_struct_align;
cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
struct cls_struct_align a2)
{
struct cls_struct_align result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
printf("%d %" PRIdLL " %d %d %" PRIdLL " %d: %d %" PRIdLL " %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, result.a, result.b, result.c);
return result;
}
static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_align a1, a2;
a1 = *(struct cls_struct_align*)(args[0]);
a2 = *(struct cls_struct_align*)(args[1]);
*(cls_struct_align*)resp = cls_struct_align_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_align g_dbl = { 12, 4951, 127 };
struct cls_struct_align f_dbl = { 1, 9320, 13 };
struct cls_struct_align res_dbl;
cls_struct_fields[0] = &ffi_type_uchar;
cls_struct_fields[1] = &ffi_type_sint64;
cls_struct_fields[2] = &ffi_type_uchar;
cls_struct_fields[3] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl);
/* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %" PRIdLL " %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_align_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(code))(g_dbl, f_dbl);
/* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %" PRIdLL " %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
exit(0);
}
@@ -1,91 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure alignment of uint16.
Limitations: none.
PR: none.
Originator: <hos@tamanegi.org> 20031203 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_align {
unsigned char a;
unsigned short b;
unsigned char c;
} cls_struct_align;
cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
struct cls_struct_align a2)
{
struct cls_struct_align result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
printf("%d %d %d %d %d %d: %d %d %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, result.a, result.b, result.c);
return result;
}
static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_align a1, a2;
a1 = *(struct cls_struct_align*)(args[0]);
a2 = *(struct cls_struct_align*)(args[1]);
*(cls_struct_align*)resp = cls_struct_align_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_align g_dbl = { 12, 4951, 127 };
struct cls_struct_align f_dbl = { 1, 9320, 13 };
struct cls_struct_align res_dbl;
cls_struct_fields[0] = &ffi_type_uchar;
cls_struct_fields[1] = &ffi_type_ushort;
cls_struct_fields[2] = &ffi_type_uchar;
cls_struct_fields[3] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl);
/* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_align_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(code))(g_dbl, f_dbl);
/* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
exit(0);
}
@@ -1,91 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure alignment of uint32.
Limitations: none.
PR: none.
Originator: <hos@tamanegi.org> 20031203 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_align {
unsigned char a;
unsigned int b;
unsigned char c;
} cls_struct_align;
cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
struct cls_struct_align a2)
{
struct cls_struct_align result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
printf("%d %d %d %d %d %d: %d %d %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, result.a, result.b, result.c);
return result;
}
static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_align a1, a2;
a1 = *(struct cls_struct_align*)(args[0]);
a2 = *(struct cls_struct_align*)(args[1]);
*(cls_struct_align*)resp = cls_struct_align_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_align g_dbl = { 12, 4951, 127 };
struct cls_struct_align f_dbl = { 1, 9320, 13 };
struct cls_struct_align res_dbl;
cls_struct_fields[0] = &ffi_type_uchar;
cls_struct_fields[1] = &ffi_type_uint;
cls_struct_fields[2] = &ffi_type_uchar;
cls_struct_fields[3] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl);
/* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_align_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(code))(g_dbl, f_dbl);
/* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %d %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
exit(0);
}
@@ -1,93 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure alignment of uint64.
Limitations: none.
PR: none.
Originator: <hos@tamanegi.org> 20031203 */
/* { dg-do run } */
/* { dg-options "-Wno-format" { target alpha*-dec-osf* } } */
#include "ffitest.h"
typedef struct cls_struct_align {
unsigned char a;
unsigned long long b;
unsigned char c;
} cls_struct_align;
cls_struct_align cls_struct_align_fn(struct cls_struct_align a1,
struct cls_struct_align a2)
{
struct cls_struct_align result;
result.a = a1.a + a2.a;
result.b = a1.b + a2.b;
result.c = a1.c + a2.c;
printf("%d %" PRIdLL " %d %d %" PRIdLL " %d: %d %" PRIdLL " %d\n", a1.a, a1.b, a1.c, a2.a, a2.b, a2.c, result.a, result.b, result.c);
return result;
}
static void
cls_struct_align_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_align a1, a2;
a1 = *(struct cls_struct_align*)(args[0]);
a2 = *(struct cls_struct_align*)(args[1]);
*(cls_struct_align*)resp = cls_struct_align_fn(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[4];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct cls_struct_align g_dbl = { 12, 4951, 127 };
struct cls_struct_align f_dbl = { 1, 9320, 13 };
struct cls_struct_align res_dbl;
cls_struct_fields[0] = &ffi_type_uchar;
cls_struct_fields[1] = &ffi_type_uint64;
cls_struct_fields[2] = &ffi_type_uchar;
cls_struct_fields[3] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &g_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_dbl, args_dbl);
/* { dg-output "12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %" PRIdLL " %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_align_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(code))(g_dbl, f_dbl);
/* { dg-output "\n12 4951 127 1 9320 13: 13 14271 140" } */
printf("res: %d %" PRIdLL " %d\n", res_dbl.a, res_dbl.b, res_dbl.c);
/* { dg-output "\nres: 13 14271 140" } */
exit(0);
}
@@ -1,66 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check double arguments in structs.
Limitations: none.
PR: none.
Originator: Blake Chaffin 6/23/2007 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct Dbls {
double x;
double y;
} Dbls;
void
closure_test_fn(Dbls p)
{
printf("%.1f %.1f\n", p.x, p.y);
}
void
closure_test_gn(ffi_cif* cif __UNUSED__, void* resp __UNUSED__,
void** args, void* userdata __UNUSED__)
{
closure_test_fn(*(Dbls*)args[0]);
}
int main(int argc __UNUSED__, char** argv __UNUSED__)
{
ffi_cif cif;
void *code;
ffi_closure* pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
ffi_type* cl_arg_types[1];
ffi_type ts1_type;
ffi_type* ts1_type_elements[4];
ts1_type.size = 0;
ts1_type.alignment = 0;
ts1_type.type = FFI_TYPE_STRUCT;
ts1_type.elements = ts1_type_elements;
ts1_type_elements[0] = &ffi_type_double;
ts1_type_elements[1] = &ffi_type_double;
ts1_type_elements[2] = NULL;
cl_arg_types[0] = &ts1_type;
Dbls arg = { 1.0, 2.0 };
/* Initialize the cif */
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1,
&ffi_type_void, cl_arg_types) == FFI_OK);
CHECK(ffi_prep_closure_loc(pcl, &cif, closure_test_gn, NULL, code) == FFI_OK);
((void*(*)(Dbls))(code))(arg);
/* { dg-output "1.0 2.0\n" } */
closure_test_fn(arg);
/* { dg-output "1.0 2.0\n" } */
return 0;
}
@@ -1,140 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check pointer arguments across multiple hideous stack frames.
Limitations: none.
PR: none.
Originator: Blake Chaffin 6/7/2007 */
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
#include "ffitest.h"
static long dummyVar;
long dummy_func(
long double a1, char b1,
long double a2, char b2,
long double a3, char b3,
long double a4, char b4)
{
return a1 + b1 + a2 + b2 + a3 + b3 + a4 + b4;
}
void* cls_pointer_fn2(void* a1, void* a2)
{
long double trample1 = (intptr_t)a1 + (intptr_t)a2;
char trample2 = ((char*)&a1)[0] + ((char*)&a2)[0];
long double trample3 = (intptr_t)trample1 + (intptr_t)a1;
char trample4 = trample2 + ((char*)&a1)[1];
long double trample5 = (intptr_t)trample3 + (intptr_t)a2;
char trample6 = trample4 + ((char*)&a2)[1];
long double trample7 = (intptr_t)trample5 + (intptr_t)trample1;
char trample8 = trample6 + trample2;
dummyVar = dummy_func(trample1, trample2, trample3, trample4,
trample5, trample6, trample7, trample8);
void* result = (void*)((intptr_t)a1 + (intptr_t)a2);
printf("0x%08x 0x%08x: 0x%08x\n",
(unsigned int)(uintptr_t) a1,
(unsigned int)(uintptr_t) a2,
(unsigned int)(uintptr_t) result);
return result;
}
void* cls_pointer_fn1(void* a1, void* a2)
{
long double trample1 = (intptr_t)a1 + (intptr_t)a2;
char trample2 = ((char*)&a1)[0] + ((char*)&a2)[0];
long double trample3 = (intptr_t)trample1 + (intptr_t)a1;
char trample4 = trample2 + ((char*)&a1)[1];
long double trample5 = (intptr_t)trample3 + (intptr_t)a2;
char trample6 = trample4 + ((char*)&a2)[1];
long double trample7 = (intptr_t)trample5 + (intptr_t)trample1;
char trample8 = trample6 + trample2;
dummyVar = dummy_func(trample1, trample2, trample3, trample4,
trample5, trample6, trample7, trample8);
void* result = (void*)((intptr_t)a1 + (intptr_t)a2);
printf("0x%08x 0x%08x: 0x%08x\n",
(unsigned int)(intptr_t) a1,
(unsigned int)(intptr_t) a2,
(unsigned int)(intptr_t) result);
result = cls_pointer_fn2(result, a1);
return result;
}
static void
cls_pointer_gn(ffi_cif* cif __UNUSED__, void* resp,
void** args, void* userdata __UNUSED__)
{
void* a1 = *(void**)(args[0]);
void* a2 = *(void**)(args[1]);
long double trample1 = (intptr_t)a1 + (intptr_t)a2;
char trample2 = ((char*)&a1)[0] + ((char*)&a2)[0];
long double trample3 = (intptr_t)trample1 + (intptr_t)a1;
char trample4 = trample2 + ((char*)&a1)[1];
long double trample5 = (intptr_t)trample3 + (intptr_t)a2;
char trample6 = trample4 + ((char*)&a2)[1];
long double trample7 = (intptr_t)trample5 + (intptr_t)trample1;
char trample8 = trample6 + trample2;
dummyVar = dummy_func(trample1, trample2, trample3, trample4,
trample5, trample6, trample7, trample8);
*(void**)resp = cls_pointer_fn1(a1, a2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure* pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args[3];
// ffi_type cls_pointer_type;
ffi_type* arg_types[3];
/* cls_pointer_type.size = sizeof(void*);
cls_pointer_type.alignment = 0;
cls_pointer_type.type = FFI_TYPE_POINTER;
cls_pointer_type.elements = NULL;*/
void* arg1 = (void*)0x01234567;
void* arg2 = (void*)0x89abcdef;
ffi_arg res = 0;
arg_types[0] = &ffi_type_pointer;
arg_types[1] = &ffi_type_pointer;
arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &ffi_type_pointer,
arg_types) == FFI_OK);
args[0] = &arg1;
args[1] = &arg2;
args[2] = NULL;
printf("\n");
ffi_call(&cif, FFI_FN(cls_pointer_fn1), &res, args);
printf("res: 0x%08x\n", (unsigned int) res);
// { dg-output "\n0x01234567 0x89abcdef: 0x8acf1356" }
// { dg-output "\n0x8acf1356 0x01234567: 0x8bf258bd" }
// { dg-output "\nres: 0x8bf258bd" }
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_pointer_gn, NULL, code) == FFI_OK);
res = (ffi_arg)(uintptr_t)((void*(*)(void*, void*))(code))(arg1, arg2);
printf("res: 0x%08x\n", (unsigned int) res);
// { dg-output "\n0x01234567 0x89abcdef: 0x8acf1356" }
// { dg-output "\n0x8acf1356 0x01234567: 0x8bf258bd" }
// { dg-output "\nres: 0x8bf258bd" }
exit(0);
}
@@ -1,26 +0,0 @@
/* Area: ffi_prep_cif
Purpose: Test error return for bad typedefs.
Limitations: none.
PR: none.
Originator: Blake Chaffin 6/6/2007 */
/* { dg-do run } */
#include "ffitest.h"
int main (void)
{
ffi_cif cif;
ffi_type* arg_types[1];
arg_types[0] = NULL;
ffi_type badType = ffi_type_void;
badType.size = 0;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 0, &badType,
arg_types) == FFI_BAD_TYPEDEF);
exit(0);
}
@@ -1,50 +0,0 @@
/* Area: ffi_call
Purpose: Check fastcall fct call on X86_WIN32 systems.
Limitations: none.
PR: none.
Originator: From the original ffitest.c */
/* { dg-do run { target i?86-*-cygwin* i?86-*-mingw* } } */
#include "ffitest.h"
static size_t __attribute__((fastcall)) my_fastcall_f(char *s, float a)
{
return (size_t) ((int) strlen(s) + (int) a);
}
int main (void)
{
ffi_cif cif;
ffi_type *args[MAX_ARGS];
void *values[MAX_ARGS];
ffi_arg rint;
char *s;
float v2;
args[0] = &ffi_type_pointer;
args[1] = &ffi_type_float;
values[0] = (void*) &s;
values[1] = (void*) &v2;
/* Initialize the cif */
CHECK(ffi_prep_cif(&cif, FFI_FASTCALL, 2,
&ffi_type_sint, args) == FFI_OK);
s = "a";
v2 = 0.0;
ffi_call(&cif, FFI_FN(my_fastcall_f), &rint, values);
CHECK(rint == 1);
s = "1234567";
v2 = -1.0;
ffi_call(&cif, FFI_FN(my_fastcall_f), &rint, values);
CHECK(rint == 6);
s = "1234567890123456789012345";
v2 = 1.0;
ffi_call(&cif, FFI_FN(my_fastcall_f), &rint, values);
CHECK(rint == 26);
printf("fastcall fct1 tests passed\n");
exit(0);
}
@@ -1,50 +0,0 @@
/* Area: ffi_call
Purpose: Check fastcall fct call on X86_WIN32 systems.
Limitations: none.
PR: none.
Originator: From the original ffitest.c */
/* { dg-do run { target i?86-*-cygwin* i?86-*-mingw* } } */
#include "ffitest.h"
static size_t __attribute__((fastcall)) my_fastcall_f(float a, char *s)
{
return (size_t) ((int) strlen(s) + (int) a);
}
int main (void)
{
ffi_cif cif;
ffi_type *args[MAX_ARGS];
void *values[MAX_ARGS];
ffi_arg rint;
char *s;
float v2;
args[1] = &ffi_type_pointer;
args[0] = &ffi_type_float;
values[1] = (void*) &s;
values[0] = (void*) &v2;
/* Initialize the cif */
CHECK(ffi_prep_cif(&cif, FFI_FASTCALL, 2,
&ffi_type_sint, args) == FFI_OK);
s = "a";
v2 = 0.0;
ffi_call(&cif, FFI_FN(my_fastcall_f), &rint, values);
CHECK(rint == 1);
s = "1234567";
v2 = -1.0;
ffi_call(&cif, FFI_FN(my_fastcall_f), &rint, values);
CHECK(rint == 6);
s = "1234567890123456789012345";
v2 = 1.0;
ffi_call(&cif, FFI_FN(my_fastcall_f), &rint, values);
CHECK(rint == 26);
printf("fastcall fct2 tests passed\n");
exit(0);
}
@@ -1,56 +0,0 @@
/* Area: ffi_call
Purpose: Check fastcall f call on X86_WIN32 systems.
Limitations: none.
PR: none.
Originator: From the original ffitest.c */
/* { dg-do run { target i?86-*-cygwin* i?86-*-mingw* } } */
#include "ffitest.h"
static size_t __attribute__((fastcall)) my_fastcall_f(float a, char *s, int i)
{
return (size_t) ((int) strlen(s) + (int) a + i);
}
int main (void)
{
ffi_cif cif;
ffi_type *args[MAX_ARGS];
void *values[MAX_ARGS];
ffi_arg rint;
char *s;
int v1;
float v2;
args[2] = &ffi_type_sint;
args[1] = &ffi_type_pointer;
args[0] = &ffi_type_float;
values[2] = (void*) &v1;
values[1] = (void*) &s;
values[0] = (void*) &v2;
/* Initialize the cif */
CHECK(ffi_prep_cif(&cif, FFI_FASTCALL, 3,
&ffi_type_sint, args) == FFI_OK);
s = "a";
v1 = 1;
v2 = 0.0;
ffi_call(&cif, FFI_FN(my_fastcall_f), &rint, values);
CHECK(rint == 2);
s = "1234567";
v2 = -1.0;
v1 = -2;
ffi_call(&cif, FFI_FN(my_fastcall_f), &rint, values);
CHECK(rint == 4);
s = "1234567890123456789012345";
v2 = 1.0;
v1 = 2;
ffi_call(&cif, FFI_FN(my_fastcall_f), &rint, values);
CHECK(rint == 28);
printf("fastcall fct3 tests passed\n");
exit(0);
}
@@ -1,153 +0,0 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <ffi.h>
#include "fficonfig.h"
#if defined HAVE_STDINT_H
#include <stdint.h>
#endif
#if defined HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#define MAX_ARGS 256
#define CHECK(x) !(x) ? abort() : 0
/* Define __UNUSED__ that also other compilers than gcc can run the tests. */
#undef __UNUSED__
#if defined(__GNUC__)
#define __UNUSED__ __attribute__((__unused__))
#else
#define __UNUSED__
#endif
/* Prefer MAP_ANON(YMOUS) to /dev/zero, since we don't need to keep a
file open. */
#ifdef HAVE_MMAP_ANON
# undef HAVE_MMAP_DEV_ZERO
# include <sys/mman.h>
# ifndef MAP_FAILED
# define MAP_FAILED -1
# endif
# if !defined (MAP_ANONYMOUS) && defined (MAP_ANON)
# define MAP_ANONYMOUS MAP_ANON
# endif
# define USING_MMAP
#endif
#ifdef HAVE_MMAP_DEV_ZERO
# include <sys/mman.h>
# ifndef MAP_FAILED
# define MAP_FAILED -1
# endif
# define USING_MMAP
#endif
/* MinGW kludge. */
#ifdef _WIN64
#define PRIdLL "I64d"
#define PRIuLL "I64u"
#else
#define PRIdLL "lld"
#define PRIuLL "llu"
#endif
/* Tru64 UNIX kludge. */
#if defined(__alpha__) && defined(__osf__)
/* Tru64 UNIX V4.0 doesn't support %lld/%lld, but long is 64-bit. */
#undef PRIdLL
#define PRIdLL "ld"
#undef PRIuLL
#define PRIuLL "lu"
#define PRId8 "hd"
#define PRIu8 "hu"
#define PRId64 "ld"
#define PRIu64 "lu"
#define PRIuPTR "lu"
#endif
/* PA HP-UX kludge. */
#if defined(__hppa__) && defined(__hpux__) && !defined(PRIuPTR)
#define PRIuPTR "lu"
#endif
/* IRIX kludge. */
#if defined(__sgi)
/* IRIX 6.5 <inttypes.h> provides all definitions, but only for C99
compilations. */
#define PRId8 "hhd"
#define PRIu8 "hhu"
#if (_MIPS_SZLONG == 32)
#define PRId64 "lld"
#define PRIu64 "llu"
#endif
/* This doesn't match <inttypes.h>, which always has "lld" here, but the
arguments are uint64_t, int64_t, which are unsigned long, long for
64-bit in <sgidefs.h>. */
#if (_MIPS_SZLONG == 64)
#define PRId64 "ld"
#define PRIu64 "lu"
#endif
/* This doesn't match <inttypes.h>, which has "u" here, but the arguments
are uintptr_t, which is always unsigned long. */
#define PRIuPTR "lu"
#endif
/* Solaris < 10 kludge. */
#if defined(__sun__) && defined(__svr4__) && !defined(PRIuPTR)
#if defined(__arch64__) || defined (__x86_64__)
#define PRIuPTR "lu"
#else
#define PRIuPTR "u"
#endif
#endif
#ifdef USING_MMAP
static inline void *
allocate_mmap (size_t size)
{
void *page;
#if defined (HAVE_MMAP_DEV_ZERO)
static int dev_zero_fd = -1;
#endif
#ifdef HAVE_MMAP_DEV_ZERO
if (dev_zero_fd == -1)
{
dev_zero_fd = open ("/dev/zero", O_RDONLY);
if (dev_zero_fd == -1)
{
perror ("open /dev/zero: %m");
exit (1);
}
}
#endif
#ifdef HAVE_MMAP_ANON
page = mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
#endif
#ifdef HAVE_MMAP_DEV_ZERO
page = mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_PRIVATE, dev_zero_fd, 0);
#endif
if (page == (void *) MAP_FAILED)
{
perror ("virtual memory exhausted");
exit (1);
}
return page;
}
#endif
@@ -1,342 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check large structure returns.
Limitations: none.
PR: none.
Originator: Blake Chaffin 6/18/2007
*/
/* { dg-excess-errors "" { target x86_64-*-mingw* x86_64-*-cygwin* } } */
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
/* { dg-options -mlong-double-128 { target powerpc64*-*-linux* } } */
/* { dg-output "" { xfail x86_64-*-mingw* x86_64-*-cygwin* } } */
#include "ffitest.h"
typedef struct BigStruct{
uint8_t a;
int8_t b;
uint16_t c;
int16_t d;
uint32_t e;
int32_t f;
uint64_t g;
int64_t h;
float i;
double j;
long double k;
char* l;
uint8_t m;
int8_t n;
uint16_t o;
int16_t p;
uint32_t q;
int32_t r;
uint64_t s;
int64_t t;
float u;
double v;
long double w;
char* x;
uint8_t y;
int8_t z;
uint16_t aa;
int16_t bb;
uint32_t cc;
int32_t dd;
uint64_t ee;
int64_t ff;
float gg;
double hh;
long double ii;
char* jj;
uint8_t kk;
int8_t ll;
uint16_t mm;
int16_t nn;
uint32_t oo;
int32_t pp;
uint64_t qq;
int64_t rr;
float ss;
double tt;
long double uu;
char* vv;
uint8_t ww;
int8_t xx;
} BigStruct;
BigStruct
test_large_fn(
uint8_t ui8_1,
int8_t si8_1,
uint16_t ui16_1,
int16_t si16_1,
uint32_t ui32_1,
int32_t si32_1,
uint64_t ui64_1,
int64_t si64_1,
float f_1,
double d_1,
long double ld_1,
char* p_1,
uint8_t ui8_2,
int8_t si8_2,
uint16_t ui16_2,
int16_t si16_2,
uint32_t ui32_2,
int32_t si32_2,
uint64_t ui64_2,
int64_t si64_2,
float f_2,
double d_2,
long double ld_2,
char* p_2,
uint8_t ui8_3,
int8_t si8_3,
uint16_t ui16_3,
int16_t si16_3,
uint32_t ui32_3,
int32_t si32_3,
uint64_t ui64_3,
int64_t si64_3,
float f_3,
double d_3,
long double ld_3,
char* p_3,
uint8_t ui8_4,
int8_t si8_4,
uint16_t ui16_4,
int16_t si16_4,
uint32_t ui32_4,
int32_t si32_4,
uint64_t ui64_4,
int64_t si64_4,
float f_4,
double d_4,
long double ld_4,
char* p_4,
uint8_t ui8_5,
int8_t si8_5)
{
BigStruct retVal = {
ui8_1 + 1, si8_1 + 1, ui16_1 + 1, si16_1 + 1, ui32_1 + 1, si32_1 + 1,
ui64_1 + 1, si64_1 + 1, f_1 + 1, d_1 + 1, ld_1 + 1, (char*)((intptr_t)p_1 + 1),
ui8_2 + 2, si8_2 + 2, ui16_2 + 2, si16_2 + 2, ui32_2 + 2, si32_2 + 2,
ui64_2 + 2, si64_2 + 2, f_2 + 2, d_2 + 2, ld_2 + 2, (char*)((intptr_t)p_2 + 2),
ui8_3 + 3, si8_3 + 3, ui16_3 + 3, si16_3 + 3, ui32_3 + 3, si32_3 + 3,
ui64_3 + 3, si64_3 + 3, f_3 + 3, d_3 + 3, ld_3 + 3, (char*)((intptr_t)p_3 + 3),
ui8_4 + 4, si8_4 + 4, ui16_4 + 4, si16_4 + 4, ui32_4 + 4, si32_4 + 4,
ui64_4 + 4, si64_4 + 4, f_4 + 4, d_4 + 4, ld_4 + 4, (char*)((intptr_t)p_4 + 4),
ui8_5 + 5, si8_5 + 5};
printf("%" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx "
"%" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx "
"%" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx "
"%" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx %" PRIu8 " %" PRId8 ": "
"%" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx "
"%" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx "
"%" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx "
"%" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx %" PRIu8 " %" PRId8 "\n",
ui8_1, si8_1, ui16_1, si16_1, ui32_1, si32_1, ui64_1, si64_1, f_1, d_1, ld_1, (unsigned long)p_1,
ui8_2, si8_2, ui16_2, si16_2, ui32_2, si32_2, ui64_2, si64_2, f_2, d_2, ld_2, (unsigned long)p_2,
ui8_3, si8_3, ui16_3, si16_3, ui32_3, si32_3, ui64_3, si64_3, f_3, d_3, ld_3, (unsigned long)p_3,
ui8_4, si8_4, ui16_4, si16_4, ui32_4, si32_4, ui64_4, si64_4, f_4, d_4, ld_4, (unsigned long)p_4, ui8_5, si8_5,
retVal.a, retVal.b, retVal.c, retVal.d, retVal.e, retVal.f,
retVal.g, retVal.h, retVal.i, retVal.j, retVal.k, (unsigned long)retVal.l,
retVal.m, retVal.n, retVal.o, retVal.p, retVal.q, retVal.r,
retVal.s, retVal.t, retVal.u, retVal.v, retVal.w, (unsigned long)retVal.x,
retVal.y, retVal.z, retVal.aa, retVal.bb, retVal.cc, retVal.dd,
retVal.ee, retVal.ff, retVal.gg, retVal.hh, retVal.ii, (unsigned long)retVal.jj,
retVal.kk, retVal.ll, retVal.mm, retVal.nn, retVal.oo, retVal.pp,
retVal.qq, retVal.rr, retVal.ss, retVal.tt, retVal.uu, (unsigned long)retVal.vv, retVal.ww, retVal.xx);
return retVal;
}
static void
cls_large_fn(ffi_cif* cif __UNUSED__, void* resp, void** args, void* userdata __UNUSED__)
{
uint8_t ui8_1 = *(uint8_t*)args[0];
int8_t si8_1 = *(int8_t*)args[1];
uint16_t ui16_1 = *(uint16_t*)args[2];
int16_t si16_1 = *(int16_t*)args[3];
uint32_t ui32_1 = *(uint32_t*)args[4];
int32_t si32_1 = *(int32_t*)args[5];
uint64_t ui64_1 = *(uint64_t*)args[6];
int64_t si64_1 = *(int64_t*)args[7];
float f_1 = *(float*)args[8];
double d_1 = *(double*)args[9];
long double ld_1 = *(long double*)args[10];
char* p_1 = *(char**)args[11];
uint8_t ui8_2 = *(uint8_t*)args[12];
int8_t si8_2 = *(int8_t*)args[13];
uint16_t ui16_2 = *(uint16_t*)args[14];
int16_t si16_2 = *(int16_t*)args[15];
uint32_t ui32_2 = *(uint32_t*)args[16];
int32_t si32_2 = *(int32_t*)args[17];
uint64_t ui64_2 = *(uint64_t*)args[18];
int64_t si64_2 = *(int64_t*)args[19];
float f_2 = *(float*)args[20];
double d_2 = *(double*)args[21];
long double ld_2 = *(long double*)args[22];
char* p_2 = *(char**)args[23];
uint8_t ui8_3 = *(uint8_t*)args[24];
int8_t si8_3 = *(int8_t*)args[25];
uint16_t ui16_3 = *(uint16_t*)args[26];
int16_t si16_3 = *(int16_t*)args[27];
uint32_t ui32_3 = *(uint32_t*)args[28];
int32_t si32_3 = *(int32_t*)args[29];
uint64_t ui64_3 = *(uint64_t*)args[30];
int64_t si64_3 = *(int64_t*)args[31];
float f_3 = *(float*)args[32];
double d_3 = *(double*)args[33];
long double ld_3 = *(long double*)args[34];
char* p_3 = *(char**)args[35];
uint8_t ui8_4 = *(uint8_t*)args[36];
int8_t si8_4 = *(int8_t*)args[37];
uint16_t ui16_4 = *(uint16_t*)args[38];
int16_t si16_4 = *(int16_t*)args[39];
uint32_t ui32_4 = *(uint32_t*)args[40];
int32_t si32_4 = *(int32_t*)args[41];
uint64_t ui64_4 = *(uint64_t*)args[42];
int64_t si64_4 = *(int64_t*)args[43];
float f_4 = *(float*)args[44];
double d_4 = *(double*)args[45];
long double ld_4 = *(long double*)args[46];
char* p_4 = *(char**)args[47];
uint8_t ui8_5 = *(uint8_t*)args[48];
int8_t si8_5 = *(int8_t*)args[49];
*(BigStruct*)resp = test_large_fn(
ui8_1, si8_1, ui16_1, si16_1, ui32_1, si32_1, ui64_1, si64_1, f_1, d_1, ld_1, p_1,
ui8_2, si8_2, ui16_2, si16_2, ui32_2, si32_2, ui64_2, si64_2, f_2, d_2, ld_2, p_2,
ui8_3, si8_3, ui16_3, si16_3, ui32_3, si32_3, ui64_3, si64_3, f_3, d_3, ld_3, p_3,
ui8_4, si8_4, ui16_4, si16_4, ui32_4, si32_4, ui64_4, si64_4, f_4, d_4, ld_4, p_4,
ui8_5, si8_5);
}
int
main(int argc __UNUSED__, const char** argv __UNUSED__)
{
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
ffi_cif cif;
ffi_type* argTypes[51];
void* argValues[51];
ffi_type ret_struct_type;
ffi_type* st_fields[51];
BigStruct retVal;
memset (&retVal, 0, sizeof(retVal));
ret_struct_type.size = 0;
ret_struct_type.alignment = 0;
ret_struct_type.type = FFI_TYPE_STRUCT;
ret_struct_type.elements = st_fields;
st_fields[0] = st_fields[12] = st_fields[24] = st_fields[36] = st_fields[48] = &ffi_type_uint8;
st_fields[1] = st_fields[13] = st_fields[25] = st_fields[37] = st_fields[49] = &ffi_type_sint8;
st_fields[2] = st_fields[14] = st_fields[26] = st_fields[38] = &ffi_type_uint16;
st_fields[3] = st_fields[15] = st_fields[27] = st_fields[39] = &ffi_type_sint16;
st_fields[4] = st_fields[16] = st_fields[28] = st_fields[40] = &ffi_type_uint32;
st_fields[5] = st_fields[17] = st_fields[29] = st_fields[41] = &ffi_type_sint32;
st_fields[6] = st_fields[18] = st_fields[30] = st_fields[42] = &ffi_type_uint64;
st_fields[7] = st_fields[19] = st_fields[31] = st_fields[43] = &ffi_type_sint64;
st_fields[8] = st_fields[20] = st_fields[32] = st_fields[44] = &ffi_type_float;
st_fields[9] = st_fields[21] = st_fields[33] = st_fields[45] = &ffi_type_double;
st_fields[10] = st_fields[22] = st_fields[34] = st_fields[46] = &ffi_type_longdouble;
st_fields[11] = st_fields[23] = st_fields[35] = st_fields[47] = &ffi_type_pointer;
st_fields[50] = NULL;
uint8_t ui8 = 1;
int8_t si8 = 2;
uint16_t ui16 = 3;
int16_t si16 = 4;
uint32_t ui32 = 5;
int32_t si32 = 6;
uint64_t ui64 = 7;
int64_t si64 = 8;
float f = 9;
double d = 10;
long double ld = 11;
char* p = (char*)0x12345678;
argTypes[0] = argTypes[12] = argTypes[24] = argTypes[36] = argTypes[48] = &ffi_type_uint8;
argValues[0] = argValues[12] = argValues[24] = argValues[36] = argValues[48] = &ui8;
argTypes[1] = argTypes[13] = argTypes[25] = argTypes[37] = argTypes[49] = &ffi_type_sint8;
argValues[1] = argValues[13] = argValues[25] = argValues[37] = argValues[49] = &si8;
argTypes[2] = argTypes[14] = argTypes[26] = argTypes[38] = &ffi_type_uint16;
argValues[2] = argValues[14] = argValues[26] = argValues[38] = &ui16;
argTypes[3] = argTypes[15] = argTypes[27] = argTypes[39] = &ffi_type_sint16;
argValues[3] = argValues[15] = argValues[27] = argValues[39] = &si16;
argTypes[4] = argTypes[16] = argTypes[28] = argTypes[40] = &ffi_type_uint32;
argValues[4] = argValues[16] = argValues[28] = argValues[40] = &ui32;
argTypes[5] = argTypes[17] = argTypes[29] = argTypes[41] = &ffi_type_sint32;
argValues[5] = argValues[17] = argValues[29] = argValues[41] = &si32;
argTypes[6] = argTypes[18] = argTypes[30] = argTypes[42] = &ffi_type_uint64;
argValues[6] = argValues[18] = argValues[30] = argValues[42] = &ui64;
argTypes[7] = argTypes[19] = argTypes[31] = argTypes[43] = &ffi_type_sint64;
argValues[7] = argValues[19] = argValues[31] = argValues[43] = &si64;
argTypes[8] = argTypes[20] = argTypes[32] = argTypes[44] = &ffi_type_float;
argValues[8] = argValues[20] = argValues[32] = argValues[44] = &f;
argTypes[9] = argTypes[21] = argTypes[33] = argTypes[45] = &ffi_type_double;
argValues[9] = argValues[21] = argValues[33] = argValues[45] = &d;
argTypes[10] = argTypes[22] = argTypes[34] = argTypes[46] = &ffi_type_longdouble;
argValues[10] = argValues[22] = argValues[34] = argValues[46] = &ld;
argTypes[11] = argTypes[23] = argTypes[35] = argTypes[47] = &ffi_type_pointer;
argValues[11] = argValues[23] = argValues[35] = argValues[47] = &p;
argTypes[50] = NULL;
argValues[50] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 50, &ret_struct_type, argTypes) == FFI_OK);
ffi_call(&cif, FFI_FN(test_large_fn), &retVal, argValues);
// { dg-output "1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" }
printf("res: %" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx "
"%" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx "
"%" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx "
"%" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx %" PRIu8 " %" PRId8 "\n",
retVal.a, retVal.b, retVal.c, retVal.d, retVal.e, retVal.f,
retVal.g, retVal.h, retVal.i, retVal.j, retVal.k, (unsigned long)retVal.l,
retVal.m, retVal.n, retVal.o, retVal.p, retVal.q, retVal.r,
retVal.s, retVal.t, retVal.u, retVal.v, retVal.w, (unsigned long)retVal.x,
retVal.y, retVal.z, retVal.aa, retVal.bb, retVal.cc, retVal.dd,
retVal.ee, retVal.ff, retVal.gg, retVal.hh, retVal.ii, (unsigned long)retVal.jj,
retVal.kk, retVal.ll, retVal.mm, retVal.nn, retVal.oo, retVal.pp,
retVal.qq, retVal.rr, retVal.ss, retVal.tt, retVal.uu, (unsigned long)retVal.vv, retVal.ww, retVal.xx);
// { dg-output "\nres: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" }
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_large_fn, NULL, code) == FFI_OK);
retVal = ((BigStruct(*)(
uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t, uint64_t, int64_t, float, double, long double, char*,
uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t, uint64_t, int64_t, float, double, long double, char*,
uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t, uint64_t, int64_t, float, double, long double, char*,
uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t, uint64_t, int64_t, float, double, long double, char*,
uint8_t, int8_t))(code))(
ui8, si8, ui16, si16, ui32, si32, ui64, si64, f, d, ld, p,
ui8, si8, ui16, si16, ui32, si32, ui64, si64, f, d, ld, p,
ui8, si8, ui16, si16, ui32, si32, ui64, si64, f, d, ld, p,
ui8, si8, ui16, si16, ui32, si32, ui64, si64, f, d, ld, p,
ui8, si8);
// { dg-output "\n1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2 3 4 5 6 7 8 9 10 11 0x12345678 1 2: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" }
printf("res: %" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx "
"%" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx "
"%" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx "
"%" PRIu8 " %" PRId8 " %hu %hd %u %d %" PRIu64 " %" PRId64 " %.0f %.0f %.0Lf %#lx %" PRIu8 " %" PRId8 "\n",
retVal.a, retVal.b, retVal.c, retVal.d, retVal.e, retVal.f,
retVal.g, retVal.h, retVal.i, retVal.j, retVal.k, (unsigned long)retVal.l,
retVal.m, retVal.n, retVal.o, retVal.p, retVal.q, retVal.r,
retVal.s, retVal.t, retVal.u, retVal.v, retVal.w, (unsigned long)retVal.x,
retVal.y, retVal.z, retVal.aa, retVal.bb, retVal.cc, retVal.dd,
retVal.ee, retVal.ff, retVal.gg, retVal.hh, retVal.ii, (unsigned long)retVal.jj,
retVal.kk, retVal.ll, retVal.mm, retVal.nn, retVal.oo, retVal.pp,
retVal.qq, retVal.rr, retVal.ss, retVal.tt, retVal.uu, (unsigned long)retVal.vv, retVal.ww, retVal.xx);
// { dg-output "\nres: 2 3 4 5 6 7 8 9 10 11 12 0x12345679 3 4 5 6 7 8 9 10 11 12 13 0x1234567a 4 5 6 7 8 9 10 11 12 13 14 0x1234567b 5 6 7 8 9 10 11 12 13 14 15 0x1234567c 6 7" }
return 0;
}
@@ -1,152 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Contains structs as parameter of the struct itself.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030828 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_16byte1 {
double a;
float b;
int c;
} cls_struct_16byte1;
typedef struct cls_struct_16byte2 {
int ii;
double dd;
float ff;
} cls_struct_16byte2;
typedef struct cls_struct_combined {
cls_struct_16byte1 d;
cls_struct_16byte2 e;
} cls_struct_combined;
cls_struct_combined cls_struct_combined_fn(struct cls_struct_16byte1 b0,
struct cls_struct_16byte2 b1,
struct cls_struct_combined b2)
{
struct cls_struct_combined result;
result.d.a = b0.a + b1.dd + b2.d.a;
result.d.b = b0.b + b1.ff + b2.d.b;
result.d.c = b0.c + b1.ii + b2.d.c;
result.e.ii = b0.c + b1.ii + b2.e.ii;
result.e.dd = b0.a + b1.dd + b2.e.dd;
result.e.ff = b0.b + b1.ff + b2.e.ff;
printf("%g %g %d %d %g %g %g %g %d %d %g %g: %g %g %d %d %g %g\n",
b0.a, b0.b, b0.c,
b1.ii, b1.dd, b1.ff,
b2.d.a, b2.d.b, b2.d.c,
b2.e.ii, b2.e.dd, b2.e.ff,
result.d.a, result.d.b, result.d.c,
result.e.ii, result.e.dd, result.e.ff);
return result;
}
static void
cls_struct_combined_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_16byte1 b0;
struct cls_struct_16byte2 b1;
struct cls_struct_combined b2;
b0 = *(struct cls_struct_16byte1*)(args[0]);
b1 = *(struct cls_struct_16byte2*)(args[1]);
b2 = *(struct cls_struct_combined*)(args[2]);
*(cls_struct_combined*)resp = cls_struct_combined_fn(b0, b1, b2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[5];
ffi_type* cls_struct_fields1[5];
ffi_type* cls_struct_fields2[5];
ffi_type cls_struct_type, cls_struct_type1, cls_struct_type2;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
cls_struct_type1.size = 0;
cls_struct_type1.alignment = 0;
cls_struct_type1.type = FFI_TYPE_STRUCT;
cls_struct_type1.elements = cls_struct_fields1;
cls_struct_type2.size = 0;
cls_struct_type2.alignment = 0;
cls_struct_type2.type = FFI_TYPE_STRUCT;
cls_struct_type2.elements = cls_struct_fields2;
struct cls_struct_16byte1 e_dbl = { 9.0, 2.0, 6};
struct cls_struct_16byte2 f_dbl = { 1, 2.0, 3.0};
struct cls_struct_combined g_dbl = {{4.0, 5.0, 6},
{3, 1.0, 8.0}};
struct cls_struct_combined res_dbl;
cls_struct_fields[0] = &ffi_type_double;
cls_struct_fields[1] = &ffi_type_float;
cls_struct_fields[2] = &ffi_type_sint;
cls_struct_fields[3] = NULL;
cls_struct_fields1[0] = &ffi_type_sint;
cls_struct_fields1[1] = &ffi_type_double;
cls_struct_fields1[2] = &ffi_type_float;
cls_struct_fields1[3] = NULL;
cls_struct_fields2[0] = &cls_struct_type;
cls_struct_fields2[1] = &cls_struct_type1;
cls_struct_fields2[2] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type1;
dbl_arg_types[2] = &cls_struct_type2;
dbl_arg_types[3] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 3, &cls_struct_type2,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &e_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = &g_dbl;
args_dbl[3] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_combined_fn), &res_dbl, args_dbl);
/* { dg-output "9 2 6 1 2 3 4 5 6 3 1 8: 15 10 13 10 12 13" } */
CHECK( res_dbl.d.a == (e_dbl.a + f_dbl.dd + g_dbl.d.a));
CHECK( res_dbl.d.b == (e_dbl.b + f_dbl.ff + g_dbl.d.b));
CHECK( res_dbl.d.c == (e_dbl.c + f_dbl.ii + g_dbl.d.c));
CHECK( res_dbl.e.ii == (e_dbl.c + f_dbl.ii + g_dbl.e.ii));
CHECK( res_dbl.e.dd == (e_dbl.a + f_dbl.dd + g_dbl.e.dd));
CHECK( res_dbl.e.ff == (e_dbl.b + f_dbl.ff + g_dbl.e.ff));
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_combined_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_combined(*)(cls_struct_16byte1,
cls_struct_16byte2,
cls_struct_combined))
(code))(e_dbl, f_dbl, g_dbl);
/* { dg-output "\n9 2 6 1 2 3 4 5 6 3 1 8: 15 10 13 10 12 13" } */
CHECK( res_dbl.d.a == (e_dbl.a + f_dbl.dd + g_dbl.d.a));
CHECK( res_dbl.d.b == (e_dbl.b + f_dbl.ff + g_dbl.d.b));
CHECK( res_dbl.d.c == (e_dbl.c + f_dbl.ii + g_dbl.d.c));
CHECK( res_dbl.e.ii == (e_dbl.c + f_dbl.ii + g_dbl.e.ii));
CHECK( res_dbl.e.dd == (e_dbl.a + f_dbl.dd + g_dbl.e.dd));
CHECK( res_dbl.e.ff == (e_dbl.b + f_dbl.ff + g_dbl.e.ff));
exit(0);
}
@@ -1,161 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Contains structs as parameter of the struct itself.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030828 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct cls_struct_16byte1 {
double a;
float b;
int c;
} cls_struct_16byte1;
typedef struct cls_struct_16byte2 {
int ii;
double dd;
float ff;
} cls_struct_16byte2;
typedef struct cls_struct_combined {
cls_struct_16byte1 d;
cls_struct_16byte2 e;
} cls_struct_combined;
cls_struct_combined cls_struct_combined_fn(struct cls_struct_16byte1 b0,
struct cls_struct_16byte2 b1,
struct cls_struct_combined b2,
struct cls_struct_16byte1 b3)
{
struct cls_struct_combined result;
result.d.a = b0.a + b1.dd + b2.d.a;
result.d.b = b0.b + b1.ff + b2.d.b;
result.d.c = b0.c + b1.ii + b2.d.c;
result.e.ii = b0.c + b1.ii + b2.e.ii;
result.e.dd = b0.a + b1.dd + b2.e.dd;
result.e.ff = b0.b + b1.ff + b2.e.ff;
printf("%g %g %d %d %g %g %g %g %d %d %g %g %g %g %d: %g %g %d %d %g %g\n",
b0.a, b0.b, b0.c,
b1.ii, b1.dd, b1.ff,
b2.d.a, b2.d.b, b2.d.c,
b2.e.ii, b2.e.dd, b2.e.ff,
b3.a, b3.b, b3.c,
result.d.a, result.d.b, result.d.c,
result.e.ii, result.e.dd, result.e.ff);
return result;
}
static void
cls_struct_combined_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct cls_struct_16byte1 b0;
struct cls_struct_16byte2 b1;
struct cls_struct_combined b2;
struct cls_struct_16byte1 b3;
b0 = *(struct cls_struct_16byte1*)(args[0]);
b1 = *(struct cls_struct_16byte2*)(args[1]);
b2 = *(struct cls_struct_combined*)(args[2]);
b3 = *(struct cls_struct_16byte1*)(args[3]);
*(cls_struct_combined*)resp = cls_struct_combined_fn(b0, b1, b2, b3);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[5];
ffi_type* cls_struct_fields1[5];
ffi_type* cls_struct_fields2[5];
ffi_type cls_struct_type, cls_struct_type1, cls_struct_type2;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
cls_struct_type1.size = 0;
cls_struct_type1.alignment = 0;
cls_struct_type1.type = FFI_TYPE_STRUCT;
cls_struct_type1.elements = cls_struct_fields1;
cls_struct_type2.size = 0;
cls_struct_type2.alignment = 0;
cls_struct_type2.type = FFI_TYPE_STRUCT;
cls_struct_type2.elements = cls_struct_fields2;
struct cls_struct_16byte1 e_dbl = { 9.0, 2.0, 6};
struct cls_struct_16byte2 f_dbl = { 1, 2.0, 3.0};
struct cls_struct_combined g_dbl = {{4.0, 5.0, 6},
{3, 1.0, 8.0}};
struct cls_struct_16byte1 h_dbl = { 3.0, 2.0, 4};
struct cls_struct_combined res_dbl;
cls_struct_fields[0] = &ffi_type_double;
cls_struct_fields[1] = &ffi_type_float;
cls_struct_fields[2] = &ffi_type_sint;
cls_struct_fields[3] = NULL;
cls_struct_fields1[0] = &ffi_type_sint;
cls_struct_fields1[1] = &ffi_type_double;
cls_struct_fields1[2] = &ffi_type_float;
cls_struct_fields1[3] = NULL;
cls_struct_fields2[0] = &cls_struct_type;
cls_struct_fields2[1] = &cls_struct_type1;
cls_struct_fields2[2] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type1;
dbl_arg_types[2] = &cls_struct_type2;
dbl_arg_types[3] = &cls_struct_type;
dbl_arg_types[4] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 4, &cls_struct_type2,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &e_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = &g_dbl;
args_dbl[3] = &h_dbl;
args_dbl[4] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_combined_fn), &res_dbl, args_dbl);
/* { dg-output "9 2 6 1 2 3 4 5 6 3 1 8 3 2 4: 15 10 13 10 12 13" } */
CHECK( res_dbl.d.a == (e_dbl.a + f_dbl.dd + g_dbl.d.a));
CHECK( res_dbl.d.b == (e_dbl.b + f_dbl.ff + g_dbl.d.b));
CHECK( res_dbl.d.c == (e_dbl.c + f_dbl.ii + g_dbl.d.c));
CHECK( res_dbl.e.ii == (e_dbl.c + f_dbl.ii + g_dbl.e.ii));
CHECK( res_dbl.e.dd == (e_dbl.a + f_dbl.dd + g_dbl.e.dd));
CHECK( res_dbl.e.ff == (e_dbl.b + f_dbl.ff + g_dbl.e.ff));
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_combined_gn, NULL, code) == FFI_OK);
res_dbl = ((cls_struct_combined(*)(cls_struct_16byte1,
cls_struct_16byte2,
cls_struct_combined,
cls_struct_16byte1))
(code))(e_dbl, f_dbl, g_dbl, h_dbl);
/* { dg-output "\n9 2 6 1 2 3 4 5 6 3 1 8 3 2 4: 15 10 13 10 12 13" } */
CHECK( res_dbl.d.a == (e_dbl.a + f_dbl.dd + g_dbl.d.a));
CHECK( res_dbl.d.b == (e_dbl.b + f_dbl.ff + g_dbl.d.b));
CHECK( res_dbl.d.c == (e_dbl.c + f_dbl.ii + g_dbl.d.c));
CHECK( res_dbl.e.ii == (e_dbl.c + f_dbl.ii + g_dbl.e.ii));
CHECK( res_dbl.e.dd == (e_dbl.a + f_dbl.dd + g_dbl.e.dd));
CHECK( res_dbl.e.ff == (e_dbl.b + f_dbl.ff + g_dbl.e.ff));
// CHECK( 1 == 0);
exit(0);
}
@@ -1,133 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Contains structs as parameter of the struct itself.
Sample taken from Alan Modras patch to src/prep_cif.c.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20051010 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct A {
unsigned long long a;
unsigned char b;
} A;
typedef struct B {
unsigned char y;
struct A x;
unsigned int z;
} B;
typedef struct C {
unsigned long long d;
unsigned char e;
} C;
static B B_fn(struct A b2, struct B b3, struct C b4)
{
struct B result;
result.x.a = b2.a + b3.x.a + b3.z + b4.d;
result.x.b = b2.b + b3.x.b + b3.y + b4.e;
result.y = b2.b + b3.x.b + b4.e;
printf("%d %d %d %d %d %d %d %d: %d %d %d\n", (int)b2.a, b2.b,
(int)b3.x.a, b3.x.b, b3.y, b3.z, (int)b4.d, b4.e,
(int)result.x.a, result.x.b, result.y);
return result;
}
static void
B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct A b0;
struct B b1;
struct C b2;
b0 = *(struct A*)(args[0]);
b1 = *(struct B*)(args[1]);
b2 = *(struct C*)(args[2]);
*(B*)resp = B_fn(b0, b1, b2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[4];
ffi_type* cls_struct_fields[3];
ffi_type* cls_struct_fields1[4];
ffi_type* cls_struct_fields2[3];
ffi_type cls_struct_type, cls_struct_type1, cls_struct_type2;
ffi_type* dbl_arg_types[4];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
cls_struct_type1.size = 0;
cls_struct_type1.alignment = 0;
cls_struct_type1.type = FFI_TYPE_STRUCT;
cls_struct_type1.elements = cls_struct_fields1;
cls_struct_type2.size = 0;
cls_struct_type2.alignment = 0;
cls_struct_type2.type = FFI_TYPE_STRUCT;
cls_struct_type2.elements = cls_struct_fields2;
struct A e_dbl = { 1LL, 7};
struct B f_dbl = { 99, {12LL , 127}, 255};
struct C g_dbl = { 2LL, 9};
struct B res_dbl;
cls_struct_fields[0] = &ffi_type_uint64;
cls_struct_fields[1] = &ffi_type_uchar;
cls_struct_fields[2] = NULL;
cls_struct_fields1[0] = &ffi_type_uchar;
cls_struct_fields1[1] = &cls_struct_type;
cls_struct_fields1[2] = &ffi_type_uint;
cls_struct_fields1[3] = NULL;
cls_struct_fields2[0] = &ffi_type_uint64;
cls_struct_fields2[1] = &ffi_type_uchar;
cls_struct_fields2[2] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type1;
dbl_arg_types[2] = &cls_struct_type2;
dbl_arg_types[3] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 3, &cls_struct_type1,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &e_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = &g_dbl;
args_dbl[3] = NULL;
ffi_call(&cif, FFI_FN(B_fn), &res_dbl, args_dbl);
/* { dg-output "1 7 12 127 99 255 2 9: 270 242 143" } */
CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a + f_dbl.z + g_dbl.d));
CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y + g_dbl.e));
CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b + g_dbl.e));
CHECK(ffi_prep_closure_loc(pcl, &cif, B_gn, NULL, code) == FFI_OK);
res_dbl = ((B(*)(A, B, C))(code))(e_dbl, f_dbl, g_dbl);
/* { dg-output "\n1 7 12 127 99 255 2 9: 270 242 143" } */
CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a + f_dbl.z + g_dbl.d));
CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y + g_dbl.e));
CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b + g_dbl.e));
exit(0);
}
@@ -1,110 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Contains structs as parameter of the struct itself.
Sample taken from Alan Modras patch to src/prep_cif.c.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030911 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct A {
unsigned long a;
unsigned char b;
} A;
typedef struct B {
struct A x;
unsigned char y;
} B;
B B_fn(struct A b0, struct B b1)
{
struct B result;
result.x.a = b0.a + b1.x.a;
result.x.b = b0.b + b1.x.b + b1.y;
result.y = b0.b + b1.x.b;
printf("%lu %d %lu %d %d: %lu %d %d\n", b0.a, b0.b, b1.x.a, b1.x.b, b1.y,
result.x.a, result.x.b, result.y);
return result;
}
static void
B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct A b0;
struct B b1;
b0 = *(struct A*)(args[0]);
b1 = *(struct B*)(args[1]);
*(B*)resp = B_fn(b0, b1);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[3];
ffi_type* cls_struct_fields[3];
ffi_type* cls_struct_fields1[3];
ffi_type cls_struct_type, cls_struct_type1;
ffi_type* dbl_arg_types[3];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
cls_struct_type1.size = 0;
cls_struct_type1.alignment = 0;
cls_struct_type1.type = FFI_TYPE_STRUCT;
cls_struct_type1.elements = cls_struct_fields1;
struct A e_dbl = { 1, 7};
struct B f_dbl = {{12 , 127}, 99};
struct B res_dbl;
cls_struct_fields[0] = &ffi_type_ulong;
cls_struct_fields[1] = &ffi_type_uchar;
cls_struct_fields[2] = NULL;
cls_struct_fields1[0] = &cls_struct_type;
cls_struct_fields1[1] = &ffi_type_uchar;
cls_struct_fields1[2] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type1;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type1,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &e_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(B_fn), &res_dbl, args_dbl);
/* { dg-output "1 7 12 127 99: 13 233 134" } */
CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a));
CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y));
CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b));
CHECK(ffi_prep_closure_loc(pcl, &cif, B_gn, NULL, code) == FFI_OK);
res_dbl = ((B(*)(A, B))(code))(e_dbl, f_dbl);
/* { dg-output "\n1 7 12 127 99: 13 233 134" } */
CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a));
CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y));
CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b));
exit(0);
}
@@ -1,111 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Contains structs as parameter of the struct itself.
Sample taken from Alan Modras patch to src/prep_cif.c.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20030911 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct A {
unsigned long long a;
unsigned char b;
} A;
typedef struct B {
struct A x;
unsigned char y;
} B;
B B_fn(struct A b0, struct B b1)
{
struct B result;
result.x.a = b0.a + b1.x.a;
result.x.b = b0.b + b1.x.b + b1.y;
result.y = b0.b + b1.x.b;
printf("%d %d %d %d %d: %d %d %d\n", (int)b0.a, b0.b,
(int)b1.x.a, b1.x.b, b1.y,
(int)result.x.a, result.x.b, result.y);
return result;
}
static void
B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct A b0;
struct B b1;
b0 = *(struct A*)(args[0]);
b1 = *(struct B*)(args[1]);
*(B*)resp = B_fn(b0, b1);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[3];
ffi_type* cls_struct_fields[3];
ffi_type* cls_struct_fields1[3];
ffi_type cls_struct_type, cls_struct_type1;
ffi_type* dbl_arg_types[3];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
cls_struct_type1.size = 0;
cls_struct_type1.alignment = 0;
cls_struct_type1.type = FFI_TYPE_STRUCT;
cls_struct_type1.elements = cls_struct_fields1;
struct A e_dbl = { 1LL, 7};
struct B f_dbl = {{12LL , 127}, 99};
struct B res_dbl;
cls_struct_fields[0] = &ffi_type_uint64;
cls_struct_fields[1] = &ffi_type_uchar;
cls_struct_fields[2] = NULL;
cls_struct_fields1[0] = &cls_struct_type;
cls_struct_fields1[1] = &ffi_type_uchar;
cls_struct_fields1[2] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type1;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type1,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &e_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(B_fn), &res_dbl, args_dbl);
/* { dg-output "1 7 12 127 99: 13 233 134" } */
CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a));
CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y));
CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b));
CHECK(ffi_prep_closure_loc(pcl, &cif, B_gn, NULL, code) == FFI_OK);
res_dbl = ((B(*)(A, B))(code))(e_dbl, f_dbl);
/* { dg-output "\n1 7 12 127 99: 13 233 134" } */
CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a));
CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y));
CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b));
exit(0);
}
@@ -1,111 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Contains structs as parameter of the struct itself.
Sample taken from Alan Modras patch to src/prep_cif.c.
Limitations: none.
PR: PR 25630.
Originator: <andreast@gcc.gnu.org> 20051010 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct A {
double a;
unsigned char b;
} A;
typedef struct B {
struct A x;
unsigned char y;
} B;
static B B_fn(struct A b2, struct B b3)
{
struct B result;
result.x.a = b2.a + b3.x.a;
result.x.b = b2.b + b3.x.b + b3.y;
result.y = b2.b + b3.x.b;
printf("%d %d %d %d %d: %d %d %d\n", (int)b2.a, b2.b,
(int)b3.x.a, b3.x.b, b3.y,
(int)result.x.a, result.x.b, result.y);
return result;
}
static void
B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct A b0;
struct B b1;
b0 = *(struct A*)(args[0]);
b1 = *(struct B*)(args[1]);
*(B*)resp = B_fn(b0, b1);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[3];
ffi_type* cls_struct_fields[3];
ffi_type* cls_struct_fields1[3];
ffi_type cls_struct_type, cls_struct_type1;
ffi_type* dbl_arg_types[3];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
cls_struct_type1.size = 0;
cls_struct_type1.alignment = 0;
cls_struct_type1.type = FFI_TYPE_STRUCT;
cls_struct_type1.elements = cls_struct_fields1;
struct A e_dbl = { 1.0, 7};
struct B f_dbl = {{12.0 , 127}, 99};
struct B res_dbl;
cls_struct_fields[0] = &ffi_type_double;
cls_struct_fields[1] = &ffi_type_uchar;
cls_struct_fields[2] = NULL;
cls_struct_fields1[0] = &cls_struct_type;
cls_struct_fields1[1] = &ffi_type_uchar;
cls_struct_fields1[2] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type1;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type1,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &e_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(B_fn), &res_dbl, args_dbl);
/* { dg-output "1 7 12 127 99: 13 233 134" } */
CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a));
CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y));
CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b));
CHECK(ffi_prep_closure_loc(pcl, &cif, B_gn, NULL, code) == FFI_OK);
res_dbl = ((B(*)(A, B))(code))(e_dbl, f_dbl);
/* { dg-output "\n1 7 12 127 99: 13 233 134" } */
CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a));
CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y));
CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b));
exit(0);
}
@@ -1,112 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Contains structs as parameter of the struct itself.
Sample taken from Alan Modras patch to src/prep_cif.c.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20051010 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct A {
long double a;
unsigned char b;
} A;
typedef struct B {
struct A x;
unsigned char y;
} B;
static B B_fn(struct A b2, struct B b3)
{
struct B result;
result.x.a = b2.a + b3.x.a;
result.x.b = b2.b + b3.x.b + b3.y;
result.y = b2.b + b3.x.b;
printf("%d %d %d %d %d: %d %d %d\n", (int)b2.a, b2.b,
(int)b3.x.a, b3.x.b, b3.y,
(int)result.x.a, result.x.b, result.y);
return result;
}
static void
B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct A b0;
struct B b1;
b0 = *(struct A*)(args[0]);
b1 = *(struct B*)(args[1]);
*(B*)resp = B_fn(b0, b1);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[3];
ffi_type* cls_struct_fields[3];
ffi_type* cls_struct_fields1[3];
ffi_type cls_struct_type, cls_struct_type1;
ffi_type* dbl_arg_types[3];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
cls_struct_type1.size = 0;
cls_struct_type1.alignment = 0;
cls_struct_type1.type = FFI_TYPE_STRUCT;
cls_struct_type1.elements = cls_struct_fields1;
struct A e_dbl = { 1.0, 7};
struct B f_dbl = {{12.0 , 127}, 99};
struct B res_dbl;
cls_struct_fields[0] = &ffi_type_longdouble;
cls_struct_fields[1] = &ffi_type_uchar;
cls_struct_fields[2] = NULL;
cls_struct_fields1[0] = &cls_struct_type;
cls_struct_fields1[1] = &ffi_type_uchar;
cls_struct_fields1[2] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type1;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type1,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &e_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(B_fn), &res_dbl, args_dbl);
/* { dg-output "1 7 12 127 99: 13 233 134" } */
CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a));
CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y));
CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b));
CHECK(ffi_prep_closure_loc(pcl, &cif, B_gn, NULL, code) == FFI_OK);
res_dbl = ((B(*)(A, B))(code))(e_dbl, f_dbl);
/* { dg-output "\n1 7 12 127 99: 13 233 134" } */
CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a));
CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y));
CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b));
exit(0);
}
@@ -1,131 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Contains structs as parameter of the struct itself.
Sample taken from Alan Modras patch to src/prep_cif.c.
Limitations: none.
PR: PR 25630.
Originator: <andreast@gcc.gnu.org> 20051010 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct A {
double a;
unsigned char b;
} A;
typedef struct B {
struct A x;
unsigned char y;
} B;
typedef struct C {
long d;
unsigned char e;
} C;
static B B_fn(struct A b2, struct B b3, struct C b4)
{
struct B result;
result.x.a = b2.a + b3.x.a + b4.d;
result.x.b = b2.b + b3.x.b + b3.y + b4.e;
result.y = b2.b + b3.x.b + b4.e;
printf("%d %d %d %d %d %d %d: %d %d %d\n", (int)b2.a, b2.b,
(int)b3.x.a, b3.x.b, b3.y, (int)b4.d, b4.e,
(int)result.x.a, result.x.b, result.y);
return result;
}
static void
B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct A b0;
struct B b1;
struct C b2;
b0 = *(struct A*)(args[0]);
b1 = *(struct B*)(args[1]);
b2 = *(struct C*)(args[2]);
*(B*)resp = B_fn(b0, b1, b2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[4];
ffi_type* cls_struct_fields[3];
ffi_type* cls_struct_fields1[3];
ffi_type* cls_struct_fields2[3];
ffi_type cls_struct_type, cls_struct_type1, cls_struct_type2;
ffi_type* dbl_arg_types[4];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
cls_struct_type1.size = 0;
cls_struct_type1.alignment = 0;
cls_struct_type1.type = FFI_TYPE_STRUCT;
cls_struct_type1.elements = cls_struct_fields1;
cls_struct_type2.size = 0;
cls_struct_type2.alignment = 0;
cls_struct_type2.type = FFI_TYPE_STRUCT;
cls_struct_type2.elements = cls_struct_fields2;
struct A e_dbl = { 1.0, 7};
struct B f_dbl = {{12.0 , 127}, 99};
struct C g_dbl = { 2, 9};
struct B res_dbl;
cls_struct_fields[0] = &ffi_type_double;
cls_struct_fields[1] = &ffi_type_uchar;
cls_struct_fields[2] = NULL;
cls_struct_fields1[0] = &cls_struct_type;
cls_struct_fields1[1] = &ffi_type_uchar;
cls_struct_fields1[2] = NULL;
cls_struct_fields2[0] = &ffi_type_slong;
cls_struct_fields2[1] = &ffi_type_uchar;
cls_struct_fields2[2] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type1;
dbl_arg_types[2] = &cls_struct_type2;
dbl_arg_types[3] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 3, &cls_struct_type1,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &e_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = &g_dbl;
args_dbl[3] = NULL;
ffi_call(&cif, FFI_FN(B_fn), &res_dbl, args_dbl);
/* { dg-output "1 7 12 127 99 2 9: 15 242 143" } */
CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a + g_dbl.d));
CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y + g_dbl.e));
CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b + g_dbl.e));
CHECK(ffi_prep_closure_loc(pcl, &cif, B_gn, NULL, code) == FFI_OK);
res_dbl = ((B(*)(A, B, C))(code))(e_dbl, f_dbl, g_dbl);
/* { dg-output "\n1 7 12 127 99 2 9: 15 242 143" } */
CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a + g_dbl.d));
CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y + g_dbl.e));
CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b + g_dbl.e));
exit(0);
}
@@ -1,111 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Contains structs as parameter of the struct itself.
Sample taken from Alan Modras patch to src/prep_cif.c.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20051010 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct A {
unsigned long long a;
unsigned char b;
} A;
typedef struct B {
struct A x;
unsigned char y;
} B;
static B B_fn(struct A b2, struct B b3)
{
struct B result;
result.x.a = b2.a + b3.x.a;
result.x.b = b2.b + b3.x.b + b3.y;
result.y = b2.b + b3.x.b;
printf("%d %d %d %d %d: %d %d %d\n", (int)b2.a, b2.b,
(int)b3.x.a, b3.x.b, b3.y,
(int)result.x.a, result.x.b, result.y);
return result;
}
static void
B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct A b0;
struct B b1;
b0 = *(struct A*)(args[0]);
b1 = *(struct B*)(args[1]);
*(B*)resp = B_fn(b0, b1);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[3];
ffi_type* cls_struct_fields[3];
ffi_type* cls_struct_fields1[3];
ffi_type cls_struct_type, cls_struct_type1;
ffi_type* dbl_arg_types[3];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
cls_struct_type1.size = 0;
cls_struct_type1.alignment = 0;
cls_struct_type1.type = FFI_TYPE_STRUCT;
cls_struct_type1.elements = cls_struct_fields1;
struct A e_dbl = { 1LL, 7};
struct B f_dbl = {{12.0 , 127}, 99};
struct B res_dbl;
cls_struct_fields[0] = &ffi_type_uint64;
cls_struct_fields[1] = &ffi_type_uchar;
cls_struct_fields[2] = NULL;
cls_struct_fields1[0] = &cls_struct_type;
cls_struct_fields1[1] = &ffi_type_uchar;
cls_struct_fields1[2] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type1;
dbl_arg_types[2] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &cls_struct_type1,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &e_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = NULL;
ffi_call(&cif, FFI_FN(B_fn), &res_dbl, args_dbl);
/* { dg-output "1 7 12 127 99: 13 233 134" } */
CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a));
CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y));
CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b));
CHECK(ffi_prep_closure_loc(pcl, &cif, B_gn, NULL, code) == FFI_OK);
res_dbl = ((B(*)(A, B))(code))(e_dbl, f_dbl);
/* { dg-output "\n1 7 12 127 99: 13 233 134" } */
CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a));
CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y));
CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b));
exit(0);
}
@@ -1,131 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Contains structs as parameter of the struct itself.
Sample taken from Alan Modras patch to src/prep_cif.c.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20051010 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct A {
unsigned long long a;
unsigned char b;
} A;
typedef struct B {
struct A x;
unsigned char y;
} B;
typedef struct C {
unsigned long long d;
unsigned char e;
} C;
static B B_fn(struct A b2, struct B b3, struct C b4)
{
struct B result;
result.x.a = b2.a + b3.x.a + b4.d;
result.x.b = b2.b + b3.x.b + b3.y + b4.e;
result.y = b2.b + b3.x.b + b4.e;
printf("%d %d %d %d %d %d %d: %d %d %d\n", (int)b2.a, b2.b,
(int)b3.x.a, b3.x.b, b3.y, (int)b4.d, b4.e,
(int)result.x.a, result.x.b, result.y);
return result;
}
static void
B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct A b0;
struct B b1;
struct C b2;
b0 = *(struct A*)(args[0]);
b1 = *(struct B*)(args[1]);
b2 = *(struct C*)(args[2]);
*(B*)resp = B_fn(b0, b1, b2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[4];
ffi_type* cls_struct_fields[3];
ffi_type* cls_struct_fields1[3];
ffi_type* cls_struct_fields2[3];
ffi_type cls_struct_type, cls_struct_type1, cls_struct_type2;
ffi_type* dbl_arg_types[4];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
cls_struct_type1.size = 0;
cls_struct_type1.alignment = 0;
cls_struct_type1.type = FFI_TYPE_STRUCT;
cls_struct_type1.elements = cls_struct_fields1;
cls_struct_type2.size = 0;
cls_struct_type2.alignment = 0;
cls_struct_type2.type = FFI_TYPE_STRUCT;
cls_struct_type2.elements = cls_struct_fields2;
struct A e_dbl = { 1LL, 7};
struct B f_dbl = {{12LL , 127}, 99};
struct C g_dbl = { 2LL, 9};
struct B res_dbl;
cls_struct_fields[0] = &ffi_type_uint64;
cls_struct_fields[1] = &ffi_type_uchar;
cls_struct_fields[2] = NULL;
cls_struct_fields1[0] = &cls_struct_type;
cls_struct_fields1[1] = &ffi_type_uchar;
cls_struct_fields1[2] = NULL;
cls_struct_fields2[0] = &ffi_type_uint64;
cls_struct_fields2[1] = &ffi_type_uchar;
cls_struct_fields2[2] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type1;
dbl_arg_types[2] = &cls_struct_type2;
dbl_arg_types[3] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 3, &cls_struct_type1,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &e_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = &g_dbl;
args_dbl[3] = NULL;
ffi_call(&cif, FFI_FN(B_fn), &res_dbl, args_dbl);
/* { dg-output "1 7 12 127 99 2 9: 15 242 143" } */
CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a + g_dbl.d));
CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y + g_dbl.e));
CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b + g_dbl.e));
CHECK(ffi_prep_closure_loc(pcl, &cif, B_gn, NULL, code) == FFI_OK);
res_dbl = ((B(*)(A, B, C))(code))(e_dbl, f_dbl, g_dbl);
/* { dg-output "\n1 7 12 127 99 2 9: 15 242 143" } */
CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a + g_dbl.d));
CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y + g_dbl.e));
CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b + g_dbl.e));
exit(0);
}
@@ -1,131 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure passing with different structure size.
Contains structs as parameter of the struct itself.
Sample taken from Alan Modras patch to src/prep_cif.c.
Limitations: none.
PR: none.
Originator: <andreast@gcc.gnu.org> 20051010 */
/* { dg-do run } */
#include "ffitest.h"
typedef struct A {
unsigned char a;
unsigned long long b;
} A;
typedef struct B {
struct A x;
unsigned char y;
} B;
typedef struct C {
unsigned long d;
unsigned char e;
} C;
static B B_fn(struct A b2, struct B b3, struct C b4)
{
struct B result;
result.x.a = b2.a + b3.x.a + b4.d;
result.x.b = b2.b + b3.x.b + b3.y + b4.e;
result.y = b2.b + b3.x.b + b4.e;
printf("%d %d %d %d %d %d %d: %d %d %d\n", b2.a, (int)b2.b,
b3.x.a, (int)b3.x.b, b3.y, (int)b4.d, b4.e,
result.x.a, (int)result.x.b, result.y);
return result;
}
static void
B_gn(ffi_cif* cif __UNUSED__, void* resp, void** args,
void* userdata __UNUSED__)
{
struct A b0;
struct B b1;
struct C b2;
b0 = *(struct A*)(args[0]);
b1 = *(struct B*)(args[1]);
b2 = *(struct C*)(args[2]);
*(B*)resp = B_fn(b0, b1, b2);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[4];
ffi_type* cls_struct_fields[3];
ffi_type* cls_struct_fields1[3];
ffi_type* cls_struct_fields2[3];
ffi_type cls_struct_type, cls_struct_type1, cls_struct_type2;
ffi_type* dbl_arg_types[4];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
cls_struct_type1.size = 0;
cls_struct_type1.alignment = 0;
cls_struct_type1.type = FFI_TYPE_STRUCT;
cls_struct_type1.elements = cls_struct_fields1;
cls_struct_type2.size = 0;
cls_struct_type2.alignment = 0;
cls_struct_type2.type = FFI_TYPE_STRUCT;
cls_struct_type2.elements = cls_struct_fields2;
struct A e_dbl = { 1, 7LL};
struct B f_dbl = {{12.0 , 127}, 99};
struct C g_dbl = { 2, 9};
struct B res_dbl;
cls_struct_fields[0] = &ffi_type_uchar;
cls_struct_fields[1] = &ffi_type_uint64;
cls_struct_fields[2] = NULL;
cls_struct_fields1[0] = &cls_struct_type;
cls_struct_fields1[1] = &ffi_type_uchar;
cls_struct_fields1[2] = NULL;
cls_struct_fields2[0] = &ffi_type_ulong;
cls_struct_fields2[1] = &ffi_type_uchar;
cls_struct_fields2[2] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type1;
dbl_arg_types[2] = &cls_struct_type2;
dbl_arg_types[3] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 3, &cls_struct_type1,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &e_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = &g_dbl;
args_dbl[3] = NULL;
ffi_call(&cif, FFI_FN(B_fn), &res_dbl, args_dbl);
/* { dg-output "1 7 12 127 99 2 9: 15 242 143" } */
CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a + g_dbl.d));
CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y + g_dbl.e));
CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b + g_dbl.e));
CHECK(ffi_prep_closure_loc(pcl, &cif, B_gn, NULL, code) == FFI_OK);
res_dbl = ((B(*)(A, B, C))(code))(e_dbl, f_dbl, g_dbl);
/* { dg-output "\n1 7 12 127 99 2 9: 15 242 143" } */
CHECK( res_dbl.x.a == (e_dbl.a + f_dbl.x.a + g_dbl.d));
CHECK( res_dbl.x.b == (e_dbl.b + f_dbl.x.b + f_dbl.y + g_dbl.e));
CHECK( res_dbl.y == (e_dbl.b + f_dbl.x.b + g_dbl.e));
exit(0);
}
@@ -1,145 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure returning with different structure size.
Depending on the ABI. Check bigger struct which overlaps
the gp and fp register count on Darwin/AIX/ppc64.
Limitations: none.
PR: none.
Originator: Blake Chaffin 6/21/2007 */
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
#include "ffitest.h"
// 13 FPRs: 104 bytes
// 14 FPRs: 112 bytes
typedef struct struct_108byte {
double a;
double b;
double c;
double d;
double e;
double f;
double g;
double h;
double i;
double j;
double k;
double l;
double m;
int n;
} struct_108byte;
struct_108byte cls_struct_108byte_fn(
struct_108byte b0,
struct_108byte b1,
struct_108byte b2,
struct_108byte b3)
{
struct_108byte result;
result.a = b0.a + b1.a + b2.a + b3.a;
result.b = b0.b + b1.b + b2.b + b3.b;
result.c = b0.c + b1.c + b2.c + b3.c;
result.d = b0.d + b1.d + b2.d + b3.d;
result.e = b0.e + b1.e + b2.e + b3.e;
result.f = b0.f + b1.f + b2.f + b3.f;
result.g = b0.g + b1.g + b2.g + b3.g;
result.h = b0.h + b1.h + b2.h + b3.h;
result.i = b0.i + b1.i + b2.i + b3.i;
result.j = b0.j + b1.j + b2.j + b3.j;
result.k = b0.k + b1.k + b2.k + b3.k;
result.l = b0.l + b1.l + b2.l + b3.l;
result.m = b0.m + b1.m + b2.m + b3.m;
result.n = b0.n + b1.n + b2.n + b3.n;
printf("%g %g %g %g %g %g %g %g %g %g %g %g %g %d\n", result.a, result.b, result.c,
result.d, result.e, result.f, result.g, result.h, result.i,
result.j, result.k, result.l, result.m, result.n);
return result;
}
static void
cls_struct_108byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, void* userdata __UNUSED__)
{
struct_108byte b0, b1, b2, b3;
b0 = *(struct_108byte*)(args[0]);
b1 = *(struct_108byte*)(args[1]);
b2 = *(struct_108byte*)(args[2]);
b3 = *(struct_108byte*)(args[3]);
*(struct_108byte*)resp = cls_struct_108byte_fn(b0, b1, b2, b3);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[15];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct_108byte e_dbl = { 9.0, 2.0, 6.0, 5.0, 3.0, 4.0, 8.0, 1.0, 1.0, 2.0, 3.0, 7.0, 2.0, 7 };
struct_108byte f_dbl = { 1.0, 2.0, 3.0, 7.0, 2.0, 5.0, 6.0, 7.0, 4.0, 5.0, 7.0, 9.0, 1.0, 4 };
struct_108byte g_dbl = { 4.0, 5.0, 7.0, 9.0, 1.0, 1.0, 2.0, 9.0, 8.0, 6.0, 1.0, 4.0, 0.0, 3 };
struct_108byte h_dbl = { 8.0, 6.0, 1.0, 4.0, 0.0, 3.0, 3.0, 1.0, 9.0, 2.0, 6.0, 5.0, 3.0, 2 };
struct_108byte res_dbl;
cls_struct_fields[0] = &ffi_type_double;
cls_struct_fields[1] = &ffi_type_double;
cls_struct_fields[2] = &ffi_type_double;
cls_struct_fields[3] = &ffi_type_double;
cls_struct_fields[4] = &ffi_type_double;
cls_struct_fields[5] = &ffi_type_double;
cls_struct_fields[6] = &ffi_type_double;
cls_struct_fields[7] = &ffi_type_double;
cls_struct_fields[8] = &ffi_type_double;
cls_struct_fields[9] = &ffi_type_double;
cls_struct_fields[10] = &ffi_type_double;
cls_struct_fields[11] = &ffi_type_double;
cls_struct_fields[12] = &ffi_type_double;
cls_struct_fields[13] = &ffi_type_sint32;
cls_struct_fields[14] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = &cls_struct_type;
dbl_arg_types[3] = &cls_struct_type;
dbl_arg_types[4] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 4, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &e_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = &g_dbl;
args_dbl[3] = &h_dbl;
args_dbl[4] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_108byte_fn), &res_dbl, args_dbl);
/* { dg-output "22 15 17 25 6 13 19 18 22 15 17 25 6 16" } */
printf("res: %g %g %g %g %g %g %g %g %g %g %g %g %g %d\n", res_dbl.a, res_dbl.b,
res_dbl.c, res_dbl.d, res_dbl.e, res_dbl.f, res_dbl.g, res_dbl.h, res_dbl.i,
res_dbl.j, res_dbl.k, res_dbl.l, res_dbl.m, res_dbl.n);
/* { dg-output "\nres: 22 15 17 25 6 13 19 18 22 15 17 25 6 16" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_108byte_gn, NULL, code) == FFI_OK);
res_dbl = ((struct_108byte(*)(struct_108byte, struct_108byte,
struct_108byte, struct_108byte))(code))(e_dbl, f_dbl, g_dbl, h_dbl);
/* { dg-output "\n22 15 17 25 6 13 19 18 22 15 17 25 6 16" } */
printf("res: %g %g %g %g %g %g %g %g %g %g %g %g %g %d\n", res_dbl.a, res_dbl.b,
res_dbl.c, res_dbl.d, res_dbl.e, res_dbl.f, res_dbl.g, res_dbl.h, res_dbl.i,
res_dbl.j, res_dbl.k, res_dbl.l, res_dbl.m, res_dbl.n);
/* { dg-output "\nres: 22 15 17 25 6 13 19 18 22 15 17 25 6 16" } */
exit(0);
}
@@ -1,124 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure returning with different structure size.
Depending on the ABI. Check bigger struct which overlaps
the gp and fp register count on Darwin/AIX/ppc64.
Limitations: none.
PR: none.
Originator: Blake Chaffin 6/21/2007 */
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
#include "ffitest.h"
typedef struct struct_72byte {
double a;
double b;
double c;
double d;
double e;
double f;
double g;
double h;
double i;
} struct_72byte;
struct_72byte cls_struct_72byte_fn(
struct_72byte b0,
struct_72byte b1,
struct_72byte b2,
struct_72byte b3)
{
struct_72byte result;
result.a = b0.a + b1.a + b2.a + b3.a;
result.b = b0.b + b1.b + b2.b + b3.b;
result.c = b0.c + b1.c + b2.c + b3.c;
result.d = b0.d + b1.d + b2.d + b3.d;
result.e = b0.e + b1.e + b2.e + b3.e;
result.f = b0.f + b1.f + b2.f + b3.f;
result.g = b0.g + b1.g + b2.g + b3.g;
result.h = b0.h + b1.h + b2.h + b3.h;
result.i = b0.i + b1.i + b2.i + b3.i;
printf("%g %g %g %g %g %g %g %g %g\n", result.a, result.b, result.c,
result.d, result.e, result.f, result.g, result.h, result.i);
return result;
}
static void
cls_struct_72byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, void* userdata __UNUSED__)
{
struct_72byte b0, b1, b2, b3;
b0 = *(struct_72byte*)(args[0]);
b1 = *(struct_72byte*)(args[1]);
b2 = *(struct_72byte*)(args[2]);
b3 = *(struct_72byte*)(args[3]);
*(struct_72byte*)resp = cls_struct_72byte_fn(b0, b1, b2, b3);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[10];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct_72byte e_dbl = { 9.0, 2.0, 6.0, 5.0, 3.0, 4.0, 8.0, 1.0, 7.0 };
struct_72byte f_dbl = { 1.0, 2.0, 3.0, 7.0, 2.0, 5.0, 6.0, 7.0, 4.0 };
struct_72byte g_dbl = { 4.0, 5.0, 7.0, 9.0, 1.0, 1.0, 2.0, 9.0, 3.0 };
struct_72byte h_dbl = { 8.0, 6.0, 1.0, 4.0, 0.0, 3.0, 3.0, 1.0, 2.0 };
struct_72byte res_dbl;
cls_struct_fields[0] = &ffi_type_double;
cls_struct_fields[1] = &ffi_type_double;
cls_struct_fields[2] = &ffi_type_double;
cls_struct_fields[3] = &ffi_type_double;
cls_struct_fields[4] = &ffi_type_double;
cls_struct_fields[5] = &ffi_type_double;
cls_struct_fields[6] = &ffi_type_double;
cls_struct_fields[7] = &ffi_type_double;
cls_struct_fields[8] = &ffi_type_double;
cls_struct_fields[9] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = &cls_struct_type;
dbl_arg_types[3] = &cls_struct_type;
dbl_arg_types[4] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 4, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &e_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = &g_dbl;
args_dbl[3] = &h_dbl;
args_dbl[4] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_72byte_fn), &res_dbl, args_dbl);
/* { dg-output "22 15 17 25 6 13 19 18 16" } */
printf("res: %g %g %g %g %g %g %g %g %g\n", res_dbl.a, res_dbl.b, res_dbl.c,
res_dbl.d, res_dbl.e, res_dbl.f, res_dbl.g, res_dbl.h, res_dbl.i);
/* { dg-output "\nres: 22 15 17 25 6 13 19 18 16" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_72byte_gn, NULL, code) == FFI_OK);
res_dbl = ((struct_72byte(*)(struct_72byte, struct_72byte,
struct_72byte, struct_72byte))(code))(e_dbl, f_dbl, g_dbl, h_dbl);
/* { dg-output "\n22 15 17 25 6 13 19 18 16" } */
printf("res: %g %g %g %g %g %g %g %g %g\n", res_dbl.a, res_dbl.b, res_dbl.c,
res_dbl.d, res_dbl.e, res_dbl.f, res_dbl.g, res_dbl.h, res_dbl.i);
/* { dg-output "\nres: 22 15 17 25 6 13 19 18 16" } */
exit(0);
}
@@ -1,125 +0,0 @@
/* Area: ffi_call, closure_call
Purpose: Check structure returning with different structure size.
Depending on the ABI. Check bigger struct which overlaps
the gp and fp register count on Darwin/AIX/ppc64.
Limitations: none.
PR: none.
Originator: Blake Chaffin 6/21/2007 */
/* { dg-do run { xfail strongarm*-*-* xscale*-*-* } } */
/* { dg-options "-Wno-format" { target alpha*-dec-osf* } } */
#include "ffitest.h"
typedef struct struct_72byte {
double a;
double b;
double c;
double d;
double e;
double f;
double g;
double h;
long long i;
} struct_72byte;
struct_72byte cls_struct_72byte_fn(
struct_72byte b0,
struct_72byte b1,
struct_72byte b2,
struct_72byte b3)
{
struct_72byte result;
result.a = b0.a + b1.a + b2.a + b3.a;
result.b = b0.b + b1.b + b2.b + b3.b;
result.c = b0.c + b1.c + b2.c + b3.c;
result.d = b0.d + b1.d + b2.d + b3.d;
result.e = b0.e + b1.e + b2.e + b3.e;
result.f = b0.f + b1.f + b2.f + b3.f;
result.g = b0.g + b1.g + b2.g + b3.g;
result.h = b0.h + b1.h + b2.h + b3.h;
result.i = b0.i + b1.i + b2.i + b3.i;
printf("%g %g %g %g %g %g %g %g %" PRIdLL "\n", result.a, result.b, result.c,
result.d, result.e, result.f, result.g, result.h, result.i);
return result;
}
static void
cls_struct_72byte_gn(ffi_cif* cif __UNUSED__, void* resp, void** args, void* userdata __UNUSED__)
{
struct_72byte b0, b1, b2, b3;
b0 = *(struct_72byte*)(args[0]);
b1 = *(struct_72byte*)(args[1]);
b2 = *(struct_72byte*)(args[2]);
b3 = *(struct_72byte*)(args[3]);
*(struct_72byte*)resp = cls_struct_72byte_fn(b0, b1, b2, b3);
}
int main (void)
{
ffi_cif cif;
void *code;
ffi_closure *pcl = ffi_closure_alloc(sizeof(ffi_closure), &code);
void* args_dbl[5];
ffi_type* cls_struct_fields[10];
ffi_type cls_struct_type;
ffi_type* dbl_arg_types[5];
cls_struct_type.size = 0;
cls_struct_type.alignment = 0;
cls_struct_type.type = FFI_TYPE_STRUCT;
cls_struct_type.elements = cls_struct_fields;
struct_72byte e_dbl = { 9.0, 2.0, 6.0, 5.0, 3.0, 4.0, 8.0, 1.0, 7 };
struct_72byte f_dbl = { 1.0, 2.0, 3.0, 7.0, 2.0, 5.0, 6.0, 7.0, 4 };
struct_72byte g_dbl = { 4.0, 5.0, 7.0, 9.0, 1.0, 1.0, 2.0, 9.0, 3 };
struct_72byte h_dbl = { 8.0, 6.0, 1.0, 4.0, 0.0, 3.0, 3.0, 1.0, 2 };
struct_72byte res_dbl;
cls_struct_fields[0] = &ffi_type_double;
cls_struct_fields[1] = &ffi_type_double;
cls_struct_fields[2] = &ffi_type_double;
cls_struct_fields[3] = &ffi_type_double;
cls_struct_fields[4] = &ffi_type_double;
cls_struct_fields[5] = &ffi_type_double;
cls_struct_fields[6] = &ffi_type_double;
cls_struct_fields[7] = &ffi_type_double;
cls_struct_fields[8] = &ffi_type_sint64;
cls_struct_fields[9] = NULL;
dbl_arg_types[0] = &cls_struct_type;
dbl_arg_types[1] = &cls_struct_type;
dbl_arg_types[2] = &cls_struct_type;
dbl_arg_types[3] = &cls_struct_type;
dbl_arg_types[4] = NULL;
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 4, &cls_struct_type,
dbl_arg_types) == FFI_OK);
args_dbl[0] = &e_dbl;
args_dbl[1] = &f_dbl;
args_dbl[2] = &g_dbl;
args_dbl[3] = &h_dbl;
args_dbl[4] = NULL;
ffi_call(&cif, FFI_FN(cls_struct_72byte_fn), &res_dbl, args_dbl);
/* { dg-output "22 15 17 25 6 13 19 18 16" } */
printf("res: %g %g %g %g %g %g %g %g %" PRIdLL "\n", res_dbl.a, res_dbl.b, res_dbl.c,
res_dbl.d, res_dbl.e, res_dbl.f, res_dbl.g, res_dbl.h, res_dbl.i);
/* { dg-output "\nres: 22 15 17 25 6 13 19 18 16" } */
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_72byte_gn, NULL, code) == FFI_OK);
res_dbl = ((struct_72byte(*)(struct_72byte, struct_72byte,
struct_72byte, struct_72byte))(code))(e_dbl, f_dbl, g_dbl, h_dbl);
/* { dg-output "\n22 15 17 25 6 13 19 18 16" } */
printf("res: %g %g %g %g %g %g %g %g %" PRIdLL "\n", res_dbl.a, res_dbl.b, res_dbl.c,
res_dbl.d, res_dbl.e, res_dbl.f, res_dbl.g, res_dbl.h, res_dbl.i);
/* { dg-output "\nres: 22 15 17 25 6 13 19 18 16" } */
exit(0);
}
@@ -1,44 +0,0 @@
/* Area: ffi_call
Purpose: Check fastcall strlen call on X86_WIN32 systems.
Limitations: none.
PR: none.
Originator: From the original ffitest.c */
/* { dg-do run { target i?86-*-cygwin* i?86-*-mingw* } } */
#include "ffitest.h"
static size_t __attribute__((fastcall)) my_fastcall_strlen(char *s)
{
return (strlen(s));
}
int main (void)
{
ffi_cif cif;
ffi_type *args[MAX_ARGS];
void *values[MAX_ARGS];
ffi_arg rint;
char *s;
args[0] = &ffi_type_pointer;
values[0] = (void*) &s;
/* Initialize the cif */
CHECK(ffi_prep_cif(&cif, FFI_FASTCALL, 1,
&ffi_type_sint, args) == FFI_OK);
s = "a";
ffi_call(&cif, FFI_FN(my_fastcall_strlen), &rint, values);
CHECK(rint == 1);
s = "1234567";
ffi_call(&cif, FFI_FN(my_fastcall_strlen), &rint, values);
CHECK(rint == 7);
s = "1234567890123456789012345";
ffi_call(&cif, FFI_FN(my_fastcall_strlen), &rint, values);
CHECK(rint == 25);
printf("fastcall strlen tests passed\n");
exit(0);
}
@@ -1,65 +0,0 @@
/* Area: ffi_call
Purpose: Check structures with fastcall/thiscall convention.
Limitations: none.
PR: none.
Originator: From the original ffitest.c */
/* { dg-do run { target i?86-*-cygwin* i?86-*-mingw* } } */
#include "ffitest.h"
typedef struct
{
unsigned char uc;
double d;
unsigned int ui;
} test_structure_1;
static __attribute__ ((fastcall)) test_structure_1 struct1(test_structure_1 ts)
{
ts.uc++;
ts.d--;
ts.ui++;
return ts;
}
int main (void)
{
ffi_cif cif;
ffi_type *args[MAX_ARGS];
void *values[MAX_ARGS];
ffi_type ts1_type;
ffi_type *ts1_type_elements[4];
ts1_type.size = 0;
ts1_type.alignment = 0;
ts1_type.type = FFI_TYPE_STRUCT;
ts1_type.elements = ts1_type_elements;
ts1_type_elements[0] = &ffi_type_uchar;
ts1_type_elements[1] = &ffi_type_double;
ts1_type_elements[2] = &ffi_type_uint;
ts1_type_elements[3] = NULL;
test_structure_1 ts1_arg;
/* This is a hack to get a properly aligned result buffer */
test_structure_1 *ts1_result =
(test_structure_1 *) malloc (sizeof(test_structure_1));
args[0] = &ts1_type;
values[0] = &ts1_arg;
/* Initialize the cif */
CHECK(ffi_prep_cif(&cif, FFI_FASTCALL, 1,
&ts1_type, args) == FFI_OK);
ts1_arg.uc = '\x01';
ts1_arg.d = 3.14159;
ts1_arg.ui = 555;
ffi_call(&cif, FFI_FN(struct1), ts1_result, values);
CHECK(ts1_result->ui == 556);
CHECK(ts1_result->d == 3.14159 - 1);
free (ts1_result);
exit(0);
}
@@ -1,67 +0,0 @@
/* Area: ffi_call
Purpose: Check structures.
Limitations: none.
PR: none.
Originator: From the original ffitest.c */
/* { dg-do run } */
#include "ffitest.h"
typedef struct
{
double d1;
double d2;
} test_structure_2;
static test_structure_2 struct2(test_structure_2 ts)
{
ts.d1--;
ts.d2--;
return ts;
}
int main (void)
{
ffi_cif cif;
ffi_type *args[MAX_ARGS];
void *values[MAX_ARGS];
test_structure_2 ts2_arg;
ffi_type ts2_type;
ffi_type *ts2_type_elements[3];
ts2_type.size = 0;
ts2_type.alignment = 0;
ts2_type.type = FFI_TYPE_STRUCT;
ts2_type.elements = ts2_type_elements;
ts2_type_elements[0] = &ffi_type_double;
ts2_type_elements[1] = &ffi_type_double;
ts2_type_elements[2] = NULL;
/* This is a hack to get a properly aligned result buffer */
test_structure_2 *ts2_result =
(test_structure_2 *) malloc (sizeof(test_structure_2));
args[0] = &ts2_type;
values[0] = &ts2_arg;
/* Initialize the cif */
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ts2_type, args) == FFI_OK);
ts2_arg.d1 = 5.55;
ts2_arg.d2 = 6.66;
printf ("%g\n", ts2_arg.d1);
printf ("%g\n", ts2_arg.d2);
ffi_call(&cif, FFI_FN(struct2), ts2_result, values);
printf ("%g\n", ts2_result->d1);
printf ("%g\n", ts2_result->d2);
CHECK(ts2_result->d1 == 5.55 - 1);
CHECK(ts2_result->d2 == 6.66 - 1);
free (ts2_result);
exit(0);
}
@@ -1,67 +0,0 @@
/* Area: ffi_call
Purpose: Check structures in fastcall/stdcall function
Limitations: none.
PR: none.
Originator: From the original ffitest.c */
/* { dg-do run { target i?86-*-cygwin* i?86-*-mingw* } } */
#include "ffitest.h"
typedef struct
{
double d1;
double d2;
} test_structure_2;
static test_structure_2 __attribute__ ((fastcall)) struct2(test_structure_2 ts)
{
ts.d1--;
ts.d2--;
return ts;
}
int main (void)
{
ffi_cif cif;
ffi_type *args[MAX_ARGS];
void *values[MAX_ARGS];
test_structure_2 ts2_arg;
ffi_type ts2_type;
ffi_type *ts2_type_elements[3];
ts2_type.size = 0;
ts2_type.alignment = 0;
ts2_type.type = FFI_TYPE_STRUCT;
ts2_type.elements = ts2_type_elements;
ts2_type_elements[0] = &ffi_type_double;
ts2_type_elements[1] = &ffi_type_double;
ts2_type_elements[2] = NULL;
/* This is a hack to get a properly aligned result buffer */
test_structure_2 *ts2_result =
(test_structure_2 *) malloc (sizeof(test_structure_2));
args[0] = &ts2_type;
values[0] = &ts2_arg;
/* Initialize the cif */
CHECK(ffi_prep_cif(&cif, FFI_FASTCALL, 1, &ts2_type, args) == FFI_OK);
ts2_arg.d1 = 5.55;
ts2_arg.d2 = 6.66;
printf ("%g\n", ts2_arg.d1);
printf ("%g\n", ts2_arg.d2);
ffi_call(&cif, FFI_FN(struct2), ts2_result, values);
printf ("%g\n", ts2_result->d1);
printf ("%g\n", ts2_result->d2);
CHECK(ts2_result->d1 == 5.55 - 1);
CHECK(ts2_result->d2 == 6.66 - 1);
free (ts2_result);
exit(0);
}

Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais