yakg 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/VERSION +1 -1
- data/lib/yakg/backend/dbus-secret-service.rb +5 -0
- data/lib/yakg/backend/macos-keychain.rb +5 -4
- data/lib/yakg/backend/win32-dpapi.rb +150 -0
- data/lib/yakg/backend.rb +3 -0
- data/lib/yakg.rb +11 -2
- data/spec/yakg_spec.rb +4 -0
- data/vendor/gems/.gitignore +1 -0
- data/vendor/gems/README.md +49 -0
- data/vendor/gems/installit.sh +63 -35
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/.require_paths +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/COPYING +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/COPYING.LESSER +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/History.txt +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/LICENSE +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/README.md +0 -0
- data/vendor/gems/ruby/{1.9.1/gems/ffi-1.8.1 → 1.8/gems/ffi-1.9.0}/Rakefile +2 -1
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/ffi.gemspec +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/gen/Rakefile +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/gen/log +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/autopointer.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/buffer.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/callback.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/enum.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/errno.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/ffi.iml +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/ffi.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/io.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/library.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/managedstruct.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/memorypointer.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/arm-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-cygwin/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-darwin/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-freebsd/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1/lib/ffi/platform/i486-gnu → ffi-1.9.0/lib/ffi/platform/i386-gnu}/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-netbsd/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1/lib/ffi/platform/x86_64-freebsd → ffi-1.9.0/lib/ffi/platform/i386-openbsd}/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-solaris/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-windows/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/ia64-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/mips-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/mipsel-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/powerpc-aix/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/powerpc-darwin/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/powerpc-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/s390-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/s390x-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/sparc-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/sparc-solaris/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/sparcv9-solaris/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-darwin/types.conf +0 -0
- data/vendor/gems/ruby/{1.9.1/gems/ffi-1.8.1 → 1.8/gems/ffi-1.9.0}/lib/ffi/platform/x86_64-freebsd/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1/lib/ffi/platform/i386-openbsd → ffi-1.9.0/lib/ffi/platform/x86_64-netbsd}/types.conf +0 -0
- data/vendor/gems/ruby/{2.0.0/gems/ffi-1.8.1/lib/ffi/platform/x86_64-freebsd → 1.8/gems/ffi-1.9.0/lib/ffi/platform/x86_64-openbsd}/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-solaris/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-windows/types.conf +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/pointer.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/struct.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/struct_layout_builder.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/const_generator.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/generator.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/generator_task.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/struct_generator.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/types_generator.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/types.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/union.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/variadic.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/ffi-1.9.0/lib/ffi/version.rb +4 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi.rb +0 -0
- data/vendor/gems/ruby/1.8/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi_c.bundle +0 -0
- data/vendor/gems/ruby/1.8/specifications/{ffi-1.8.1.gemspec → ffi-1.9.0.gemspec} +4 -4
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/COPYING +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/COPYING.LESSER +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/History.txt +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/LICENSE +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/README.md +0 -0
- data/vendor/gems/ruby/{2.0.0/gems/ffi-1.8.1 → 1.9.1/gems/ffi-1.9.0}/Rakefile +2 -1
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/ffi.gemspec +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/gen/Rakefile +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/gen/log +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/autopointer.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/buffer.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/callback.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/enum.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/errno.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/ffi.iml +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/ffi.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/io.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/library.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/managedstruct.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/memorypointer.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/arm-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-cygwin/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-darwin/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-freebsd/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1/lib/ffi/platform/i486-gnu → ffi-1.9.0/lib/ffi/platform/i386-gnu}/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-linux/types.conf +0 -0
- data/vendor/gems/ruby/{1.8/gems/ffi-1.8.1/lib/ffi/platform/x86_64-netbsd → 1.9.1/gems/ffi-1.9.0/lib/ffi/platform/i386-netbsd}/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.9.0/lib/ffi/platform/i386-openbsd/types.conf +128 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-solaris/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-windows/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/ia64-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/mips-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/mipsel-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/powerpc-aix/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/powerpc-darwin/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/powerpc-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/s390-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/s390x-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/sparc-linux/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/sparc-solaris/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/sparcv9-solaris/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-darwin/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.9.0/lib/ffi/platform/x86_64-freebsd/types.conf +128 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-linux/types.conf +0 -0
- data/vendor/gems/ruby/{1.8/gems/ffi-1.8.1/lib/ffi/platform/x86_64-openbsd → 1.9.1/gems/ffi-1.9.0/lib/ffi/platform/x86_64-netbsd}/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.9.0/lib/ffi/platform/x86_64-openbsd/types.conf +128 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-solaris/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-windows/types.conf +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/pointer.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/struct.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/struct_layout_builder.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/const_generator.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/generator.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/generator_task.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/struct_generator.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/types_generator.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/types.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/union.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/variadic.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.9.0/lib/ffi/version.rb +4 -0
- data/vendor/gems/ruby/1.9.1/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi.rb +0 -0
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.9.0/lib/ffi_c.bundle +0 -0
- data/vendor/gems/ruby/1.9.1/specifications/corefoundation-0.2.0.gemspec +7 -9
- data/vendor/gems/ruby/1.9.1/specifications/ffi-1.9.0.gemspec +42 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/COPYING +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/COPYING.LESSER +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/History.txt +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/LICENSE +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/README.md +0 -0
- data/vendor/gems/ruby/{1.8/gems/ffi-1.8.1 → 2.0.0/gems/ffi-1.9.0}/Rakefile +2 -1
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/ffi.gemspec +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/gen/Rakefile +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/gen/log +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/autopointer.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/buffer.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/callback.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/enum.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/errno.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/ffi.iml +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/ffi.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/io.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/library.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/managedstruct.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/memorypointer.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/arm-linux/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-cygwin/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-darwin/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-freebsd/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1/lib/ffi/platform/i486-gnu → ffi-1.9.0/lib/ffi/platform/i386-gnu}/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-linux/types.conf +0 -0
- data/vendor/gems/ruby/{1.9.1/gems/ffi-1.8.1 → 2.0.0/gems/ffi-1.9.0}/lib/ffi/platform/i386-netbsd/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/platform/i386-openbsd/types.conf +128 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-solaris/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/i386-windows/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/ia64-linux/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/mips-linux/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/mipsel-linux/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/powerpc-aix/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/powerpc-darwin/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/powerpc-linux/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/s390-linux/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/s390x-linux/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/sparc-linux/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/sparc-solaris/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/sparcv9-solaris/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-darwin/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/platform/x86_64-freebsd/types.conf +128 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-linux/types.conf +0 -0
- data/vendor/gems/ruby/{1.9.1/gems/ffi-1.8.1/lib/ffi/platform/i386-openbsd → 2.0.0/gems/ffi-1.9.0/lib/ffi/platform/x86_64-netbsd}/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/platform/x86_64-openbsd/types.conf +128 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-solaris/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform/x86_64-windows/types.conf +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/platform.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/pointer.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/struct.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/struct_layout_builder.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/const_generator.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/generator.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/generator_task.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/struct_generator.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/tools/types_generator.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/types.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/union.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi/variadic.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi/version.rb +4 -0
- data/vendor/gems/ruby/2.0.0/gems/{ffi-1.8.1 → ffi-1.9.0}/lib/ffi.rb +0 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.9.0/lib/ffi_c.bundle +0 -0
- data/vendor/gems/ruby/2.0.0/specifications/corefoundation-0.2.0.gemspec +1 -1
- data/vendor/gems/ruby/2.0.0/specifications/{ffi-1.8.1.gemspec → ffi-1.9.0.gemspec} +4 -4
- metadata +200 -277
- data/vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/array_spec.rb +0 -92
- data/vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/boolean_spec.rb +0 -24
- data/vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/data_spec.rb +0 -30
- data/vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/date_spec.rb +0 -25
- data/vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/dictionary_spec.rb +0 -81
- data/vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/extensions_spec.rb +0 -127
- data/vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/null_spec.rb +0 -7
- data/vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/number_spec.rb +0 -52
- data/vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/spec_helper.rb +0 -10
- data/vendor/gems/ruby/1.8/gems/corefoundation-0.2.0/spec/string_spec.rb +0 -48
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/lib/ffi/version.rb +0 -4
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/Benchmark.c +0 -52
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/BoolTest.c +0 -31
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/BufferTest.c +0 -31
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/ClosureTest.c +0 -190
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/EnumTest.c +0 -34
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/FunctionTest.c +0 -58
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/GNUmakefile +0 -149
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/GlobalVariable.c +0 -62
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/LastErrorTest.c +0 -21
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/NumberTest.c +0 -132
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/PointerTest.c +0 -63
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/ReferenceTest.c +0 -23
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/StringTest.c +0 -34
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/StructTest.c +0 -240
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/UnionTest.c +0 -43
- data/vendor/gems/ruby/1.8/gems/ffi-1.8.1/libtest/VariadicTest.c +0 -62
- data/vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/array_spec.rb +0 -92
- data/vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/boolean_spec.rb +0 -24
- data/vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/data_spec.rb +0 -30
- data/vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/date_spec.rb +0 -25
- data/vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/dictionary_spec.rb +0 -81
- data/vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/extensions_spec.rb +0 -127
- data/vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/null_spec.rb +0 -7
- data/vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/number_spec.rb +0 -52
- data/vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/spec_helper.rb +0 -10
- data/vendor/gems/ruby/1.9.1/gems/corefoundation-0.2.0/spec/string_spec.rb +0 -48
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/.require_paths +0 -2
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/lib/ffi/platform/x86_64-netbsd/types.conf +0 -126
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/lib/ffi/platform/x86_64-openbsd/types.conf +0 -126
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/lib/ffi/version.rb +0 -4
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/lib/ffi_c.bundle +0 -0
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/Benchmark.c +0 -52
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/BoolTest.c +0 -31
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/BufferTest.c +0 -31
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/ClosureTest.c +0 -190
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/EnumTest.c +0 -34
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/FunctionTest.c +0 -58
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/GNUmakefile +0 -149
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/GlobalVariable.c +0 -62
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/LastErrorTest.c +0 -21
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/NumberTest.c +0 -132
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/PointerTest.c +0 -63
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/ReferenceTest.c +0 -23
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/StringTest.c +0 -34
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/StructTest.c +0 -240
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/UnionTest.c +0 -43
- data/vendor/gems/ruby/1.9.1/gems/ffi-1.8.1/libtest/VariadicTest.c +0 -62
- data/vendor/gems/ruby/1.9.1/specifications/ffi-1.8.1.gemspec +0 -43
- data/vendor/gems/ruby/2.0.0/build_info/corefoundation-0.2.0.info +0 -1
- data/vendor/gems/ruby/2.0.0/build_info/ffi-1.8.1.info +0 -1
- data/vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/array_spec.rb +0 -92
- data/vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/boolean_spec.rb +0 -24
- data/vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/data_spec.rb +0 -30
- data/vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/date_spec.rb +0 -25
- data/vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/dictionary_spec.rb +0 -81
- data/vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/extensions_spec.rb +0 -127
- data/vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/null_spec.rb +0 -7
- data/vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/number_spec.rb +0 -52
- data/vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/spec_helper.rb +0 -10
- data/vendor/gems/ruby/2.0.0/gems/corefoundation-0.2.0/spec/string_spec.rb +0 -48
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/lib/ffi/platform/i386-netbsd/types.conf +0 -126
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/lib/ffi/platform/i386-openbsd/types.conf +0 -126
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/lib/ffi/platform/x86_64-netbsd/types.conf +0 -126
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/lib/ffi/platform/x86_64-openbsd/types.conf +0 -126
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/lib/ffi/version.rb +0 -4
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/lib/ffi_c.bundle +0 -0
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/Benchmark.c +0 -52
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/BoolTest.c +0 -31
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/BufferTest.c +0 -31
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/ClosureTest.c +0 -190
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/EnumTest.c +0 -34
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/FunctionTest.c +0 -58
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/GNUmakefile +0 -149
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/GlobalVariable.c +0 -62
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/LastErrorTest.c +0 -21
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/NumberTest.c +0 -132
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/PointerTest.c +0 -63
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/ReferenceTest.c +0 -23
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/StringTest.c +0 -34
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/StructTest.c +0 -240
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/UnionTest.c +0 -43
- data/vendor/gems/ruby/2.0.0/gems/ffi-1.8.1/libtest/VariadicTest.c +0 -62
@@ -1,190 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (c) 2007 Wayne Meissner. All rights reserved.
|
3
|
-
*
|
4
|
-
* For licensing, see LICENSE.SPECS
|
5
|
-
*/
|
6
|
-
|
7
|
-
#include <stdlib.h>
|
8
|
-
#include <stdbool.h>
|
9
|
-
#ifndef _WIN32
|
10
|
-
# include <pthread.h>
|
11
|
-
#else
|
12
|
-
# include <windows.h>
|
13
|
-
# include <process.h>
|
14
|
-
#endif
|
15
|
-
|
16
|
-
#define R(T, rtype) rtype testClosureVr##T(rtype (*closure)(void)) { \
|
17
|
-
return closure != NULL ? (*closure)() : (rtype) 0; \
|
18
|
-
}
|
19
|
-
|
20
|
-
#define P(T, ptype) void testClosure##T##rV(void (*closure)(ptype), ptype a1) { \
|
21
|
-
if (closure != NULL) (*closure)(a1); \
|
22
|
-
}
|
23
|
-
|
24
|
-
void testClosureVrV(void (*closure)(void))
|
25
|
-
{
|
26
|
-
(*closure)();
|
27
|
-
}
|
28
|
-
|
29
|
-
R(Z, bool);
|
30
|
-
R(B, char);
|
31
|
-
R(S, short);
|
32
|
-
R(I, int);
|
33
|
-
R(L, long);
|
34
|
-
R(J, long long);
|
35
|
-
R(LL, long long);
|
36
|
-
R(F, float);
|
37
|
-
R(D, double);
|
38
|
-
R(P, const void*);
|
39
|
-
|
40
|
-
|
41
|
-
P(Z, bool);
|
42
|
-
P(B, char);
|
43
|
-
P(S, short);
|
44
|
-
P(I, int);
|
45
|
-
P(L, long);
|
46
|
-
P(J, long long);
|
47
|
-
P(LL, long long);
|
48
|
-
P(F, float);
|
49
|
-
P(D, double);
|
50
|
-
P(P, const void*);
|
51
|
-
P(UL, unsigned long);
|
52
|
-
|
53
|
-
void testOptionalClosureBrV(void (*closure)(char), char a1)
|
54
|
-
{
|
55
|
-
if (closure) {
|
56
|
-
(*closure)(a1);
|
57
|
-
}
|
58
|
-
}
|
59
|
-
|
60
|
-
|
61
|
-
struct ThreadVrV {
|
62
|
-
void (*closure)(void);
|
63
|
-
int count;
|
64
|
-
};
|
65
|
-
|
66
|
-
static void *
|
67
|
-
threadVrV(void *arg)
|
68
|
-
{
|
69
|
-
struct ThreadVrV* t = (struct ThreadVrV *) arg;
|
70
|
-
|
71
|
-
int i;
|
72
|
-
for (i = 0; i < t->count; i++) {
|
73
|
-
(*t->closure)();
|
74
|
-
}
|
75
|
-
|
76
|
-
return NULL;
|
77
|
-
}
|
78
|
-
|
79
|
-
void testThreadedClosureVrV(void (*closure)(void), int n)
|
80
|
-
{
|
81
|
-
struct ThreadVrV arg = {closure, n};
|
82
|
-
#ifndef _WIN32
|
83
|
-
pthread_t t;
|
84
|
-
pthread_create(&t, NULL, threadVrV, &arg);
|
85
|
-
pthread_join(t, NULL);
|
86
|
-
#else
|
87
|
-
HANDLE hThread = (HANDLE) _beginthread((void (*)(void *))threadVrV, 0, &arg);
|
88
|
-
WaitForSingleObject(hThread, INFINITE);
|
89
|
-
#endif
|
90
|
-
}
|
91
|
-
|
92
|
-
struct s8f32s32 {
|
93
|
-
char s8;
|
94
|
-
float f32;
|
95
|
-
int s32;
|
96
|
-
};
|
97
|
-
|
98
|
-
// Takes a struct argument
|
99
|
-
void testClosureTrV(void (*closure)(struct s8f32s32 s), struct s8f32s32* s)
|
100
|
-
{
|
101
|
-
(*closure)(*s);
|
102
|
-
}
|
103
|
-
|
104
|
-
// Returns a struct value
|
105
|
-
struct s8f32s32 testClosureVrT(struct s8f32s32 (*closure)())
|
106
|
-
{
|
107
|
-
return (*closure)();
|
108
|
-
}
|
109
|
-
|
110
|
-
typedef int (*returnTypeClosure_t)(int) ;
|
111
|
-
typedef returnTypeClosure_t (*lookupClosure_t)();
|
112
|
-
|
113
|
-
int testReturnsClosure(lookupClosure_t lookup, int val)
|
114
|
-
{
|
115
|
-
returnTypeClosure_t func = lookup ? (*lookup)() : NULL;
|
116
|
-
return func ? (*func)(val) : 0;
|
117
|
-
}
|
118
|
-
|
119
|
-
static int multiplyByTwo(int value)
|
120
|
-
{
|
121
|
-
return value * 2;
|
122
|
-
}
|
123
|
-
|
124
|
-
returnTypeClosure_t testReturnsFunctionPointer()
|
125
|
-
{
|
126
|
-
return multiplyByTwo;
|
127
|
-
}
|
128
|
-
|
129
|
-
typedef int (*argumentClosure_t)(int);
|
130
|
-
typedef int (*withArgumentClosure_t)(argumentClosure_t, int);
|
131
|
-
|
132
|
-
int testArgumentClosure(withArgumentClosure_t closure_with, argumentClosure_t closure_arg, int val)
|
133
|
-
{
|
134
|
-
return (*closure_with)(closure_arg, val);
|
135
|
-
}
|
136
|
-
|
137
|
-
|
138
|
-
//
|
139
|
-
// These macros produce functions of the form:
|
140
|
-
// testClosureBIrV(void (*closure)(char, int), char a1, int a2) {}
|
141
|
-
//
|
142
|
-
#define C2_(J1, J2, N1, N2) \
|
143
|
-
void testClosure##J1##J2##rV(void (*closure)(N1, N2), N1 a1, N2 a2) \
|
144
|
-
{ \
|
145
|
-
if (closure != NULL) (*closure)(a1, a2); \
|
146
|
-
}
|
147
|
-
|
148
|
-
#define C2(J, N) \
|
149
|
-
C2_(B, J, char, N) \
|
150
|
-
C2_(S, J, short, N) \
|
151
|
-
C2_(I, J, int, N) \
|
152
|
-
C2_(LL, J, long long, N) \
|
153
|
-
C2_(F, J, float, N) \
|
154
|
-
C2_(D, J, double, N) \
|
155
|
-
|
156
|
-
|
157
|
-
C2(B, char);
|
158
|
-
C2(S, short);
|
159
|
-
C2(I, int);
|
160
|
-
C2(LL, long long);
|
161
|
-
C2(F, float);
|
162
|
-
C2(D, double);
|
163
|
-
|
164
|
-
#define C3_(J1, J2, J3, N1, N2, N3) \
|
165
|
-
void testClosure##J1##J2##J3##rV(void (*closure)(N1, N2, N3), N1 a1, N2 a2, N3 a3) \
|
166
|
-
{ \
|
167
|
-
(*closure)(a1, a2, a3); \
|
168
|
-
}
|
169
|
-
|
170
|
-
|
171
|
-
#define C3(J, N) \
|
172
|
-
C3_(B, J, B, char, N, char) \
|
173
|
-
C3_(S, J, S, short, N, short) \
|
174
|
-
C3_(I, J, I, int, N, int) \
|
175
|
-
C3_(LL, J, LL, long long, N, long long) \
|
176
|
-
C3_(F, J, F, float, N, float) \
|
177
|
-
C3_(D, J, D, double, N, double) \
|
178
|
-
|
179
|
-
C3(B, char);
|
180
|
-
C3(S, short);
|
181
|
-
C3(I, int);
|
182
|
-
C3(LL, long long);
|
183
|
-
C3(F, float);
|
184
|
-
C3(D, double);
|
185
|
-
C3_(B, S, I, char, short, int);
|
186
|
-
C3_(B, S, LL, char, short, long long);
|
187
|
-
C3_(LL, S, B, long long, short, char);
|
188
|
-
C3_(LL, B, S, long long, char, short);
|
189
|
-
|
190
|
-
|
@@ -1,34 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (c) 2007 Wayne Meissner. All rights reserved.
|
3
|
-
*
|
4
|
-
* For licensing, see LICENSE.SPECS
|
5
|
-
*/
|
6
|
-
|
7
|
-
int test_untagged_enum(int val) {
|
8
|
-
return val;
|
9
|
-
}
|
10
|
-
|
11
|
-
int test_untagged_typedef_enum(int val) {
|
12
|
-
return val;
|
13
|
-
}
|
14
|
-
|
15
|
-
typedef enum {c1, c2, c3, c4} enum_type1;
|
16
|
-
enum_type1 test_tagged_typedef_enum1(enum_type1 val) {
|
17
|
-
return val;
|
18
|
-
}
|
19
|
-
|
20
|
-
typedef enum {c5 = 42, c6, c7, c8} enum_type2;
|
21
|
-
enum_type2 test_tagged_typedef_enum2(enum_type2 val) {
|
22
|
-
return val;
|
23
|
-
}
|
24
|
-
|
25
|
-
typedef enum {c9 = 42, c10, c11 = 4242, c12} enum_type3;
|
26
|
-
enum_type3 test_tagged_typedef_enum3(enum_type3 val) {
|
27
|
-
return val;
|
28
|
-
}
|
29
|
-
|
30
|
-
typedef enum {c13 = 42, c14 = 4242, c15 = 424242, c16 = 42424242} enum_type4;
|
31
|
-
enum_type4 test_tagged_typedef_enum4(enum_type4 val) {
|
32
|
-
return val;
|
33
|
-
}
|
34
|
-
|
@@ -1,58 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (c) 2007 Wayne Meissner. All rights reserved.
|
3
|
-
*
|
4
|
-
* For licensing, see LICENSE.SPECS
|
5
|
-
*/
|
6
|
-
|
7
|
-
#ifdef _WIN32
|
8
|
-
#include <windows.h>
|
9
|
-
#define sleep(x) Sleep(x)
|
10
|
-
#endif
|
11
|
-
|
12
|
-
#ifndef _WIN32
|
13
|
-
#include <unistd.h>
|
14
|
-
#include <pthread.h>
|
15
|
-
#endif
|
16
|
-
|
17
|
-
int testAdd(int a, int b)
|
18
|
-
{
|
19
|
-
return a + b;
|
20
|
-
};
|
21
|
-
|
22
|
-
int testFunctionAdd(int a, int b, int (*f)(int, int))
|
23
|
-
{
|
24
|
-
return f(a, b);
|
25
|
-
};
|
26
|
-
|
27
|
-
void testBlocking(int seconds) {
|
28
|
-
sleep(seconds);
|
29
|
-
};
|
30
|
-
|
31
|
-
struct async_data {
|
32
|
-
void (*fn)(int);
|
33
|
-
int value;
|
34
|
-
};
|
35
|
-
|
36
|
-
static void* asyncThreadCall(void *data)
|
37
|
-
{
|
38
|
-
struct async_data* d = (struct async_data *) data;
|
39
|
-
if (d != NULL && d->fn != NULL) {
|
40
|
-
(*d->fn)(d->value);
|
41
|
-
}
|
42
|
-
|
43
|
-
return NULL;
|
44
|
-
}
|
45
|
-
|
46
|
-
void testAsyncCallback(void (*fn)(int), int value)
|
47
|
-
{
|
48
|
-
#ifndef _WIN32
|
49
|
-
pthread_t t;
|
50
|
-
struct async_data d;
|
51
|
-
d.fn = fn;
|
52
|
-
d.value = value;
|
53
|
-
pthread_create(&t, NULL, asyncThreadCall, &d);
|
54
|
-
pthread_join(t, NULL);
|
55
|
-
#else
|
56
|
-
(*fn)(value);
|
57
|
-
#endif
|
58
|
-
}
|
@@ -1,149 +0,0 @@
|
|
1
|
-
# -*- makefile -*-
|
2
|
-
|
3
|
-
ifeq ($(OS),)
|
4
|
-
BUILD_OS := $(shell uname -s | tr '[:upper:]' '[:lower:]')
|
5
|
-
OS := $(BUILD_OS)
|
6
|
-
endif
|
7
|
-
|
8
|
-
ifeq ($(CPU),)
|
9
|
-
CPU := $(shell uname -m | sed -e 's/i[345678]86/i386/')
|
10
|
-
endif
|
11
|
-
|
12
|
-
PLATFORM = $(CPU)-$(OS)
|
13
|
-
|
14
|
-
ifeq ($(OS), sunos)
|
15
|
-
OS = solaris
|
16
|
-
endif
|
17
|
-
|
18
|
-
SRC_DIR = libtest
|
19
|
-
BUILD_DIR ?= build
|
20
|
-
TEST_BUILD_DIR = $(BUILD_DIR)/libtest
|
21
|
-
# Set defaults to unix (linux/solaris/bsd)
|
22
|
-
PREFIX = lib
|
23
|
-
LIBEXT ?= so
|
24
|
-
LIBNAME = $(PREFIX)test.$(LIBEXT)
|
25
|
-
|
26
|
-
export MACOSX_DEPLOYMENT_TARGET=10.4
|
27
|
-
|
28
|
-
CCACHE := $(strip $(realpath $(shell which ccache 2> /dev/null)))
|
29
|
-
|
30
|
-
TEST_SRCS = $(wildcard $(SRC_DIR)/*.c)
|
31
|
-
TEST_OBJS := $(patsubst $(SRC_DIR)/%.c, $(TEST_BUILD_DIR)/%.o, $(TEST_SRCS))
|
32
|
-
|
33
|
-
#
|
34
|
-
# Compiler/linker flags from:
|
35
|
-
# http://weblogs.java.net/blog/kellyohair/archive/2006/01/compilation_of_1.html
|
36
|
-
JFLAGS = -fno-omit-frame-pointer -fno-strict-aliasing
|
37
|
-
OFLAGS = -O2 $(JFLAGS)
|
38
|
-
WFLAGS = -W -Wall -Wno-unused -Wno-parentheses
|
39
|
-
PICFLAGS = -fPIC
|
40
|
-
SOFLAGS = -shared
|
41
|
-
LDFLAGS += $(SOFLAGS)
|
42
|
-
|
43
|
-
IFLAGS = -I"$(BUILD_DIR)"
|
44
|
-
CFLAGS = $(OFLAGS) $(WFLAGS) $(IFLAGS) $(PICFLAGS) -D_REENTRANT
|
45
|
-
|
46
|
-
ifneq ($(strip $(findstring $(OS), win32, mingw, cygwin)),)
|
47
|
-
# For cygwin => win32-native builds, strip out cygwin deps
|
48
|
-
ifneq ($(findstring cygwin, $(BUILD_OS)),)
|
49
|
-
CC += -mno-cygwin -mwin32
|
50
|
-
LDFLAGS += -mno-cygwin -Wl,--add-stdcall-alias
|
51
|
-
endif
|
52
|
-
PICFLAGS=
|
53
|
-
LIBEXT=dll
|
54
|
-
CC = gcc
|
55
|
-
endif
|
56
|
-
|
57
|
-
ifeq ($(OS), darwin)
|
58
|
-
ifneq ($(findstring $(CPU),ppc),)
|
59
|
-
ARCHFLAGS += -arch ppc
|
60
|
-
endif
|
61
|
-
ifneq ($(findstring $(CPU),i386 x86_64),)
|
62
|
-
ARCHFLAGS += -arch i386 -arch x86_64
|
63
|
-
endif
|
64
|
-
CFLAGS += $(ARCHFLAGS) -DTARGET_RT_MAC_CFM=0
|
65
|
-
CFLAGS += -fno-common
|
66
|
-
LDFLAGS = $(ARCHFLAGS) -dynamiclib
|
67
|
-
# link against the universal libraries on ppc machines
|
68
|
-
LDFLAGS += -L$(MACSDK)/usr/lib
|
69
|
-
LIBEXT = dylib
|
70
|
-
FFI_CFLAGS += -isysroot $(MACSDK)
|
71
|
-
PICFLAGS =
|
72
|
-
SOFLAGS =
|
73
|
-
endif
|
74
|
-
|
75
|
-
ifeq ($(OS), linux)
|
76
|
-
SOFLAGS += -Wl,-soname,$(LIBNAME)
|
77
|
-
endif
|
78
|
-
|
79
|
-
ifeq ($(OS), solaris)
|
80
|
-
CC = /usr/sfw/bin/gcc -std=c99
|
81
|
-
LD = /usr/ccs/bin/ld
|
82
|
-
SOFLAGS = -shared -static-libgcc
|
83
|
-
endif
|
84
|
-
|
85
|
-
ifeq ($(OS), aix)
|
86
|
-
LIBEXT = a
|
87
|
-
SOFLAGS = -shared -static-libgcc
|
88
|
-
PICFLAGS += -pthread
|
89
|
-
endif
|
90
|
-
|
91
|
-
ifneq ($(findstring bsd, $(OS)),)
|
92
|
-
SOFLAGS = -shared -static-libgcc
|
93
|
-
CFLAGS += -pthread
|
94
|
-
LDFLAGS += -pthread
|
95
|
-
endif
|
96
|
-
|
97
|
-
ifeq ($(CPU), i386)
|
98
|
-
MODEL = 32
|
99
|
-
endif
|
100
|
-
|
101
|
-
ifeq ($(CPU), sparcv9)
|
102
|
-
MODEL = 64
|
103
|
-
endif
|
104
|
-
|
105
|
-
ifeq ($(CPU), amd64)
|
106
|
-
MODEL = 64
|
107
|
-
endif
|
108
|
-
|
109
|
-
ifeq ($(CPU), x86_64)
|
110
|
-
MODEL = 64
|
111
|
-
endif
|
112
|
-
|
113
|
-
ifeq ($(CPU), ppc64)
|
114
|
-
MODEL = 64
|
115
|
-
endif
|
116
|
-
|
117
|
-
ifeq ($(CPU), powerpc64)
|
118
|
-
MODEL = 64
|
119
|
-
endif
|
120
|
-
|
121
|
-
MODELFLAG =
|
122
|
-
ifneq ($(MODEL),)
|
123
|
-
MODELFLAG = -m$(MODEL)
|
124
|
-
endif
|
125
|
-
|
126
|
-
# On platforms (linux, solaris) that support both 32bit and 64bit, force building for one or the other
|
127
|
-
ifneq ($(or $(findstring linux, $(OS)), $(findstring solaris, $(OS))),)
|
128
|
-
# Change the CC/LD instead of CFLAGS/LDFLAGS, incase other things in the flags
|
129
|
-
# makes the libffi build choke
|
130
|
-
CC += $(MODELFLAG)
|
131
|
-
LD += $(MODELFLAG)
|
132
|
-
endif
|
133
|
-
|
134
|
-
LIBTEST = $(BUILD_DIR)/$(LIBNAME)
|
135
|
-
|
136
|
-
all: $(LIBTEST)
|
137
|
-
|
138
|
-
$(TEST_BUILD_DIR)/%.o : $(SRC_DIR)/%.c
|
139
|
-
@mkdir -p $(@D)
|
140
|
-
$(CCACHE) $(CC) $(CFLAGS) -c $< -o $@
|
141
|
-
|
142
|
-
$(LIBTEST): $(TEST_OBJS)
|
143
|
-
$(CC) -o $@ $(LDFLAGS) $(TEST_OBJS) -lm
|
144
|
-
|
145
|
-
clean::
|
146
|
-
# nothing to do - ant will delete the build dir
|
147
|
-
|
148
|
-
debug::
|
149
|
-
@echo "SRCS=$(TEST_SRCS)"
|
@@ -1,62 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (c) 2007 Wayne Meissner. All rights reserved.
|
3
|
-
*
|
4
|
-
* For licensing, see LICENSE.SPECS
|
5
|
-
*/
|
6
|
-
|
7
|
-
#include <sys/types.h>
|
8
|
-
#include <stdint.h>
|
9
|
-
|
10
|
-
typedef int8_t s8;
|
11
|
-
typedef uint8_t u8;
|
12
|
-
typedef int16_t s16;
|
13
|
-
typedef uint16_t u16;
|
14
|
-
typedef int32_t s32;
|
15
|
-
typedef uint32_t u32;
|
16
|
-
typedef int64_t s64;
|
17
|
-
typedef uint64_t u64;
|
18
|
-
typedef signed long sL;
|
19
|
-
typedef unsigned long uL;
|
20
|
-
typedef float f32;
|
21
|
-
typedef double f64;
|
22
|
-
#if !defined(__OpenBSD__)
|
23
|
-
typedef unsigned long ulong;
|
24
|
-
#endif
|
25
|
-
typedef void* pointer;
|
26
|
-
typedef void* P;
|
27
|
-
|
28
|
-
#define GVAR(T) \
|
29
|
-
extern T gvar_##T; \
|
30
|
-
T gvar_##T = (T) -1; \
|
31
|
-
T gvar_##T##_get() { return gvar_##T; }; \
|
32
|
-
void gvar_##T##_set(T v) { gvar_##T = v; }
|
33
|
-
|
34
|
-
GVAR(s8);
|
35
|
-
GVAR(u8);
|
36
|
-
GVAR(s16);
|
37
|
-
GVAR(u16);
|
38
|
-
GVAR(s32);
|
39
|
-
GVAR(u32);
|
40
|
-
GVAR(s64);
|
41
|
-
GVAR(u64);
|
42
|
-
GVAR(long);
|
43
|
-
GVAR(ulong);
|
44
|
-
GVAR(pointer);
|
45
|
-
|
46
|
-
struct gstruct {
|
47
|
-
long data;
|
48
|
-
};
|
49
|
-
|
50
|
-
struct gstruct gvar_gstruct = { -1 };
|
51
|
-
|
52
|
-
struct gstruct*
|
53
|
-
gvar_gstruct_get(void)
|
54
|
-
{
|
55
|
-
return &gvar_gstruct;
|
56
|
-
}
|
57
|
-
|
58
|
-
void
|
59
|
-
gvar_gstruct_set(const struct gstruct* val)
|
60
|
-
{
|
61
|
-
gvar_gstruct = *val;
|
62
|
-
}
|
@@ -1,21 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (c) 2007 Wayne Meissner. All rights reserved.
|
3
|
-
*
|
4
|
-
* For licensing, see LICENSE.SPECS
|
5
|
-
*/
|
6
|
-
|
7
|
-
#if defined(_WIN32) || defined(__WIN32__)
|
8
|
-
# include <windows.h>
|
9
|
-
#else
|
10
|
-
# include <errno.h>
|
11
|
-
#endif
|
12
|
-
|
13
|
-
int setLastError(int error) {
|
14
|
-
#if defined(_WIN32) || defined(__WIN32__)
|
15
|
-
SetLastError(error);
|
16
|
-
#else
|
17
|
-
errno = error;
|
18
|
-
#endif
|
19
|
-
return -1;
|
20
|
-
}
|
21
|
-
|
@@ -1,132 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (c) 2007 Wayne Meissner. All rights reserved.
|
3
|
-
*
|
4
|
-
* For licensing, see LICENSE.SPECS
|
5
|
-
*/
|
6
|
-
|
7
|
-
#include <sys/types.h>
|
8
|
-
#include <stdio.h>
|
9
|
-
#include <string.h>
|
10
|
-
#include <stdint.h>
|
11
|
-
|
12
|
-
#if defined(__sparc) && defined(__sun__)
|
13
|
-
#define fix_mem_access __asm("ta 6")
|
14
|
-
#else
|
15
|
-
#define fix_mem_access
|
16
|
-
#endif
|
17
|
-
|
18
|
-
typedef int8_t s8;
|
19
|
-
typedef uint8_t u8;
|
20
|
-
typedef int16_t s16;
|
21
|
-
typedef uint16_t u16;
|
22
|
-
typedef int32_t s32;
|
23
|
-
typedef uint32_t u32;
|
24
|
-
typedef int64_t s64;
|
25
|
-
typedef uint64_t u64;
|
26
|
-
typedef signed long sL;
|
27
|
-
typedef unsigned long uL;
|
28
|
-
typedef float f32;
|
29
|
-
typedef double f64;
|
30
|
-
typedef long double f128;
|
31
|
-
#if !defined(__OpenBSD__)
|
32
|
-
typedef unsigned long ulong;
|
33
|
-
#endif
|
34
|
-
|
35
|
-
#define ADD(T) T add_##T(T arg1, T arg2) { return arg1 + arg2; }
|
36
|
-
#define SUB(T) T sub_##T(T arg1, T arg2) { return arg1 - arg2; }
|
37
|
-
#define MUL(T) T mul_##T(T arg1, T arg2) { return arg1 * arg2; }
|
38
|
-
#define DIV(T) T div_##T(T arg1, T arg2) { return arg1 / arg2; }
|
39
|
-
#define RET(T) T ret_##T(T arg1) { return arg1; }
|
40
|
-
#define SET(T) static T T##_;void set_##T(T arg1) { T##_ = arg1; }
|
41
|
-
#define GET(T) T get_##T() { return T##_; }
|
42
|
-
typedef char* ptr;
|
43
|
-
#define TEST(T) ADD(T) SUB(T) MUL(T) DIV(T) RET(T) SET(T) GET(T)
|
44
|
-
TEST(s8);
|
45
|
-
TEST(u8);
|
46
|
-
TEST(s16);
|
47
|
-
TEST(u16);
|
48
|
-
TEST(s32);
|
49
|
-
TEST(u32);
|
50
|
-
TEST(s64);
|
51
|
-
TEST(u64);
|
52
|
-
TEST(float);
|
53
|
-
TEST(double);
|
54
|
-
TEST(long);
|
55
|
-
TEST(ulong);
|
56
|
-
TEST(f128);
|
57
|
-
|
58
|
-
#define ADD2(R, T1, T2) R add_##T1##T2##_##R(T1 arg1, T2 arg2) { return arg1 + arg2; }
|
59
|
-
#define SUB2(R, T1, T2) R sub_##T1##T2##_##R(T1 arg1, T2 arg2) { return arg1 - arg2; }
|
60
|
-
#define MUL2(R, T1, T2) R mul_##T1##T2##_##R(T1 arg1, T2 arg2) { return arg1 * arg2; }
|
61
|
-
#define DIV2(R, T1, T2) R div_##T1##T2##_##R(T1 arg1, T2 arg2) { return arg1 / arg2; }
|
62
|
-
|
63
|
-
#define T2__(R, T1, T2) ADD2(R, T1, T2) SUB2(R, T1, T2) MUL2(R, T1, T2) DIV2(R, T1, T2)
|
64
|
-
#define T2_(R, T1) \
|
65
|
-
T2__(R, T1, s8) T2__(R, T1, u8) \
|
66
|
-
T2__(R, T1, s16) T2__(R, T1, u16) \
|
67
|
-
T2__(R, T1, s32) T2__(R, T1, u32) \
|
68
|
-
T2__(R, T1, sL) T2__(R, T1, uL) \
|
69
|
-
T2__(R, T1, s64) T2__(R, T1, u64) \
|
70
|
-
|
71
|
-
#define TEST2(R) \
|
72
|
-
T2_(R, s8) T2_(R, u8) T2_(R, s16) T2_(R, u16) T2_(R, s32) T2_(R, u32) \
|
73
|
-
T2_(R, sL) T2_(R, uL) T2_(R, s64) T2_(R, u64)
|
74
|
-
|
75
|
-
#ifdef notyet
|
76
|
-
TEST2(s32)
|
77
|
-
TEST2(u32)
|
78
|
-
TEST2(s64)
|
79
|
-
TEST2(u64)
|
80
|
-
#endif
|
81
|
-
|
82
|
-
#define ADD3(R, T1, T2, T3) R add_##T1##T2##T3##_##R(T1 arg1, T2 arg2, T3 arg3) { return arg1 + arg2 + arg3; }
|
83
|
-
#define pack_f32(buf, v) do { float f = v; memcpy((buf), &f, sizeof(f)); } while(0)
|
84
|
-
#define pack_f64(buf, v) do { double f = v; memcpy((buf), &f, sizeof(f)); } while(0)
|
85
|
-
#define pack_int(buf, v) do { *(buf) = v; } while(0)
|
86
|
-
#define pack_s8 pack_int
|
87
|
-
#define pack_u8 pack_int
|
88
|
-
#define pack_s16 pack_int
|
89
|
-
#define pack_u16 pack_int
|
90
|
-
#define pack_s32 pack_int
|
91
|
-
#define pack_u32 pack_int
|
92
|
-
#define pack_s64 pack_int
|
93
|
-
#define pack_u64 pack_int
|
94
|
-
#define pack_sL pack_int
|
95
|
-
#define pack_uL pack_int
|
96
|
-
|
97
|
-
#define PACK3(R, T1, T2, T3) void pack_##T1##T2##T3##_##R(T1 arg1, T2 arg2, T3 arg3, R* r) { \
|
98
|
-
fix_mem_access; \
|
99
|
-
pack_##T1(&r[0], arg1); \
|
100
|
-
pack_##T2(&r[1], arg2); \
|
101
|
-
pack_##T3(&r[2], arg3); \
|
102
|
-
}
|
103
|
-
|
104
|
-
#define T3___(R, T1, T2, T3) PACK3(R, T1, T2, T3) /* SUB2(R, T1, T2) MUL2(R, T1, T2) DIV2(R, T1, T2) */
|
105
|
-
#define T3__(R, T1, T2) \
|
106
|
-
T3___(R, T1, T2, s8) T3___(R, T1, T2, u8) \
|
107
|
-
T3___(R, T1, T2, s16) T3___(R, T1, T2, u16) \
|
108
|
-
T3___(R, T1, T2, s32) T3___(R, T1, T2, u32) \
|
109
|
-
T3___(R, T1, T2, sL) T3___(R, T1, T2, uL) \
|
110
|
-
T3___(R, T1, T2, s64) T3___(R, T1, T2, u64) \
|
111
|
-
T3___(R, T1, T2, f32) T3___(R, T1, T2, f64) \
|
112
|
-
|
113
|
-
#define T3_(R, T1) \
|
114
|
-
T3__(R, T1, s8) T3__(R, T1, u8) \
|
115
|
-
T3__(R, T1, s16) T3__(R, T1, u16) \
|
116
|
-
T3__(R, T1, s32) T3__(R, T1, u32) \
|
117
|
-
T3__(R, T1, sL) T3__(R, T1, uL) \
|
118
|
-
T3__(R, T1, s64) T3__(R, T1, u64) \
|
119
|
-
T3__(R, T1, f32) T3__(R, T1, f64) \
|
120
|
-
|
121
|
-
#define TEST3(R) \
|
122
|
-
T3_(R, s8) T3_(R, u8) T3_(R, s16) T3_(R, u16) T3_(R, s32) T3_(R, u32) \
|
123
|
-
T3_(R, sL) T3_(R, uL) T3_(R, s64) T3_(R, u64) T3_(R, f32) T3_(R, f64)
|
124
|
-
|
125
|
-
TEST3(s64)
|
126
|
-
|
127
|
-
void
|
128
|
-
foo6(intptr_t i1, intptr_t i2, intptr_t i3, intptr_t i4, intptr_t i5, intptr_t i6) { }
|
129
|
-
|
130
|
-
void
|
131
|
-
foo5(intptr_t i1, intptr_t i2, intptr_t i3, intptr_t i4, intptr_t i5) { }
|
132
|
-
|
@@ -1,63 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright (c) 2007 Wayne Meissner. All rights reserved.
|
3
|
-
*
|
4
|
-
* For licensing, see LICENSE.SPECS
|
5
|
-
*/
|
6
|
-
|
7
|
-
#include <sys/types.h>
|
8
|
-
#include <sys/param.h>
|
9
|
-
#include <stdint.h>
|
10
|
-
#include <stdio.h>
|
11
|
-
#include <stdlib.h>
|
12
|
-
#include <string.h>
|
13
|
-
typedef void* ptr;
|
14
|
-
typedef void* pointer;
|
15
|
-
#ifdef _WIN32
|
16
|
-
typedef char* caddr_t;
|
17
|
-
#endif
|
18
|
-
|
19
|
-
#define RET(T) T ptr_ret_##T(void* arg1, int offset) { \
|
20
|
-
T tmp; memcpy(&tmp, (caddr_t) arg1 + offset, sizeof(tmp)); return tmp; \
|
21
|
-
}
|
22
|
-
#define SET(T) void ptr_set_##T(void* arg1, int offset, T value) { \
|
23
|
-
memcpy((caddr_t) arg1 + offset, &value, sizeof(value)); \
|
24
|
-
}
|
25
|
-
#define TEST(T) SET(T) RET(T)
|
26
|
-
|
27
|
-
TEST(int8_t);
|
28
|
-
TEST(int16_t);
|
29
|
-
TEST(int32_t);
|
30
|
-
TEST(int64_t);
|
31
|
-
TEST(float);
|
32
|
-
TEST(double);
|
33
|
-
TEST(pointer);
|
34
|
-
|
35
|
-
void*
|
36
|
-
ptr_return_array_element(void **ptrArray, int arrayIndex)
|
37
|
-
{
|
38
|
-
return ptrArray[arrayIndex];
|
39
|
-
}
|
40
|
-
|
41
|
-
void
|
42
|
-
ptr_set_array_element(void **ptrArray, int arrayIndex, void *value)
|
43
|
-
{
|
44
|
-
ptrArray[arrayIndex] = value;
|
45
|
-
}
|
46
|
-
|
47
|
-
void*
|
48
|
-
ptr_malloc(int size)
|
49
|
-
{
|
50
|
-
return calloc(1, size);
|
51
|
-
}
|
52
|
-
void
|
53
|
-
ptr_free(void* ptr)
|
54
|
-
{
|
55
|
-
free(ptr);
|
56
|
-
}
|
57
|
-
|
58
|
-
void*
|
59
|
-
ptr_from_address(uintptr_t addr)
|
60
|
-
{
|
61
|
-
return (void *) addr;
|
62
|
-
}
|
63
|
-
|