pax_global_header 0000666 0000000 0000000 00000000064 12442353370 0014515 g ustar 00root root 0000000 0000000 52 comment=2478e42659aa5fb57ad0140f00f29cd6bcc27ab6
jnr-constants-jnr-constants-0.8.6/ 0000775 0000000 0000000 00000000000 12442353370 0017134 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/.classpath 0000664 0000000 0000000 00000000742 12442353370 0021122 0 ustar 00root root 0000000 0000000
jnr-constants-jnr-constants-0.8.6/.gitignore 0000664 0000000 0000000 00000000057 12442353370 0021126 0 ustar 00root root 0000000 0000000 build
target
nbproject/private
dist
/.settings/ jnr-constants-jnr-constants-0.8.6/.project 0000664 0000000 0000000 00000001036 12442353370 0020603 0 ustar 00root root 0000000 0000000
constantine
org.eclipse.jdt.core.javabuilder
org.maven.ide.eclipse.maven2Builder
org.maven.ide.eclipse.maven2Nature
org.eclipse.jdt.core.javanature
jnr-constants-jnr-constants-0.8.6/.settings/ 0000775 0000000 0000000 00000000000 12442353370 0021052 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/.settings/org.eclipse.jdt.core.prefs 0000664 0000000 0000000 00000000422 12442353370 0026032 0 ustar 00root root 0000000 0000000 #Wed Dec 30 15:04:21 CET 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.5
jnr-constants-jnr-constants-0.8.6/.settings/org.maven.ide.eclipse.prefs 0000664 0000000 0000000 00000000420 12442353370 0026166 0 ustar 00root root 0000000 0000000 #Wed Dec 30 15:04:19 CET 2009
activeProfiles=
eclipse.preferences.version=1
fullBuildGoals=process-test-resources
includeModules=false
resolveWorkspaceProjects=false
resourceFilterGoals=process-resources resources\:testResources
skipCompilerPlugin=true
version=1
jnr-constants-jnr-constants-0.8.6/.travis.yml 0000664 0000000 0000000 00000000060 12442353370 0021241 0 ustar 00root root 0000000 0000000 language: java
jdk:
- oraclejdk7
- openjdk6
jnr-constants-jnr-constants-0.8.6/LICENSE 0000664 0000000 0000000 00000002253 12442353370 0020143 0 ustar 00root root 0000000 0000000 Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Alternatively, you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
version 3 for more details.
You should have received a copy of the GNU Lesser General Public License
version 3 along with this work. If not, see .
jnr-constants-jnr-constants-0.8.6/Rakefile 0000664 0000000 0000000 00000016010 12442353370 0020577 0 ustar 00root root 0000000 0000000 $VERBOSE = true
$verbose = Rake.application.options.trace
require 'rubygems'
require 'ffi'
require 'fileutils'
ICONSTANT = "jnr.constants.Constant"
PLATFORM_PREFIX = "jnr.constants.platform"
PLATFORM_DIR = "src/main/java/jnr/constants/platform"
OS = FFI::Platform::OS
ARCH = FFI::Platform::ARCH
IS_WINDOWS = OS =~ /^win/
if (IS_WINDOWS)
CONSTANTS = ['LastError', 'Errno', 'OpenFlags', 'Signal']
else
CONSTANTS = Dir["gen/const/*.rb"].map {|c| File.basename(c, ".rb") }
CONSTANTS.delete('LastError') # this is Windows-specific
end
def gen_platform_constants(name, pkg, file_name, options = {})
meth = "gen_#{name.downcase}_java".to_sym
FileUtils.makedirs(File.dirname(file_name))
File.open(file_name, "w") do |f|
constants = send(meth, options).constants
raise ArgumentError, "No constants generated for #{name}" if constants.empty?
f.puts "// WARNING: This file is autogenerated. DO NOT EDIT!"
f.puts "// Generated #{Time.now}"
f.puts "package #{pkg};"
f.puts "public enum #{name} implements #{ICONSTANT} {";
sep = nil
comments = []
sorted = constants.values.reject { |c| c.value.nil? }.sort
min_value, max_value = sorted.first.value, sorted.last.value
constants.values.each_with_index do |c, i|
if c.value.nil?
comments << "// #{c.name} not defined"
else
if sep
f.puts sep
comments.each {|comm| f.puts "#{comm}" }
comments.clear
else
sep = ","
end
f.print "#{c.name}(#{c.value}L)"
end
end
f.puts ";"
comments.each {|comm| f.puts "#{comm}" }
f.puts "private final long value;"
f.puts "private #{name}(long value) { this.value = value; }"
f.puts "public static final long MIN_VALUE = #{min_value}L;"
f.puts "public static final long MAX_VALUE = #{max_value}L;"
f.puts ""
# Generate the string description table
unless constants.values.reject {|c| c.description.nil? }.empty?
f.puts "static final class StringTable {"
f.puts " public static final java.util.Map<#{name}, String> descriptions = generateTable();"
f.puts " public static final java.util.Map<#{name}, String> generateTable() {"
f.puts " java.util.Map<#{name}, String> map = new java.util.EnumMap<#{name}, String>(#{name}.class);"
constants.values.each do |c|
if !c.value.nil?
f.puts " map.put(#{c.name}, \"#{c.description.nil? ? c.name : c.description}\");"
end
end
f.puts " return map;"
f.puts " }"
f.puts "}"
f.puts "public final String toString() { return StringTable.descriptions.get(this); }"
end
f.puts "public final int intValue() { return (int) value; }"
f.puts "public final long longValue() { return value; }"
f.puts "public final boolean defined() { return true; }"
f.puts "}"
end
end
def gen_fake_constants(name, pkg, file_name, options = {})
meth = "gen_#{name.downcase}_java".to_sym
FileUtils.makedirs(File.dirname(file_name))
File.open(file_name, "w") do |f|
cg = send(meth, options)
names = cg.names
f.puts "// WARNING: This file is autogenerated. DO NOT EDIT!"
f.puts "// Generated #{Time.now}"
f.puts "package #{pkg};"
f.puts "public enum #{name} implements #{ICONSTANT} {";
max_value = 0
names.each_with_index do |c, i|
max_value = cg.type ==:bitmask ? "0x#{(1 << i).to_s(16)}" : i + 1
f.puts "#{c}(#{max_value})#{i < (names.length - 1) ? ',' : ';'}"
end
f.puts "private final long value;"
f.puts "private #{name}(long value) { this.value = value; }"
f.puts "public static final long MIN_VALUE = 1L;"
f.puts "public static final long MAX_VALUE = #{max_value}L;"
f.puts "public final int intValue() { return (int) value; }"
f.puts "public final long longValue() { return value; }"
f.puts "public final boolean defined() { return true; }"
f.puts "}"
end
end
def gen_xplatform_constants(name, pkg, file_name, options = {})
meth = "gen_#{name.downcase}_java".to_sym
FileUtils.makedirs(File.dirname(file_name))
File.open(file_name, "w") do |f|
cg = send(meth, options)
names = cg.names
f.puts "// WARNING: This file is autogenerated. DO NOT EDIT!"
f.puts "// Generated #{Time.now}"
f.puts "package #{pkg};"
f.puts "public enum #{name} implements #{ICONSTANT} {";
names.each { |n| f.puts "#{n}," }
f.puts "__UNKNOWN_CONSTANT__;"
unknown_range = cg.unknown_range
f.puts "private static final ConstantResolver<#{name}> resolver = "
if cg.type == :bitmask
f.puts "ConstantResolver.getBitmaskResolver(#{name}.class);"
elsif !unknown_range.empty?
f.puts "ConstantResolver.getResolver(#{name}.class, #{unknown_range[:first]}, #{unknown_range[:last]});"
else
f.puts "ConstantResolver.getResolver(#{name}.class);"
end
f.puts "public final int intValue() { return (int) resolver.longValue(this); }"
f.puts "public final long longValue() { return resolver.longValue(this); }"
f.puts "public final String description() { return resolver.description(this); }"
f.puts "public final boolean defined() { return resolver.defined(this); }"
f.puts "public final String toString() { return description(); }"
f.puts "public static #{name} valueOf(long value) { "
f.puts " return resolver.valueOf(value);"
f.puts "}"
f.puts "}"
end
end
xplatform_files = []
platform_files = []
fake_files = []
CONSTANTS.each do |name|
load File.join(File.dirname(__FILE__), "gen", "const", "#{name}.rb")
platform_files << File.join(PLATFORM_DIR, OS, "#{name}.java")
file File.join(PLATFORM_DIR, OS, "#{name}.java") do |t|
gen_platform_constants(name, "#{PLATFORM_PREFIX}.#{OS}", t.name)
end
xplatform_files << File.join(PLATFORM_DIR, "#{name}.java")
file File.join(PLATFORM_DIR, "#{name}.java") do |t|
gen_xplatform_constants(name, PLATFORM_PREFIX, t.name)
end
fake_files << File.join(PLATFORM_DIR, "fake", "#{name}.java")
file File.join(PLATFORM_DIR, "fake", "#{name}.java") do |t|
gen_fake_constants(name, "#{PLATFORM_PREFIX}.fake", t.name)
end
end
task :default => :generate
task :generate => platform_files + xplatform_files + fake_files
task :regen => [ :clean, :generate ]
task :clean => [ "clean:platform", "clean:xplatform", "clean:fake" ]
namespace :clean do
task :platform do
FileUtils.rm_f(platform_files)
end
task :xplatform do
FileUtils.rm_f(xplatform_files)
end
task :fake do
FileUtils.rm_f(fake_files)
end
end
namespace :generate do
desc "Generate missing architecture constants"
task :platform => platform_files
desc "Generate missing platform-independent constants"
task :xplatform => xplatform_files
desc "Generate missing fake constants"
task :fake => fake_files
end
namespace :regen do
desc "Force regeneration of architecture constants"
task :platform => [ "clean:platform" ] + platform_files
desc "Force regeneration of platform-independent constants"
task :xplatform => [ "clean:xplatform" ] + xplatform_files
desc "Force regeneration of fake constants"
task :fake => [ "clean:fake" ] + fake_files
end
jnr-constants-jnr-constants-0.8.6/gen/ 0000775 0000000 0000000 00000000000 12442353370 0017705 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/gen/ConstGenerator.rb 0000664 0000000 0000000 00000000112 12442353370 0023161 0 ustar 00root root 0000000 0000000 require 'gen/const_generator'
ConstGenerator = Constantine::ConstGenerator jnr-constants-jnr-constants-0.8.6/gen/const/ 0000775 0000000 0000000 00000000000 12442353370 0021033 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/gen/const/AddressFamily.rb 0000664 0000000 0000000 00000001517 12442353370 0024113 0 ustar 00root root 0000000 0000000 require 'gen/ConstGenerator'
def gen_addressfamily_java(options)
ConstGenerator.new 'platform.address_family', options do |cg|
cg.include "sys/socket.h"
%w[
AF_UNSPEC
AF_LOCAL
AF_UNIX
AF_INET
AF_IMPLINK
AF_PUP
AF_CHAOS
AF_NS
AF_ISO
AF_OSI
AF_ECMA
AF_DATAKIT
AF_CCITT
AF_SNA
AF_DECnet
AF_DLI
AF_LAT
AF_HYLINK
AF_APPLETALK
AF_ROUTE
AF_LINK
pseudo_AF_XTP
AF_COIP
AF_CNT
pseudo_AF_RTIP
AF_IPX
AF_SIP
pseudo_AF_PIP
AF_NDRV
AF_ISDN
AF_E164
pseudo_AF_KEY
AF_INET6
AF_NATM
AF_SYSTEM
AF_NETBIOS
AF_PPP
AF_ATM
pseudo_AF_HDRCMPLT
AF_NETGRAPH
AF_AX25
AF_MAX
].each {|c| cg.const c }
end
end
jnr-constants-jnr-constants-0.8.6/gen/const/Errno.rb 0000664 0000000 0000000 00000002773 12442353370 0022456 0 ustar 00root root 0000000 0000000 require 'gen/ConstGenerator'
def gen_errno_java(options)
ConstGenerator.new 'platform.errno', options do |cg|
cg.include "errno.h"
cg.include "string.h"
cg.strfunc = "strerror"
cg.unknown_range=[20000, 20999]
consts = %w[
EPERM
ENOENT
ESRCH
EINTR
EIO
ENXIO
E2BIG
ENOEXEC
EBADF
ECHILD
EDEADLK
ENOMEM
EACCES
EFAULT
ENOTBLK
EBUSY
EEXIST
EXDEV
ENODEV
ENOTDIR
EISDIR
EINVAL
ENFILE
EMFILE
ENOTTY
ETXTBSY
EFBIG
ENOSPC
ESPIPE
EROFS
EMLINK
EPIPE
EDOM
ERANGE
EWOULDBLOCK
EAGAIN
EINPROGRESS
EALREADY
ENOTSOCK
EDESTADDRREQ
EMSGSIZE
EPROTOTYPE
ENOPROTOOPT
EPROTONOSUPPORT
ESOCKTNOSUPPORT
EOPNOTSUPP
EPFNOSUPPORT
EAFNOSUPPORT
EADDRINUSE
EADDRNOTAVAIL
ENETDOWN
ENETUNREACH
ENETRESET
ECONNABORTED
ECONNRESET
ENOBUFS
EISCONN
ENOTCONN
ESHUTDOWN
ETOOMANYREFS
ETIMEDOUT
ECONNREFUSED
ELOOP
ENAMETOOLONG
EHOSTDOWN
EHOSTUNREACH
ENOTEMPTY
EUSERS
EDQUOT
ESTALE
EREMOTE
ENOLCK
ENOSYS
EOVERFLOW
EIDRM
ENOMSG
EILSEQ
EBADMSG
EMULTIHOP
ENODATA
ENOLINK
ENOSR
ENOSTR
EPROTO
ETIME
]
consts.each { |c| cg.const c }
end
end
jnr-constants-jnr-constants-0.8.6/gen/const/Fcntl.rb 0000664 0000000 0000000 00000001453 12442353370 0022431 0 ustar 00root root 0000000 0000000 require 'gen/ConstGenerator'
def gen_fcntl_java(options)
ConstGenerator.new 'platform.fcntl', options do |cg|
cg.include "fcntl.h"
cg.include "string.h"
cg.unknown_range=[20000, 20999]
consts = %w[
F_DUPFD
F_GETFD
F_SETFD
F_GETFL
F_SETFL
F_GETOWN
F_SETOWN
F_GETLK
F_SETLK
F_SETLKW
F_CHKCLEAN
F_PREALLOCATE
F_SETSIZE
F_RDADVISE
F_RDAHEAD
F_READBOOTSTRAP
F_WRITEBOOTSTRAP
F_NOCACHE
F_LOG2PHYS
F_GETPATH
F_FULLFSYNC
F_PATHPKG_CHECK
F_FREEZE_FS
F_THAW_FS
F_GLOBAL_NOCACHE
F_ADDSIGS
F_MARKDEPENDENCY
F_RDLCK
F_UNLCK
F_WRLCK
F_ALLOCATECONTIG
F_ALLOCATEALL
]
consts.each { |c| cg.const c }
end
end
jnr-constants-jnr-constants-0.8.6/gen/const/INAddr.rb 0000664 0000000 0000000 00000000701 12442353370 0022457 0 ustar 00root root 0000000 0000000 require 'gen/ConstGenerator'
def gen_inaddr_java(options)
ConstGenerator.new 'platform.inaddr', options do |cg|
cg.include "sys/types.h"
cg.include "netinet/in.h"
%w[
INADDR_ANY
INADDR_BROADCAST
INADDR_NONE
INADDR_LOOPBACK
INADDR_UNSPEC_GROUP
INADDR_ALLHOSTS_GROUP
INADDR_ALLRTRS_GROUP
INADDR_MAX_LOCAL_GROUP
].each {|c| cg.const(c, "%#x", "(unsigned int)") { |v| v.hex} }
end
end
jnr-constants-jnr-constants-0.8.6/gen/const/IPProto.rb 0000664 0000000 0000000 00000001323 12442353370 0022713 0 ustar 00root root 0000000 0000000 require 'gen/ConstGenerator'
def gen_ipproto_java(options)
ConstGenerator.new 'platform.ipproto', options do |cg|
cg.include "netinet/in.h"
%w[
IPPROTO_IP
IPPROTO_HOPOPTS
IPPROTO_ICMP
IPPROTO_IGMP
IPPROTO_IPIP
IPPROTO_TCP
IPPROTO_EGP
IPPROTO_PUP
IPPROTO_UDP
IPPROTO_IDP
IPPROTO_TP
IPPROTO_IPV6
IPPROTO_ROUTING
IPPROTO_FRAGMENT
IPPROTO_RSVP
IPPROTO_GRE
IPPROTO_ESP
IPPROTO_AH
IPPROTO_ICMPV6
IPPROTO_NONE
IPPROTO_DSTOPTS
IPPROTO_MTP
IPPROTO_ENCAP
IPPROTO_PIM
IPPROTO_COMP
IPPROTO_SCTP
IPPROTO_RAW
IPPROTO_MAX
].each {|c| cg.const c}
end
end
jnr-constants-jnr-constants-0.8.6/gen/const/LastError.rb 0000664 0000000 0000000 00000010014 12442353370 0023271 0 ustar 00root root 0000000 0000000 require 'gen/ConstGenerator'
def gen_lasterror_java(options)
options[:LastError] = true
ConstGenerator.new 'platform.lasterror', options do |cg|
cg.include "Winerror.h"
cg.include "string.h"
cg.include "windows.h"
cg.unknown_range=[20000, 20999]
consts = %w[
ERROR_INVALID_FUNCTION
ERROR_INVALID_FUNCTION
ERROR_FILE_NOT_FOUND
ERROR_PATH_NOT_FOUND
ERROR_TOO_MANY_OPEN_FILES
ERROR_ACCESS_DENIED
ERROR_INVALID_HANDLE
ERROR_ARENA_TRASHED
ERROR_NOT_ENOUGH_MEMORY
ERROR_INVALID_BLOCK
ERROR_BAD_ENVIRONMENT
ERROR_BAD_FORMAT
ERROR_INVALID_ACCESS
ERROR_INVALID_DATA
ERROR_INVALID_DRIVE
ERROR_CURRENT_DIRECTORY
ERROR_NOT_SAME_DEVICE
ERROR_NO_MORE_FILES
ERROR_WRITE_PROTECT
ERROR_BAD_UNIT
ERROR_NOT_READY
ERROR_BAD_COMMAND
ERROR_CRC
ERROR_BAD_LENGTH
ERROR_SEEK
ERROR_NOT_DOS_DISK
ERROR_SECTOR_NOT_FOUND
ERROR_OUT_OF_PAPER
ERROR_WRITE_FAULT
ERROR_READ_FAULT
ERROR_GEN_FAILURE
ERROR_LOCK_VIOLATION
ERROR_SHARING_VIOLATION
ERROR_WRONG_DISK
ERROR_SHARING_BUFFER_EXCEEDED
ERROR_BAD_NETPATH
ERROR_NETWORK_ACCESS_DENIED
ERROR_BAD_NET_NAME
ERROR_FILE_EXISTS
ERROR_CANNOT_MAKE
ERROR_FAIL_I24
ERROR_INVALID_PARAMETER
ERROR_NO_PROC_SLOTS
ERROR_DRIVE_LOCKED
ERROR_BROKEN_PIPE
ERROR_DISK_FULL
ERROR_INVALID_TARGET_HANDLE
ERROR_INVALID_HANDLE
ERROR_WAIT_NO_CHILDREN
ERROR_CHILD_NOT_COMPLETE
ERROR_DIRECT_ACCESS_HANDLE
ERROR_NEGATIVE_SEEK
ERROR_SEEK_ON_DEVICE
ERROR_DIR_NOT_EMPTY
ERROR_DIRECTORY
ERROR_NOT_LOCKED
ERROR_BAD_PATHNAME
ERROR_MAX_THRDS_REACHED
ERROR_LOCK_FAILED
ERROR_ALREADY_EXISTS
ERROR_INVALID_STARTING_CODESEG
ERROR_INVALID_STACKSEG
ERROR_INVALID_MODULETYPE
ERROR_INVALID_EXE_SIGNATURE
ERROR_EXE_MARKED_INVALID
ERROR_BAD_EXE_FORMAT
ERROR_ITERATED_DATA_EXCEEDS_64k
ERROR_INVALID_MINALLOCSIZE
ERROR_DYNLINK_FROM_INVALID_RING
ERROR_IOPL_NOT_ENABLED
ERROR_INVALID_SEGDPL
ERROR_AUTODATASEG_EXCEEDS_64k
ERROR_RING2SEG_MUST_BE_MOVABLE
ERROR_RELOC_CHAIN_XEEDS_SEGLIM
ERROR_INFLOOP_IN_RELOC_CHAIN
ERROR_FILENAME_EXCED_RANGE
ERROR_NESTING_NOT_ALLOWED
ERROR_PIPE_LOCAL
ERROR_PIPE_LOCAL
ERROR_BAD_PIPE
ERROR_PIPE_BUSY
ERROR_NO_DATA
ERROR_PIPE_NOT_CONNECTED
ERROR_OPERATION_ABORTED
ERROR_NOT_ENOUGH_QUOTA
ERROR_MOD_NOT_FOUND
WSAEINTR
WSAEBADF
WSAEACCES
WSAEFAULT
WSAEINVAL
WSAEMFILE
WSAEWOULDBLOCK
WSAEINPROGRESS
WSAEALREADY
WSAENOTSOCK
WSAEDESTADDRREQ
WSAEMSGSIZE
WSAEPROTOTYPE
WSAENOPROTOOPT
WSAEPROTONOSUPPORT
WSAESOCKTNOSUPPORT
WSAEOPNOTSUPP
WSAEPFNOSUPPORT
WSAEAFNOSUPPORT
WSAEADDRINUSE
WSAEADDRNOTAVAIL
WSAENETDOWN
WSAENETUNREACH
WSAENETRESET
WSAECONNABORTED
WSAECONNRESET
WSAENOBUFS
WSAEISCONN
WSAENOTCONN
WSAESHUTDOWN
WSAETOOMANYREFS
WSAETIMEDOUT
WSAECONNREFUSED
WSAELOOP
WSAENAMETOOLONG
WSAEHOSTDOWN
WSAEHOSTUNREACH
WSAENOTEMPTY
WSAEPROCLIM
WSAEUSERS
WSAEDQUOT
WSAESTALE
WSAEREMOTE
WSASYSNOTREADY
WSAVERNOTSUPPORTED
WSANOTINITIALISED
WSAEDISCON
WSAENOMORE
WSAECANCELLED
WSAEINVALIDPROCTABLE
WSAEINVALIDPROVIDER
WSAEPROVIDERFAILEDINIT
WSASYSCALLFAILURE
WSASERVICE_NOT_FOUND
WSATYPE_NOT_FOUND
WSA_E_NO_MORE
WSA_E_CANCELLED
WSAEREFUSED
WSAHOST_NOT_FOUND
WSATRY_AGAIN
WSANO_RECOVERY
WSANO_DATA
]
consts.each { |c| cg.const(c, '%ld') }
end
end
jnr-constants-jnr-constants-0.8.6/gen/const/NameInfo.rb 0000664 0000000 0000000 00000000554 12442353370 0023060 0 ustar 00root root 0000000 0000000 require 'gen/ConstGenerator'
def gen_nameinfo_java(options)
ConstGenerator.new 'platform.nameinfo', options do |cg|
cg.include "sys/socket.h"
cg.include "netdb.h"
%w[
NI_MAXHOST
NI_MAXSERV
NI_NOFQDN
NI_NUMERICHOST
NI_NAMEREQD
NI_NUMERICSERV
NI_DGRAM
NI_WITHSCOPEID
].each {|c| cg.const c}
end
end jnr-constants-jnr-constants-0.8.6/gen/const/OpenFlags.rb 0000664 0000000 0000000 00000001126 12442353370 0023236 0 ustar 00root root 0000000 0000000 require 'gen/ConstGenerator'
def gen_openflags_java(options)
ConstGenerator.new 'platform.openflags', options do |cg|
cg.include "fcntl.h"
cg.include "string.h"
cg.type = :bitmask
cg.unknown_range=[20000, 20999]
consts = %w[
O_RDONLY
O_WRONLY
O_RDWR
O_ACCMODE
O_NONBLOCK
O_APPEND
O_SYNC
O_SHLOCK
O_EXLOCK
O_ASYNC
O_FSYNC
O_NOFOLLOW
O_CREAT
O_TRUNC
O_EXCL
O_EVTONLY
O_DIRECTORY
O_SYMLINK
O_BINARY
O_NOCTTY
]
consts.each { |c| cg.const c }
end
end
jnr-constants-jnr-constants-0.8.6/gen/const/PRIO.rb 0000664 0000000 0000000 00000000416 12442353370 0022132 0 ustar 00root root 0000000 0000000 require 'gen/ConstGenerator'
def gen_prio_java(options)
ConstGenerator.new 'platform.prio', options do |cg|
cg.include "sys/resource.h"
%w[
PRIO_MIN
PRIO_PROCESS
PRIO_PGRP
PRIO_USER
PRIO_MAX
].each {|c| cg.const c }
end
end
jnr-constants-jnr-constants-0.8.6/gen/const/ProtocolFamily.rb 0000664 0000000 0000000 00000001376 12442353370 0024332 0 ustar 00root root 0000000 0000000 require 'gen/ConstGenerator'
def gen_protocolfamily_java(options)
ConstGenerator.new 'platform.protocol_family', options do |cg|
cg.include "sys/socket.h"
%w[
PF_UNSPEC
PF_LOCAL
PF_UNIX
PF_INET
PF_IMPLINK
PF_PUP
PF_CHAOS
PF_NS
PF_ISO
PF_OSI
PF_ECMA
PF_DATAKIT
PF_CCITT
PF_SNA
PF_DECnet
PF_DLI
PF_LAT
PF_HYLINK
PF_APPLETALK
PF_ROUTE
PF_LINK
PF_XTP
PF_COIP
PF_CNT
PF_SIP
PF_IPX
PF_RTIP
PF_PIP
PF_NDRV
PF_ISDN
PF_KEY
PF_INET6
PF_NATM
PF_SYSTEM
PF_NETBIOS
PF_PPP
PF_ATM
PF_NETGRAPH
PF_MAX
].each {|c| cg.const c}
end
end jnr-constants-jnr-constants-0.8.6/gen/const/RLIM.rb 0000664 0000000 0000000 00000000557 12442353370 0022132 0 ustar 00root root 0000000 0000000 require 'gen/ConstGenerator'
def gen_rlim_java(options)
ConstGenerator.new 'platform.rlimit', options do |cg|
cg.include "stdint.h"
cg.include "sys/resource.h"
cg.include "sys/types.h"
%w[
RLIM_NLIMITS
RLIM_INFINITY
RLIM_SAVED_MAX
RLIM_SAVED_CUR
].each {|c| cg.const(c, "%#lx", "(unsigned long)") { |v| v.hex} }
end
end jnr-constants-jnr-constants-0.8.6/gen/const/RLIMIT.rb 0000664 0000000 0000000 00000001122 12442353370 0022354 0 ustar 00root root 0000000 0000000 require 'gen/ConstGenerator'
def gen_rlimit_java(options)
ConstGenerator.new 'platform.rlimit', options do |cg|
cg.include "stdint.h"
cg.include "sys/resource.h"
cg.include "sys/types.h"
%w[
RLIMIT_AS
RLIMIT_CORE
RLIMIT_CPU
RLIMIT_DATA
RLIMIT_FSIZE
RLIMIT_LOCKS
RLIMIT_MEMLOCK
RLIMIT_MSGQUEUE
RLIMIT_NICE
RLIMIT_NLIMITS
RLIMIT_NOFILE
RLIMIT_NPROC
RLIMIT_OFILE
RLIMIT_RSS
RLIMIT_RTPRIO
RLIMIT_RTTIME
RLIMIT_SIGPENDING
RLIMIT_STACK
].each {|c| cg.const c }
end
end jnr-constants-jnr-constants-0.8.6/gen/const/Shutdown.rb 0000664 0000000 0000000 00000000404 12442353370 0023171 0 ustar 00root root 0000000 0000000 require 'gen/ConstGenerator'
def gen_shutdown_java(options)
ConstGenerator.new 'platform.shutdown', options do |cg|
cg.include "sys/socket.h"
cg.type = :bitmask
%w[
SHUT_RD
SHUT_WR
SHUT_RDWR
].each {|c| cg.const c}
end
end jnr-constants-jnr-constants-0.8.6/gen/const/Signal.rb 0000664 0000000 0000000 00000001074 12442353370 0022577 0 ustar 00root root 0000000 0000000 require 'gen/ConstGenerator'
require 'rbconfig'
def gen_signal_java(options)
ConstGenerator.new 'platform.signal', options do |cg|
cg.include "signal.h"
cg.include "win32.h" if RbConfig::CONFIG['host_os'] == 'mswin32'
%w[
SIGHUP
SIGINT
SIGQUIT
SIGILL
SIGTRAP
SIGABRT
SIGIOT
SIGBUS
SIGFPE
SIGKILL
SIGUSR1
SIGSEGV
SIGUSR2
SIGPIPE
SIGALRM
SIGTERM
SIGSTKFLT
SIGCLD
SIGCHLD
SIGCONT
SIGSTOP
SIGTSTP
SIGTTIN
SIGTTOU
SIGURG
SIGXCPU
SIGXFSZ
SIGVTALRM
SIGPROF
SIGWINCH
SIGPOLL
SIGIO
SIGPWR
SIGSYS
SIGUNUSED
SIGRTMIN
SIGRTMAX
NSIG
].each {|c| cg.const c}
end
end
jnr-constants-jnr-constants-0.8.6/gen/const/Sock.rb 0000664 0000000 0000000 00000000445 12442353370 0022262 0 ustar 00root root 0000000 0000000 require 'gen/ConstGenerator'
def gen_sock_java(options)
ConstGenerator.new 'platform.sock', options do |cg|
cg.include "sys/socket.h"
%w[
SOCK_STREAM
SOCK_DGRAM
SOCK_RAW
SOCK_RDM
SOCK_SEQPACKET
SOCK_MAXADDRLEN
].each {|c| cg.const c}
end
end jnr-constants-jnr-constants-0.8.6/gen/const/SocketLevel.rb 0000664 0000000 0000000 00000000401 12442353370 0023573 0 ustar 00root root 0000000 0000000 require 'gen/ConstGenerator'
def gen_socketlevel_java(options)
ConstGenerator.new 'platform.socketlevel', options do |cg|
cg.include "sys/socket.h"
%w[
SOL_SOCKET
SOL_IP
SOL_TCP
SOL_UDP
].each {|c| cg.const c}
end
end jnr-constants-jnr-constants-0.8.6/gen/const/SocketOption.rb 0000664 0000000 0000000 00000002060 12442353370 0023777 0 ustar 00root root 0000000 0000000 require 'gen/ConstGenerator'
def gen_socketoption_java(options)
ConstGenerator.new 'platform.socket_option', options do |cg|
cg.include "sys/socket.h"
%w[
SO_DEBUG
SO_ACCEPTCONN
SO_REUSEADDR
SO_KEEPALIVE
SO_DONTROUTE
SO_BROADCAST
SO_USELOOPBACK
SO_LINGER
SO_OOBINLINE
SO_REUSEPORT
SO_TIMESTAMP
SO_ACCEPTFILTER
SO_DONTTRUNC
SO_WANTMORE
SO_WANTOOBFLAG
SO_SNDBUF
SO_RCVBUF
SO_SNDLOWAT
SO_RCVLOWAT
SO_SNDTIMEO
SO_RCVTIMEO
SO_ERROR
SO_TYPE
SO_NREAD
SO_NKE
SO_NOSIGPIPE
SO_NOADDRERR
SO_NWRITE
SO_REUSESHAREUID
SO_LABEL
SO_PEERLABEL
SO_ATTACH_FILTER
SO_BINDTODEVICE
SO_DETACH_FILTER
SO_NO_CHECK
SO_PASSCRED
SO_PEERCRED
SO_PEERNAME
SO_PRIORITY
SO_SECURITY_AUTHENTICATION
SO_SECURITY_ENCRYPTION_NETWORK
SO_SECURITY_ENCRYPTION_TRANSPORT
].each {|c| cg.const(c, "%#x", "(unsigned int)") { |v| v.hex} }
end
end
jnr-constants-jnr-constants-0.8.6/gen/const/Sysconf.rb 0000664 0000000 0000000 00000006266 12442353370 0023016 0 ustar 00root root 0000000 0000000 require 'gen/ConstGenerator'
def gen_sysconf_java(options)
ConstGenerator.new 'platform.sysconf', options do |cg|
cg.include "sys/types.h"
cg.include "unistd.h"
%w[
_SC_ARG_MAX
_SC_CHILD_MAX
_SC_CLK_TCK
_SC_NGROUPS_MAX
_SC_OPEN_MAX
_SC_JOB_CONTROL
_SC_SAVED_IDS
_SC_VERSION
_SC_BC_BASE_MAX
_SC_BC_DIM_MAX
_SC_BC_SCALE_MAX
_SC_BC_STRING_MAX
_SC_COLL_WEIGHTS_MAX
_SC_EXPR_NEST_MAX
_SC_LINE_MAX
_SC_RE_DUP_MAX
_SC_2_VERSION
_SC_2_C_BIND
_SC_2_C_DEV
_SC_2_CHAR_TERM
_SC_2_FORT_DEV
_SC_2_FORT_RUN
_SC_2_LOCALEDEF
_SC_2_SW_DEV
_SC_2_UPE
_SC_STREAM_MAX
_SC_TZNAME_MAX
_SC_ASYNCHRONOUS_IO
_SC_PAGESIZE
_SC_MEMLOCK
_SC_MEMLOCK_RANGE
_SC_MEMORY_PROTECTION
_SC_MESSAGE_PASSING
_SC_PRIORITIZED_IO
_SC_PRIORITY_SCHEDULING
_SC_REALTIME_SIGNALS
_SC_SEMAPHORES
_SC_FSYNC
_SC_SHARED_MEMORY_OBJECTS
_SC_SYNCHRONIZED_IO
_SC_TIMERS
_SC_AIO_LISTIO_MAX
_SC_AIO_MAX
_SC_AIO_PRIO_DELTA_MAX
_SC_DELAYTIMER_MAX
_SC_MQ_OPEN_MAX
_SC_MAPPED_FILES
_SC_RTSIG_MAX
_SC_SEM_NSEMS_MAX
_SC_SEM_VALUE_MAX
_SC_SIGQUEUE_MAX
_SC_TIMER_MAX
_SC_NPROCESSORS_CONF
_SC_NPROCESSORS_ONLN
_SC_2_PBS
_SC_2_PBS_ACCOUNTING
_SC_2_PBS_CHECKPOINT
_SC_2_PBS_LOCATE
_SC_2_PBS_MESSAGE
_SC_2_PBS_TRACK
_SC_ADVISORY_INFO
_SC_BARRIERS
_SC_CLOCK_SELECTION
_SC_CPUTIME
_SC_FILE_LOCKING
_SC_GETGR_R_SIZE_MAX
_SC_GETPW_R_SIZE_MAX
_SC_HOST_NAME_MAX
_SC_LOGIN_NAME_MAX
_SC_MONOTONIC_CLOCK
_SC_MQ_PRIO_MAX
_SC_READER_WRITER_LOCKS
_SC_REGEXP
_SC_SHELL
_SC_SPAWN
_SC_SPIN_LOCKS
_SC_SPORADIC_SERVER
_SC_THREAD_ATTR_STACKADDR
_SC_THREAD_ATTR_STACKSIZE
_SC_THREAD_CPUTIME
_SC_THREAD_DESTRUCTOR_ITERATIONS
_SC_THREAD_KEYS_MAX
_SC_THREAD_PRIO_INHERIT
_SC_THREAD_PRIO_PROTECT
_SC_THREAD_PRIORITY_SCHEDULING
_SC_THREAD_PROCESS_SHARED
_SC_THREAD_SAFE_FUNCTIONS
_SC_THREAD_SPORADIC_SERVER
_SC_THREAD_STACK_MIN
_SC_THREAD_THREADS_MAX
_SC_TIMEOUTS
_SC_THREADS
_SC_TRACE
_SC_TRACE_EVENT_FILTER
_SC_TRACE_INHERIT
_SC_TRACE_LOG
_SC_TTY_NAME_MAX
_SC_TYPED_MEMORY_OBJECTS
_SC_V6_ILP32_OFF32
_SC_V6_ILP32_OFFBIG
_SC_V6_LP64_OFF64
_SC_V6_LPBIG_OFFBIG
_SC_IPV6
_SC_RAW_SOCKETS
_SC_SYMLOOP_MAX
_SC_ATEXIT_MAX
_SC_IOV_MAX
_SC_PAGE_SIZE
_SC_XOPEN_CRYPT
_SC_XOPEN_ENH_I18N
_SC_XOPEN_LEGACY
_SC_XOPEN_REALTIME
_SC_XOPEN_REALTIME_THREADS
_SC_XOPEN_SHM
_SC_XOPEN_STREAMS
_SC_XOPEN_UNIX
_SC_XOPEN_VERSION
_SC_XOPEN_XCU_VERSION
_SC_XBS5_ILP32_OFF32
_SC_XBS5_ILP32_OFFBIG
_SC_XBS5_LP64_OFF64
_SC_XBS5_LPBIG_OFFBIG
_SC_SS_REPL_MAX
_SC_TRACE_EVENT_NAME_MAX
_SC_TRACE_NAME_MAX
_SC_TRACE_SYS_MAX
_SC_TRACE_USER_EVENT_MAX
_SC_PASS_MAX
].each {|c| cg.const(c) }
end
end
jnr-constants-jnr-constants-0.8.6/gen/const/TCP.rb 0000664 0000000 0000000 00000001065 12442353370 0022010 0 ustar 00root root 0000000 0000000 require 'gen/ConstGenerator'
def gen_tcp_java(options)
ConstGenerator.new 'platform.tcp', options do |cg|
cg.include "sys/socket.h"
cg.include "sys/types.h"
cg.include "netinet/tcp.h"
%w[
TCP_MAX_SACK
TCP_MSS
TCP_MINMSS
TCP_MINMSSOVERLOAD
TCP_MAXWIN
TCP_MAX_WINSHIFT
TCP_MAXBURST
TCP_MAXHLEN
TCP_MAXOLEN
TCP_NODELAY
TCP_MAXSEG
TCP_NOPUSH
TCP_NOOPT
TCP_KEEPALIVE
TCP_NSTATES
TCP_RETRANSHZ
].each {|c| cg.const c, "%lu", "(unsigned long)"}
end
end jnr-constants-jnr-constants-0.8.6/gen/const/WaitFlags.rb 0000664 0000000 0000000 00000000467 12442353370 0023250 0 ustar 00root root 0000000 0000000 require 'gen/ConstGenerator'
def gen_waitflags_java(options)
ConstGenerator.new 'platform.waitflags', options do |cg|
cg.include "sys/wait.h"
cg.type = :bitmask
%w[
WNOHANG
WUNTRACED
WSTOPPED
WEXITED
WCONTINUED
WNOWAIT
].each {|c| cg.const(c, "%#x", "(unsigned int)") { |v| v.hex} }
end
end
jnr-constants-jnr-constants-0.8.6/gen/const_generator.rb 0000664 0000000 0000000 00000013361 12442353370 0023432 0 ustar 00root root 0000000 0000000 require 'tempfile'
require 'open3'
module Constantine
##
# ConstGenerator turns C constants into ruby values.
class ConstGenerator
@options = {}
attr_reader :constants
attr_reader :names
attr_reader :type
##
# Creates a new constant generator that uses +prefix+ as a name, and an
# options hash.
#
# The only option is :required, which if set to true raises an error if a
# constant you have requested was not found.
#
# When passed a block, #calculate is automatically called at the end of
# the block, otherwise you must call it yourself.
def initialize(prefix = nil, options = {})
@includes = []
@constants = {}
@names = []
@prefix = prefix
@unknown_range = { :first => 20000, :last => 29999 }
@required = options[:required]
@options = options
if block_given? then
yield self
calculate self.class.options.merge(options)
end
end
def self.options=(options)
@options = options
end
def self.options
@options
end
def [](name)
@constants[name].value
end
##
# Request the value for C constant +name+. +format+ is a printf format
# string to print the value out, and +cast+ is a C cast for the value.
# +ruby_name+ allows you to give the constant an alternate ruby name for
# #to_ruby. +converter+ or +converter_proc+ allow you to convert the
# value from a string to the appropriate type for #to_ruby.
def const(name, format = nil, cast = '', ruby_name = nil, converter = nil,
&converter_proc)
format ||= '%d'
cast ||= ''
if converter_proc and converter then
raise ArgumentError, "Supply only converter or converter block"
end
converter = converter_proc if converter.nil?
const = Constant.new name, format, cast, ruby_name, converter
@constants[name.to_s] = const
@names << name.to_s
return const
end
def strfunc=(strfunc)
@options[:to_str] = strfunc.to_s
end
def unknown_range=(range)
@unknown_range = { :first => range[0], :last => range[1] }
end
def unknown_range
@unknown_range
end
def type=(t)
if t == :bitmask
@type = t
else
raise "Invalid constant type #{t}"
end
end
def calculate(options = {})
binary = File.join Dir.tmpdir, "rb_const_gen_bin_#{Process.pid}"
Tempfile.open("#{@prefix}.const_generator") do |f|
f.puts "#include "
@includes.each do |inc|
f.puts "#include <#{inc}>"
end
f.puts "#include \n\n"
f.puts "int main(int argc, char **argv)\n{"
process_lastError = options.has_key?(:LastError)
if (process_lastError)
f.puts "char buffer[1001];\n"
end
@constants.each_value do |const|
str = options.has_key?(:to_str) ? "#{options[:to_str]}(#{const.name})" : "\"\""
if (process_lastError)
f.puts <<-EOF
#ifdef #{const.name}
memset(buffer, 0, sizeof buffer);
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, #{const.name}, 0, buffer, 1000, NULL);
printf("#{const.name} #{const.format} %s\\n", #{const.cast}#{const.name}, buffer);
#endif
EOF
else
f.puts <<-EOF
#ifdef #{const.name}
printf("#{const.name} #{const.format} %s\\n", #{const.cast}#{const.name}, #{str});
#endif
EOF
end
end
f.puts "\n\treturn 0;\n}"
f.flush
output = `gcc #{options[:cppflags]} -D_DARWIN_USE_64_BIT_INODE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -x c -Wall -Werror #{f.path} -o #{binary} 2>&1`
unless $?.success? then
output = output.split("\n").map { |l| "\t#{l}" }.join "\n"
raise "Compilation error generating constants #{@prefix}:\n#{output}"
end
end
output = `#{binary}`
File.unlink(binary + (FFI::Platform.windows? ? ".exe" : ""))
output.each_line do |line|
line.strip!
next if line.empty?
line =~ /^(\S+)\s(\S+)\s?(.*?)\.?$/
const = @constants[$1]
const.value = $2
const.description = $3 unless $3.strip.empty?
end
missing_constants = @constants.select do |name, constant|
constant.value.nil?
end.map { |name,| name }
if @required and not missing_constants.empty? then
raise "Missing required constants for #{@prefix}: #{missing_constants.join ', '}"
end
end
def dump_constants(io)
@constants.each do |name, constant|
name = [@prefix, name].join '.'
io.puts "#{name} = #{constant.converted_value}"
end
end
##
# Outputs values for discovered constants. If the constant's value was
# not discovered it is not omitted.
def to_ruby
@constants.sort_by { |name,| name }.map do |name, constant|
if constant.value.nil? then
"# #{name} not available"
else
constant.to_ruby
end
end.join "\n"
end
def include(i)
@includes << i
end
end
class ConstGenerator::Constant
attr_reader :name, :format, :cast
attr_accessor :value
attr_accessor :description
def initialize(name, format, cast, ruby_name = nil, converter=nil)
@name = name
@format = format
@cast = cast
@ruby_name = ruby_name
@converter = converter
@value = nil
@description = nil
end
def converted_value
if @converter
@converter.call(@value)
else
@value
end
end
def <=>(c)
converted_value.to_i <=> c.converted_value.to_i
end
def ruby_name
@ruby_name || @name
end
def to_ruby
"#{ruby_name} = #{converted_value}"
end
end
end
jnr-constants-jnr-constants-0.8.6/pom.xml 0000664 0000000 0000000 00000003242 12442353370 0020452 0 ustar 00root root 0000000 0000000
4.0.0
org.sonatype.oss
oss-parent
7
com.github.jnr
jnr-constants
jar
0.8.6
jnr-constants
A set of platform constants (e.g. errno values)
http://github.com/jnr/jnr-constants
The Apache Software License, Version 2.0
http://www.apache.org/licenses/LICENSE-2.0.txt
repo
scm:git:git@github.com:jnr/jnr-constants.git
scm:git:git@github.com:jnr/jnr-constants.git
git@github.com:jnr/jnr-constants.git
wmeissner
Wayne Meissner
wmeissner@gmail.com
junit
junit
4.8.2
test
UTF-8
1.5
1.5
jnr-constants-jnr-constants-0.8.6/src/ 0000775 0000000 0000000 00000000000 12442353370 0017723 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/main/ 0000775 0000000 0000000 00000000000 12442353370 0020647 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/main/java/ 0000775 0000000 0000000 00000000000 12442353370 0021570 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/main/java/com/ 0000775 0000000 0000000 00000000000 12442353370 0022346 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/ 0000775 0000000 0000000 00000000000 12442353370 0023435 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/ 0000775 0000000 0000000 00000000000 12442353370 0025762 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/Constant.java 0000664 0000000 0000000 00000002360 12442353370 0030417 0 ustar 00root root 0000000 0000000 /*
* 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.
*/
package com.kenai.constantine;
/**
* A class that represents a native platform constant
*/
@Deprecated
public interface Constant extends jnr.constants.Constant {
int value();
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/ConstantSet.java 0000664 0000000 0000000 00000016445 12442353370 0031104 0 ustar 00root root 0000000 0000000 /*
* 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.
*/
package com.kenai.constantine;
import java.lang.reflect.Field;
import java.util.AbstractSet;
import java.util.Collection;
import java.util.EnumSet;
import java.util.Iterator;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Provides forward and reverse lookup for platform constants
*/
@Deprecated
public class ConstantSet extends AbstractSet {
private final ConcurrentMap nameToConstant;
private final ConcurrentMap valueToConstant;
private final jnr.constants.ConstantSet constants;
private static final ConcurrentMap constantSets = new ConcurrentHashMap();
private static final Object lock = new Object();
/**
* Gets a ConstantSet
*
* @param name The name of the constant set to get.
* @return A ConstantSet.
*/
public static ConstantSet getConstantSet(String name) {
ConstantSet constants = constantSets.get(name);
if (constants == null) {
synchronized (lock) {
if (!constantSets.containsKey(name)) {
constants = new ConstantSet(jnr.constants.ConstantSet.getConstantSet(name));
constantSets.put(name, constants);
}
}
}
return constants;
}
/**
* Creates a new instance of ConstantSet
*
* @param constants The JNR constants to lookup real values in
*/
@SuppressWarnings("unchecked")
private ConstantSet(jnr.constants.ConstantSet constants) {
nameToConstant = new ConcurrentHashMap();
valueToConstant = new ConcurrentHashMap();
this.constants = constants;
}
/**
* Gets the constant for a name.
*
* @param name The name of the system constant (e.g. "EINVAL").
* @return A {@link Constant} instance.
*/
@SuppressWarnings("unchecked")
public Constant getConstant(String name) {
Constant c = nameToConstant.get(name);
if (c == null) {
synchronized (lock) {
if (!nameToConstant.containsKey(name)) {
jnr.constants.Constant jnrConstant = constants.getConstant(name);
if (jnrConstant != null) {
nameToConstant.put(name, c = new ConstantImpl(jnrConstant));
valueToConstant.put(jnrConstant.intValue(), c);
}
}
}
}
return c;
}
/**
* Gets the constant for a name.
*
* @param value The name of the system constant (e.g. "EINVAL").
* @return A {@link Constant} instance.
*/
@SuppressWarnings("unchecked")
public Constant getConstant(int value) {
Constant c = valueToConstant.get(value);
return c != null ? c : getConstant(constants.getConstant(value).name());
}
/**
* Gets the integer value of a platform constant.
*
* @param name The name of the platform constant to look up (e.g. "EINVAL").
* @return The integer value of the constant.
*/
public int getValue(String name) {
return (int) constants.getValue(name);
}
/**
* Gets the name of a platform constant value.
*
* @param value The integer value to look up.
* @return The name of the constant.
*/
public String getName(int value) {
return constants.getName(value);
}
public long minValue() {
return constants.minValue();
}
public long maxValue() {
return constants.maxValue();
}
private final class ConstantImpl implements Constant {
private final jnr.constants.Constant constant;
ConstantImpl(jnr.constants.Constant constant) {
this.constant = constant;
}
public int value() {
return constant.intValue();
}
public int intValue() {
return constant.intValue();
}
public long longValue() {
return constant.longValue();
}
public String name() {
return constant.name();
}
public boolean defined() {
return true;
}
public int hashCode() {
return constant.hashCode();
}
public boolean equals(Object other) {
return other instanceof ConstantImpl && ((ConstantImpl) other).constant.equals(constant);
}
public final String toString() {
return constant.toString();
}
}
private final class ConstantIterator implements Iterator {
private final Iterator it;
ConstantIterator() {
this.it = constants.iterator();
}
public boolean hasNext() {
return it.hasNext();
}
public void remove() {
throw new UnsupportedOperationException();
}
public Constant next() {
return getConstant(it.next().name());
}
}
@Override
public Iterator iterator() {
return new ConstantIterator();
}
@Override
public int size() {
return constants.size();
}
@Override
public boolean contains(Object o) {
return o != null && o.getClass().equals(ConstantImpl.class) && nameToConstant.values().contains(o);
}
public static void main(String[] args) {
ConstantSet errnos = ConstantSet.getConstantSet("Errno");
for (Constant c : errnos) {
System.out.println(c.name() + "=" + c.value());
}
com.kenai.constantine.platform.Errno errno = com.kenai.constantine.platform.Errno.valueOf(22);
System.out.println("errno for 22=" + errno);
System.out.println("errno for 101=" + com.kenai.constantine.platform.Errno.valueOf(101));
System.out.println("errno for 22=" + com.kenai.constantine.platform.Errno.valueOf(22));
System.out.println("EINVAL.value() = " + com.kenai.constantine.platform.Errno.EINVAL.value());
System.out.println("E2BIG.value() = " + com.kenai.constantine.platform.Errno.E2BIG.value());
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/ 0000775 0000000 0000000 00000000000 12442353370 0027606 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/AddressFamily.java 0000664 0000000 0000000 00000002373 12442353370 0033205 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Sat May 02 18:23:28 +1000 2009
package com.kenai.constantine.platform;
@Deprecated
public enum AddressFamily implements com.kenai.constantine.Constant {
AF_UNSPEC,
AF_LOCAL,
AF_UNIX,
AF_INET,
AF_IMPLINK,
AF_PUP,
AF_CHAOS,
AF_NS,
AF_ISO,
AF_OSI,
AF_ECMA,
AF_DATAKIT,
AF_CCITT,
AF_SNA,
AF_DECnet,
AF_DLI,
AF_LAT,
AF_HYLINK,
AF_APPLETALK,
AF_ROUTE,
AF_LINK,
pseudo_AF_XTP,
AF_COIP,
AF_CNT,
pseudo_AF_RTIP,
AF_IPX,
AF_SIP,
pseudo_AF_PIP,
AF_NDRV,
AF_ISDN,
AF_E164,
pseudo_AF_KEY,
AF_INET6,
AF_NATM,
AF_SYSTEM,
AF_NETBIOS,
AF_PPP,
AF_ATM,
pseudo_AF_HDRCMPLT,
AF_NETGRAPH,
AF_AX25,
AF_MAX,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(AddressFamily.class, 20000, 29999);
public final int value() { return resolver.intValue(this); }
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return true; }
public final String toString() { return description(); }
public final static AddressFamily valueOf(int value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/ConstantResolver.java0000664 0000000 0000000 00000017031 12442353370 0033766 0 ustar 00root root 0000000 0000000 /*
* 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.
*/
package com.kenai.constantine.platform;
import com.kenai.constantine.Constant;
import com.kenai.constantine.ConstantSet;
import java.lang.reflect.Array;
import java.util.EnumSet;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
/**
* Provides forward and reverse lookup utilities to cross-platform enums
*/
@Deprecated
class ConstantResolver> {
public static final String __UNKNOWN_CONSTANT__ = "__UNKNOWN_CONSTANT__";
private final Object modLock = new Object();
private final Class enumType;
private final Map reverseLookupMap = new ConcurrentHashMap();
private final AtomicInteger nextUnknown;;
private final int lastUnknown;
private final boolean bitmask;
private Constant[] cache = null;
private volatile E[] valueCache = null;
private volatile int cacheGuard = 0;
private volatile ConstantSet constants;
private ConstantResolver(Class enumType) {
this(enumType, Integer.MIN_VALUE, Integer.MIN_VALUE + 1000, false);
}
private ConstantResolver(Class enumType, int firstUnknown, int lastUnknown, boolean bitmask) {
this.enumType = enumType;
this.nextUnknown = new AtomicInteger(firstUnknown);
this.lastUnknown = lastUnknown;
this.bitmask = bitmask;
}
static final > ConstantResolver getResolver(Class enumType) {
return new ConstantResolver(enumType);
}
static final > ConstantResolver getResolver(Class enumType, int first, int last) {
return new ConstantResolver(enumType, first, last, false);
}
static final > ConstantResolver getBitmaskResolver(Class enumType) {
return new ConstantResolver(enumType, 0, 0x80000000, true);
}
private static final class UnknownConstant implements Constant {
private final int value;
private final String name;
UnknownConstant(int value, String name) {
this.value = value;
this.name = name;
}
public int value() {
return value;
}
public int intValue() {
return value;
}
public long longValue() {
return value;
}
public String name() {
return name;
}
public boolean defined() {
return false;
}
@Override
public String toString() {
return name;
}
}
private Constant getConstant(E e) {
Constant c;
if (cacheGuard != 0 && (c = cache[e.ordinal()]) != null) { // read volatile guard
return c;
}
// fallthru to slow lookup+add
return lookupAndCacheConstant(e);
}
private Constant lookupAndCacheConstant(E e) {
synchronized (modLock) {
Constant c;
// Recheck, in case another thread loaded the table
if (cacheGuard != 0 && (c = cache[e.ordinal()]) != null) {
return c;
}
EnumSet enums = EnumSet.allOf(enumType);
ConstantSet cset = getConstants();
if (cache == null) {
cache = new Constant[enums.size()];
}
long known = 0, unknown = 0;
for (Enum v : enums) {
c = cset.getConstant(v.name());
if (c == null) {
if (bitmask) {
// Flag the value as unknown - real values will be
// inserted once all values are resolved, so there are
// no collisions
unknown |= (1L << v.ordinal());
c = new UnknownConstant(0, v.name());
} else {
c = new UnknownConstant(nextUnknown.getAndAdd(1), v.name());
}
} else if (bitmask) {
known |= c.value();
}
cache[v.ordinal()] = c;
}
//
// For bitmask constant sets, we generate bitmask values for missing
// constants by utilising unused bits
//
if (bitmask) {
long mask = 0;
while ((mask = Long.lowestOneBit(unknown)) != 0) {
int index = Long.numberOfTrailingZeros(mask);
int sparebit = Long.numberOfTrailingZeros(Long.lowestOneBit(~known));
int value = 1 << sparebit;
cache[index] = new UnknownConstant(value, cache[index].name());
known |= value;
unknown &= ~(1L << index);
}
}
cacheGuard = 1; // write volatile guard
return cache[e.ordinal()];
}
}
final int intValue(E e) {
return getConstant(e).value();
}
final long longValue(E e) {
return getConstant(e).longValue();
}
final String description(E e) {
return getConstant(e).toString();
}
@SuppressWarnings("unchecked")
final E valueOf(int value) {
E e;
if (value >= 0 && value < 256 && valueCache != null && (e = valueCache[value]) != null) {
return e;
}
e = reverseLookupMap.get(value);
if (e != null) {
return e;
}
Constant c = getConstants().getConstant(value);
if (c != null) {
try {
e = Enum.valueOf(enumType, c.name());
reverseLookupMap.put(value, e);
if (c.value() >= 0 && c.value() < 256) {
E[] values = valueCache;
if (values == null) {
values = (E[]) Array.newInstance(enumType, 256);
}
values[c.value()] = e;
valueCache = values;
}
return e;
} catch (IllegalArgumentException ex) {}
}
System.out.println("failed to reverse lookup value " + value);
return Enum.valueOf(enumType, __UNKNOWN_CONSTANT__);
}
private final ConstantSet getConstants() {
if (constants == null) {
constants = ConstantSet.getConstantSet(enumType.getSimpleName());
if (constants == null) {
throw new RuntimeException("Could not load platform constants for " + enumType.getSimpleName());
}
}
return constants;
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/Errno.java 0000664 0000000 0000000 00000003127 12442353370 0031541 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Sat May 02 18:23:29 +1000 2009
package com.kenai.constantine.platform;
@Deprecated
public enum Errno implements com.kenai.constantine.Constant {
EPERM,
ENOENT,
ESRCH,
EINTR,
EIO,
ENXIO,
E2BIG,
ENOEXEC,
EBADF,
ECHILD,
EDEADLK,
ENOMEM,
EACCES,
EFAULT,
ENOTBLK,
EBUSY,
EEXIST,
EXDEV,
ENODEV,
ENOTDIR,
EISDIR,
EINVAL,
ENFILE,
EMFILE,
ENOTTY,
ETXTBSY,
EFBIG,
ENOSPC,
ESPIPE,
EROFS,
EMLINK,
EPIPE,
EDOM,
ERANGE,
EWOULDBLOCK,
EAGAIN,
EINPROGRESS,
EALREADY,
ENOTSOCK,
EDESTADDRREQ,
EMSGSIZE,
EPROTOTYPE,
ENOPROTOOPT,
EPROTONOSUPPORT,
ESOCKTNOSUPPORT,
EOPNOTSUPP,
EPFNOSUPPORT,
EAFNOSUPPORT,
EADDRINUSE,
EADDRNOTAVAIL,
ENETDOWN,
ENETUNREACH,
ENETRESET,
ECONNABORTED,
ECONNRESET,
ENOBUFS,
EISCONN,
ENOTCONN,
ESHUTDOWN,
ETOOMANYREFS,
ETIMEDOUT,
ECONNREFUSED,
ELOOP,
ENAMETOOLONG,
EHOSTDOWN,
EHOSTUNREACH,
ENOTEMPTY,
EUSERS,
EDQUOT,
ESTALE,
EREMOTE,
ENOLCK,
ENOSYS,
EOVERFLOW,
EIDRM,
ENOMSG,
EILSEQ,
EBADMSG,
EMULTIHOP,
ENODATA,
ENOLINK,
ENOSR,
ENOSTR,
EPROTO,
ETIME,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(Errno.class, 20000, 20999);
public final int value() { return resolver.intValue(this); }
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return true; }
public final String toString() { return description(); }
public final static Errno valueOf(int value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/Fcntl.java 0000664 0000000 0000000 00000002254 12442353370 0031522 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Sat May 02 18:23:30 +1000 2009
package com.kenai.constantine.platform;
@Deprecated
public enum Fcntl implements com.kenai.constantine.Constant {
F_DUPFD,
F_GETFD,
F_SETFD,
F_GETFL,
F_SETFL,
F_GETOWN,
F_SETOWN,
F_GETLK,
F_SETLK,
F_SETLKW,
F_CHKCLEAN,
F_PREALLOCATE,
F_SETSIZE,
F_RDADVISE,
F_RDAHEAD,
F_READBOOTSTRAP,
F_WRITEBOOTSTRAP,
F_NOCACHE,
F_LOG2PHYS,
F_GETPATH,
F_FULLFSYNC,
F_PATHPKG_CHECK,
F_FREEZE_FS,
F_THAW_FS,
F_GLOBAL_NOCACHE,
F_ADDSIGS,
F_MARKDEPENDENCY,
F_RDLCK,
F_UNLCK,
F_WRLCK,
F_ALLOCATECONTIG,
F_ALLOCATEALL,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(Fcntl.class, 20000, 20999);
public final int value() { return resolver.intValue(this); }
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return true; }
public final String toString() { return description(); }
public final static Fcntl valueOf(int value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/INAddr.java 0000664 0000000 0000000 00000001706 12442353370 0031556 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Sat May 02 18:23:30 +1000 2009
package com.kenai.constantine.platform;
@Deprecated
public enum INAddr implements com.kenai.constantine.Constant {
INADDR_ANY,
INADDR_BROADCAST,
INADDR_NONE,
INADDR_LOOPBACK,
INADDR_UNSPEC_GROUP,
INADDR_ALLHOSTS_GROUP,
INADDR_ALLRTRS_GROUP,
INADDR_MAX_LOCAL_GROUP,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(INAddr.class, 20000, 29999);
public final int value() { return resolver.intValue(this); }
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return true; }
public final String toString() { return description(); }
public final static INAddr valueOf(int value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/IPProto.java 0000664 0000000 0000000 00000002273 12442353370 0032011 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Sat May 02 18:23:30 +1000 2009
package com.kenai.constantine.platform;
@Deprecated
public enum IPProto implements com.kenai.constantine.Constant {
IPPROTO_IP,
IPPROTO_HOPOPTS,
IPPROTO_ICMP,
IPPROTO_IGMP,
IPPROTO_IPIP,
IPPROTO_TCP,
IPPROTO_EGP,
IPPROTO_PUP,
IPPROTO_UDP,
IPPROTO_IDP,
IPPROTO_TP,
IPPROTO_IPV6,
IPPROTO_ROUTING,
IPPROTO_FRAGMENT,
IPPROTO_RSVP,
IPPROTO_GRE,
IPPROTO_ESP,
IPPROTO_AH,
IPPROTO_ICMPV6,
IPPROTO_NONE,
IPPROTO_DSTOPTS,
IPPROTO_MTP,
IPPROTO_ENCAP,
IPPROTO_PIM,
IPPROTO_COMP,
IPPROTO_SCTP,
IPPROTO_RAW,
IPPROTO_MAX,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(IPProto.class, 20000, 29999);
public final int value() { return resolver.intValue(this); }
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return true; }
public final String toString() { return description(); }
public final static IPProto valueOf(int value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/NameInfo.java 0000664 0000000 0000000 00000001642 12442353370 0032150 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Sat May 02 18:23:32 +1000 2009
package com.kenai.constantine.platform;
@Deprecated
public enum NameInfo implements com.kenai.constantine.Constant {
NI_MAXHOST,
NI_MAXSERV,
NI_NOFQDN,
NI_NUMERICHOST,
NI_NAMEREQD,
NI_NUMERICSERV,
NI_DGRAM,
NI_WITHSCOPEID,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(NameInfo.class, 20000, 29999);
public final int value() { return resolver.intValue(this); }
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return true; }
public final String toString() { return description(); }
public final static NameInfo valueOf(int value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/OpenFlags.java 0000664 0000000 0000000 00000001775 12442353370 0032341 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Sat May 02 18:23:29 +1000 2009
package com.kenai.constantine.platform;
@Deprecated
public enum OpenFlags implements com.kenai.constantine.Constant {
O_RDONLY,
O_WRONLY,
O_RDWR,
O_ACCMODE,
O_NONBLOCK,
O_APPEND,
O_SYNC,
O_SHLOCK,
O_EXLOCK,
O_ASYNC,
O_FSYNC,
O_NOFOLLOW,
O_CREAT,
O_TRUNC,
O_EXCL,
O_EVTONLY,
O_DIRECTORY,
O_SYMLINK,
O_BINARY,
O_NOCTTY,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getBitmaskResolver(OpenFlags.class);
public final int value() { return resolver.intValue(this); }
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return true; }
public final String toString() { return description(); }
public final static OpenFlags valueOf(int value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/PRIO.java 0000664 0000000 0000000 00000001540 12442353370 0031222 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Sat May 02 18:23:31 +1000 2009
package com.kenai.constantine.platform;
@Deprecated
public enum PRIO implements com.kenai.constantine.Constant {
PRIO_MIN,
PRIO_PROCESS,
PRIO_PGRP,
PRIO_USER,
PRIO_MAX,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(PRIO.class, 20000, 29999);
public final int value() { return resolver.intValue(this); }
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return true; }
public final String toString() { return description(); }
public final static PRIO valueOf(int value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/ProtocolFamily.java 0000664 0000000 0000000 00000002275 12442353370 0033422 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Sat May 02 18:23:30 +1000 2009
package com.kenai.constantine.platform;
@Deprecated
public enum ProtocolFamily implements com.kenai.constantine.Constant {
PF_UNSPEC,
PF_LOCAL,
PF_UNIX,
PF_INET,
PF_IMPLINK,
PF_PUP,
PF_CHAOS,
PF_NS,
PF_ISO,
PF_OSI,
PF_ECMA,
PF_DATAKIT,
PF_CCITT,
PF_SNA,
PF_DECnet,
PF_DLI,
PF_LAT,
PF_HYLINK,
PF_APPLETALK,
PF_ROUTE,
PF_LINK,
PF_XTP,
PF_COIP,
PF_CNT,
PF_SIP,
PF_IPX,
PF_RTIP,
PF_PIP,
PF_NDRV,
PF_ISDN,
PF_KEY,
PF_INET6,
PF_NATM,
PF_SYSTEM,
PF_NETBIOS,
PF_PPP,
PF_ATM,
PF_NETGRAPH,
PF_MAX,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(ProtocolFamily.class, 20000, 29999);
public final int value() { return resolver.intValue(this); }
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return true; }
public final String toString() { return description(); }
public final static ProtocolFamily valueOf(int value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/RLIM.java 0000664 0000000 0000000 00000001545 12442353370 0031221 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Sat May 02 18:23:29 +1000 2009
package com.kenai.constantine.platform;
@Deprecated
public enum RLIM implements com.kenai.constantine.Constant {
RLIM_NLIMITS,
RLIM_INFINITY,
RLIM_SAVED_MAX,
RLIM_SAVED_CUR,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(RLIM.class, 20000, 29999);
public final int value() { return resolver.intValue(this); }
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return true; }
public final String toString() { return description(); }
public final static RLIM valueOf(int value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/RLIMIT.java 0000664 0000000 0000000 00000002061 12442353370 0031450 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Sat May 02 18:23:30 +1000 2009
package com.kenai.constantine.platform;
@Deprecated
public enum RLIMIT implements com.kenai.constantine.Constant {
RLIMIT_AS,
RLIMIT_CORE,
RLIMIT_CPU,
RLIMIT_DATA,
RLIMIT_FSIZE,
RLIMIT_LOCKS,
RLIMIT_MEMLOCK,
RLIMIT_MSGQUEUE,
RLIMIT_NICE,
RLIMIT_NLIMITS,
RLIMIT_NOFILE,
RLIMIT_NPROC,
RLIMIT_OFILE,
RLIMIT_RSS,
RLIMIT_RTPRIO,
RLIMIT_RTTIME,
RLIMIT_SIGPENDING,
RLIMIT_STACK,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(RLIMIT.class, 20000, 29999);
public final int value() { return resolver.intValue(this); }
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return true; }
public final String toString() { return description(); }
public final static RLIMIT valueOf(int value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/Shutdown.java 0000664 0000000 0000000 00000001516 12442353370 0032267 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Sat May 02 18:23:30 +1000 2009
package com.kenai.constantine.platform;
@Deprecated
public enum Shutdown implements com.kenai.constantine.Constant {
SHUT_RD,
SHUT_WR,
SHUT_RDWR,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getBitmaskResolver(Shutdown.class);
public final int value() { return resolver.intValue(this); }
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return true; }
public final String toString() { return description(); }
public final static Shutdown valueOf(int value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/Signal.java 0000664 0000000 0000000 00000002200 12442353370 0031660 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Sat May 02 18:23:29 +1000 2009
package com.kenai.constantine.platform;
@Deprecated
public enum Signal implements com.kenai.constantine.Constant {
SIGHUP,
SIGINT,
SIGQUIT,
SIGILL,
SIGTRAP,
SIGABRT,
SIGIOT,
SIGBUS,
SIGFPE,
SIGKILL,
SIGUSR1,
SIGSEGV,
SIGUSR2,
SIGPIPE,
SIGALRM,
SIGTERM,
SIGSTKFLT,
SIGCLD,
SIGCHLD,
SIGCONT,
SIGSTOP,
SIGTSTP,
SIGTTIN,
SIGTTOU,
SIGURG,
SIGXCPU,
SIGXFSZ,
SIGVTALRM,
SIGPROF,
SIGWINCH,
SIGPOLL,
SIGIO,
SIGPWR,
SIGSYS,
SIGUNUSED,
SIGRTMIN,
SIGRTMAX,
NSIG,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(Signal.class, 20000, 29999);
public final int value() { return resolver.intValue(this); }
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return true; }
public final String toString() { return description(); }
public final static Signal valueOf(int value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/Sock.java 0000664 0000000 0000000 00000001566 12442353370 0031360 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Sat May 02 18:23:31 +1000 2009
package com.kenai.constantine.platform;
@Deprecated
public enum Sock implements com.kenai.constantine.Constant {
SOCK_STREAM,
SOCK_DGRAM,
SOCK_RAW,
SOCK_RDM,
SOCK_SEQPACKET,
SOCK_MAXADDRLEN,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(Sock.class, 20000, 29999);
public final int value() { return resolver.intValue(this); }
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return true; }
public final String toString() { return description(); }
public final static Sock valueOf(int value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/SocketLevel.java 0000664 0000000 0000000 00000001552 12442353370 0032674 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Sat May 02 18:23:31 +1000 2009
package com.kenai.constantine.platform;
@Deprecated
public enum SocketLevel implements com.kenai.constantine.Constant {
SOL_SOCKET,
SOL_IP,
SOL_TCP,
SOL_UDP,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(SocketLevel.class, 20000, 29999);
public final int value() { return resolver.intValue(this); }
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return true; }
public final String toString() { return description(); }
public final static SocketLevel valueOf(int value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/SocketOption.java 0000664 0000000 0000000 00000002656 12442353370 0033103 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Sat May 02 18:23:31 +1000 2009
package com.kenai.constantine.platform;
@Deprecated
public enum SocketOption implements com.kenai.constantine.Constant {
SO_DEBUG,
SO_ACCEPTCONN,
SO_REUSEADDR,
SO_KEEPALIVE,
SO_DONTROUTE,
SO_BROADCAST,
SO_USELOOPBACK,
SO_LINGER,
SO_OOBINLINE,
SO_REUSEPORT,
SO_TIMESTAMP,
SO_ACCEPTFILTER,
SO_DONTTRUNC,
SO_WANTMORE,
SO_WANTOOBFLAG,
SO_SNDBUF,
SO_RCVBUF,
SO_SNDLOWAT,
SO_RCVLOWAT,
SO_SNDTIMEO,
SO_RCVTIMEO,
SO_ERROR,
SO_TYPE,
SO_NREAD,
SO_NKE,
SO_NOSIGPIPE,
SO_NOADDRERR,
SO_NWRITE,
SO_REUSESHAREUID,
SO_LABEL,
SO_PEERLABEL,
SO_ATTACH_FILTER,
SO_BINDTODEVICE,
SO_DETACH_FILTER,
SO_NO_CHECK,
SO_PASSCRED,
SO_PEERCRED,
SO_PEERNAME,
SO_PRIORITY,
SO_SECURITY_AUTHENTICATION,
SO_SECURITY_ENCRYPTION_NETWORK,
SO_SECURITY_ENCRYPTION_TRANSPORT,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(SocketOption.class, 20000, 29999);
public final int value() { return resolver.intValue(this); }
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return true; }
public final String toString() { return description(); }
public final static SocketOption valueOf(int value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/Sysconf.java 0000664 0000000 0000000 00000006217 12442353370 0032103 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Sat May 02 18:23:28 +1000 2009
package com.kenai.constantine.platform;
@Deprecated
public enum Sysconf implements com.kenai.constantine.Constant {
_SC_ARG_MAX,
_SC_CHILD_MAX,
_SC_CLK_TCK,
_SC_NGROUPS_MAX,
_SC_OPEN_MAX,
_SC_JOB_CONTROL,
_SC_SAVED_IDS,
_SC_VERSION,
_SC_BC_BASE_MAX,
_SC_BC_DIM_MAX,
_SC_BC_SCALE_MAX,
_SC_BC_STRING_MAX,
_SC_COLL_WEIGHTS_MAX,
_SC_EXPR_NEST_MAX,
_SC_LINE_MAX,
_SC_RE_DUP_MAX,
_SC_2_VERSION,
_SC_2_C_BIND,
_SC_2_C_DEV,
_SC_2_CHAR_TERM,
_SC_2_FORT_DEV,
_SC_2_FORT_RUN,
_SC_2_LOCALEDEF,
_SC_2_SW_DEV,
_SC_2_UPE,
_SC_STREAM_MAX,
_SC_TZNAME_MAX,
_SC_ASYNCHRONOUS_IO,
_SC_PAGESIZE,
_SC_MEMLOCK,
_SC_MEMLOCK_RANGE,
_SC_MEMORY_PROTECTION,
_SC_MESSAGE_PASSING,
_SC_PRIORITIZED_IO,
_SC_PRIORITY_SCHEDULING,
_SC_REALTIME_SIGNALS,
_SC_SEMAPHORES,
_SC_FSYNC,
_SC_SHARED_MEMORY_OBJECTS,
_SC_SYNCHRONIZED_IO,
_SC_TIMERS,
_SC_AIO_LISTIO_MAX,
_SC_AIO_MAX,
_SC_AIO_PRIO_DELTA_MAX,
_SC_DELAYTIMER_MAX,
_SC_MQ_OPEN_MAX,
_SC_MAPPED_FILES,
_SC_RTSIG_MAX,
_SC_SEM_NSEMS_MAX,
_SC_SEM_VALUE_MAX,
_SC_SIGQUEUE_MAX,
_SC_TIMER_MAX,
_SC_NPROCESSORS_CONF,
_SC_NPROCESSORS_ONLN,
_SC_2_PBS,
_SC_2_PBS_ACCOUNTING,
_SC_2_PBS_CHECKPOINT,
_SC_2_PBS_LOCATE,
_SC_2_PBS_MESSAGE,
_SC_2_PBS_TRACK,
_SC_ADVISORY_INFO,
_SC_BARRIERS,
_SC_CLOCK_SELECTION,
_SC_CPUTIME,
_SC_FILE_LOCKING,
_SC_GETGR_R_SIZE_MAX,
_SC_GETPW_R_SIZE_MAX,
_SC_HOST_NAME_MAX,
_SC_LOGIN_NAME_MAX,
_SC_MONOTONIC_CLOCK,
_SC_MQ_PRIO_MAX,
_SC_READER_WRITER_LOCKS,
_SC_REGEXP,
_SC_SHELL,
_SC_SPAWN,
_SC_SPIN_LOCKS,
_SC_SPORADIC_SERVER,
_SC_THREAD_ATTR_STACKADDR,
_SC_THREAD_ATTR_STACKSIZE,
_SC_THREAD_CPUTIME,
_SC_THREAD_DESTRUCTOR_ITERATIONS,
_SC_THREAD_KEYS_MAX,
_SC_THREAD_PRIO_INHERIT,
_SC_THREAD_PRIO_PROTECT,
_SC_THREAD_PRIORITY_SCHEDULING,
_SC_THREAD_PROCESS_SHARED,
_SC_THREAD_SAFE_FUNCTIONS,
_SC_THREAD_SPORADIC_SERVER,
_SC_THREAD_STACK_MIN,
_SC_THREAD_THREADS_MAX,
_SC_TIMEOUTS,
_SC_THREADS,
_SC_TRACE,
_SC_TRACE_EVENT_FILTER,
_SC_TRACE_INHERIT,
_SC_TRACE_LOG,
_SC_TTY_NAME_MAX,
_SC_TYPED_MEMORY_OBJECTS,
_SC_V6_ILP32_OFF32,
_SC_V6_ILP32_OFFBIG,
_SC_V6_LP64_OFF64,
_SC_V6_LPBIG_OFFBIG,
_SC_IPV6,
_SC_RAW_SOCKETS,
_SC_SYMLOOP_MAX,
_SC_ATEXIT_MAX,
_SC_IOV_MAX,
_SC_PAGE_SIZE,
_SC_XOPEN_CRYPT,
_SC_XOPEN_ENH_I18N,
_SC_XOPEN_LEGACY,
_SC_XOPEN_REALTIME,
_SC_XOPEN_REALTIME_THREADS,
_SC_XOPEN_SHM,
_SC_XOPEN_STREAMS,
_SC_XOPEN_UNIX,
_SC_XOPEN_VERSION,
_SC_XOPEN_XCU_VERSION,
_SC_XBS5_ILP32_OFF32,
_SC_XBS5_ILP32_OFFBIG,
_SC_XBS5_LP64_OFF64,
_SC_XBS5_LPBIG_OFFBIG,
_SC_SS_REPL_MAX,
_SC_TRACE_EVENT_NAME_MAX,
_SC_TRACE_NAME_MAX,
_SC_TRACE_SYS_MAX,
_SC_TRACE_USER_EVENT_MAX,
_SC_PASS_MAX,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(Sysconf.class, 20000, 29999);
public final int value() { return resolver.intValue(this); }
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return true; }
public final String toString() { return description(); }
public final static Sysconf valueOf(int value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/TCP.java 0000664 0000000 0000000 00000001774 12442353370 0031110 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Sat May 02 18:23:31 +1000 2009
package com.kenai.constantine.platform;
@Deprecated
public enum TCP implements com.kenai.constantine.Constant {
TCP_MAX_SACK,
TCP_MSS,
TCP_MINMSS,
TCP_MINMSSOVERLOAD,
TCP_MAXWIN,
TCP_MAX_WINSHIFT,
TCP_MAXBURST,
TCP_MAXHLEN,
TCP_MAXOLEN,
TCP_NODELAY,
TCP_MAXSEG,
TCP_NOPUSH,
TCP_NOOPT,
TCP_KEEPALIVE,
TCP_NSTATES,
TCP_RETRANSHZ,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(TCP.class, 20000, 29999);
public final int value() { return resolver.intValue(this); }
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return true; }
public final String toString() { return description(); }
public final static TCP valueOf(int value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/com/kenai/constantine/platform/WaitFlags.java 0000664 0000000 0000000 00000001561 12442353370 0032335 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Sat May 02 18:23:28 +1000 2009
package com.kenai.constantine.platform;
@Deprecated
public enum WaitFlags implements com.kenai.constantine.Constant {
WNOHANG,
WUNTRACED,
WSTOPPED,
WEXITED,
WCONTINUED,
WNOWAIT,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getBitmaskResolver(WaitFlags.class);
public final int value() { return resolver.intValue(this); }
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return true; }
public final String toString() { return description(); }
public final static WaitFlags valueOf(int value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/ 0000775 0000000 0000000 00000000000 12442353370 0022361 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/ 0000775 0000000 0000000 00000000000 12442353370 0024375 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/Constant.java 0000664 0000000 0000000 00000002400 12442353370 0027025 0 ustar 00root root 0000000 0000000 /*
* 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.
*/
package jnr.constants;
/**
* A class that represents a native platform constant
*/
public interface Constant {
int intValue();
long longValue();
String name();
boolean defined();
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/ConstantSet.java 0000664 0000000 0000000 00000016460 12442353370 0027514 0 ustar 00root root 0000000 0000000 /*
* 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.
*/
package jnr.constants;
import java.lang.reflect.Field;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
/**
* Provides forward and reverse lookup for platform constants
*/
public class ConstantSet extends AbstractSet {
private final Map nameToConstant;
private final Map valueToConstant;
private final Set constants;
private final Class enumClass;
private volatile Long minValue;
private volatile Long maxValue;
private static final ConcurrentMap constantSets
= new ConcurrentHashMap();
private static final Object lock = new Object();
/**
* Gets a ConstantSet
*
* @param name The name of the constant set to get.
* @return A ConstantSet.
*/
public static ConstantSet getConstantSet(String name) {
ConstantSet constants = constantSets.get(name);
return constants != null ? constants : loadConstantSet(name);
}
private static ConstantSet loadConstantSet(String name) {
synchronized (lock) {
ConstantSet constants = constantSets.get(name);
if (constants == null) {
Class enumClass = getEnumClass(name);
if (enumClass == null) {
return null;
}
if (!Constant.class.isAssignableFrom(enumClass)) {
throw new ClassCastException("class for " + name
+ " does not implement Constant interface");
}
constantSets.put(name, constants = new ConstantSet(enumClass));
}
return constants;
}
}
/**
* Gets the {@link Enum} class for the constant name space.
*
* @param name The name of the constants to locate.
* @return A Class.
*/
@SuppressWarnings("unchecked")
private static final Class getEnumClass(String name) {
String[] prefixes = Platform.getPlatform().getPackagePrefixes();
for (String prefix : prefixes) {
try {
return (Class) Class.forName(prefix + "." + name).asSubclass(Enum.class);
} catch (ClassNotFoundException ex) {
}
}
return null;
}
/**
* Creates a new instance of ConstantSet
*
* @param enumClass The Enum subclass to load constants from.
*/
@SuppressWarnings("unchecked")
private ConstantSet(Class enumClass) {
this.enumClass = enumClass;
this.constants = EnumSet.allOf(enumClass);
Map names = new HashMap();
Map values = new HashMap();
for (Enum e : constants) {
if (e instanceof Constant) {
Constant c = (Constant) e;
names.put(e.name(), c);
values.put(c.longValue(), c);
}
}
nameToConstant = Collections.unmodifiableMap(names);
valueToConstant = Collections.unmodifiableMap(values);
}
/**
* Gets the constant for a name.
*
* @param name The name of the system constant (e.g. "EINVAL").
* @return A {@link Constant} instance.
*/
public final Constant getConstant(String name) {
return nameToConstant.get(name);
}
/**
* Gets the constant for a value.
*
* @param value A system constant value.
* @return A {@link Constant} instance.
*/
public Constant getConstant(long value) {
return valueToConstant.get(value);
}
/**
* Gets the integer value of a platform constant.
*
* @param name The name of the platform constant to look up (e.g. "EINVAL").
* @return The integer value of the constant.
*/
public long getValue(String name) {
Constant c = getConstant(name);
return c != null ? c.longValue() : 0;
}
/**
* Gets the name of a platform constant value.
*
* @param value The integer value to look up.
* @return The name of the constant.
*/
public String getName(int value) {
Constant c = getConstant(value);
return c != null ? c.name() : "unknown";
}
private Long getLongField(String name, long defaultValue) {
try {
Field f = enumClass.getField(name);
return (Long) f.get(enumClass);
} catch (NoSuchFieldException ex) {
return defaultValue;
} catch (RuntimeException ex) {
throw ex;
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
/**
* Returns the minimum value in this ConstantSet
* @return a long value
*/
public long minValue() {
if (minValue == null) {
minValue = getLongField("MIN_VALUE", Integer.MIN_VALUE);
}
return minValue.intValue();
}
/**
* Returns the maximum value in this ConstantSet
* @return a long value
*/
public long maxValue() {
if (maxValue == null) {
maxValue = getLongField("MAX_VALUE", Integer.MAX_VALUE);
}
return maxValue.intValue();
}
private final class ConstantIterator implements Iterator {
private final Iterator it;
private Constant next = null;
ConstantIterator(Collection constants) {
this.it = constants.iterator();
next = it.hasNext() ? (Constant) it.next() : null;
}
public boolean hasNext() {
return next != null && !next.name().equals("__UNKNOWN_CONSTANT__");
}
public void remove() {
throw new UnsupportedOperationException();
}
public Constant next() {
Constant prev = next;
next = it.hasNext() ? (Constant) it.next() : null;
return prev;
}
}
@Override
public Iterator iterator() {
return new ConstantIterator(constants);
}
@Override
public int size() {
return constants.size();
}
@Override
public boolean contains(Object o) {
return o != null && o.getClass().equals(enumClass);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/Platform.java 0000664 0000000 0000000 00000010432 12442353370 0027024 0 ustar 00root root 0000000 0000000 /*
* 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.
*/
package jnr.constants;
import java.nio.ByteOrder;
import java.util.HashMap;
import java.util.Map;
/**
* Platform specific constants.
*/
public final class Platform {
private static final Platform INSTANCE = new Platform();
public static Platform getPlatform() {
return INSTANCE;
}
private static final class PackageNameResolver {
public static final String PACKAGE_NAME = new PackageNameResolver().inferPackageName();
private String inferPackageName() {
try {
Class cls = getClass();
Package pkg = cls.getPackage();
return pkg != null ? pkg.getName(): cls.getName().substring(0, cls.getName().lastIndexOf('.'));
} catch (NullPointerException npe) {
return "jnr.constants";
}
}
}
private Platform() { }
private static String getConstantsPackageName() {
return PackageNameResolver.PACKAGE_NAME;
}
public String[] getPackagePrefixes() {
return new String[] {
getArchPackageName(),
getOSPackageName(),
getFakePackageName(),
};
}
public String getArchPackageName() {
return String.format("%s.platform.%s.%s", getConstantsPackageName(), OS, ARCH);
}
public String getOSPackageName() {
return String.format("%s.platform.%s", getConstantsPackageName(), OS);
}
public String getFakePackageName() {
return String.format("%s.platform.fake", getConstantsPackageName());
}
public static final Map OS_NAMES = new HashMap() {{
put("Mac OS X", "darwin");
}
public static final long serialVersionUID = 1L;
};
public static final Map ARCH_NAMES = new HashMap() {{
put("x86", "i386");
}
public static final long serialVersionUID = 1L;
};
private static String initOperatingSystem() {
String osname = getProperty("os.name", "unknown").toLowerCase();
for (String s : OS_NAMES.keySet()) {
if (s.equalsIgnoreCase(osname)) {
return OS_NAMES.get(s);
}
}
if (osname.startsWith("windows")) {
return "windows";
}
return osname;
}
private static final String initArchitecture() {
String arch = getProperty("os.arch", "unknown").toLowerCase();
for (String s : ARCH_NAMES.keySet()) {
if (s.equalsIgnoreCase(arch)) {
return ARCH_NAMES.get(s);
}
}
return arch;
}
public static final String ARCH = initArchitecture();
public static final String OS = initOperatingSystem();
public static final String NAME = String.format("%s-%s", ARCH, OS);
public static final int BIG_ENDIAN = 4321;
public static final int LITTLE_ENDIAN = 1234;
public static final int BYTE_ORDER = ByteOrder.nativeOrder().equals(ByteOrder.BIG_ENDIAN) ? BIG_ENDIAN : LITTLE_ENDIAN;
private static String getProperty(String property, String defValue) {
try {
return System.getProperty(property, defValue);
} catch (SecurityException se) {
return defValue;
}
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/ 0000775 0000000 0000000 00000000000 12442353370 0026221 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/AddressFamily.java 0000664 0000000 0000000 00000002252 12442353370 0031614 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:13 +1000
package jnr.constants.platform;
public enum AddressFamily implements jnr.constants.Constant {
AF_UNSPEC,
AF_LOCAL,
AF_UNIX,
AF_INET,
AF_IMPLINK,
AF_PUP,
AF_CHAOS,
AF_NS,
AF_ISO,
AF_OSI,
AF_ECMA,
AF_DATAKIT,
AF_CCITT,
AF_SNA,
AF_DECnet,
AF_DLI,
AF_LAT,
AF_HYLINK,
AF_APPLETALK,
AF_ROUTE,
AF_LINK,
pseudo_AF_XTP,
AF_COIP,
AF_CNT,
pseudo_AF_RTIP,
AF_IPX,
AF_SIP,
pseudo_AF_PIP,
AF_NDRV,
AF_ISDN,
AF_E164,
pseudo_AF_KEY,
AF_INET6,
AF_NATM,
AF_SYSTEM,
AF_NETBIOS,
AF_PPP,
AF_ATM,
pseudo_AF_HDRCMPLT,
AF_NETGRAPH,
AF_AX25,
AF_MAX,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(AddressFamily.class, 20000, 29999);
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return resolver.defined(this); }
public final String toString() { return description(); }
public static AddressFamily valueOf(long value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/ConstantResolver.java 0000664 0000000 0000000 00000017026 12442353370 0032405 0 ustar 00root root 0000000 0000000 /*
* 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.
*/
package jnr.constants.platform;
import jnr.constants.platform.*;
import jnr.constants.Constant;
import jnr.constants.ConstantSet;
import java.lang.reflect.Array;
import java.util.EnumSet;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicLong;
/**
* Provides forward and reverse lookup utilities to cross-platform enums
*/
class ConstantResolver> {
public static final String __UNKNOWN_CONSTANT__ = "__UNKNOWN_CONSTANT__";
private final Object modLock = new Object();
private final Class enumType;
private final Map reverseLookupMap = new ConcurrentHashMap();
private final AtomicLong nextUnknown;;
private final boolean bitmask;
private Constant[] cache = null;
private volatile E[] valueCache = null;
private volatile int cacheGuard = 0;
private volatile ConstantSet constants;
private ConstantResolver(Class enumType) {
this(enumType, Integer.MIN_VALUE, Integer.MIN_VALUE + 1000, false);
}
private ConstantResolver(Class enumType, int firstUnknown, int lastUnknown, boolean bitmask) {
this.enumType = enumType;
this.nextUnknown = new AtomicLong(firstUnknown);
this.bitmask = bitmask;
}
static > ConstantResolver getResolver(Class enumType) {
return new ConstantResolver(enumType);
}
static > ConstantResolver getResolver(Class enumType, int first, int last) {
return new ConstantResolver(enumType, first, last, false);
}
static > ConstantResolver getBitmaskResolver(Class enumType) {
return new ConstantResolver(enumType, 0, 0x80000000, true);
}
private static final class UnknownConstant implements Constant {
private final long value;
private final String name;
UnknownConstant(long value, String name) {
this.value = value;
this.name = name;
}
public int value() {
return (int) value;
}
public final int intValue() {
return (int) value;
}
public final long longValue() {
return value;
}
public final String name() {
return name;
}
public final boolean defined() {
return false;
}
@Override
public final String toString() {
return name;
}
}
private Constant getConstant(E e) {
Constant c;
if (cacheGuard != 0 && (c = cache[e.ordinal()]) != null) { // read volatile guard
return c;
}
// fallthru to slow lookup+add
return lookupAndCacheConstant(e);
}
private Constant lookupAndCacheConstant(E e) {
synchronized (modLock) {
Constant c;
// Recheck, in case another thread loaded the table
if (cacheGuard != 0 && (c = cache[e.ordinal()]) != null) {
return c;
}
EnumSet enums = EnumSet.allOf(enumType);
ConstantSet cset = getConstants();
if (cache == null) {
cache = new Constant[enums.size()];
}
long known = 0, unknown = 0;
for (Enum v : enums) {
c = cset.getConstant(v.name());
if (c == null) {
if (bitmask) {
// Flag the value as unknown - real values will be
// inserted once all values are resolved, so there are
// no collisions
unknown |= (1L << v.ordinal());
c = new UnknownConstant(0, v.name());
} else {
c = new UnknownConstant(nextUnknown.getAndAdd(1), v.name());
}
} else if (bitmask) {
known |= c.longValue();
}
cache[v.ordinal()] = c;
}
//
// For bitmask constant sets, we generate bitmask values for missing
// constants by utilising unused bits
//
if (bitmask) {
long mask = 0;
while ((mask = Long.lowestOneBit(unknown)) != 0) {
int index = Long.numberOfTrailingZeros(mask);
int sparebit = Long.numberOfTrailingZeros(Long.lowestOneBit(~known));
int value = 1 << sparebit;
cache[index] = new UnknownConstant(value, cache[index].name());
known |= value;
unknown &= ~(1L << index);
}
}
cacheGuard = 1; // write volatile guard
return cache[e.ordinal()];
}
}
final int intValue(E e) {
return getConstant(e).intValue();
}
final long longValue(E e) {
return getConstant(e).longValue();
}
final String description(E e) {
return getConstant(e).toString();
}
final boolean defined(E e) {
return getConstant(e).defined();
}
@SuppressWarnings("unchecked")
final E valueOf(long value) {
E e;
if (value >= 0 && value < 256 && valueCache != null && (e = valueCache[(int) value]) != null) {
return e;
}
e = reverseLookupMap.get(value);
if (e != null) {
return e;
}
Constant c = getConstants().getConstant(value);
if (c != null) {
try {
e = Enum.valueOf(enumType, c.name());
reverseLookupMap.put(value, e);
if (c.intValue() >= 0 && c.intValue() < 256) {
E[] values = valueCache;
if (values == null) {
values = (E[]) Array.newInstance(enumType, 256);
}
values[c.intValue()] = e;
valueCache = values;
}
return e;
} catch (IllegalArgumentException ex) {}
}
return Enum.valueOf(enumType, __UNKNOWN_CONSTANT__);
}
private ConstantSet getConstants() {
if (constants == null) {
constants = ConstantSet.getConstantSet(enumType.getSimpleName());
if (constants == null) {
throw new RuntimeException("Could not load platform constants for " + enumType.getSimpleName());
}
}
return constants;
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/Errno.java 0000664 0000000 0000000 00000003006 12442353370 0030150 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:13 +1000
package jnr.constants.platform;
public enum Errno implements jnr.constants.Constant {
EPERM,
ENOENT,
ESRCH,
EINTR,
EIO,
ENXIO,
E2BIG,
ENOEXEC,
EBADF,
ECHILD,
EDEADLK,
ENOMEM,
EACCES,
EFAULT,
ENOTBLK,
EBUSY,
EEXIST,
EXDEV,
ENODEV,
ENOTDIR,
EISDIR,
EINVAL,
ENFILE,
EMFILE,
ENOTTY,
ETXTBSY,
EFBIG,
ENOSPC,
ESPIPE,
EROFS,
EMLINK,
EPIPE,
EDOM,
ERANGE,
EWOULDBLOCK,
EAGAIN,
EINPROGRESS,
EALREADY,
ENOTSOCK,
EDESTADDRREQ,
EMSGSIZE,
EPROTOTYPE,
ENOPROTOOPT,
EPROTONOSUPPORT,
ESOCKTNOSUPPORT,
EOPNOTSUPP,
EPFNOSUPPORT,
EAFNOSUPPORT,
EADDRINUSE,
EADDRNOTAVAIL,
ENETDOWN,
ENETUNREACH,
ENETRESET,
ECONNABORTED,
ECONNRESET,
ENOBUFS,
EISCONN,
ENOTCONN,
ESHUTDOWN,
ETOOMANYREFS,
ETIMEDOUT,
ECONNREFUSED,
ELOOP,
ENAMETOOLONG,
EHOSTDOWN,
EHOSTUNREACH,
ENOTEMPTY,
EUSERS,
EDQUOT,
ESTALE,
EREMOTE,
ENOLCK,
ENOSYS,
EOVERFLOW,
EIDRM,
ENOMSG,
EILSEQ,
EBADMSG,
EMULTIHOP,
ENODATA,
ENOLINK,
ENOSR,
ENOSTR,
EPROTO,
ETIME,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(Errno.class, 20000, 20999);
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return resolver.defined(this); }
public final String toString() { return description(); }
public static Errno valueOf(long value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/Fcntl.java 0000664 0000000 0000000 00000002133 12442353370 0030131 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:13 +1000
package jnr.constants.platform;
public enum Fcntl implements jnr.constants.Constant {
F_DUPFD,
F_GETFD,
F_SETFD,
F_GETFL,
F_SETFL,
F_GETOWN,
F_SETOWN,
F_GETLK,
F_SETLK,
F_SETLKW,
F_CHKCLEAN,
F_PREALLOCATE,
F_SETSIZE,
F_RDADVISE,
F_RDAHEAD,
F_READBOOTSTRAP,
F_WRITEBOOTSTRAP,
F_NOCACHE,
F_LOG2PHYS,
F_GETPATH,
F_FULLFSYNC,
F_PATHPKG_CHECK,
F_FREEZE_FS,
F_THAW_FS,
F_GLOBAL_NOCACHE,
F_ADDSIGS,
F_MARKDEPENDENCY,
F_RDLCK,
F_UNLCK,
F_WRLCK,
F_ALLOCATECONTIG,
F_ALLOCATEALL,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(Fcntl.class, 20000, 20999);
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return resolver.defined(this); }
public final String toString() { return description(); }
public static Fcntl valueOf(long value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/INAddr.java 0000664 0000000 0000000 00000001565 12442353370 0030174 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:13 +1000
package jnr.constants.platform;
public enum INAddr implements jnr.constants.Constant {
INADDR_ANY,
INADDR_BROADCAST,
INADDR_NONE,
INADDR_LOOPBACK,
INADDR_UNSPEC_GROUP,
INADDR_ALLHOSTS_GROUP,
INADDR_ALLRTRS_GROUP,
INADDR_MAX_LOCAL_GROUP,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(INAddr.class, 20000, 29999);
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return resolver.defined(this); }
public final String toString() { return description(); }
public static INAddr valueOf(long value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/IPProto.java 0000664 0000000 0000000 00000002152 12442353370 0030420 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:13 +1000
package jnr.constants.platform;
public enum IPProto implements jnr.constants.Constant {
IPPROTO_IP,
IPPROTO_HOPOPTS,
IPPROTO_ICMP,
IPPROTO_IGMP,
IPPROTO_IPIP,
IPPROTO_TCP,
IPPROTO_EGP,
IPPROTO_PUP,
IPPROTO_UDP,
IPPROTO_IDP,
IPPROTO_TP,
IPPROTO_IPV6,
IPPROTO_ROUTING,
IPPROTO_FRAGMENT,
IPPROTO_RSVP,
IPPROTO_GRE,
IPPROTO_ESP,
IPPROTO_AH,
IPPROTO_ICMPV6,
IPPROTO_NONE,
IPPROTO_DSTOPTS,
IPPROTO_MTP,
IPPROTO_ENCAP,
IPPROTO_PIM,
IPPROTO_COMP,
IPPROTO_SCTP,
IPPROTO_RAW,
IPPROTO_MAX,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(IPProto.class, 20000, 29999);
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return resolver.defined(this); }
public final String toString() { return description(); }
public static IPProto valueOf(long value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/NameInfo.java 0000664 0000000 0000000 00000001521 12442353370 0030557 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:13 +1000
package jnr.constants.platform;
public enum NameInfo implements jnr.constants.Constant {
NI_MAXHOST,
NI_MAXSERV,
NI_NOFQDN,
NI_NUMERICHOST,
NI_NAMEREQD,
NI_NUMERICSERV,
NI_DGRAM,
NI_WITHSCOPEID,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(NameInfo.class, 20000, 29999);
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return resolver.defined(this); }
public final String toString() { return description(); }
public static NameInfo valueOf(long value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/OpenFlags.java 0000664 0000000 0000000 00000001654 12442353370 0030750 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:13 +1000
package jnr.constants.platform;
public enum OpenFlags implements jnr.constants.Constant {
O_RDONLY,
O_WRONLY,
O_RDWR,
O_ACCMODE,
O_NONBLOCK,
O_APPEND,
O_SYNC,
O_SHLOCK,
O_EXLOCK,
O_ASYNC,
O_FSYNC,
O_NOFOLLOW,
O_CREAT,
O_TRUNC,
O_EXCL,
O_EVTONLY,
O_DIRECTORY,
O_SYMLINK,
O_BINARY,
O_NOCTTY,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getBitmaskResolver(OpenFlags.class);
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return resolver.defined(this); }
public final String toString() { return description(); }
public static OpenFlags valueOf(long value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/PRIO.java 0000664 0000000 0000000 00000001417 12442353370 0027640 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:13 +1000
package jnr.constants.platform;
public enum PRIO implements jnr.constants.Constant {
PRIO_MIN,
PRIO_PROCESS,
PRIO_PGRP,
PRIO_USER,
PRIO_MAX,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(PRIO.class, 20000, 29999);
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return resolver.defined(this); }
public final String toString() { return description(); }
public static PRIO valueOf(long value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/ProtocolFamily.java 0000664 0000000 0000000 00000002154 12442353370 0032031 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:14 +1000
package jnr.constants.platform;
public enum ProtocolFamily implements jnr.constants.Constant {
PF_UNSPEC,
PF_LOCAL,
PF_UNIX,
PF_INET,
PF_IMPLINK,
PF_PUP,
PF_CHAOS,
PF_NS,
PF_ISO,
PF_OSI,
PF_ECMA,
PF_DATAKIT,
PF_CCITT,
PF_SNA,
PF_DECnet,
PF_DLI,
PF_LAT,
PF_HYLINK,
PF_APPLETALK,
PF_ROUTE,
PF_LINK,
PF_XTP,
PF_COIP,
PF_CNT,
PF_SIP,
PF_IPX,
PF_RTIP,
PF_PIP,
PF_NDRV,
PF_ISDN,
PF_KEY,
PF_INET6,
PF_NATM,
PF_SYSTEM,
PF_NETBIOS,
PF_PPP,
PF_ATM,
PF_NETGRAPH,
PF_MAX,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(ProtocolFamily.class, 20000, 29999);
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return resolver.defined(this); }
public final String toString() { return description(); }
public static ProtocolFamily valueOf(long value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/RLIM.java 0000664 0000000 0000000 00000001424 12442353370 0027630 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:14 +1000
package jnr.constants.platform;
public enum RLIM implements jnr.constants.Constant {
RLIM_NLIMITS,
RLIM_INFINITY,
RLIM_SAVED_MAX,
RLIM_SAVED_CUR,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(RLIM.class, 20000, 29999);
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return resolver.defined(this); }
public final String toString() { return description(); }
public static RLIM valueOf(long value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/RLIMIT.java 0000664 0000000 0000000 00000001740 12442353370 0030066 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:14 +1000
package jnr.constants.platform;
public enum RLIMIT implements jnr.constants.Constant {
RLIMIT_AS,
RLIMIT_CORE,
RLIMIT_CPU,
RLIMIT_DATA,
RLIMIT_FSIZE,
RLIMIT_LOCKS,
RLIMIT_MEMLOCK,
RLIMIT_MSGQUEUE,
RLIMIT_NICE,
RLIMIT_NLIMITS,
RLIMIT_NOFILE,
RLIMIT_NPROC,
RLIMIT_OFILE,
RLIMIT_RSS,
RLIMIT_RTPRIO,
RLIMIT_RTTIME,
RLIMIT_SIGPENDING,
RLIMIT_STACK,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(RLIMIT.class, 20000, 29999);
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return resolver.defined(this); }
public final String toString() { return description(); }
public static RLIMIT valueOf(long value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/Shutdown.java 0000664 0000000 0000000 00000001375 12442353370 0030705 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:14 +1000
package jnr.constants.platform;
public enum Shutdown implements jnr.constants.Constant {
SHUT_RD,
SHUT_WR,
SHUT_RDWR,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getBitmaskResolver(Shutdown.class);
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return resolver.defined(this); }
public final String toString() { return description(); }
public static Shutdown valueOf(long value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/Signal.java 0000664 0000000 0000000 00000002057 12442353370 0030305 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:14 +1000
package jnr.constants.platform;
public enum Signal implements jnr.constants.Constant {
SIGHUP,
SIGINT,
SIGQUIT,
SIGILL,
SIGTRAP,
SIGABRT,
SIGIOT,
SIGBUS,
SIGFPE,
SIGKILL,
SIGUSR1,
SIGSEGV,
SIGUSR2,
SIGPIPE,
SIGALRM,
SIGTERM,
SIGSTKFLT,
SIGCLD,
SIGCHLD,
SIGCONT,
SIGSTOP,
SIGTSTP,
SIGTTIN,
SIGTTOU,
SIGURG,
SIGXCPU,
SIGXFSZ,
SIGVTALRM,
SIGPROF,
SIGWINCH,
SIGPOLL,
SIGIO,
SIGPWR,
SIGSYS,
SIGUNUSED,
SIGRTMIN,
SIGRTMAX,
NSIG,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(Signal.class, 20000, 29999);
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return resolver.defined(this); }
public final String toString() { return description(); }
public static Signal valueOf(long value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/Sock.java 0000664 0000000 0000000 00000001445 12442353370 0027767 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:14 +1000
package jnr.constants.platform;
public enum Sock implements jnr.constants.Constant {
SOCK_STREAM,
SOCK_DGRAM,
SOCK_RAW,
SOCK_RDM,
SOCK_SEQPACKET,
SOCK_MAXADDRLEN,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(Sock.class, 20000, 29999);
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return resolver.defined(this); }
public final String toString() { return description(); }
public static Sock valueOf(long value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/SocketLevel.java 0000664 0000000 0000000 00000001431 12442353370 0031303 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:14 +1000
package jnr.constants.platform;
public enum SocketLevel implements jnr.constants.Constant {
SOL_SOCKET,
SOL_IP,
SOL_TCP,
SOL_UDP,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(SocketLevel.class, 20000, 29999);
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return resolver.defined(this); }
public final String toString() { return description(); }
public static SocketLevel valueOf(long value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/SocketOption.java 0000664 0000000 0000000 00000002535 12442353370 0031512 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:14 +1000
package jnr.constants.platform;
public enum SocketOption implements jnr.constants.Constant {
SO_DEBUG,
SO_ACCEPTCONN,
SO_REUSEADDR,
SO_KEEPALIVE,
SO_DONTROUTE,
SO_BROADCAST,
SO_USELOOPBACK,
SO_LINGER,
SO_OOBINLINE,
SO_REUSEPORT,
SO_TIMESTAMP,
SO_ACCEPTFILTER,
SO_DONTTRUNC,
SO_WANTMORE,
SO_WANTOOBFLAG,
SO_SNDBUF,
SO_RCVBUF,
SO_SNDLOWAT,
SO_RCVLOWAT,
SO_SNDTIMEO,
SO_RCVTIMEO,
SO_ERROR,
SO_TYPE,
SO_NREAD,
SO_NKE,
SO_NOSIGPIPE,
SO_NOADDRERR,
SO_NWRITE,
SO_REUSESHAREUID,
SO_LABEL,
SO_PEERLABEL,
SO_ATTACH_FILTER,
SO_BINDTODEVICE,
SO_DETACH_FILTER,
SO_NO_CHECK,
SO_PASSCRED,
SO_PEERCRED,
SO_PEERNAME,
SO_PRIORITY,
SO_SECURITY_AUTHENTICATION,
SO_SECURITY_ENCRYPTION_NETWORK,
SO_SECURITY_ENCRYPTION_TRANSPORT,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(SocketOption.class, 20000, 29999);
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return resolver.defined(this); }
public final String toString() { return description(); }
public static SocketOption valueOf(long value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/Sysconf.java 0000664 0000000 0000000 00000006076 12442353370 0030521 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:14 +1000
package jnr.constants.platform;
public enum Sysconf implements jnr.constants.Constant {
_SC_ARG_MAX,
_SC_CHILD_MAX,
_SC_CLK_TCK,
_SC_NGROUPS_MAX,
_SC_OPEN_MAX,
_SC_JOB_CONTROL,
_SC_SAVED_IDS,
_SC_VERSION,
_SC_BC_BASE_MAX,
_SC_BC_DIM_MAX,
_SC_BC_SCALE_MAX,
_SC_BC_STRING_MAX,
_SC_COLL_WEIGHTS_MAX,
_SC_EXPR_NEST_MAX,
_SC_LINE_MAX,
_SC_RE_DUP_MAX,
_SC_2_VERSION,
_SC_2_C_BIND,
_SC_2_C_DEV,
_SC_2_CHAR_TERM,
_SC_2_FORT_DEV,
_SC_2_FORT_RUN,
_SC_2_LOCALEDEF,
_SC_2_SW_DEV,
_SC_2_UPE,
_SC_STREAM_MAX,
_SC_TZNAME_MAX,
_SC_ASYNCHRONOUS_IO,
_SC_PAGESIZE,
_SC_MEMLOCK,
_SC_MEMLOCK_RANGE,
_SC_MEMORY_PROTECTION,
_SC_MESSAGE_PASSING,
_SC_PRIORITIZED_IO,
_SC_PRIORITY_SCHEDULING,
_SC_REALTIME_SIGNALS,
_SC_SEMAPHORES,
_SC_FSYNC,
_SC_SHARED_MEMORY_OBJECTS,
_SC_SYNCHRONIZED_IO,
_SC_TIMERS,
_SC_AIO_LISTIO_MAX,
_SC_AIO_MAX,
_SC_AIO_PRIO_DELTA_MAX,
_SC_DELAYTIMER_MAX,
_SC_MQ_OPEN_MAX,
_SC_MAPPED_FILES,
_SC_RTSIG_MAX,
_SC_SEM_NSEMS_MAX,
_SC_SEM_VALUE_MAX,
_SC_SIGQUEUE_MAX,
_SC_TIMER_MAX,
_SC_NPROCESSORS_CONF,
_SC_NPROCESSORS_ONLN,
_SC_2_PBS,
_SC_2_PBS_ACCOUNTING,
_SC_2_PBS_CHECKPOINT,
_SC_2_PBS_LOCATE,
_SC_2_PBS_MESSAGE,
_SC_2_PBS_TRACK,
_SC_ADVISORY_INFO,
_SC_BARRIERS,
_SC_CLOCK_SELECTION,
_SC_CPUTIME,
_SC_FILE_LOCKING,
_SC_GETGR_R_SIZE_MAX,
_SC_GETPW_R_SIZE_MAX,
_SC_HOST_NAME_MAX,
_SC_LOGIN_NAME_MAX,
_SC_MONOTONIC_CLOCK,
_SC_MQ_PRIO_MAX,
_SC_READER_WRITER_LOCKS,
_SC_REGEXP,
_SC_SHELL,
_SC_SPAWN,
_SC_SPIN_LOCKS,
_SC_SPORADIC_SERVER,
_SC_THREAD_ATTR_STACKADDR,
_SC_THREAD_ATTR_STACKSIZE,
_SC_THREAD_CPUTIME,
_SC_THREAD_DESTRUCTOR_ITERATIONS,
_SC_THREAD_KEYS_MAX,
_SC_THREAD_PRIO_INHERIT,
_SC_THREAD_PRIO_PROTECT,
_SC_THREAD_PRIORITY_SCHEDULING,
_SC_THREAD_PROCESS_SHARED,
_SC_THREAD_SAFE_FUNCTIONS,
_SC_THREAD_SPORADIC_SERVER,
_SC_THREAD_STACK_MIN,
_SC_THREAD_THREADS_MAX,
_SC_TIMEOUTS,
_SC_THREADS,
_SC_TRACE,
_SC_TRACE_EVENT_FILTER,
_SC_TRACE_INHERIT,
_SC_TRACE_LOG,
_SC_TTY_NAME_MAX,
_SC_TYPED_MEMORY_OBJECTS,
_SC_V6_ILP32_OFF32,
_SC_V6_ILP32_OFFBIG,
_SC_V6_LP64_OFF64,
_SC_V6_LPBIG_OFFBIG,
_SC_IPV6,
_SC_RAW_SOCKETS,
_SC_SYMLOOP_MAX,
_SC_ATEXIT_MAX,
_SC_IOV_MAX,
_SC_PAGE_SIZE,
_SC_XOPEN_CRYPT,
_SC_XOPEN_ENH_I18N,
_SC_XOPEN_LEGACY,
_SC_XOPEN_REALTIME,
_SC_XOPEN_REALTIME_THREADS,
_SC_XOPEN_SHM,
_SC_XOPEN_STREAMS,
_SC_XOPEN_UNIX,
_SC_XOPEN_VERSION,
_SC_XOPEN_XCU_VERSION,
_SC_XBS5_ILP32_OFF32,
_SC_XBS5_ILP32_OFFBIG,
_SC_XBS5_LP64_OFF64,
_SC_XBS5_LPBIG_OFFBIG,
_SC_SS_REPL_MAX,
_SC_TRACE_EVENT_NAME_MAX,
_SC_TRACE_NAME_MAX,
_SC_TRACE_SYS_MAX,
_SC_TRACE_USER_EVENT_MAX,
_SC_PASS_MAX,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(Sysconf.class, 20000, 29999);
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return resolver.defined(this); }
public final String toString() { return description(); }
public static Sysconf valueOf(long value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/TCP.java 0000664 0000000 0000000 00000001653 12442353370 0027517 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:14 +1000
package jnr.constants.platform;
public enum TCP implements jnr.constants.Constant {
TCP_MAX_SACK,
TCP_MSS,
TCP_MINMSS,
TCP_MINMSSOVERLOAD,
TCP_MAXWIN,
TCP_MAX_WINSHIFT,
TCP_MAXBURST,
TCP_MAXHLEN,
TCP_MAXOLEN,
TCP_NODELAY,
TCP_MAXSEG,
TCP_NOPUSH,
TCP_NOOPT,
TCP_KEEPALIVE,
TCP_NSTATES,
TCP_RETRANSHZ,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getResolver(TCP.class, 20000, 29999);
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return resolver.defined(this); }
public final String toString() { return description(); }
public static TCP valueOf(long value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/WaitFlags.java 0000664 0000000 0000000 00000001440 12442353370 0030744 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:14 +1000
package jnr.constants.platform;
public enum WaitFlags implements jnr.constants.Constant {
WNOHANG,
WUNTRACED,
WSTOPPED,
WEXITED,
WCONTINUED,
WNOWAIT,
__UNKNOWN_CONSTANT__;
private static final ConstantResolver resolver =
ConstantResolver.getBitmaskResolver(WaitFlags.class);
public final int intValue() { return (int) resolver.longValue(this); }
public final long longValue() { return resolver.longValue(this); }
public final String description() { return resolver.description(this); }
public final boolean defined() { return resolver.defined(this); }
public final String toString() { return description(); }
public static WaitFlags valueOf(long value) {
return resolver.valueOf(value);
}
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/darwin/ 0000775 0000000 0000000 00000000000 12442353370 0027505 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/darwin/AddressFamily.java 0000664 0000000 0000000 00000002217 12442353370 0033101 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:12 +1000
package jnr.constants.platform.darwin;
public enum AddressFamily implements jnr.constants.Constant {
AF_UNSPEC(0L),
AF_LOCAL(1L),
AF_UNIX(1L),
AF_INET(2L),
AF_IMPLINK(3L),
AF_PUP(4L),
AF_CHAOS(5L),
AF_NS(6L),
AF_ISO(7L),
AF_OSI(7L),
AF_ECMA(8L),
AF_DATAKIT(9L),
AF_CCITT(10L),
AF_SNA(11L),
AF_DECnet(12L),
AF_DLI(13L),
AF_LAT(14L),
AF_HYLINK(15L),
AF_APPLETALK(16L),
AF_ROUTE(17L),
AF_LINK(18L),
pseudo_AF_XTP(19L),
AF_COIP(20L),
AF_CNT(21L),
pseudo_AF_RTIP(22L),
AF_IPX(23L),
AF_SIP(24L),
pseudo_AF_PIP(25L),
AF_NDRV(27L),
AF_ISDN(28L),
AF_E164(28L),
pseudo_AF_KEY(29L),
AF_INET6(30L),
AF_NATM(31L),
AF_SYSTEM(32L),
AF_NETBIOS(33L),
AF_PPP(34L),
// AF_ATM not defined
pseudo_AF_HDRCMPLT(35L),
// AF_NETGRAPH not defined
// AF_AX25 not defined
AF_MAX(38L);
private final long value;
private AddressFamily(long value) { this.value = value; }
public static final long MIN_VALUE = 0L;
public static final long MAX_VALUE = 38L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/darwin/Errno.java 0000664 0000000 0000000 00000013670 12442353370 0031444 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:12 +1000
package jnr.constants.platform.darwin;
public enum Errno implements jnr.constants.Constant {
EPERM(1L),
ENOENT(2L),
ESRCH(3L),
EINTR(4L),
EIO(5L),
ENXIO(6L),
E2BIG(7L),
ENOEXEC(8L),
EBADF(9L),
ECHILD(10L),
EDEADLK(11L),
ENOMEM(12L),
EACCES(13L),
EFAULT(14L),
ENOTBLK(15L),
EBUSY(16L),
EEXIST(17L),
EXDEV(18L),
ENODEV(19L),
ENOTDIR(20L),
EISDIR(21L),
EINVAL(22L),
ENFILE(23L),
EMFILE(24L),
ENOTTY(25L),
ETXTBSY(26L),
EFBIG(27L),
ENOSPC(28L),
ESPIPE(29L),
EROFS(30L),
EMLINK(31L),
EPIPE(32L),
EDOM(33L),
ERANGE(34L),
EWOULDBLOCK(35L),
EAGAIN(35L),
EINPROGRESS(36L),
EALREADY(37L),
ENOTSOCK(38L),
EDESTADDRREQ(39L),
EMSGSIZE(40L),
EPROTOTYPE(41L),
ENOPROTOOPT(42L),
EPROTONOSUPPORT(43L),
ESOCKTNOSUPPORT(44L),
EOPNOTSUPP(102L),
EPFNOSUPPORT(46L),
EAFNOSUPPORT(47L),
EADDRINUSE(48L),
EADDRNOTAVAIL(49L),
ENETDOWN(50L),
ENETUNREACH(51L),
ENETRESET(52L),
ECONNABORTED(53L),
ECONNRESET(54L),
ENOBUFS(55L),
EISCONN(56L),
ENOTCONN(57L),
ESHUTDOWN(58L),
ETOOMANYREFS(59L),
ETIMEDOUT(60L),
ECONNREFUSED(61L),
ELOOP(62L),
ENAMETOOLONG(63L),
EHOSTDOWN(64L),
EHOSTUNREACH(65L),
ENOTEMPTY(66L),
EUSERS(68L),
EDQUOT(69L),
ESTALE(70L),
EREMOTE(71L),
ENOLCK(77L),
ENOSYS(78L),
EOVERFLOW(84L),
EIDRM(90L),
ENOMSG(91L),
EILSEQ(92L),
EBADMSG(94L),
EMULTIHOP(95L),
ENODATA(96L),
ENOLINK(97L),
ENOSR(98L),
ENOSTR(99L),
EPROTO(100L),
ETIME(101L);
private final long value;
private Errno(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 102L;
static final class StringTable {
public static final java.util.Map descriptions = generateTable();
public static final java.util.Map generateTable() {
java.util.Map map = new java.util.EnumMap(Errno.class);
map.put(EPERM, "Operation not permitted");
map.put(ENOENT, "No such file or directory");
map.put(ESRCH, "No such process");
map.put(EINTR, "Interrupted system call");
map.put(EIO, "Input/output error");
map.put(ENXIO, "Device not configured");
map.put(E2BIG, "Argument list too long");
map.put(ENOEXEC, "Exec format error");
map.put(EBADF, "Bad file descriptor");
map.put(ECHILD, "No child processes");
map.put(EDEADLK, "Resource deadlock avoided");
map.put(ENOMEM, "Cannot allocate memory");
map.put(EACCES, "Permission denied");
map.put(EFAULT, "Bad address");
map.put(ENOTBLK, "Block device required");
map.put(EBUSY, "Resource busy");
map.put(EEXIST, "File exists");
map.put(EXDEV, "Cross-device link");
map.put(ENODEV, "Operation not supported by device");
map.put(ENOTDIR, "Not a directory");
map.put(EISDIR, "Is a directory");
map.put(EINVAL, "Invalid argument");
map.put(ENFILE, "Too many open files in system");
map.put(EMFILE, "Too many open files");
map.put(ENOTTY, "Inappropriate ioctl for device");
map.put(ETXTBSY, "Text file busy");
map.put(EFBIG, "File too large");
map.put(ENOSPC, "No space left on device");
map.put(ESPIPE, "Illegal seek");
map.put(EROFS, "Read-only file system");
map.put(EMLINK, "Too many links");
map.put(EPIPE, "Broken pipe");
map.put(EDOM, "Numerical argument out of domain");
map.put(ERANGE, "Result too large");
map.put(EWOULDBLOCK, "Resource temporarily unavailable");
map.put(EAGAIN, "Resource temporarily unavailable");
map.put(EINPROGRESS, "Operation now in progress");
map.put(EALREADY, "Operation already in progress");
map.put(ENOTSOCK, "Socket operation on non-socket");
map.put(EDESTADDRREQ, "Destination address required");
map.put(EMSGSIZE, "Message too long");
map.put(EPROTOTYPE, "Protocol wrong type for socket");
map.put(ENOPROTOOPT, "Protocol not available");
map.put(EPROTONOSUPPORT, "Protocol not supported");
map.put(ESOCKTNOSUPPORT, "Socket type not supported");
map.put(EOPNOTSUPP, "Operation not supported on socket");
map.put(EPFNOSUPPORT, "Protocol family not supported");
map.put(EAFNOSUPPORT, "Address family not supported by protocol family");
map.put(EADDRINUSE, "Address already in use");
map.put(EADDRNOTAVAIL, "Can't assign requested address");
map.put(ENETDOWN, "Network is down");
map.put(ENETUNREACH, "Network is unreachable");
map.put(ENETRESET, "Network dropped connection on reset");
map.put(ECONNABORTED, "Software caused connection abort");
map.put(ECONNRESET, "Connection reset by peer");
map.put(ENOBUFS, "No buffer space available");
map.put(EISCONN, "Socket is already connected");
map.put(ENOTCONN, "Socket is not connected");
map.put(ESHUTDOWN, "Can't send after socket shutdown");
map.put(ETOOMANYREFS, "Too many references: can't splice");
map.put(ETIMEDOUT, "Operation timed out");
map.put(ECONNREFUSED, "Connection refused");
map.put(ELOOP, "Too many levels of symbolic links");
map.put(ENAMETOOLONG, "File name too long");
map.put(EHOSTDOWN, "Host is down");
map.put(EHOSTUNREACH, "No route to host");
map.put(ENOTEMPTY, "Directory not empty");
map.put(EUSERS, "Too many users");
map.put(EDQUOT, "Disc quota exceeded");
map.put(ESTALE, "Stale NFS file handle");
map.put(EREMOTE, "Too many levels of remote in path");
map.put(ENOLCK, "No locks available");
map.put(ENOSYS, "Function not implemented");
map.put(EOVERFLOW, "Value too large to be stored in data type");
map.put(EIDRM, "Identifier removed");
map.put(ENOMSG, "No message of desired type");
map.put(EILSEQ, "Illegal byte sequence");
map.put(EBADMSG, "Bad message");
map.put(EMULTIHOP, "EMULTIHOP (Reserved)");
map.put(ENODATA, "No message available on STREAM");
map.put(ENOLINK, "ENOLINK (Reserved)");
map.put(ENOSR, "No STREAM resources");
map.put(ENOSTR, "Not a STREAM");
map.put(EPROTO, "Protocol error");
map.put(ETIME, "STREAM ioctl timeout");
return map;
}
}
public final String toString() { return StringTable.descriptions.get(this); }
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/darwin/Fcntl.java 0000664 0000000 0000000 00000002000 12442353370 0031406 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:12 +1000
package jnr.constants.platform.darwin;
public enum Fcntl implements jnr.constants.Constant {
F_DUPFD(0L),
F_GETFD(1L),
F_SETFD(2L),
F_GETFL(3L),
F_SETFL(4L),
F_GETOWN(5L),
F_SETOWN(6L),
F_GETLK(7L),
F_SETLK(8L),
F_SETLKW(9L),
F_CHKCLEAN(41L),
F_PREALLOCATE(42L),
F_SETSIZE(43L),
F_RDADVISE(44L),
F_RDAHEAD(45L),
F_READBOOTSTRAP(46L),
F_WRITEBOOTSTRAP(47L),
F_NOCACHE(48L),
F_LOG2PHYS(49L),
F_GETPATH(50L),
F_FULLFSYNC(51L),
F_PATHPKG_CHECK(52L),
F_FREEZE_FS(53L),
F_THAW_FS(54L),
F_GLOBAL_NOCACHE(55L),
F_ADDSIGS(59L),
F_MARKDEPENDENCY(60L),
F_RDLCK(1L),
F_UNLCK(2L),
F_WRLCK(3L),
F_ALLOCATECONTIG(2L),
F_ALLOCATEALL(4L);
private final long value;
private Fcntl(long value) { this.value = value; }
public static final long MIN_VALUE = 0L;
public static final long MAX_VALUE = 60L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/darwin/INAddr.java 0000664 0000000 0000000 00000001356 12442353370 0031456 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:12 +1000
package jnr.constants.platform.darwin;
public enum INAddr implements jnr.constants.Constant {
INADDR_ANY(0L),
INADDR_BROADCAST(0xffffffffL),
INADDR_NONE(0xffffffffL),
INADDR_LOOPBACK(0x7f000001L),
INADDR_UNSPEC_GROUP(0xe0000000L),
INADDR_ALLHOSTS_GROUP(0xe0000001L),
INADDR_ALLRTRS_GROUP(0xe0000002L),
INADDR_MAX_LOCAL_GROUP(0xe00000ffL);
private final long value;
private INAddr(long value) { this.value = value; }
public static final long MIN_VALUE = 0L;
public static final long MAX_VALUE = 0xffffffffL;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/darwin/IPProto.java 0000664 0000000 0000000 00000002025 12442353370 0031703 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:12 +1000
package jnr.constants.platform.darwin;
public enum IPProto implements jnr.constants.Constant {
IPPROTO_IP(0L),
IPPROTO_HOPOPTS(0L),
IPPROTO_ICMP(1L),
IPPROTO_IGMP(2L),
IPPROTO_IPIP(4L),
IPPROTO_TCP(6L),
IPPROTO_EGP(8L),
IPPROTO_PUP(12L),
IPPROTO_UDP(17L),
IPPROTO_IDP(22L),
IPPROTO_TP(29L),
IPPROTO_IPV6(41L),
IPPROTO_ROUTING(43L),
IPPROTO_FRAGMENT(44L),
IPPROTO_RSVP(46L),
IPPROTO_GRE(47L),
IPPROTO_ESP(50L),
IPPROTO_AH(51L),
IPPROTO_ICMPV6(58L),
IPPROTO_NONE(59L),
IPPROTO_DSTOPTS(60L),
IPPROTO_MTP(92L),
IPPROTO_ENCAP(98L),
IPPROTO_PIM(103L),
// IPPROTO_COMP not defined
// IPPROTO_SCTP not defined
IPPROTO_RAW(255L),
IPPROTO_MAX(256L);
private final long value;
private IPProto(long value) { this.value = value; }
public static final long MIN_VALUE = 0L;
public static final long MAX_VALUE = 256L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/darwin/NameInfo.java 0000664 0000000 0000000 00000001207 12442353370 0032044 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:12 +1000
package jnr.constants.platform.darwin;
public enum NameInfo implements jnr.constants.Constant {
NI_MAXHOST(1025L),
NI_MAXSERV(32L),
NI_NOFQDN(1L),
NI_NUMERICHOST(2L),
NI_NAMEREQD(4L),
NI_NUMERICSERV(8L),
NI_DGRAM(16L),
NI_WITHSCOPEID(32L);
private final long value;
private NameInfo(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 1025L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/darwin/OpenFlags.java 0000664 0000000 0000000 00000001504 12442353370 0032226 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:12 +1000
package jnr.constants.platform.darwin;
public enum OpenFlags implements jnr.constants.Constant {
O_RDONLY(0L),
O_WRONLY(1L),
O_RDWR(2L),
O_ACCMODE(3L),
O_NONBLOCK(4L),
O_APPEND(8L),
O_SYNC(128L),
O_SHLOCK(16L),
O_EXLOCK(32L),
O_ASYNC(64L),
O_FSYNC(128L),
O_NOFOLLOW(256L),
O_CREAT(512L),
O_TRUNC(1024L),
O_EXCL(2048L),
O_EVTONLY(32768L),
O_DIRECTORY(1048576L),
O_SYMLINK(2097152L),
// O_BINARY not defined
O_NOCTTY(131072L);
private final long value;
private OpenFlags(long value) { this.value = value; }
public static final long MIN_VALUE = 0L;
public static final long MAX_VALUE = 2097152L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/darwin/PRIO.java 0000664 0000000 0000000 00000001076 12442353370 0031125 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:12 +1000
package jnr.constants.platform.darwin;
public enum PRIO implements jnr.constants.Constant {
PRIO_MIN(-20L),
PRIO_PROCESS(0L),
PRIO_PGRP(1L),
PRIO_USER(2L),
PRIO_MAX(20L);
private final long value;
private PRIO(long value) { this.value = value; }
public static final long MIN_VALUE = -20L;
public static final long MAX_VALUE = 20L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/darwin/ProtocolFamily.java 0000664 0000000 0000000 00000002067 12442353370 0033320 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:12 +1000
package jnr.constants.platform.darwin;
public enum ProtocolFamily implements jnr.constants.Constant {
PF_UNSPEC(0L),
PF_LOCAL(1L),
PF_UNIX(1L),
PF_INET(2L),
PF_IMPLINK(3L),
PF_PUP(4L),
PF_CHAOS(5L),
PF_NS(6L),
PF_ISO(7L),
PF_OSI(7L),
PF_ECMA(8L),
PF_DATAKIT(9L),
PF_CCITT(10L),
PF_SNA(11L),
PF_DECnet(12L),
PF_DLI(13L),
PF_LAT(14L),
PF_HYLINK(15L),
PF_APPLETALK(16L),
PF_ROUTE(17L),
PF_LINK(18L),
PF_XTP(19L),
PF_COIP(20L),
PF_CNT(21L),
PF_SIP(24L),
PF_IPX(23L),
PF_RTIP(22L),
PF_PIP(25L),
PF_NDRV(27L),
PF_ISDN(28L),
PF_KEY(29L),
PF_INET6(30L),
PF_NATM(31L),
PF_SYSTEM(32L),
PF_NETBIOS(33L),
PF_PPP(34L),
// PF_ATM not defined
// PF_NETGRAPH not defined
PF_MAX(38L);
private final long value;
private ProtocolFamily(long value) { this.value = value; }
public static final long MIN_VALUE = 0L;
public static final long MAX_VALUE = 38L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/darwin/RLIM.java 0000664 0000000 0000000 00000001201 12442353370 0031105 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:12 +1000
package jnr.constants.platform.darwin;
public enum RLIM implements jnr.constants.Constant {
RLIM_NLIMITS(0x9L),
RLIM_INFINITY(0x7fffffffffffffffL),
RLIM_SAVED_MAX(0x7fffffffffffffffL),
RLIM_SAVED_CUR(0x7fffffffffffffffL);
private final long value;
private RLIM(long value) { this.value = value; }
public static final long MIN_VALUE = 0x9L;
public static final long MAX_VALUE = 0x7fffffffffffffffL;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/darwin/RLIMIT.java 0000664 0000000 0000000 00000001611 12442353370 0031347 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:12 +1000
package jnr.constants.platform.darwin;
public enum RLIMIT implements jnr.constants.Constant {
RLIMIT_AS(5L),
RLIMIT_CORE(4L),
RLIMIT_CPU(0L),
RLIMIT_DATA(2L),
RLIMIT_FSIZE(1L),
// RLIMIT_LOCKS not defined
RLIMIT_MEMLOCK(6L),
// RLIMIT_MSGQUEUE not defined
// RLIMIT_NICE not defined
// RLIMIT_NLIMITS not defined
RLIMIT_NOFILE(8L),
RLIMIT_NPROC(7L),
// RLIMIT_OFILE not defined
RLIMIT_RSS(5L),
// RLIMIT_RTPRIO not defined
// RLIMIT_RTTIME not defined
// RLIMIT_SIGPENDING not defined
RLIMIT_STACK(3L);
private final long value;
private RLIMIT(long value) { this.value = value; }
public static final long MIN_VALUE = 0L;
public static final long MAX_VALUE = 8L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/darwin/Shutdown.java 0000664 0000000 0000000 00000001035 12442353370 0032162 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:13 +1000
package jnr.constants.platform.darwin;
public enum Shutdown implements jnr.constants.Constant {
SHUT_RD(0L),
SHUT_WR(1L),
SHUT_RDWR(2L);
private final long value;
private Shutdown(long value) { this.value = value; }
public static final long MIN_VALUE = 0L;
public static final long MAX_VALUE = 2L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/darwin/Signal.java 0000664 0000000 0000000 00000002065 12442353370 0031570 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:13 +1000
package jnr.constants.platform.darwin;
public enum Signal implements jnr.constants.Constant {
SIGHUP(1L),
SIGINT(2L),
SIGQUIT(3L),
SIGILL(4L),
SIGTRAP(5L),
SIGABRT(6L),
SIGIOT(6L),
SIGBUS(10L),
SIGFPE(8L),
SIGKILL(9L),
SIGUSR1(30L),
SIGSEGV(11L),
SIGUSR2(31L),
SIGPIPE(13L),
SIGALRM(14L),
SIGTERM(15L),
// SIGSTKFLT not defined
// SIGCLD not defined
SIGCHLD(20L),
SIGCONT(19L),
SIGSTOP(17L),
SIGTSTP(18L),
SIGTTIN(21L),
SIGTTOU(22L),
SIGURG(16L),
SIGXCPU(24L),
SIGXFSZ(25L),
SIGVTALRM(26L),
SIGPROF(27L),
SIGWINCH(28L),
// SIGPOLL not defined
SIGIO(23L),
// SIGPWR not defined
SIGSYS(12L),
// SIGUNUSED not defined
// SIGRTMIN not defined
// SIGRTMAX not defined
NSIG(32L);
private final long value;
private Signal(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 32L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/darwin/Sock.java 0000664 0000000 0000000 00000001126 12442353370 0031247 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:13 +1000
package jnr.constants.platform.darwin;
public enum Sock implements jnr.constants.Constant {
SOCK_STREAM(1L),
SOCK_DGRAM(2L),
SOCK_RAW(3L),
SOCK_RDM(4L),
SOCK_SEQPACKET(5L),
SOCK_MAXADDRLEN(255L);
private final long value;
private Sock(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 255L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/darwin/SocketLevel.java 0000664 0000000 0000000 00000001132 12442353370 0032565 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:13 +1000
package jnr.constants.platform.darwin;
public enum SocketLevel implements jnr.constants.Constant {
SOL_SOCKET(65535L);
// SOL_IP not defined
// SOL_TCP not defined
// SOL_UDP not defined
private final long value;
private SocketLevel(long value) { this.value = value; }
public static final long MIN_VALUE = 65535L;
public static final long MAX_VALUE = 65535L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/darwin/SocketOption.java 0000664 0000000 0000000 00000003010 12442353370 0032763 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:13 +1000
package jnr.constants.platform.darwin;
public enum SocketOption implements jnr.constants.Constant {
SO_DEBUG(0x1L),
SO_ACCEPTCONN(0x2L),
SO_REUSEADDR(0x4L),
SO_KEEPALIVE(0x8L),
SO_DONTROUTE(0x10L),
SO_BROADCAST(0x20L),
SO_USELOOPBACK(0x40L),
SO_LINGER(0x80L),
SO_OOBINLINE(0x100L),
SO_REUSEPORT(0x200L),
SO_TIMESTAMP(0x400L),
// SO_ACCEPTFILTER not defined
SO_DONTTRUNC(0x2000L),
SO_WANTMORE(0x4000L),
SO_WANTOOBFLAG(0x8000L),
SO_SNDBUF(0x1001L),
SO_RCVBUF(0x1002L),
SO_SNDLOWAT(0x1003L),
SO_RCVLOWAT(0x1004L),
SO_SNDTIMEO(0x1005L),
SO_RCVTIMEO(0x1006L),
SO_ERROR(0x1007L),
SO_TYPE(0x1008L),
SO_NREAD(0x1020L),
SO_NKE(0x1021L),
SO_NOSIGPIPE(0x1022L),
SO_NOADDRERR(0x1023L),
SO_NWRITE(0x1024L),
SO_REUSESHAREUID(0x1025L),
SO_LABEL(0x1010L),
SO_PEERLABEL(0x1011L);
// SO_ATTACH_FILTER not defined
// SO_BINDTODEVICE not defined
// SO_DETACH_FILTER not defined
// SO_NO_CHECK not defined
// SO_PASSCRED not defined
// SO_PEERCRED not defined
// SO_PEERNAME not defined
// SO_PRIORITY not defined
// SO_SECURITY_AUTHENTICATION not defined
// SO_SECURITY_ENCRYPTION_NETWORK not defined
// SO_SECURITY_ENCRYPTION_TRANSPORT not defined
private final long value;
private SocketOption(long value) { this.value = value; }
public static final long MIN_VALUE = 0x1L;
public static final long MAX_VALUE = 0x8000L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/darwin/Sysconf.java 0000664 0000000 0000000 00000006745 12442353370 0032010 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:13 +1000
package jnr.constants.platform.darwin;
public enum Sysconf implements jnr.constants.Constant {
_SC_ARG_MAX(1L),
_SC_CHILD_MAX(2L),
_SC_CLK_TCK(3L),
_SC_NGROUPS_MAX(4L),
_SC_OPEN_MAX(5L),
_SC_JOB_CONTROL(6L),
_SC_SAVED_IDS(7L),
_SC_VERSION(8L),
_SC_BC_BASE_MAX(9L),
_SC_BC_DIM_MAX(10L),
_SC_BC_SCALE_MAX(11L),
_SC_BC_STRING_MAX(12L),
_SC_COLL_WEIGHTS_MAX(13L),
_SC_EXPR_NEST_MAX(14L),
_SC_LINE_MAX(15L),
_SC_RE_DUP_MAX(16L),
_SC_2_VERSION(17L),
_SC_2_C_BIND(18L),
_SC_2_C_DEV(19L),
_SC_2_CHAR_TERM(20L),
_SC_2_FORT_DEV(21L),
_SC_2_FORT_RUN(22L),
_SC_2_LOCALEDEF(23L),
_SC_2_SW_DEV(24L),
_SC_2_UPE(25L),
_SC_STREAM_MAX(26L),
_SC_TZNAME_MAX(27L),
_SC_ASYNCHRONOUS_IO(28L),
_SC_PAGESIZE(29L),
_SC_MEMLOCK(30L),
_SC_MEMLOCK_RANGE(31L),
_SC_MEMORY_PROTECTION(32L),
_SC_MESSAGE_PASSING(33L),
_SC_PRIORITIZED_IO(34L),
_SC_PRIORITY_SCHEDULING(35L),
_SC_REALTIME_SIGNALS(36L),
_SC_SEMAPHORES(37L),
_SC_FSYNC(38L),
_SC_SHARED_MEMORY_OBJECTS(39L),
_SC_SYNCHRONIZED_IO(40L),
_SC_TIMERS(41L),
_SC_AIO_LISTIO_MAX(42L),
_SC_AIO_MAX(43L),
_SC_AIO_PRIO_DELTA_MAX(44L),
_SC_DELAYTIMER_MAX(45L),
_SC_MQ_OPEN_MAX(46L),
_SC_MAPPED_FILES(47L),
_SC_RTSIG_MAX(48L),
_SC_SEM_NSEMS_MAX(49L),
_SC_SEM_VALUE_MAX(50L),
_SC_SIGQUEUE_MAX(51L),
_SC_TIMER_MAX(52L),
_SC_NPROCESSORS_CONF(57L),
_SC_NPROCESSORS_ONLN(58L),
_SC_2_PBS(59L),
_SC_2_PBS_ACCOUNTING(60L),
_SC_2_PBS_CHECKPOINT(61L),
_SC_2_PBS_LOCATE(62L),
_SC_2_PBS_MESSAGE(63L),
_SC_2_PBS_TRACK(64L),
_SC_ADVISORY_INFO(65L),
_SC_BARRIERS(66L),
_SC_CLOCK_SELECTION(67L),
_SC_CPUTIME(68L),
_SC_FILE_LOCKING(69L),
_SC_GETGR_R_SIZE_MAX(70L),
_SC_GETPW_R_SIZE_MAX(71L),
_SC_HOST_NAME_MAX(72L),
_SC_LOGIN_NAME_MAX(73L),
_SC_MONOTONIC_CLOCK(74L),
_SC_MQ_PRIO_MAX(75L),
_SC_READER_WRITER_LOCKS(76L),
_SC_REGEXP(77L),
_SC_SHELL(78L),
_SC_SPAWN(79L),
_SC_SPIN_LOCKS(80L),
_SC_SPORADIC_SERVER(81L),
_SC_THREAD_ATTR_STACKADDR(82L),
_SC_THREAD_ATTR_STACKSIZE(83L),
_SC_THREAD_CPUTIME(84L),
_SC_THREAD_DESTRUCTOR_ITERATIONS(85L),
_SC_THREAD_KEYS_MAX(86L),
_SC_THREAD_PRIO_INHERIT(87L),
_SC_THREAD_PRIO_PROTECT(88L),
_SC_THREAD_PRIORITY_SCHEDULING(89L),
_SC_THREAD_PROCESS_SHARED(90L),
_SC_THREAD_SAFE_FUNCTIONS(91L),
_SC_THREAD_SPORADIC_SERVER(92L),
_SC_THREAD_STACK_MIN(93L),
_SC_THREAD_THREADS_MAX(94L),
_SC_TIMEOUTS(95L),
_SC_THREADS(96L),
_SC_TRACE(97L),
_SC_TRACE_EVENT_FILTER(98L),
_SC_TRACE_INHERIT(99L),
_SC_TRACE_LOG(100L),
_SC_TTY_NAME_MAX(101L),
_SC_TYPED_MEMORY_OBJECTS(102L),
_SC_V6_ILP32_OFF32(103L),
_SC_V6_ILP32_OFFBIG(104L),
_SC_V6_LP64_OFF64(105L),
_SC_V6_LPBIG_OFFBIG(106L),
_SC_IPV6(118L),
_SC_RAW_SOCKETS(119L),
_SC_SYMLOOP_MAX(120L),
_SC_ATEXIT_MAX(107L),
_SC_IOV_MAX(56L),
_SC_PAGE_SIZE(29L),
_SC_XOPEN_CRYPT(108L),
_SC_XOPEN_ENH_I18N(109L),
_SC_XOPEN_LEGACY(110L),
_SC_XOPEN_REALTIME(111L),
_SC_XOPEN_REALTIME_THREADS(112L),
_SC_XOPEN_SHM(113L),
_SC_XOPEN_STREAMS(114L),
_SC_XOPEN_UNIX(115L),
_SC_XOPEN_VERSION(116L),
_SC_XOPEN_XCU_VERSION(121L),
_SC_XBS5_ILP32_OFF32(122L),
_SC_XBS5_ILP32_OFFBIG(123L),
_SC_XBS5_LP64_OFF64(124L),
_SC_XBS5_LPBIG_OFFBIG(125L),
_SC_SS_REPL_MAX(126L),
_SC_TRACE_EVENT_NAME_MAX(127L),
_SC_TRACE_NAME_MAX(128L),
_SC_TRACE_SYS_MAX(129L),
_SC_TRACE_USER_EVENT_MAX(130L),
_SC_PASS_MAX(131L);
private final long value;
private Sysconf(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 131L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/darwin/TCP.java 0000664 0000000 0000000 00000001451 12442353370 0030777 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:13 +1000
package jnr.constants.platform.darwin;
public enum TCP implements jnr.constants.Constant {
TCP_MAX_SACK(3L),
TCP_MSS(512L),
TCP_MINMSS(216L),
TCP_MINMSSOVERLOAD(1000L),
TCP_MAXWIN(65535L),
TCP_MAX_WINSHIFT(14L),
TCP_MAXBURST(4L),
TCP_MAXHLEN(60L),
TCP_MAXOLEN(40L),
TCP_NODELAY(1L),
TCP_MAXSEG(2L),
TCP_NOPUSH(4L),
TCP_NOOPT(8L),
TCP_KEEPALIVE(16L);
// TCP_NSTATES not defined
// TCP_RETRANSHZ not defined
private final long value;
private TCP(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 65535L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/darwin/WaitFlags.java 0000664 0000000 0000000 00000001135 12442353370 0032231 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:13 +1000
package jnr.constants.platform.darwin;
public enum WaitFlags implements jnr.constants.Constant {
WNOHANG(0x1L),
WUNTRACED(0x2L),
WSTOPPED(0x8L),
WEXITED(0x4L),
WCONTINUED(0x10L),
WNOWAIT(0x20L);
private final long value;
private WaitFlags(long value) { this.value = value; }
public static final long MIN_VALUE = 0x1L;
public static final long MAX_VALUE = 0x20L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/fake/ 0000775 0000000 0000000 00000000000 12442353370 0027127 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/fake/AddressFamily.java 0000664 0000000 0000000 00000002112 12442353370 0032515 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:14 +1000
package jnr.constants.platform.fake;
public enum AddressFamily implements jnr.constants.Constant {
AF_UNSPEC(1),
AF_LOCAL(2),
AF_UNIX(3),
AF_INET(4),
AF_IMPLINK(5),
AF_PUP(6),
AF_CHAOS(7),
AF_NS(8),
AF_ISO(9),
AF_OSI(10),
AF_ECMA(11),
AF_DATAKIT(12),
AF_CCITT(13),
AF_SNA(14),
AF_DECnet(15),
AF_DLI(16),
AF_LAT(17),
AF_HYLINK(18),
AF_APPLETALK(19),
AF_ROUTE(20),
AF_LINK(21),
pseudo_AF_XTP(22),
AF_COIP(23),
AF_CNT(24),
pseudo_AF_RTIP(25),
AF_IPX(26),
AF_SIP(27),
pseudo_AF_PIP(28),
AF_NDRV(29),
AF_ISDN(30),
AF_E164(31),
pseudo_AF_KEY(32),
AF_INET6(33),
AF_NATM(34),
AF_SYSTEM(35),
AF_NETBIOS(36),
AF_PPP(37),
AF_ATM(38),
pseudo_AF_HDRCMPLT(39),
AF_NETGRAPH(40),
AF_AX25(41),
AF_MAX(42);
private final long value;
private AddressFamily(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 42L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/fake/Errno.java 0000664 0000000 0000000 00000003142 12442353370 0031057 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:14 +1000
package jnr.constants.platform.fake;
public enum Errno implements jnr.constants.Constant {
EPERM(1),
ENOENT(2),
ESRCH(3),
EINTR(4),
EIO(5),
ENXIO(6),
E2BIG(7),
ENOEXEC(8),
EBADF(9),
ECHILD(10),
EDEADLK(11),
ENOMEM(12),
EACCES(13),
EFAULT(14),
ENOTBLK(15),
EBUSY(16),
EEXIST(17),
EXDEV(18),
ENODEV(19),
ENOTDIR(20),
EISDIR(21),
EINVAL(22),
ENFILE(23),
EMFILE(24),
ENOTTY(25),
ETXTBSY(26),
EFBIG(27),
ENOSPC(28),
ESPIPE(29),
EROFS(30),
EMLINK(31),
EPIPE(32),
EDOM(33),
ERANGE(34),
EWOULDBLOCK(35),
EAGAIN(36),
EINPROGRESS(37),
EALREADY(38),
ENOTSOCK(39),
EDESTADDRREQ(40),
EMSGSIZE(41),
EPROTOTYPE(42),
ENOPROTOOPT(43),
EPROTONOSUPPORT(44),
ESOCKTNOSUPPORT(45),
EOPNOTSUPP(46),
EPFNOSUPPORT(47),
EAFNOSUPPORT(48),
EADDRINUSE(49),
EADDRNOTAVAIL(50),
ENETDOWN(51),
ENETUNREACH(52),
ENETRESET(53),
ECONNABORTED(54),
ECONNRESET(55),
ENOBUFS(56),
EISCONN(57),
ENOTCONN(58),
ESHUTDOWN(59),
ETOOMANYREFS(60),
ETIMEDOUT(61),
ECONNREFUSED(62),
ELOOP(63),
ENAMETOOLONG(64),
EHOSTDOWN(65),
EHOSTUNREACH(66),
ENOTEMPTY(67),
EUSERS(68),
EDQUOT(69),
ESTALE(70),
EREMOTE(71),
ENOLCK(72),
ENOSYS(73),
EOVERFLOW(74),
EIDRM(75),
ENOMSG(76),
EILSEQ(77),
EBADMSG(78),
EMULTIHOP(79),
ENODATA(80),
ENOLINK(81),
ENOSR(82),
ENOSTR(83),
EPROTO(84),
ETIME(85);
private final long value;
private Errno(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 85L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/fake/Fcntl.java 0000664 0000000 0000000 00000001743 12442353370 0031045 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:14 +1000
package jnr.constants.platform.fake;
public enum Fcntl implements jnr.constants.Constant {
F_DUPFD(1),
F_GETFD(2),
F_SETFD(3),
F_GETFL(4),
F_SETFL(5),
F_GETOWN(6),
F_SETOWN(7),
F_GETLK(8),
F_SETLK(9),
F_SETLKW(10),
F_CHKCLEAN(11),
F_PREALLOCATE(12),
F_SETSIZE(13),
F_RDADVISE(14),
F_RDAHEAD(15),
F_READBOOTSTRAP(16),
F_WRITEBOOTSTRAP(17),
F_NOCACHE(18),
F_LOG2PHYS(19),
F_GETPATH(20),
F_FULLFSYNC(21),
F_PATHPKG_CHECK(22),
F_FREEZE_FS(23),
F_THAW_FS(24),
F_GLOBAL_NOCACHE(25),
F_ADDSIGS(26),
F_MARKDEPENDENCY(27),
F_RDLCK(28),
F_UNLCK(29),
F_WRLCK(30),
F_ALLOCATECONTIG(31),
F_ALLOCATEALL(32);
private final long value;
private Fcntl(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 32L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/fake/INAddr.java 0000664 0000000 0000000 00000001233 12442353370 0031072 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:14 +1000
package jnr.constants.platform.fake;
public enum INAddr implements jnr.constants.Constant {
INADDR_ANY(1),
INADDR_BROADCAST(2),
INADDR_NONE(3),
INADDR_LOOPBACK(4),
INADDR_UNSPEC_GROUP(5),
INADDR_ALLHOSTS_GROUP(6),
INADDR_ALLRTRS_GROUP(7),
INADDR_MAX_LOCAL_GROUP(8);
private final long value;
private INAddr(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 8L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/fake/IPProto.java 0000664 0000000 0000000 00000001736 12442353370 0031335 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:14 +1000
package jnr.constants.platform.fake;
public enum IPProto implements jnr.constants.Constant {
IPPROTO_IP(1),
IPPROTO_HOPOPTS(2),
IPPROTO_ICMP(3),
IPPROTO_IGMP(4),
IPPROTO_IPIP(5),
IPPROTO_TCP(6),
IPPROTO_EGP(7),
IPPROTO_PUP(8),
IPPROTO_UDP(9),
IPPROTO_IDP(10),
IPPROTO_TP(11),
IPPROTO_IPV6(12),
IPPROTO_ROUTING(13),
IPPROTO_FRAGMENT(14),
IPPROTO_RSVP(15),
IPPROTO_GRE(16),
IPPROTO_ESP(17),
IPPROTO_AH(18),
IPPROTO_ICMPV6(19),
IPPROTO_NONE(20),
IPPROTO_DSTOPTS(21),
IPPROTO_MTP(22),
IPPROTO_ENCAP(23),
IPPROTO_PIM(24),
IPPROTO_COMP(25),
IPPROTO_SCTP(26),
IPPROTO_RAW(27),
IPPROTO_MAX(28);
private final long value;
private IPProto(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 28L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/fake/NameInfo.java 0000664 0000000 0000000 00000001163 12442353370 0031467 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:14 +1000
package jnr.constants.platform.fake;
public enum NameInfo implements jnr.constants.Constant {
NI_MAXHOST(1),
NI_MAXSERV(2),
NI_NOFQDN(3),
NI_NUMERICHOST(4),
NI_NAMEREQD(5),
NI_NUMERICSERV(6),
NI_DGRAM(7),
NI_WITHSCOPEID(8);
private final long value;
private NameInfo(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 8L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/fake/OpenFlags.java 0000664 0000000 0000000 00000001515 12442353370 0031652 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:15 +1000
package jnr.constants.platform.fake;
public enum OpenFlags implements jnr.constants.Constant {
O_RDONLY(0x1),
O_WRONLY(0x2),
O_RDWR(0x4),
O_ACCMODE(0x8),
O_NONBLOCK(0x10),
O_APPEND(0x20),
O_SYNC(0x40),
O_SHLOCK(0x80),
O_EXLOCK(0x100),
O_ASYNC(0x200),
O_FSYNC(0x400),
O_NOFOLLOW(0x800),
O_CREAT(0x1000),
O_TRUNC(0x2000),
O_EXCL(0x4000),
O_EVTONLY(0x8000),
O_DIRECTORY(0x10000),
O_SYMLINK(0x20000),
O_BINARY(0x40000),
O_NOCTTY(0x80000);
private final long value;
private OpenFlags(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 0x80000L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/fake/PRIO.java 0000664 0000000 0000000 00000001060 12442353370 0030540 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:15 +1000
package jnr.constants.platform.fake;
public enum PRIO implements jnr.constants.Constant {
PRIO_MIN(1),
PRIO_PROCESS(2),
PRIO_PGRP(3),
PRIO_USER(4),
PRIO_MAX(5);
private final long value;
private PRIO(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 5L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/fake/ProtocolFamily.java 0000664 0000000 0000000 00000001776 12442353370 0032750 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:15 +1000
package jnr.constants.platform.fake;
public enum ProtocolFamily implements jnr.constants.Constant {
PF_UNSPEC(1),
PF_LOCAL(2),
PF_UNIX(3),
PF_INET(4),
PF_IMPLINK(5),
PF_PUP(6),
PF_CHAOS(7),
PF_NS(8),
PF_ISO(9),
PF_OSI(10),
PF_ECMA(11),
PF_DATAKIT(12),
PF_CCITT(13),
PF_SNA(14),
PF_DECnet(15),
PF_DLI(16),
PF_LAT(17),
PF_HYLINK(18),
PF_APPLETALK(19),
PF_ROUTE(20),
PF_LINK(21),
PF_XTP(22),
PF_COIP(23),
PF_CNT(24),
PF_SIP(25),
PF_IPX(26),
PF_RTIP(27),
PF_PIP(28),
PF_NDRV(29),
PF_ISDN(30),
PF_KEY(31),
PF_INET6(32),
PF_NATM(33),
PF_SYSTEM(34),
PF_NETBIOS(35),
PF_PPP(36),
PF_ATM(37),
PF_NETGRAPH(38),
PF_MAX(39);
private final long value;
private ProtocolFamily(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 39L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/fake/RLIM.java 0000664 0000000 0000000 00000001062 12442353370 0030534 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:15 +1000
package jnr.constants.platform.fake;
public enum RLIM implements jnr.constants.Constant {
RLIM_NLIMITS(1),
RLIM_INFINITY(2),
RLIM_SAVED_MAX(3),
RLIM_SAVED_CUR(4);
private final long value;
private RLIM(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 4L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/fake/RLIMIT.java 0000664 0000000 0000000 00000001456 12442353370 0031000 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:15 +1000
package jnr.constants.platform.fake;
public enum RLIMIT implements jnr.constants.Constant {
RLIMIT_AS(1),
RLIMIT_CORE(2),
RLIMIT_CPU(3),
RLIMIT_DATA(4),
RLIMIT_FSIZE(5),
RLIMIT_LOCKS(6),
RLIMIT_MEMLOCK(7),
RLIMIT_MSGQUEUE(8),
RLIMIT_NICE(9),
RLIMIT_NLIMITS(10),
RLIMIT_NOFILE(11),
RLIMIT_NPROC(12),
RLIMIT_OFILE(13),
RLIMIT_RSS(14),
RLIMIT_RTPRIO(15),
RLIMIT_RTTIME(16),
RLIMIT_SIGPENDING(17),
RLIMIT_STACK(18);
private final long value;
private RLIMIT(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 18L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/fake/Shutdown.java 0000664 0000000 0000000 00000001037 12442353370 0031606 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:15 +1000
package jnr.constants.platform.fake;
public enum Shutdown implements jnr.constants.Constant {
SHUT_RD(0x1),
SHUT_WR(0x2),
SHUT_RDWR(0x4);
private final long value;
private Shutdown(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 0x4L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/fake/Signal.java 0000664 0000000 0000000 00000001715 12442353370 0031213 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:15 +1000
package jnr.constants.platform.fake;
public enum Signal implements jnr.constants.Constant {
SIGHUP(1),
SIGINT(2),
SIGQUIT(3),
SIGILL(4),
SIGTRAP(5),
SIGABRT(6),
SIGIOT(7),
SIGBUS(8),
SIGFPE(9),
SIGKILL(10),
SIGUSR1(11),
SIGSEGV(12),
SIGUSR2(13),
SIGPIPE(14),
SIGALRM(15),
SIGTERM(16),
SIGSTKFLT(17),
SIGCLD(18),
SIGCHLD(19),
SIGCONT(20),
SIGSTOP(21),
SIGTSTP(22),
SIGTTIN(23),
SIGTTOU(24),
SIGURG(25),
SIGXCPU(26),
SIGXFSZ(27),
SIGVTALRM(28),
SIGPROF(29),
SIGWINCH(30),
SIGPOLL(31),
SIGIO(32),
SIGPWR(33),
SIGSYS(34),
SIGUNUSED(35),
SIGRTMIN(36),
SIGRTMAX(37),
NSIG(38);
private final long value;
private Signal(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 38L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/fake/Sock.java 0000664 0000000 0000000 00000001111 12442353370 0030663 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:15 +1000
package jnr.constants.platform.fake;
public enum Sock implements jnr.constants.Constant {
SOCK_STREAM(1),
SOCK_DGRAM(2),
SOCK_RAW(3),
SOCK_RDM(4),
SOCK_SEQPACKET(5),
SOCK_MAXADDRLEN(6);
private final long value;
private Sock(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 6L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/fake/SocketLevel.java 0000664 0000000 0000000 00000001051 12442353370 0032207 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:15 +1000
package jnr.constants.platform.fake;
public enum SocketLevel implements jnr.constants.Constant {
SOL_SOCKET(1),
SOL_IP(2),
SOL_TCP(3),
SOL_UDP(4);
private final long value;
private SocketLevel(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 4L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/fake/SocketOption.java 0000664 0000000 0000000 00000002377 12442353370 0032424 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:15 +1000
package jnr.constants.platform.fake;
public enum SocketOption implements jnr.constants.Constant {
SO_DEBUG(1),
SO_ACCEPTCONN(2),
SO_REUSEADDR(3),
SO_KEEPALIVE(4),
SO_DONTROUTE(5),
SO_BROADCAST(6),
SO_USELOOPBACK(7),
SO_LINGER(8),
SO_OOBINLINE(9),
SO_REUSEPORT(10),
SO_TIMESTAMP(11),
SO_ACCEPTFILTER(12),
SO_DONTTRUNC(13),
SO_WANTMORE(14),
SO_WANTOOBFLAG(15),
SO_SNDBUF(16),
SO_RCVBUF(17),
SO_SNDLOWAT(18),
SO_RCVLOWAT(19),
SO_SNDTIMEO(20),
SO_RCVTIMEO(21),
SO_ERROR(22),
SO_TYPE(23),
SO_NREAD(24),
SO_NKE(25),
SO_NOSIGPIPE(26),
SO_NOADDRERR(27),
SO_NWRITE(28),
SO_REUSESHAREUID(29),
SO_LABEL(30),
SO_PEERLABEL(31),
SO_ATTACH_FILTER(32),
SO_BINDTODEVICE(33),
SO_DETACH_FILTER(34),
SO_NO_CHECK(35),
SO_PASSCRED(36),
SO_PEERCRED(37),
SO_PEERNAME(38),
SO_PRIORITY(39),
SO_SECURITY_AUTHENTICATION(40),
SO_SECURITY_ENCRYPTION_NETWORK(41),
SO_SECURITY_ENCRYPTION_TRANSPORT(42);
private final long value;
private SocketOption(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 42L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/fake/Sysconf.java 0000664 0000000 0000000 00000006540 12442353370 0031423 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:15 +1000
package jnr.constants.platform.fake;
public enum Sysconf implements jnr.constants.Constant {
_SC_ARG_MAX(1),
_SC_CHILD_MAX(2),
_SC_CLK_TCK(3),
_SC_NGROUPS_MAX(4),
_SC_OPEN_MAX(5),
_SC_JOB_CONTROL(6),
_SC_SAVED_IDS(7),
_SC_VERSION(8),
_SC_BC_BASE_MAX(9),
_SC_BC_DIM_MAX(10),
_SC_BC_SCALE_MAX(11),
_SC_BC_STRING_MAX(12),
_SC_COLL_WEIGHTS_MAX(13),
_SC_EXPR_NEST_MAX(14),
_SC_LINE_MAX(15),
_SC_RE_DUP_MAX(16),
_SC_2_VERSION(17),
_SC_2_C_BIND(18),
_SC_2_C_DEV(19),
_SC_2_CHAR_TERM(20),
_SC_2_FORT_DEV(21),
_SC_2_FORT_RUN(22),
_SC_2_LOCALEDEF(23),
_SC_2_SW_DEV(24),
_SC_2_UPE(25),
_SC_STREAM_MAX(26),
_SC_TZNAME_MAX(27),
_SC_ASYNCHRONOUS_IO(28),
_SC_PAGESIZE(29),
_SC_MEMLOCK(30),
_SC_MEMLOCK_RANGE(31),
_SC_MEMORY_PROTECTION(32),
_SC_MESSAGE_PASSING(33),
_SC_PRIORITIZED_IO(34),
_SC_PRIORITY_SCHEDULING(35),
_SC_REALTIME_SIGNALS(36),
_SC_SEMAPHORES(37),
_SC_FSYNC(38),
_SC_SHARED_MEMORY_OBJECTS(39),
_SC_SYNCHRONIZED_IO(40),
_SC_TIMERS(41),
_SC_AIO_LISTIO_MAX(42),
_SC_AIO_MAX(43),
_SC_AIO_PRIO_DELTA_MAX(44),
_SC_DELAYTIMER_MAX(45),
_SC_MQ_OPEN_MAX(46),
_SC_MAPPED_FILES(47),
_SC_RTSIG_MAX(48),
_SC_SEM_NSEMS_MAX(49),
_SC_SEM_VALUE_MAX(50),
_SC_SIGQUEUE_MAX(51),
_SC_TIMER_MAX(52),
_SC_NPROCESSORS_CONF(53),
_SC_NPROCESSORS_ONLN(54),
_SC_2_PBS(55),
_SC_2_PBS_ACCOUNTING(56),
_SC_2_PBS_CHECKPOINT(57),
_SC_2_PBS_LOCATE(58),
_SC_2_PBS_MESSAGE(59),
_SC_2_PBS_TRACK(60),
_SC_ADVISORY_INFO(61),
_SC_BARRIERS(62),
_SC_CLOCK_SELECTION(63),
_SC_CPUTIME(64),
_SC_FILE_LOCKING(65),
_SC_GETGR_R_SIZE_MAX(66),
_SC_GETPW_R_SIZE_MAX(67),
_SC_HOST_NAME_MAX(68),
_SC_LOGIN_NAME_MAX(69),
_SC_MONOTONIC_CLOCK(70),
_SC_MQ_PRIO_MAX(71),
_SC_READER_WRITER_LOCKS(72),
_SC_REGEXP(73),
_SC_SHELL(74),
_SC_SPAWN(75),
_SC_SPIN_LOCKS(76),
_SC_SPORADIC_SERVER(77),
_SC_THREAD_ATTR_STACKADDR(78),
_SC_THREAD_ATTR_STACKSIZE(79),
_SC_THREAD_CPUTIME(80),
_SC_THREAD_DESTRUCTOR_ITERATIONS(81),
_SC_THREAD_KEYS_MAX(82),
_SC_THREAD_PRIO_INHERIT(83),
_SC_THREAD_PRIO_PROTECT(84),
_SC_THREAD_PRIORITY_SCHEDULING(85),
_SC_THREAD_PROCESS_SHARED(86),
_SC_THREAD_SAFE_FUNCTIONS(87),
_SC_THREAD_SPORADIC_SERVER(88),
_SC_THREAD_STACK_MIN(89),
_SC_THREAD_THREADS_MAX(90),
_SC_TIMEOUTS(91),
_SC_THREADS(92),
_SC_TRACE(93),
_SC_TRACE_EVENT_FILTER(94),
_SC_TRACE_INHERIT(95),
_SC_TRACE_LOG(96),
_SC_TTY_NAME_MAX(97),
_SC_TYPED_MEMORY_OBJECTS(98),
_SC_V6_ILP32_OFF32(99),
_SC_V6_ILP32_OFFBIG(100),
_SC_V6_LP64_OFF64(101),
_SC_V6_LPBIG_OFFBIG(102),
_SC_IPV6(103),
_SC_RAW_SOCKETS(104),
_SC_SYMLOOP_MAX(105),
_SC_ATEXIT_MAX(106),
_SC_IOV_MAX(107),
_SC_PAGE_SIZE(108),
_SC_XOPEN_CRYPT(109),
_SC_XOPEN_ENH_I18N(110),
_SC_XOPEN_LEGACY(111),
_SC_XOPEN_REALTIME(112),
_SC_XOPEN_REALTIME_THREADS(113),
_SC_XOPEN_SHM(114),
_SC_XOPEN_STREAMS(115),
_SC_XOPEN_UNIX(116),
_SC_XOPEN_VERSION(117),
_SC_XOPEN_XCU_VERSION(118),
_SC_XBS5_ILP32_OFF32(119),
_SC_XBS5_ILP32_OFFBIG(120),
_SC_XBS5_LP64_OFF64(121),
_SC_XBS5_LPBIG_OFFBIG(122),
_SC_SS_REPL_MAX(123),
_SC_TRACE_EVENT_NAME_MAX(124),
_SC_TRACE_NAME_MAX(125),
_SC_TRACE_SYS_MAX(126),
_SC_TRACE_USER_EVENT_MAX(127),
_SC_PASS_MAX(128);
private final long value;
private Sysconf(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 128L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/fake/TCP.java 0000664 0000000 0000000 00000001367 12442353370 0030427 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:15 +1000
package jnr.constants.platform.fake;
public enum TCP implements jnr.constants.Constant {
TCP_MAX_SACK(1),
TCP_MSS(2),
TCP_MINMSS(3),
TCP_MINMSSOVERLOAD(4),
TCP_MAXWIN(5),
TCP_MAX_WINSHIFT(6),
TCP_MAXBURST(7),
TCP_MAXHLEN(8),
TCP_MAXOLEN(9),
TCP_NODELAY(10),
TCP_MAXSEG(11),
TCP_NOPUSH(12),
TCP_NOOPT(13),
TCP_KEEPALIVE(14),
TCP_NSTATES(15),
TCP_RETRANSHZ(16);
private final long value;
private TCP(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 16L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/fake/WaitFlags.java 0000664 0000000 0000000 00000001122 12442353370 0031647 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated 2010-07-31 18:57:15 +1000
package jnr.constants.platform.fake;
public enum WaitFlags implements jnr.constants.Constant {
WNOHANG(0x1),
WUNTRACED(0x2),
WSTOPPED(0x4),
WEXITED(0x8),
WCONTINUED(0x10),
WNOWAIT(0x20);
private final long value;
private WaitFlags(long value) { this.value = value; }
public static final long MIN_VALUE = 1L;
public static final long MAX_VALUE = 0x20L;
public final int intValue() { return (int) value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/freebsd/ 0000775 0000000 0000000 00000000000 12442353370 0027633 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/freebsd/AddressFamily.java 0000664 0000000 0000000 00000002243 12442353370 0033226 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 15:25:10 -0800 2009
package jnr.constants.platform.freebsd;
public enum AddressFamily implements jnr.constants.Constant {
AF_UNSPEC(0),
AF_LOCAL(1),
AF_UNIX(1),
AF_INET(2),
AF_IMPLINK(3),
AF_PUP(4),
AF_CHAOS(5),
// AF_NS not defined
AF_ISO(7),
AF_OSI(7),
AF_ECMA(8),
AF_DATAKIT(9),
AF_CCITT(10),
AF_SNA(11),
AF_DECnet(12),
AF_DLI(13),
AF_LAT(14),
AF_HYLINK(15),
AF_APPLETALK(16),
AF_ROUTE(17),
AF_LINK(18),
pseudo_AF_XTP(19),
AF_COIP(20),
AF_CNT(21),
pseudo_AF_RTIP(22),
AF_IPX(23),
AF_SIP(24),
pseudo_AF_PIP(25),
// AF_NDRV not defined
AF_ISDN(26),
AF_E164(26),
pseudo_AF_KEY(27),
AF_INET6(28),
AF_NATM(29),
// AF_SYSTEM not defined
AF_NETBIOS(6),
// AF_PPP not defined
AF_ATM(30),
pseudo_AF_HDRCMPLT(31),
AF_NETGRAPH(32),
// AF_AX25 not defined
AF_MAX(37);
private final int value;
private AddressFamily(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 37;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/freebsd/Errno.java 0000664 0000000 0000000 00000013367 12442353370 0031575 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 15:25:10 -0800 2009
package jnr.constants.platform.freebsd;
public enum Errno implements jnr.constants.Constant {
EPERM(1),
ENOENT(2),
ESRCH(3),
EINTR(4),
EIO(5),
ENXIO(6),
E2BIG(7),
ENOEXEC(8),
EBADF(9),
ECHILD(10),
EDEADLK(11),
ENOMEM(12),
EACCES(13),
EFAULT(14),
ENOTBLK(15),
EBUSY(16),
EEXIST(17),
EXDEV(18),
ENODEV(19),
ENOTDIR(20),
EISDIR(21),
EINVAL(22),
ENFILE(23),
EMFILE(24),
ENOTTY(25),
ETXTBSY(26),
EFBIG(27),
ENOSPC(28),
ESPIPE(29),
EROFS(30),
EMLINK(31),
EPIPE(32),
EDOM(33),
ERANGE(34),
EWOULDBLOCK(35),
EAGAIN(35),
EINPROGRESS(36),
EALREADY(37),
ENOTSOCK(38),
EDESTADDRREQ(39),
EMSGSIZE(40),
EPROTOTYPE(41),
ENOPROTOOPT(42),
EPROTONOSUPPORT(43),
ESOCKTNOSUPPORT(44),
EOPNOTSUPP(45),
EPFNOSUPPORT(46),
EAFNOSUPPORT(47),
EADDRINUSE(48),
EADDRNOTAVAIL(49),
ENETDOWN(50),
ENETUNREACH(51),
ENETRESET(52),
ECONNABORTED(53),
ECONNRESET(54),
ENOBUFS(55),
EISCONN(56),
ENOTCONN(57),
ESHUTDOWN(58),
ETOOMANYREFS(59),
ETIMEDOUT(60),
ECONNREFUSED(61),
ELOOP(62),
ENAMETOOLONG(63),
EHOSTDOWN(64),
EHOSTUNREACH(65),
ENOTEMPTY(66),
EUSERS(68),
EDQUOT(69),
ESTALE(70),
EREMOTE(71),
ENOLCK(77),
ENOSYS(78),
EOVERFLOW(84),
EIDRM(82),
ENOMSG(83),
EILSEQ(86),
EBADMSG(89),
EMULTIHOP(90),
// ENODATA not defined
ENOLINK(91),
// ENOSR not defined
// ENOSTR not defined
EPROTO(92);
// ETIME not defined
private final int value;
private Errno(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 92;
static final class StringTable {
public static final java.util.Map descriptions = generateTable();
public static final java.util.Map generateTable() {
java.util.Map map = new java.util.EnumMap(Errno.class);
map.put(EPERM, "Operation not permitted");
map.put(ENOENT, "No such file or directory");
map.put(ESRCH, "No such process");
map.put(EINTR, "Interrupted system call");
map.put(EIO, "Input/output error");
map.put(ENXIO, "Device not configured");
map.put(E2BIG, "Argument list too long");
map.put(ENOEXEC, "Exec format error");
map.put(EBADF, "Bad file descriptor");
map.put(ECHILD, "No child processes");
map.put(EDEADLK, "Resource deadlock avoided");
map.put(ENOMEM, "Cannot allocate memory");
map.put(EACCES, "Permission denied");
map.put(EFAULT, "Bad address");
map.put(ENOTBLK, "Block device required");
map.put(EBUSY, "Device busy");
map.put(EEXIST, "File exists");
map.put(EXDEV, "Cross-device link");
map.put(ENODEV, "Operation not supported by device");
map.put(ENOTDIR, "Not a directory");
map.put(EISDIR, "Is a directory");
map.put(EINVAL, "Invalid argument");
map.put(ENFILE, "Too many open files in system");
map.put(EMFILE, "Too many open files");
map.put(ENOTTY, "Inappropriate ioctl for device");
map.put(ETXTBSY, "Text file busy");
map.put(EFBIG, "File too large");
map.put(ENOSPC, "No space left on device");
map.put(ESPIPE, "Illegal seek");
map.put(EROFS, "Read-only file system");
map.put(EMLINK, "Too many links");
map.put(EPIPE, "Broken pipe");
map.put(EDOM, "Numerical argument out of domain");
map.put(ERANGE, "Result too large");
map.put(EWOULDBLOCK, "Resource temporarily unavailable");
map.put(EAGAIN, "Resource temporarily unavailable");
map.put(EINPROGRESS, "Operation now in progress");
map.put(EALREADY, "Operation already in progress");
map.put(ENOTSOCK, "Socket operation on non-socket");
map.put(EDESTADDRREQ, "Destination address required");
map.put(EMSGSIZE, "Message too long");
map.put(EPROTOTYPE, "Protocol wrong type for socket");
map.put(ENOPROTOOPT, "Protocol not available");
map.put(EPROTONOSUPPORT, "Protocol not supported");
map.put(ESOCKTNOSUPPORT, "Socket type not supported");
map.put(EOPNOTSUPP, "Operation not supported");
map.put(EPFNOSUPPORT, "Protocol family not supported");
map.put(EAFNOSUPPORT, "Address family not supported by protocol family");
map.put(EADDRINUSE, "Address already in use");
map.put(EADDRNOTAVAIL, "Can't assign requested address");
map.put(ENETDOWN, "Network is down");
map.put(ENETUNREACH, "Network is unreachable");
map.put(ENETRESET, "Network dropped connection on reset");
map.put(ECONNABORTED, "Software caused connection abort");
map.put(ECONNRESET, "Connection reset by peer");
map.put(ENOBUFS, "No buffer space available");
map.put(EISCONN, "Socket is already connected");
map.put(ENOTCONN, "Socket is not connected");
map.put(ESHUTDOWN, "Can't send after socket shutdown");
map.put(ETOOMANYREFS, "Too many references: can't splice");
map.put(ETIMEDOUT, "Operation timed out");
map.put(ECONNREFUSED, "Connection refused");
map.put(ELOOP, "Too many levels of symbolic links");
map.put(ENAMETOOLONG, "File name too long");
map.put(EHOSTDOWN, "Host is down");
map.put(EHOSTUNREACH, "No route to host");
map.put(ENOTEMPTY, "Directory not empty");
map.put(EUSERS, "Too many users");
map.put(EDQUOT, "Disc quota exceeded");
map.put(ESTALE, "Stale NFS file handle");
map.put(EREMOTE, "Too many levels of remote in path");
map.put(ENOLCK, "No locks available");
map.put(ENOSYS, "Function not implemented");
map.put(EOVERFLOW, "Value too large to be stored in data type");
map.put(EIDRM, "Identifier removed");
map.put(ENOMSG, "No message of desired type");
map.put(EILSEQ, "Illegal byte sequence");
map.put(EBADMSG, "Bad message");
map.put(EMULTIHOP, "Multihop attempted");
map.put(ENOLINK, "Link has been severed");
map.put(EPROTO, "Protocol error");
return map;
}
}
public final String toString() { return StringTable.descriptions.get(this); }
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/freebsd/Fcntl.java 0000664 0000000 0000000 00000002434 12442353370 0031547 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 15:55:17 -0800 2009
package jnr.constants.platform.freebsd;
public enum Fcntl implements jnr.constants.Constant {
FREAD(1),
FWRITE(2),
FAPPEND(8),
FASYNC(64),
FFSYNC(128),
FNONBLOCK(4),
FNDELAY(4),
F_DUPFD(0),
F_GETFD(1),
F_SETFD(2),
F_GETFL(3),
F_SETFL(4),
F_GETOWN(5),
F_SETOWN(6),
F_GETLK(7),
F_SETLK(8),
F_SETLKW(9),
// F_CHKCLEAN not defined
// F_PREALLOCATE not defined
// F_SETSIZE not defined
// F_RDADVISE not defined
// F_RDAHEAD not defined
// F_READBOOTSTRAP not defined
// F_WRITEBOOTSTRAP not defined
// F_NOCACHE not defined
// F_LOG2PHYS not defined
// F_GETPATH not defined
// F_FULLFSYNC not defined
// F_PATHPKG_CHECK not defined
// F_FREEZE_FS not defined
// F_THAW_FS not defined
// F_GLOBAL_NOCACHE not defined
// F_ADDSIGS not defined
// F_MARKDEPENDENCY not defined
F_RDLCK(1),
F_UNLCK(2),
F_WRLCK(3);
// F_ALLOCATECONTIG not defined
// F_ALLOCATEALL not defined
private final int value;
private Fcntl(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 128;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/freebsd/INAddr.java 0000664 0000000 0000000 00000001415 12442353370 0031600 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 15:25:10 -0800 2009
package jnr.constants.platform.freebsd;
public enum INAddr implements jnr.constants.Constant {
INADDR_ANY(0),
INADDR_BROADCAST(0xffffffff),
INADDR_NONE(0xffffffff),
INADDR_LOOPBACK(0x7f000001),
INADDR_UNSPEC_GROUP(0xe0000000),
INADDR_ALLHOSTS_GROUP(0xe0000001),
INADDR_ALLRTRS_GROUP(0xe0000002),
INADDR_MAX_LOCAL_GROUP(0xe00000ff);
private final int value;
private INAddr(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 0xffffffff;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/freebsd/IPProto.java 0000664 0000000 0000000 00000002031 12442353370 0032026 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 15:25:11 -0800 2009
package jnr.constants.platform.freebsd;
public enum IPProto implements jnr.constants.Constant {
IPPROTO_IP(0),
IPPROTO_HOPOPTS(0),
IPPROTO_ICMP(1),
IPPROTO_IGMP(2),
IPPROTO_IPIP(4),
IPPROTO_TCP(6),
IPPROTO_EGP(8),
IPPROTO_PUP(12),
IPPROTO_UDP(17),
IPPROTO_IDP(22),
IPPROTO_TP(29),
IPPROTO_IPV6(41),
IPPROTO_ROUTING(43),
IPPROTO_FRAGMENT(44),
IPPROTO_RSVP(46),
IPPROTO_GRE(47),
IPPROTO_ESP(50),
IPPROTO_AH(51),
IPPROTO_ICMPV6(58),
IPPROTO_NONE(59),
IPPROTO_DSTOPTS(60),
IPPROTO_MTP(92),
IPPROTO_ENCAP(98),
IPPROTO_PIM(103),
// IPPROTO_COMP not defined
IPPROTO_SCTP(132),
IPPROTO_RAW(255),
IPPROTO_MAX(256);
private final int value;
private IPProto(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 256;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/freebsd/NameInfo.java 0000664 0000000 0000000 00000001260 12442353370 0032171 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 15:25:12 -0800 2009
package jnr.constants.platform.freebsd;
public enum NameInfo implements jnr.constants.Constant {
NI_MAXHOST(1025),
NI_MAXSERV(32),
NI_NOFQDN(1),
NI_NUMERICHOST(2),
NI_NAMEREQD(4),
NI_NUMERICSERV(8),
NI_DGRAM(16);
// NI_WITHSCOPEID not defined
private final int value;
private NameInfo(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 1025;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/freebsd/OpenFlags.java 0000664 0000000 0000000 00000001474 12442353370 0032362 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 15:55:17 -0800 2009
package jnr.constants.platform.freebsd;
public enum OpenFlags implements jnr.constants.Constant {
O_RDONLY(0),
O_WRONLY(1),
O_RDWR(2),
O_ACCMODE(3),
O_NONBLOCK(4),
O_APPEND(8),
O_SYNC(128),
O_SHLOCK(16),
O_EXLOCK(32),
O_ASYNC(64),
O_FSYNC(128),
O_NOFOLLOW(256),
O_CREAT(512),
O_TRUNC(1024),
O_EXCL(2048);
// O_EVTONLY not defined
// O_DIRECTORY not defined
// O_SYMLINK not defined
private final int value;
private OpenFlags(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 2048;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/freebsd/PRIO.java 0000664 0000000 0000000 00000001140 12442353370 0031243 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 15:25:12 -0800 2009
package jnr.constants.platform.freebsd;
public enum PRIO implements jnr.constants.Constant {
PRIO_MIN(-20),
PRIO_PROCESS(0),
PRIO_PGRP(1),
PRIO_USER(2),
PRIO_MAX(20);
private final int value;
private PRIO(int value) { this.value = value; }
public static final long MIN_VALUE = -20;
public static final long MAX_VALUE = 20;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/freebsd/ProtocolFamily.java 0000664 0000000 0000000 00000002115 12442353370 0033440 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 15:25:11 -0800 2009
package jnr.constants.platform.freebsd;
public enum ProtocolFamily implements jnr.constants.Constant {
PF_UNSPEC(0),
PF_LOCAL(1),
PF_UNIX(1),
PF_INET(2),
PF_IMPLINK(3),
PF_PUP(4),
PF_CHAOS(5),
// PF_NS not defined
PF_ISO(7),
PF_OSI(7),
PF_ECMA(8),
PF_DATAKIT(9),
PF_CCITT(10),
PF_SNA(11),
PF_DECnet(12),
PF_DLI(13),
PF_LAT(14),
PF_HYLINK(15),
PF_APPLETALK(16),
PF_ROUTE(17),
PF_LINK(18),
PF_XTP(19),
PF_COIP(20),
PF_CNT(21),
PF_SIP(24),
PF_IPX(23),
PF_RTIP(22),
PF_PIP(25),
// PF_NDRV not defined
PF_ISDN(26),
PF_KEY(27),
PF_INET6(28),
PF_NATM(29),
// PF_SYSTEM not defined
PF_NETBIOS(6),
// PF_PPP not defined
PF_ATM(30),
PF_NETGRAPH(32),
PF_MAX(37);
private final int value;
private ProtocolFamily(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 37;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/freebsd/RLIM.java 0000664 0000000 0000000 00000001210 12442353370 0031233 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 15:25:12 -0800 2009
package jnr.constants.platform.freebsd;
public enum RLIM implements jnr.constants.Constant {
RLIM_NLIMITS(0xb),
RLIM_INFINITY(0xffffffff);
// RLIM_SAVED_MAX not defined
// RLIM_SAVED_CUR not defined
private final int value;
private RLIM(int value) { this.value = value; }
public static final long MIN_VALUE = 0xb;
public static final long MAX_VALUE = 0xffffffff;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/freebsd/RLIMIT.java 0000664 0000000 0000000 00000001650 12442353370 0031500 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 15:25:12 -0800 2009
package jnr.constants.platform.freebsd;
public enum RLIMIT implements jnr.constants.Constant {
RLIMIT_AS(10),
RLIMIT_CORE(4),
RLIMIT_CPU(0),
RLIMIT_DATA(2),
RLIMIT_FSIZE(1),
// RLIMIT_LOCKS not defined
RLIMIT_MEMLOCK(6),
// RLIMIT_MSGQUEUE not defined
// RLIMIT_NICE not defined
// RLIMIT_NLIMITS not defined
RLIMIT_NOFILE(8),
RLIMIT_NPROC(7),
// RLIMIT_OFILE not defined
RLIMIT_RSS(5),
// RLIMIT_RTPRIO not defined
// RLIMIT_RTTIME not defined
// RLIMIT_SIGPENDING not defined
RLIMIT_STACK(3);
private final int value;
private RLIMIT(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 10;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/freebsd/Shutdown.java 0000664 0000000 0000000 00000001101 12442353370 0032302 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 15:25:11 -0800 2009
package jnr.constants.platform.freebsd;
public enum Shutdown implements jnr.constants.Constant {
SHUT_RD(0),
SHUT_WR(1),
SHUT_RDWR(2);
private final int value;
private Shutdown(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 2;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/freebsd/Signal.java 0000664 0000000 0000000 00000002075 12442353370 0031717 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 15:25:13 -0800 2009
package jnr.constants.platform.freebsd;
public enum Signal implements jnr.constants.Constant {
SIGHUP(1),
SIGINT(2),
SIGQUIT(3),
SIGILL(4),
SIGTRAP(5),
SIGABRT(6),
SIGIOT(6),
SIGBUS(10),
SIGFPE(8),
SIGKILL(9),
SIGUSR1(30),
SIGSEGV(11),
SIGUSR2(31),
SIGPIPE(13),
SIGALRM(14),
SIGTERM(15),
// SIGSTKFLT not defined
// SIGCLD not defined
SIGCHLD(20),
SIGCONT(19),
SIGSTOP(17),
SIGTSTP(18),
SIGTTIN(21),
SIGTTOU(22),
SIGURG(16),
SIGXCPU(24),
SIGXFSZ(25),
SIGVTALRM(26),
SIGPROF(27),
SIGWINCH(28),
// SIGPOLL not defined
SIGIO(23),
// SIGPWR not defined
SIGSYS(12),
// SIGUNUSED not defined
// SIGRTMIN not defined
// SIGRTMAX not defined
NSIG(32);
private final int value;
private Signal(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 32;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/freebsd/Sock.java 0000664 0000000 0000000 00000001167 12442353370 0031402 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 15:25:12 -0800 2009
package jnr.constants.platform.freebsd;
public enum Sock implements jnr.constants.Constant {
SOCK_STREAM(1),
SOCK_DGRAM(2),
SOCK_RAW(3),
SOCK_RDM(4),
SOCK_SEQPACKET(5),
SOCK_MAXADDRLEN(255);
private final int value;
private Sock(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 255;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/freebsd/SocketLevel.java 0000664 0000000 0000000 00000001200 12442353370 0032707 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 15:25:13 -0800 2009
package jnr.constants.platform.freebsd;
public enum SocketLevel implements jnr.constants.Constant {
SOL_SOCKET(65535);
// SOL_IP not defined
// SOL_TCP not defined
// SOL_UDP not defined
private final int value;
private SocketLevel(int value) { this.value = value; }
public static final long MIN_VALUE = 65535;
public static final long MAX_VALUE = 65535;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/freebsd/SocketOption.java 0000664 0000000 0000000 00000003072 12442353370 0033121 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 15:25:11 -0800 2009
package jnr.constants.platform.freebsd;
public enum SocketOption implements jnr.constants.Constant {
SO_DEBUG(0x1),
SO_ACCEPTCONN(0x2),
SO_REUSEADDR(0x4),
SO_KEEPALIVE(0x8),
SO_DONTROUTE(0x10),
SO_BROADCAST(0x20),
SO_USELOOPBACK(0x40),
SO_LINGER(0x80),
SO_OOBINLINE(0x100),
SO_REUSEPORT(0x200),
SO_TIMESTAMP(0x400),
SO_ACCEPTFILTER(0x1000),
// SO_DONTTRUNC not defined
// SO_WANTMORE not defined
// SO_WANTOOBFLAG not defined
SO_SNDBUF(0x1001),
SO_RCVBUF(0x1002),
SO_SNDLOWAT(0x1003),
SO_RCVLOWAT(0x1004),
SO_SNDTIMEO(0x1005),
SO_RCVTIMEO(0x1006),
SO_ERROR(0x1007),
SO_TYPE(0x1008),
// SO_NREAD not defined
// SO_NKE not defined
SO_NOSIGPIPE(0x800),
// SO_NOADDRERR not defined
// SO_NWRITE not defined
// SO_REUSESHAREUID not defined
SO_LABEL(0x1009),
SO_PEERLABEL(0x1010);
// SO_ATTACH_FILTER not defined
// SO_BINDTODEVICE not defined
// SO_DETACH_FILTER not defined
// SO_NO_CHECK not defined
// SO_PASSCRED not defined
// SO_PEERCRED not defined
// SO_PEERNAME not defined
// SO_PRIORITY not defined
// SO_SECURITY_AUTHENTICATION not defined
// SO_SECURITY_ENCRYPTION_NETWORK not defined
// SO_SECURITY_ENCRYPTION_TRANSPORT not defined
private final int value;
private SocketOption(int value) { this.value = value; }
public static final long MIN_VALUE = 0x1;
public static final long MAX_VALUE = 0x1010;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/freebsd/Sysconf.java 0000664 0000000 0000000 00000006746 12442353370 0032137 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 15:25:11 -0800 2009
package jnr.constants.platform.freebsd;
public enum Sysconf implements jnr.constants.Constant {
_SC_ARG_MAX(1),
_SC_CHILD_MAX(2),
_SC_CLK_TCK(3),
_SC_NGROUPS_MAX(4),
_SC_OPEN_MAX(5),
_SC_JOB_CONTROL(6),
_SC_SAVED_IDS(7),
_SC_VERSION(8),
_SC_BC_BASE_MAX(9),
_SC_BC_DIM_MAX(10),
_SC_BC_SCALE_MAX(11),
_SC_BC_STRING_MAX(12),
_SC_COLL_WEIGHTS_MAX(13),
_SC_EXPR_NEST_MAX(14),
_SC_LINE_MAX(15),
_SC_RE_DUP_MAX(16),
_SC_2_VERSION(17),
_SC_2_C_BIND(18),
_SC_2_C_DEV(19),
_SC_2_CHAR_TERM(20),
_SC_2_FORT_DEV(21),
_SC_2_FORT_RUN(22),
_SC_2_LOCALEDEF(23),
_SC_2_SW_DEV(24),
_SC_2_UPE(25),
_SC_STREAM_MAX(26),
_SC_TZNAME_MAX(27),
_SC_ASYNCHRONOUS_IO(28),
_SC_PAGESIZE(47),
_SC_MEMLOCK(30),
_SC_MEMLOCK_RANGE(31),
_SC_MEMORY_PROTECTION(32),
_SC_MESSAGE_PASSING(33),
_SC_PRIORITIZED_IO(34),
_SC_PRIORITY_SCHEDULING(35),
_SC_REALTIME_SIGNALS(36),
_SC_SEMAPHORES(37),
_SC_FSYNC(38),
_SC_SHARED_MEMORY_OBJECTS(39),
_SC_SYNCHRONIZED_IO(40),
_SC_TIMERS(41),
_SC_AIO_LISTIO_MAX(42),
_SC_AIO_MAX(43),
_SC_AIO_PRIO_DELTA_MAX(44),
_SC_DELAYTIMER_MAX(45),
_SC_MQ_OPEN_MAX(46),
_SC_MAPPED_FILES(29),
_SC_RTSIG_MAX(48),
_SC_SEM_NSEMS_MAX(49),
_SC_SEM_VALUE_MAX(50),
_SC_SIGQUEUE_MAX(51),
_SC_TIMER_MAX(52),
_SC_NPROCESSORS_CONF(57),
_SC_NPROCESSORS_ONLN(58),
_SC_2_PBS(59),
_SC_2_PBS_ACCOUNTING(60),
_SC_2_PBS_CHECKPOINT(61),
_SC_2_PBS_LOCATE(62),
_SC_2_PBS_MESSAGE(63),
_SC_2_PBS_TRACK(64),
_SC_ADVISORY_INFO(65),
_SC_BARRIERS(66),
_SC_CLOCK_SELECTION(67),
_SC_CPUTIME(68),
_SC_FILE_LOCKING(69),
_SC_GETGR_R_SIZE_MAX(70),
_SC_GETPW_R_SIZE_MAX(71),
_SC_HOST_NAME_MAX(72),
_SC_LOGIN_NAME_MAX(73),
_SC_MONOTONIC_CLOCK(74),
_SC_MQ_PRIO_MAX(75),
_SC_READER_WRITER_LOCKS(76),
_SC_REGEXP(77),
_SC_SHELL(78),
_SC_SPAWN(79),
_SC_SPIN_LOCKS(80),
_SC_SPORADIC_SERVER(81),
_SC_THREAD_ATTR_STACKADDR(82),
_SC_THREAD_ATTR_STACKSIZE(83),
_SC_THREAD_CPUTIME(84),
_SC_THREAD_DESTRUCTOR_ITERATIONS(85),
_SC_THREAD_KEYS_MAX(86),
_SC_THREAD_PRIO_INHERIT(87),
_SC_THREAD_PRIO_PROTECT(88),
_SC_THREAD_PRIORITY_SCHEDULING(89),
_SC_THREAD_PROCESS_SHARED(90),
_SC_THREAD_SAFE_FUNCTIONS(91),
_SC_THREAD_SPORADIC_SERVER(92),
_SC_THREAD_STACK_MIN(93),
_SC_THREAD_THREADS_MAX(94),
_SC_TIMEOUTS(95),
_SC_THREADS(96),
_SC_TRACE(97),
_SC_TRACE_EVENT_FILTER(98),
_SC_TRACE_INHERIT(99),
_SC_TRACE_LOG(100),
_SC_TTY_NAME_MAX(101),
_SC_TYPED_MEMORY_OBJECTS(102),
_SC_V6_ILP32_OFF32(103),
_SC_V6_ILP32_OFFBIG(104),
_SC_V6_LP64_OFF64(105),
_SC_V6_LPBIG_OFFBIG(106),
_SC_IPV6(118),
_SC_RAW_SOCKETS(119),
_SC_SYMLOOP_MAX(120),
_SC_ATEXIT_MAX(107),
_SC_IOV_MAX(56),
_SC_PAGE_SIZE(47),
_SC_XOPEN_CRYPT(108),
_SC_XOPEN_ENH_I18N(109),
_SC_XOPEN_LEGACY(110),
_SC_XOPEN_REALTIME(111),
_SC_XOPEN_REALTIME_THREADS(112),
_SC_XOPEN_SHM(113),
_SC_XOPEN_STREAMS(114),
_SC_XOPEN_UNIX(115),
_SC_XOPEN_VERSION(116),
_SC_XOPEN_XCU_VERSION(117);
// _SC_XBS5_ILP32_OFF32 not defined
// _SC_XBS5_ILP32_OFFBIG not defined
// _SC_XBS5_LP64_OFF64 not defined
// _SC_XBS5_LPBIG_OFFBIG not defined
// _SC_SS_REPL_MAX not defined
// _SC_TRACE_EVENT_NAME_MAX not defined
// _SC_TRACE_NAME_MAX not defined
// _SC_TRACE_SYS_MAX not defined
// _SC_TRACE_USER_EVENT_MAX not defined
// _SC_PASS_MAX not defined
private final int value;
private Sysconf(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 120;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/freebsd/TCP.java 0000664 0000000 0000000 00000001511 12442353370 0031122 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 15:25:13 -0800 2009
package jnr.constants.platform.freebsd;
public enum TCP implements jnr.constants.Constant {
TCP_MAX_SACK(4),
TCP_MSS(512),
TCP_MINMSS(216),
TCP_MINMSSOVERLOAD(0),
TCP_MAXWIN(65535),
TCP_MAX_WINSHIFT(14),
TCP_MAXBURST(4),
TCP_MAXHLEN(60),
TCP_MAXOLEN(40),
TCP_NODELAY(1),
TCP_MAXSEG(2),
TCP_NOPUSH(4),
TCP_NOOPT(8);
// TCP_KEEPALIVE not defined
// TCP_NSTATES not defined
// TCP_RETRANSHZ not defined
private final int value;
private TCP(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 65535;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/freebsd/WaitFlags.java 0000664 0000000 0000000 00000001226 12442353370 0032360 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 15:25:14 -0800 2009
package jnr.constants.platform.freebsd;
public enum WaitFlags implements jnr.constants.Constant {
WNOHANG(0x1),
WUNTRACED(0x2),
// WSTOPPED not defined
// WEXITED not defined
WCONTINUED(0x4);
// WNOWAIT not defined
private final int value;
private WaitFlags(int value) { this.value = value; }
public static final long MIN_VALUE = 0x1;
public static final long MAX_VALUE = 0x4;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/linux/ 0000775 0000000 0000000 00000000000 12442353370 0027360 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/linux/AddressFamily.java 0000664 0000000 0000000 00000002640 12442353370 0032754 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Tue Feb 24 09:44:02 +1000 2009
package jnr.constants.platform.linux;
public enum AddressFamily implements jnr.constants.Constant {
AF_UNSPEC(0),
AF_LOCAL(1),
AF_UNIX(1),
AF_INET(2),
// AF_IMPLINK not defined
// AF_PUP not defined
// AF_CHAOS not defined
// AF_NS not defined
// AF_ISO not defined
// AF_OSI not defined
// AF_ECMA not defined
// AF_DATAKIT not defined
// AF_CCITT not defined
AF_SNA(22),
AF_DECnet(12),
// AF_DLI not defined
// AF_LAT not defined
// AF_HYLINK not defined
AF_APPLETALK(5),
AF_ROUTE(16),
// AF_LINK not defined
// pseudo_AF_XTP not defined
// AF_COIP not defined
// AF_CNT not defined
// pseudo_AF_RTIP not defined
AF_IPX(4),
// AF_SIP not defined
// pseudo_AF_PIP not defined
// AF_NDRV not defined
// AF_ISDN not defined
// AF_E164 not defined
// pseudo_AF_KEY not defined
AF_INET6(10),
// AF_NATM not defined
// AF_SYSTEM not defined
// AF_NETBIOS not defined
// AF_PPP not defined
// AF_ATM not defined
// pseudo_AF_HDRCMPLT not defined
// AF_NETGRAPH not defined
AF_AX25(3),
AF_MAX(34);
private final int value;
private AddressFamily(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 34;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/linux/Errno.java 0000664 0000000 0000000 00000013676 12442353370 0031325 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Tue Feb 24 09:44:04 +1000 2009
package jnr.constants.platform.linux;
public enum Errno implements jnr.constants.Constant {
EPERM(1),
ENOENT(2),
ESRCH(3),
EINTR(4),
EIO(5),
ENXIO(6),
E2BIG(7),
ENOEXEC(8),
EBADF(9),
ECHILD(10),
EDEADLK(35),
ENOMEM(12),
EACCES(13),
EFAULT(14),
ENOTBLK(15),
EBUSY(16),
EEXIST(17),
EXDEV(18),
ENODEV(19),
ENOTDIR(20),
EISDIR(21),
EINVAL(22),
ENFILE(23),
EMFILE(24),
ENOTTY(25),
ETXTBSY(26),
EFBIG(27),
ENOSPC(28),
ESPIPE(29),
EROFS(30),
EMLINK(31),
EPIPE(32),
EDOM(33),
ERANGE(34),
EWOULDBLOCK(11),
EAGAIN(11),
EINPROGRESS(115),
EALREADY(114),
ENOTSOCK(88),
EDESTADDRREQ(89),
EMSGSIZE(90),
EPROTOTYPE(91),
ENOPROTOOPT(92),
EPROTONOSUPPORT(93),
ESOCKTNOSUPPORT(94),
EOPNOTSUPP(95),
EPFNOSUPPORT(96),
EAFNOSUPPORT(97),
EADDRINUSE(98),
EADDRNOTAVAIL(99),
ENETDOWN(100),
ENETUNREACH(101),
ENETRESET(102),
ECONNABORTED(103),
ECONNRESET(104),
ENOBUFS(105),
EISCONN(106),
ENOTCONN(107),
ESHUTDOWN(108),
ETOOMANYREFS(109),
ETIMEDOUT(110),
ECONNREFUSED(111),
ELOOP(40),
ENAMETOOLONG(36),
EHOSTDOWN(112),
EHOSTUNREACH(113),
ENOTEMPTY(39),
EUSERS(87),
EDQUOT(122),
ESTALE(116),
EREMOTE(66),
ENOLCK(37),
ENOSYS(38),
EOVERFLOW(75),
EIDRM(43),
ENOMSG(42),
EILSEQ(84),
EBADMSG(74),
EMULTIHOP(72),
ENODATA(61),
ENOLINK(67),
ENOSR(63),
ENOSTR(60),
EPROTO(71),
ETIME(62);
private final int value;
private Errno(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 122;
static final class StringTable {
public static final java.util.Map descriptions = generateTable();
public static final java.util.Map generateTable() {
java.util.Map map = new java.util.EnumMap(Errno.class);
map.put(EPERM, "Operation not permitted");
map.put(ENOENT, "No such file or directory");
map.put(ESRCH, "No such process");
map.put(EINTR, "Interrupted system call");
map.put(EIO, "Input/output error");
map.put(ENXIO, "No such device or address");
map.put(E2BIG, "Argument list too long");
map.put(ENOEXEC, "Exec format error");
map.put(EBADF, "Bad file descriptor");
map.put(ECHILD, "No child processes");
map.put(EDEADLK, "Resource deadlock avoided");
map.put(ENOMEM, "Cannot allocate memory");
map.put(EACCES, "Permission denied");
map.put(EFAULT, "Bad address");
map.put(ENOTBLK, "Block device required");
map.put(EBUSY, "Device or resource busy");
map.put(EEXIST, "File exists");
map.put(EXDEV, "Invalid cross-device link");
map.put(ENODEV, "No such device");
map.put(ENOTDIR, "Not a directory");
map.put(EISDIR, "Is a directory");
map.put(EINVAL, "Invalid argument");
map.put(ENFILE, "Too many open files in system");
map.put(EMFILE, "Too many open files");
map.put(ENOTTY, "Inappropriate ioctl for device");
map.put(ETXTBSY, "Text file busy");
map.put(EFBIG, "File too large");
map.put(ENOSPC, "No space left on device");
map.put(ESPIPE, "Illegal seek");
map.put(EROFS, "Read-only file system");
map.put(EMLINK, "Too many links");
map.put(EPIPE, "Broken pipe");
map.put(EDOM, "Numerical argument out of domain");
map.put(ERANGE, "Numerical result out of range");
map.put(EWOULDBLOCK, "Resource temporarily unavailable");
map.put(EAGAIN, "Resource temporarily unavailable");
map.put(EINPROGRESS, "Operation now in progress");
map.put(EALREADY, "Operation already in progress");
map.put(ENOTSOCK, "Socket operation on non-socket");
map.put(EDESTADDRREQ, "Destination address required");
map.put(EMSGSIZE, "Message too long");
map.put(EPROTOTYPE, "Protocol wrong type for socket");
map.put(ENOPROTOOPT, "Protocol not available");
map.put(EPROTONOSUPPORT, "Protocol not supported");
map.put(ESOCKTNOSUPPORT, "Socket type not supported");
map.put(EOPNOTSUPP, "Operation not supported");
map.put(EPFNOSUPPORT, "Protocol family not supported");
map.put(EAFNOSUPPORT, "Address family not supported by protocol");
map.put(EADDRINUSE, "Address already in use");
map.put(EADDRNOTAVAIL, "Cannot assign requested address");
map.put(ENETDOWN, "Network is down");
map.put(ENETUNREACH, "Network is unreachable");
map.put(ENETRESET, "Network dropped connection on reset");
map.put(ECONNABORTED, "Software caused connection abort");
map.put(ECONNRESET, "Connection reset by peer");
map.put(ENOBUFS, "No buffer space available");
map.put(EISCONN, "Transport endpoint is already connected");
map.put(ENOTCONN, "Transport endpoint is not connected");
map.put(ESHUTDOWN, "Cannot send after transport endpoint shutdown");
map.put(ETOOMANYREFS, "Too many references: cannot splice");
map.put(ETIMEDOUT, "Connection timed out");
map.put(ECONNREFUSED, "Connection refused");
map.put(ELOOP, "Too many levels of symbolic links");
map.put(ENAMETOOLONG, "File name too long");
map.put(EHOSTDOWN, "Host is down");
map.put(EHOSTUNREACH, "No route to host");
map.put(ENOTEMPTY, "Directory not empty");
map.put(EUSERS, "Too many users");
map.put(EDQUOT, "Disk quota exceeded");
map.put(ESTALE, "Stale NFS file handle");
map.put(EREMOTE, "Object is remote");
map.put(ENOLCK, "No locks available");
map.put(ENOSYS, "Function not implemented");
map.put(EOVERFLOW, "Value too large for defined data type");
map.put(EIDRM, "Identifier removed");
map.put(ENOMSG, "No message of desired type");
map.put(EILSEQ, "Invalid or incomplete multibyte or wide character");
map.put(EBADMSG, "Bad message");
map.put(EMULTIHOP, "Multihop attempted");
map.put(ENODATA, "No data available");
map.put(ENOLINK, "Link has been severed");
map.put(ENOSR, "Out of streams resources");
map.put(ENOSTR, "Device not a stream");
map.put(EPROTO, "Protocol error");
map.put(ETIME, "Timer expired");
return map;
}
}
public final String toString() { return StringTable.descriptions.get(this); }
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/linux/Fcntl.java 0000664 0000000 0000000 00000002500 12442353370 0031266 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Tue Feb 24 09:44:05 +1000 2009
package jnr.constants.platform.linux;
public enum Fcntl implements jnr.constants.Constant {
FAPPEND(1024),
// FREAD not defined
// FWRITE not defined
FASYNC(8192),
FFSYNC(4096),
FNONBLOCK(2048),
FNDELAY(2048),
F_DUPFD(0),
F_GETFD(1),
F_SETFD(2),
F_GETFL(3),
F_SETFL(4),
F_GETOWN(9),
F_SETOWN(8),
F_GETLK(12),
F_SETLK(13),
F_SETLKW(14),
// F_CHKCLEAN not defined
// F_PREALLOCATE not defined
// F_SETSIZE not defined
// F_RDADVISE not defined
// F_RDAHEAD not defined
// F_READBOOTSTRAP not defined
// F_WRITEBOOTSTRAP not defined
// F_NOCACHE not defined
// F_LOG2PHYS not defined
// F_GETPATH not defined
// F_FULLFSYNC not defined
// F_PATHPKG_CHECK not defined
// F_FREEZE_FS not defined
// F_THAW_FS not defined
// F_GLOBAL_NOCACHE not defined
// F_ADDSIGS not defined
// F_MARKDEPENDENCY not defined
F_RDLCK(0),
F_UNLCK(2),
F_WRLCK(1);
// F_ALLOCATECONTIG not defined
// F_ALLOCATEALL not defined
private final int value;
private Fcntl(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 8192;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/linux/INAddr.java 0000664 0000000 0000000 00000001413 12442353370 0031323 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Tue Feb 24 09:44:04 +1000 2009
package jnr.constants.platform.linux;
public enum INAddr implements jnr.constants.Constant {
INADDR_ANY(0),
INADDR_BROADCAST(0xffffffff),
INADDR_NONE(0xffffffff),
INADDR_LOOPBACK(0x7f000001),
INADDR_UNSPEC_GROUP(0xe0000000),
INADDR_ALLHOSTS_GROUP(0xe0000001),
INADDR_ALLRTRS_GROUP(0xe0000002),
INADDR_MAX_LOCAL_GROUP(0xe00000ff);
private final int value;
private INAddr(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 0xffffffff;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/linux/IPProto.java 0000664 0000000 0000000 00000002027 12442353370 0031560 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Tue Feb 24 09:44:05 +1000 2009
package jnr.constants.platform.linux;
public enum IPProto implements jnr.constants.Constant {
IPPROTO_IP(0),
IPPROTO_HOPOPTS(0),
IPPROTO_ICMP(1),
IPPROTO_IGMP(2),
IPPROTO_IPIP(4),
IPPROTO_TCP(6),
IPPROTO_EGP(8),
IPPROTO_PUP(12),
IPPROTO_UDP(17),
IPPROTO_IDP(22),
IPPROTO_TP(29),
IPPROTO_IPV6(41),
IPPROTO_ROUTING(43),
IPPROTO_FRAGMENT(44),
IPPROTO_RSVP(46),
IPPROTO_GRE(47),
IPPROTO_ESP(50),
IPPROTO_AH(51),
IPPROTO_ICMPV6(58),
IPPROTO_NONE(59),
IPPROTO_DSTOPTS(60),
IPPROTO_MTP(92),
IPPROTO_ENCAP(98),
IPPROTO_PIM(103),
IPPROTO_COMP(108),
IPPROTO_SCTP(132),
IPPROTO_RAW(255);
// IPPROTO_MAX not defined
private final int value;
private IPProto(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 255;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/linux/NameInfo.java 0000664 0000000 0000000 00000001256 12442353370 0031723 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Tue Feb 24 09:44:07 +1000 2009
package jnr.constants.platform.linux;
public enum NameInfo implements jnr.constants.Constant {
NI_MAXHOST(1025),
NI_MAXSERV(32),
NI_NOFQDN(4),
NI_NUMERICHOST(1),
NI_NAMEREQD(8),
NI_NUMERICSERV(2),
NI_DGRAM(16);
// NI_WITHSCOPEID not defined
private final int value;
private NameInfo(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 1025;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/linux/OpenFlags.java 0000664 0000000 0000000 00000001536 12442353370 0032106 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Tue Feb 24 09:44:03 +1000 2009
package jnr.constants.platform.linux;
public enum OpenFlags implements jnr.constants.Constant {
O_RDONLY(0),
O_WRONLY(1),
O_RDWR(2),
O_ACCMODE(3),
O_NONBLOCK(2048),
O_APPEND(1024),
O_SYNC(4096),
// O_SHLOCK not defined
// O_EXLOCK not defined
O_ASYNC(8192),
O_FSYNC(4096),
// O_NOFOLLOW not defined
O_CREAT(64),
O_TRUNC(512),
O_EXCL(128);
// O_EVTONLY not defined
// O_DIRECTORY not defined
// O_SYMLINK not defined
private final int value;
private OpenFlags(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 8192;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/linux/PRIO.java 0000664 0000000 0000000 00000001136 12442353370 0030775 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Tue Feb 24 09:44:05 +1000 2009
package jnr.constants.platform.linux;
public enum PRIO implements jnr.constants.Constant {
PRIO_MIN(-20),
PRIO_PROCESS(0),
PRIO_PGRP(1),
PRIO_USER(2),
PRIO_MAX(20);
private final int value;
private PRIO(int value) { this.value = value; }
public static final long MIN_VALUE = -20;
public static final long MAX_VALUE = 20;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/linux/ProtocolFamily.java 0000664 0000000 0000000 00000002467 12442353370 0033177 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Tue Feb 24 09:44:05 +1000 2009
package jnr.constants.platform.linux;
public enum ProtocolFamily implements jnr.constants.Constant {
PF_UNSPEC(0),
PF_LOCAL(1),
PF_UNIX(1),
PF_INET(2),
// PF_IMPLINK not defined
// PF_PUP not defined
// PF_CHAOS not defined
// PF_NS not defined
// PF_ISO not defined
// PF_OSI not defined
// PF_ECMA not defined
// PF_DATAKIT not defined
// PF_CCITT not defined
PF_SNA(22),
PF_DECnet(12),
// PF_DLI not defined
// PF_LAT not defined
// PF_HYLINK not defined
PF_APPLETALK(5),
PF_ROUTE(16),
// PF_LINK not defined
// PF_XTP not defined
// PF_COIP not defined
// PF_CNT not defined
// PF_SIP not defined
PF_IPX(4),
// PF_RTIP not defined
// PF_PIP not defined
// PF_NDRV not defined
// PF_ISDN not defined
PF_KEY(15),
PF_INET6(10),
// PF_NATM not defined
// PF_SYSTEM not defined
// PF_NETBIOS not defined
// PF_PPP not defined
// PF_ATM not defined
// PF_NETGRAPH not defined
PF_MAX(34);
private final int value;
private ProtocolFamily(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 34;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/linux/RLIM.java 0000664 0000000 0000000 00000001202 12442353370 0030761 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Tue Feb 24 09:44:03 +1000 2009
package jnr.constants.platform.linux;
public enum RLIM implements jnr.constants.Constant {
RLIM_NLIMITS(0xf),
RLIM_INFINITY(0xffffffff),
RLIM_SAVED_MAX(0xffffffff),
RLIM_SAVED_CUR(0xffffffff);
private final int value;
private RLIM(int value) { this.value = value; }
public static final long MIN_VALUE = 0xf;
public static final long MAX_VALUE = 0xffffffff;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/linux/RLIMIT.java 0000664 0000000 0000000 00000001536 12442353370 0031230 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Tue Feb 24 09:44:05 +1000 2009
package jnr.constants.platform.linux;
public enum RLIMIT implements jnr.constants.Constant {
RLIMIT_AS(9),
RLIMIT_CORE(4),
RLIMIT_CPU(0),
RLIMIT_DATA(2),
RLIMIT_FSIZE(1),
RLIMIT_LOCKS(10),
RLIMIT_MEMLOCK(8),
RLIMIT_MSGQUEUE(12),
RLIMIT_NICE(13),
RLIMIT_NLIMITS(15),
RLIMIT_NOFILE(7),
RLIMIT_NPROC(6),
RLIMIT_OFILE(7),
RLIMIT_RSS(5),
RLIMIT_RTPRIO(14),
// RLIMIT_RTTIME not defined
RLIMIT_SIGPENDING(11),
RLIMIT_STACK(3);
private final int value;
private RLIMIT(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 15;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/linux/Shutdown.java 0000664 0000000 0000000 00000001077 12442353370 0032043 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Tue Feb 24 09:44:04 +1000 2009
package jnr.constants.platform.linux;
public enum Shutdown implements jnr.constants.Constant {
SHUT_RD(0),
SHUT_WR(1),
SHUT_RDWR(2);
private final int value;
private Shutdown(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 2;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/linux/Signal.java 0000664 0000000 0000000 00000001764 12442353370 0031450 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Tue Feb 24 09:44:03 +1000 2009
package jnr.constants.platform.linux;
public enum Signal implements jnr.constants.Constant {
SIGHUP(1),
SIGINT(2),
SIGQUIT(3),
SIGILL(4),
SIGTRAP(5),
SIGABRT(6),
SIGIOT(6),
SIGBUS(7),
SIGFPE(8),
SIGKILL(9),
SIGUSR1(10),
SIGSEGV(11),
SIGUSR2(12),
SIGPIPE(13),
SIGALRM(14),
SIGTERM(15),
SIGSTKFLT(16),
SIGCLD(17),
SIGCHLD(17),
SIGCONT(18),
SIGSTOP(19),
SIGTSTP(20),
SIGTTIN(21),
SIGTTOU(22),
SIGURG(23),
SIGXCPU(24),
SIGXFSZ(25),
SIGVTALRM(26),
SIGPROF(27),
SIGWINCH(28),
SIGPOLL(29),
SIGIO(29),
SIGPWR(30),
SIGSYS(31),
SIGUNUSED(31),
SIGRTMIN(34),
SIGRTMAX(64),
NSIG(65);
private final int value;
private Signal(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 65;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/linux/Sock.java 0000664 0000000 0000000 00000001174 12442353370 0031125 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Tue Feb 24 09:44:06 +1000 2009
package jnr.constants.platform.linux;
public enum Sock implements jnr.constants.Constant {
SOCK_STREAM(1),
SOCK_DGRAM(2),
SOCK_RAW(3),
SOCK_RDM(4),
SOCK_SEQPACKET(5);
// SOCK_MAXADDRLEN not defined
private final int value;
private Sock(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 5;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/linux/SocketLevel.java 0000664 0000000 0000000 00000001162 12442353370 0032443 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Tue Feb 24 09:44:06 +1000 2009
package jnr.constants.platform.linux;
public enum SocketLevel implements jnr.constants.Constant {
SOL_SOCKET(1);
// SOL_IP not defined
// SOL_TCP not defined
// SOL_UDP not defined
private final int value;
private SocketLevel(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 1;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/linux/SocketOption.java 0000664 0000000 0000000 00000002753 12442353370 0032653 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Tue Feb 24 09:44:06 +1000 2009
package jnr.constants.platform.linux;
public enum SocketOption implements jnr.constants.Constant {
SO_DEBUG(0x1),
SO_ACCEPTCONN(0x1e),
SO_REUSEADDR(0x2),
SO_KEEPALIVE(0x9),
SO_DONTROUTE(0x5),
SO_BROADCAST(0x6),
// SO_USELOOPBACK not defined
SO_LINGER(0xd),
SO_OOBINLINE(0xa),
// SO_REUSEPORT not defined
SO_TIMESTAMP(0x1d),
// SO_ACCEPTFILTER not defined
// SO_DONTTRUNC not defined
// SO_WANTMORE not defined
// SO_WANTOOBFLAG not defined
SO_SNDBUF(0x7),
SO_RCVBUF(0x8),
SO_SNDLOWAT(0x13),
SO_RCVLOWAT(0x12),
SO_SNDTIMEO(0x15),
SO_RCVTIMEO(0x14),
SO_ERROR(0x4),
SO_TYPE(0x3),
// SO_NREAD not defined
// SO_NKE not defined
// SO_NOSIGPIPE not defined
// SO_NOADDRERR not defined
// SO_NWRITE not defined
// SO_REUSESHAREUID not defined
// SO_LABEL not defined
// SO_PEERLABEL not defined
SO_ATTACH_FILTER(0x1a),
SO_BINDTODEVICE(0x19),
SO_DETACH_FILTER(0x1b),
SO_NO_CHECK(0xb),
SO_PASSCRED(0x10),
SO_PEERCRED(0x11),
SO_PEERNAME(0x1c),
SO_PRIORITY(0xc),
SO_SECURITY_AUTHENTICATION(0x16),
SO_SECURITY_ENCRYPTION_NETWORK(0x18),
SO_SECURITY_ENCRYPTION_TRANSPORT(0x17);
private final int value;
private SocketOption(int value) { this.value = value; }
public static final long MIN_VALUE = 0x1;
public static final long MAX_VALUE = 0x1e;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/linux/Sysconf.java 0000664 0000000 0000000 00000006717 12442353370 0031662 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Tue Feb 24 09:44:03 +1000 2009
package jnr.constants.platform.linux;
public enum Sysconf implements jnr.constants.Constant {
_SC_ARG_MAX(0),
_SC_CHILD_MAX(1),
_SC_CLK_TCK(2),
_SC_NGROUPS_MAX(3),
_SC_OPEN_MAX(4),
_SC_JOB_CONTROL(7),
_SC_SAVED_IDS(8),
_SC_VERSION(29),
_SC_BC_BASE_MAX(36),
_SC_BC_DIM_MAX(37),
_SC_BC_SCALE_MAX(38),
_SC_BC_STRING_MAX(39),
_SC_COLL_WEIGHTS_MAX(40),
_SC_EXPR_NEST_MAX(42),
_SC_LINE_MAX(43),
_SC_RE_DUP_MAX(44),
_SC_2_VERSION(46),
_SC_2_C_BIND(47),
_SC_2_C_DEV(48),
_SC_2_CHAR_TERM(95),
_SC_2_FORT_DEV(49),
_SC_2_FORT_RUN(50),
_SC_2_LOCALEDEF(52),
_SC_2_SW_DEV(51),
_SC_2_UPE(97),
_SC_STREAM_MAX(5),
_SC_TZNAME_MAX(6),
_SC_ASYNCHRONOUS_IO(12),
_SC_PAGESIZE(30),
_SC_MEMLOCK(17),
_SC_MEMLOCK_RANGE(18),
_SC_MEMORY_PROTECTION(19),
_SC_MESSAGE_PASSING(20),
_SC_PRIORITIZED_IO(13),
_SC_PRIORITY_SCHEDULING(10),
_SC_REALTIME_SIGNALS(9),
_SC_SEMAPHORES(21),
_SC_FSYNC(15),
_SC_SHARED_MEMORY_OBJECTS(22),
_SC_SYNCHRONIZED_IO(14),
_SC_TIMERS(11),
_SC_AIO_LISTIO_MAX(23),
_SC_AIO_MAX(24),
_SC_AIO_PRIO_DELTA_MAX(25),
_SC_DELAYTIMER_MAX(26),
_SC_MQ_OPEN_MAX(27),
_SC_MAPPED_FILES(16),
_SC_RTSIG_MAX(31),
_SC_SEM_NSEMS_MAX(32),
_SC_SEM_VALUE_MAX(33),
_SC_SIGQUEUE_MAX(34),
_SC_TIMER_MAX(35),
_SC_NPROCESSORS_CONF(83),
_SC_NPROCESSORS_ONLN(84),
_SC_2_PBS(168),
_SC_2_PBS_ACCOUNTING(169),
_SC_2_PBS_CHECKPOINT(175),
_SC_2_PBS_LOCATE(170),
_SC_2_PBS_MESSAGE(171),
_SC_2_PBS_TRACK(172),
_SC_ADVISORY_INFO(132),
_SC_BARRIERS(133),
_SC_CLOCK_SELECTION(137),
_SC_CPUTIME(138),
_SC_FILE_LOCKING(147),
_SC_GETGR_R_SIZE_MAX(69),
_SC_GETPW_R_SIZE_MAX(70),
_SC_HOST_NAME_MAX(180),
_SC_LOGIN_NAME_MAX(71),
_SC_MONOTONIC_CLOCK(149),
_SC_MQ_PRIO_MAX(28),
_SC_READER_WRITER_LOCKS(153),
_SC_REGEXP(155),
_SC_SHELL(157),
_SC_SPAWN(159),
_SC_SPIN_LOCKS(154),
_SC_SPORADIC_SERVER(160),
_SC_THREAD_ATTR_STACKADDR(77),
_SC_THREAD_ATTR_STACKSIZE(78),
_SC_THREAD_CPUTIME(139),
_SC_THREAD_DESTRUCTOR_ITERATIONS(73),
_SC_THREAD_KEYS_MAX(74),
_SC_THREAD_PRIO_INHERIT(80),
_SC_THREAD_PRIO_PROTECT(81),
_SC_THREAD_PRIORITY_SCHEDULING(79),
_SC_THREAD_PROCESS_SHARED(82),
_SC_THREAD_SAFE_FUNCTIONS(68),
_SC_THREAD_SPORADIC_SERVER(161),
_SC_THREAD_STACK_MIN(75),
_SC_THREAD_THREADS_MAX(76),
_SC_TIMEOUTS(164),
_SC_THREADS(67),
_SC_TRACE(181),
_SC_TRACE_EVENT_FILTER(182),
_SC_TRACE_INHERIT(183),
_SC_TRACE_LOG(184),
_SC_TTY_NAME_MAX(72),
_SC_TYPED_MEMORY_OBJECTS(165),
_SC_V6_ILP32_OFF32(176),
_SC_V6_ILP32_OFFBIG(177),
_SC_V6_LP64_OFF64(178),
_SC_V6_LPBIG_OFFBIG(179),
_SC_IPV6(235),
_SC_RAW_SOCKETS(236),
_SC_SYMLOOP_MAX(173),
_SC_ATEXIT_MAX(87),
_SC_IOV_MAX(60),
_SC_PAGE_SIZE(30),
_SC_XOPEN_CRYPT(92),
_SC_XOPEN_ENH_I18N(93),
_SC_XOPEN_LEGACY(129),
_SC_XOPEN_REALTIME(130),
_SC_XOPEN_REALTIME_THREADS(131),
_SC_XOPEN_SHM(94),
// _SC_XOPEN_STREAMS not defined
_SC_XOPEN_UNIX(91),
_SC_XOPEN_VERSION(89),
_SC_XOPEN_XCU_VERSION(90),
_SC_XBS5_ILP32_OFF32(125),
_SC_XBS5_ILP32_OFFBIG(126),
_SC_XBS5_LP64_OFF64(127),
_SC_XBS5_LPBIG_OFFBIG(128),
// _SC_SS_REPL_MAX not defined
// _SC_TRACE_EVENT_NAME_MAX not defined
// _SC_TRACE_NAME_MAX not defined
// _SC_TRACE_SYS_MAX not defined
// _SC_TRACE_USER_EVENT_MAX not defined
_SC_PASS_MAX(88);
private final int value;
private Sysconf(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 236;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/linux/TCP.java 0000664 0000000 0000000 00000001633 12442353370 0030654 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Tue Feb 24 09:44:06 +1000 2009
package jnr.constants.platform.linux;
public enum TCP implements jnr.constants.Constant {
TCP_MSS(512),
// TCP_MAX_SACK not defined
// TCP_MINMSS not defined
// TCP_MINMSSOVERLOAD not defined
TCP_MAXWIN(65535),
TCP_MAX_WINSHIFT(14),
// TCP_MAXBURST not defined
// TCP_MAXHLEN not defined
// TCP_MAXOLEN not defined
TCP_NODELAY(1),
TCP_MAXSEG(2);
// TCP_NOPUSH not defined
// TCP_NOOPT not defined
// TCP_KEEPALIVE not defined
// TCP_NSTATES not defined
// TCP_RETRANSHZ not defined
private final int value;
private TCP(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 65535;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/linux/WaitFlags.java 0000664 0000000 0000000 00000001205 12442353370 0032102 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Tue Feb 24 09:44:02 +1000 2009
package jnr.constants.platform.linux;
public enum WaitFlags implements jnr.constants.Constant {
WNOHANG(0x1),
WUNTRACED(0x2),
WSTOPPED(0x2),
WEXITED(0x4),
WCONTINUED(0x8),
WNOWAIT(0x1000000);
private final int value;
private WaitFlags(int value) { this.value = value; }
public static final long MIN_VALUE = 0x1;
public static final long MAX_VALUE = 0x1000000;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/openbsd/ 0000775 0000000 0000000 00000000000 12442353370 0027653 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/openbsd/AddressFamily.java 0000664 0000000 0000000 00000002301 12442353370 0033241 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Wed Feb 25 18:33:02 +1000 2009
package jnr.constants.platform.openbsd;
public enum AddressFamily implements jnr.constants.Constant {
AF_UNSPEC(0),
AF_LOCAL(1),
AF_UNIX(1),
AF_INET(2),
AF_IMPLINK(3),
AF_PUP(4),
AF_CHAOS(5),
AF_NS(6),
AF_ISO(7),
AF_OSI(7),
AF_ECMA(8),
AF_DATAKIT(9),
AF_CCITT(10),
AF_SNA(11),
AF_DECnet(12),
AF_DLI(13),
AF_LAT(14),
AF_HYLINK(15),
AF_APPLETALK(16),
AF_ROUTE(17),
AF_LINK(18),
pseudo_AF_XTP(19),
AF_COIP(20),
AF_CNT(21),
pseudo_AF_RTIP(22),
AF_IPX(23),
AF_SIP(29),
pseudo_AF_PIP(25),
// AF_NDRV not defined
AF_ISDN(26),
AF_E164(26),
// pseudo_AF_KEY not defined
AF_INET6(24),
AF_NATM(27),
// AF_SYSTEM not defined
// AF_NETBIOS not defined
// AF_PPP not defined
// AF_ATM not defined
pseudo_AF_HDRCMPLT(31),
// AF_NETGRAPH not defined
// AF_AX25 not defined
AF_MAX(33);
private final int value;
private AddressFamily(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 33;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/openbsd/Errno.java 0000664 0000000 0000000 00000013177 12442353370 0031614 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Wed Feb 25 18:33:04 +1000 2009
package jnr.constants.platform.openbsd;
public enum Errno implements jnr.constants.Constant {
EPERM(1),
ENOENT(2),
ESRCH(3),
EINTR(4),
EIO(5),
ENXIO(6),
E2BIG(7),
ENOEXEC(8),
EBADF(9),
ECHILD(10),
EDEADLK(11),
ENOMEM(12),
EACCES(13),
EFAULT(14),
ENOTBLK(15),
EBUSY(16),
EEXIST(17),
EXDEV(18),
ENODEV(19),
ENOTDIR(20),
EISDIR(21),
EINVAL(22),
ENFILE(23),
EMFILE(24),
ENOTTY(25),
ETXTBSY(26),
EFBIG(27),
ENOSPC(28),
ESPIPE(29),
EROFS(30),
EMLINK(31),
EPIPE(32),
EDOM(33),
ERANGE(34),
EWOULDBLOCK(35),
EAGAIN(35),
EINPROGRESS(36),
EALREADY(37),
ENOTSOCK(38),
EDESTADDRREQ(39),
EMSGSIZE(40),
EPROTOTYPE(41),
ENOPROTOOPT(42),
EPROTONOSUPPORT(43),
ESOCKTNOSUPPORT(44),
EOPNOTSUPP(45),
EPFNOSUPPORT(46),
EAFNOSUPPORT(47),
EADDRINUSE(48),
EADDRNOTAVAIL(49),
ENETDOWN(50),
ENETUNREACH(51),
ENETRESET(52),
ECONNABORTED(53),
ECONNRESET(54),
ENOBUFS(55),
EISCONN(56),
ENOTCONN(57),
ESHUTDOWN(58),
ETOOMANYREFS(59),
ETIMEDOUT(60),
ECONNREFUSED(61),
ELOOP(62),
ENAMETOOLONG(63),
EHOSTDOWN(64),
EHOSTUNREACH(65),
ENOTEMPTY(66),
EUSERS(68),
EDQUOT(69),
ESTALE(70),
EREMOTE(71),
ENOLCK(77),
ENOSYS(78),
EOVERFLOW(87),
EIDRM(89),
ENOMSG(90),
EILSEQ(84);
// EBADMSG not defined
// EMULTIHOP not defined
// ENODATA not defined
// ENOLINK not defined
// ENOSR not defined
// ENOSTR not defined
// EPROTO not defined
// ETIME not defined
private final int value;
private Errno(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 90;
static final class StringTable {
public static final java.util.Map descriptions = generateTable();
public static final java.util.Map generateTable() {
java.util.Map map = new java.util.EnumMap(Errno.class);
map.put(EPERM, "Operation not permitted");
map.put(ENOENT, "No such file or directory");
map.put(ESRCH, "No such process");
map.put(EINTR, "Interrupted system call");
map.put(EIO, "Input/output error");
map.put(ENXIO, "Device not configured");
map.put(E2BIG, "Argument list too long");
map.put(ENOEXEC, "Exec format error");
map.put(EBADF, "Bad file descriptor");
map.put(ECHILD, "No child processes");
map.put(EDEADLK, "Resource deadlock avoided");
map.put(ENOMEM, "Cannot allocate memory");
map.put(EACCES, "Permission denied");
map.put(EFAULT, "Bad address");
map.put(ENOTBLK, "Block device required");
map.put(EBUSY, "Device busy");
map.put(EEXIST, "File exists");
map.put(EXDEV, "Cross-device link");
map.put(ENODEV, "Operation not supported by device");
map.put(ENOTDIR, "Not a directory");
map.put(EISDIR, "Is a directory");
map.put(EINVAL, "Invalid argument");
map.put(ENFILE, "Too many open files in system");
map.put(EMFILE, "Too many open files");
map.put(ENOTTY, "Inappropriate ioctl for device");
map.put(ETXTBSY, "Text file busy");
map.put(EFBIG, "File too large");
map.put(ENOSPC, "No space left on device");
map.put(ESPIPE, "Illegal seek");
map.put(EROFS, "Read-only file system");
map.put(EMLINK, "Too many links");
map.put(EPIPE, "Broken pipe");
map.put(EDOM, "Numerical argument out of domain");
map.put(ERANGE, "Result too large");
map.put(EWOULDBLOCK, "Resource temporarily unavailable");
map.put(EAGAIN, "Resource temporarily unavailable");
map.put(EINPROGRESS, "Operation now in progress");
map.put(EALREADY, "Operation already in progress");
map.put(ENOTSOCK, "Socket operation on non-socket");
map.put(EDESTADDRREQ, "Destination address required");
map.put(EMSGSIZE, "Message too long");
map.put(EPROTOTYPE, "Protocol wrong type for socket");
map.put(ENOPROTOOPT, "Protocol not available");
map.put(EPROTONOSUPPORT, "Protocol not supported");
map.put(ESOCKTNOSUPPORT, "Socket type not supported");
map.put(EOPNOTSUPP, "Operation not supported");
map.put(EPFNOSUPPORT, "Protocol family not supported");
map.put(EAFNOSUPPORT, "Address family not supported by protocol family");
map.put(EADDRINUSE, "Address already in use");
map.put(EADDRNOTAVAIL, "Can't assign requested address");
map.put(ENETDOWN, "Network is down");
map.put(ENETUNREACH, "Network is unreachable");
map.put(ENETRESET, "Network dropped connection on reset");
map.put(ECONNABORTED, "Software caused connection abort");
map.put(ECONNRESET, "Connection reset by peer");
map.put(ENOBUFS, "No buffer space available");
map.put(EISCONN, "Socket is already connected");
map.put(ENOTCONN, "Socket is not connected");
map.put(ESHUTDOWN, "Can't send after socket shutdown");
map.put(ETOOMANYREFS, "Too many references: can't splice");
map.put(ETIMEDOUT, "Connection timed out");
map.put(ECONNREFUSED, "Connection refused");
map.put(ELOOP, "Too many levels of symbolic links");
map.put(ENAMETOOLONG, "File name too long");
map.put(EHOSTDOWN, "Host is down");
map.put(EHOSTUNREACH, "No route to host");
map.put(ENOTEMPTY, "Directory not empty");
map.put(EUSERS, "Too many users");
map.put(EDQUOT, "Disc quota exceeded");
map.put(ESTALE, "Stale NFS file handle");
map.put(EREMOTE, "Too many levels of remote in path");
map.put(ENOLCK, "No locks available");
map.put(ENOSYS, "Function not implemented");
map.put(EOVERFLOW, "Value too large to be stored in data type");
map.put(EIDRM, "Identifier removed");
map.put(ENOMSG, "No message of desired type");
map.put(EILSEQ, "Illegal byte sequence");
return map;
}
}
public final String toString() { return StringTable.descriptions.get(this); }
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/openbsd/Fcntl.java 0000664 0000000 0000000 00000002434 12442353370 0031567 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Wed Feb 25 18:33:05 +1000 2009
package jnr.constants.platform.openbsd;
public enum Fcntl implements jnr.constants.Constant {
FREAD(1),
FWRITE(2),
FAPPEND(8),
FASYNC(64),
FFSYNC(128),
FNONBLOCK(4),
FNDELAY(4),
F_DUPFD(0),
F_GETFD(1),
F_SETFD(2),
F_GETFL(3),
F_SETFL(4),
F_GETOWN(5),
F_SETOWN(6),
F_GETLK(7),
F_SETLK(8),
F_SETLKW(9),
// F_CHKCLEAN not defined
// F_PREALLOCATE not defined
// F_SETSIZE not defined
// F_RDADVISE not defined
// F_RDAHEAD not defined
// F_READBOOTSTRAP not defined
// F_WRITEBOOTSTRAP not defined
// F_NOCACHE not defined
// F_LOG2PHYS not defined
// F_GETPATH not defined
// F_FULLFSYNC not defined
// F_PATHPKG_CHECK not defined
// F_FREEZE_FS not defined
// F_THAW_FS not defined
// F_GLOBAL_NOCACHE not defined
// F_ADDSIGS not defined
// F_MARKDEPENDENCY not defined
F_RDLCK(1),
F_UNLCK(2),
F_WRLCK(3);
// F_ALLOCATECONTIG not defined
// F_ALLOCATEALL not defined
private final int value;
private Fcntl(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 128;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/openbsd/INAddr.java 0000664 0000000 0000000 00000001417 12442353370 0031622 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Wed Feb 25 18:33:07 +1000 2009
package jnr.constants.platform.openbsd;
public enum INAddr implements jnr.constants.Constant {
INADDR_ANY(0),
INADDR_BROADCAST(0xffffffff),
INADDR_NONE(0xffffffff),
INADDR_LOOPBACK(0x7f000001),
INADDR_UNSPEC_GROUP(0xe0000000),
INADDR_ALLHOSTS_GROUP(0xe0000001),
// INADDR_ALLRTRS_GROUP not defined
INADDR_MAX_LOCAL_GROUP(0xe00000ff);
private final int value;
private INAddr(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 0xffffffff;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/openbsd/IPProto.java 0000664 0000000 0000000 00000002054 12442353370 0032053 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Wed Feb 25 18:33:08 +1000 2009
package jnr.constants.platform.openbsd;
public enum IPProto implements jnr.constants.Constant {
IPPROTO_IP(0),
IPPROTO_HOPOPTS(0),
IPPROTO_ICMP(1),
IPPROTO_IGMP(2),
IPPROTO_IPIP(4),
IPPROTO_TCP(6),
IPPROTO_EGP(8),
IPPROTO_PUP(12),
IPPROTO_UDP(17),
IPPROTO_IDP(22),
IPPROTO_TP(29),
IPPROTO_IPV6(41),
IPPROTO_ROUTING(43),
IPPROTO_FRAGMENT(44),
IPPROTO_RSVP(46),
IPPROTO_GRE(47),
IPPROTO_ESP(50),
IPPROTO_AH(51),
IPPROTO_ICMPV6(58),
IPPROTO_NONE(59),
IPPROTO_DSTOPTS(60),
// IPPROTO_MTP not defined
IPPROTO_ENCAP(98),
IPPROTO_PIM(103),
// IPPROTO_COMP not defined
// IPPROTO_SCTP not defined
IPPROTO_RAW(255),
IPPROTO_MAX(256);
private final int value;
private IPProto(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 256;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/openbsd/NameInfo.java 0000664 0000000 0000000 00000001256 12442353370 0032216 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Wed Feb 25 18:33:10 +1000 2009
package jnr.constants.platform.openbsd;
public enum NameInfo implements jnr.constants.Constant {
NI_MAXHOST(256),
NI_MAXSERV(32),
NI_NOFQDN(4),
NI_NUMERICHOST(1),
NI_NAMEREQD(8),
NI_NUMERICSERV(2),
NI_DGRAM(16);
// NI_WITHSCOPEID not defined
private final int value;
private NameInfo(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 256;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/openbsd/OpenFlags.java 0000664 0000000 0000000 00000001474 12442353370 0032402 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Wed Feb 25 18:33:11 +1000 2009
package jnr.constants.platform.openbsd;
public enum OpenFlags implements jnr.constants.Constant {
O_RDONLY(0),
O_WRONLY(1),
O_RDWR(2),
O_ACCMODE(3),
O_NONBLOCK(4),
O_APPEND(8),
O_SYNC(128),
O_SHLOCK(16),
O_EXLOCK(32),
O_ASYNC(64),
O_FSYNC(128),
O_NOFOLLOW(256),
O_CREAT(512),
O_TRUNC(1024),
O_EXCL(2048);
// O_EVTONLY not defined
// O_DIRECTORY not defined
// O_SYMLINK not defined
private final int value;
private OpenFlags(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 2048;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/openbsd/PRIO.java 0000664 0000000 0000000 00000001140 12442353370 0031263 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Wed Feb 25 18:33:12 +1000 2009
package jnr.constants.platform.openbsd;
public enum PRIO implements jnr.constants.Constant {
PRIO_MIN(-20),
PRIO_PROCESS(0),
PRIO_PGRP(1),
PRIO_USER(2),
PRIO_MAX(20);
private final int value;
private PRIO(int value) { this.value = value; }
public static final long MIN_VALUE = -20;
public static final long MAX_VALUE = 20;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/openbsd/ProtocolFamily.java 0000664 0000000 0000000 00000002141 12442353370 0033457 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Wed Feb 25 18:33:14 +1000 2009
package jnr.constants.platform.openbsd;
public enum ProtocolFamily implements jnr.constants.Constant {
PF_UNSPEC(0),
PF_LOCAL(1),
PF_UNIX(1),
PF_INET(2),
PF_IMPLINK(3),
PF_PUP(4),
PF_CHAOS(5),
PF_NS(6),
PF_ISO(7),
PF_OSI(7),
PF_ECMA(8),
PF_DATAKIT(9),
PF_CCITT(10),
PF_SNA(11),
PF_DECnet(12),
PF_DLI(13),
PF_LAT(14),
PF_HYLINK(15),
PF_APPLETALK(16),
PF_ROUTE(17),
PF_LINK(18),
PF_XTP(19),
PF_COIP(20),
PF_CNT(21),
PF_SIP(29),
PF_IPX(23),
PF_RTIP(22),
PF_PIP(25),
// PF_NDRV not defined
PF_ISDN(26),
PF_KEY(30),
PF_INET6(24),
PF_NATM(27),
// PF_SYSTEM not defined
// PF_NETBIOS not defined
// PF_PPP not defined
// PF_ATM not defined
// PF_NETGRAPH not defined
PF_MAX(33);
private final int value;
private ProtocolFamily(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 33;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/openbsd/RLIM.java 0000664 0000000 0000000 00000001204 12442353370 0031256 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Wed Feb 25 18:33:15 +1000 2009
package jnr.constants.platform.openbsd;
public enum RLIM implements jnr.constants.Constant {
RLIM_NLIMITS(0x9),
RLIM_INFINITY(0xffffffff),
RLIM_SAVED_MAX(0xffffffff),
RLIM_SAVED_CUR(0xffffffff);
private final int value;
private RLIM(int value) { this.value = value; }
public static final long MIN_VALUE = 0x9;
public static final long MAX_VALUE = 0xffffffff;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/openbsd/RLIMIT.java 0000664 0000000 0000000 00000001661 12442353370 0031522 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Wed Feb 25 18:33:16 +1000 2009
package jnr.constants.platform.openbsd;
public enum RLIMIT implements jnr.constants.Constant {
RLIMIT_CORE(4),
// RLIMIT_AS not defined
RLIMIT_CPU(0),
RLIMIT_DATA(2),
RLIMIT_FSIZE(1),
// RLIMIT_LOCKS not defined
RLIMIT_MEMLOCK(6),
// RLIMIT_MSGQUEUE not defined
// RLIMIT_NICE not defined
// RLIMIT_NLIMITS not defined
RLIMIT_NOFILE(8),
RLIMIT_NPROC(7),
// RLIMIT_OFILE not defined
RLIMIT_RSS(5),
// RLIMIT_RTPRIO not defined
// RLIMIT_RTTIME not defined
// RLIMIT_SIGPENDING not defined
RLIMIT_STACK(3);
private final int value;
private RLIMIT(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 8;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/openbsd/Shutdown.java 0000664 0000000 0000000 00000001101 12442353370 0032322 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Wed Feb 25 18:33:17 +1000 2009
package jnr.constants.platform.openbsd;
public enum Shutdown implements jnr.constants.Constant {
SHUT_RD(0),
SHUT_WR(1),
SHUT_RDWR(2);
private final int value;
private Shutdown(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 2;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/openbsd/Signal.java 0000664 0000000 0000000 00000002075 12442353370 0031737 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Wed Feb 25 18:33:18 +1000 2009
package jnr.constants.platform.openbsd;
public enum Signal implements jnr.constants.Constant {
SIGHUP(1),
SIGINT(2),
SIGQUIT(3),
SIGILL(4),
SIGTRAP(5),
SIGABRT(6),
SIGIOT(6),
SIGBUS(10),
SIGFPE(8),
SIGKILL(9),
SIGUSR1(30),
SIGSEGV(11),
SIGUSR2(31),
SIGPIPE(13),
SIGALRM(14),
SIGTERM(15),
// SIGSTKFLT not defined
// SIGCLD not defined
SIGCHLD(20),
SIGCONT(19),
SIGSTOP(17),
SIGTSTP(18),
SIGTTIN(21),
SIGTTOU(22),
SIGURG(16),
SIGXCPU(24),
SIGXFSZ(25),
SIGVTALRM(26),
SIGPROF(27),
SIGWINCH(28),
// SIGPOLL not defined
SIGIO(23),
// SIGPWR not defined
SIGSYS(12),
// SIGUNUSED not defined
// SIGRTMIN not defined
// SIGRTMAX not defined
NSIG(32);
private final int value;
private Signal(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 32;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/openbsd/Sock.java 0000664 0000000 0000000 00000001176 12442353370 0031422 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Wed Feb 25 18:33:20 +1000 2009
package jnr.constants.platform.openbsd;
public enum Sock implements jnr.constants.Constant {
SOCK_STREAM(1),
SOCK_DGRAM(2),
SOCK_RAW(3),
SOCK_RDM(4),
SOCK_SEQPACKET(5);
// SOCK_MAXADDRLEN not defined
private final int value;
private Sock(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 5;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/openbsd/SocketLevel.java 0000664 0000000 0000000 00000001200 12442353370 0032727 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Wed Feb 25 18:33:21 +1000 2009
package jnr.constants.platform.openbsd;
public enum SocketLevel implements jnr.constants.Constant {
SOL_SOCKET(65535);
// SOL_IP not defined
// SOL_TCP not defined
// SOL_UDP not defined
private final int value;
private SocketLevel(int value) { this.value = value; }
public static final long MIN_VALUE = 65535;
public static final long MAX_VALUE = 65535;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/openbsd/SocketOption.java 0000664 0000000 0000000 00000003132 12442353370 0033136 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Wed Feb 25 18:33:22 +1000 2009
package jnr.constants.platform.openbsd;
public enum SocketOption implements jnr.constants.Constant {
SO_DEBUG(0x1),
SO_ACCEPTCONN(0x2),
SO_REUSEADDR(0x4),
SO_KEEPALIVE(0x8),
SO_DONTROUTE(0x10),
SO_BROADCAST(0x20),
SO_USELOOPBACK(0x40),
SO_LINGER(0x80),
SO_OOBINLINE(0x100),
SO_REUSEPORT(0x200),
// SO_TIMESTAMP not defined
// SO_ACCEPTFILTER not defined
// SO_DONTTRUNC not defined
// SO_WANTMORE not defined
// SO_WANTOOBFLAG not defined
SO_SNDBUF(0x1001),
SO_RCVBUF(0x1002),
SO_SNDLOWAT(0x1003),
SO_RCVLOWAT(0x1004),
SO_SNDTIMEO(0x1005),
SO_RCVTIMEO(0x1006),
SO_ERROR(0x1007),
SO_TYPE(0x1008);
// SO_NREAD not defined
// SO_NKE not defined
// SO_NOSIGPIPE not defined
// SO_NOADDRERR not defined
// SO_NWRITE not defined
// SO_REUSESHAREUID not defined
// SO_LABEL not defined
// SO_PEERLABEL not defined
// SO_ATTACH_FILTER not defined
// SO_BINDTODEVICE not defined
// SO_DETACH_FILTER not defined
// SO_NO_CHECK not defined
// SO_PASSCRED not defined
// SO_PEERCRED not defined
// SO_PEERNAME not defined
// SO_PRIORITY not defined
// SO_SECURITY_AUTHENTICATION not defined
// SO_SECURITY_ENCRYPTION_NETWORK not defined
// SO_SECURITY_ENCRYPTION_TRANSPORT not defined
private final int value;
private SocketOption(int value) { this.value = value; }
public static final long MIN_VALUE = 0x1;
public static final long MAX_VALUE = 0x1008;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/openbsd/Sysconf.java 0000664 0000000 0000000 00000010442 12442353370 0032143 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Wed Feb 25 18:33:23 +1000 2009
package jnr.constants.platform.openbsd;
public enum Sysconf implements jnr.constants.Constant {
_SC_ARG_MAX(1),
_SC_CHILD_MAX(2),
_SC_CLK_TCK(3),
_SC_NGROUPS_MAX(4),
_SC_OPEN_MAX(5),
_SC_JOB_CONTROL(6),
_SC_SAVED_IDS(7),
_SC_VERSION(8),
_SC_BC_BASE_MAX(9),
_SC_BC_DIM_MAX(10),
_SC_BC_SCALE_MAX(11),
_SC_BC_STRING_MAX(12),
_SC_COLL_WEIGHTS_MAX(13),
_SC_EXPR_NEST_MAX(14),
_SC_LINE_MAX(15),
_SC_RE_DUP_MAX(16),
_SC_2_VERSION(17),
_SC_2_C_BIND(18),
_SC_2_C_DEV(19),
_SC_2_CHAR_TERM(20),
_SC_2_FORT_DEV(21),
_SC_2_FORT_RUN(22),
_SC_2_LOCALEDEF(23),
_SC_2_SW_DEV(24),
_SC_2_UPE(25),
_SC_STREAM_MAX(26),
_SC_TZNAME_MAX(27),
// _SC_ASYNCHRONOUS_IO not defined
_SC_PAGESIZE(28),
// _SC_MEMLOCK not defined
// _SC_MEMLOCK_RANGE not defined
// _SC_MEMORY_PROTECTION not defined
// _SC_MESSAGE_PASSING not defined
// _SC_PRIORITIZED_IO not defined
// _SC_PRIORITY_SCHEDULING not defined
// _SC_REALTIME_SIGNALS not defined
// _SC_SEMAPHORES not defined
_SC_FSYNC(29),
// _SC_SHARED_MEMORY_OBJECTS not defined
// _SC_SYNCHRONIZED_IO not defined
// _SC_TIMERS not defined
// _SC_AIO_LISTIO_MAX not defined
// _SC_AIO_MAX not defined
// _SC_AIO_PRIO_DELTA_MAX not defined
// _SC_DELAYTIMER_MAX not defined
// _SC_MQ_OPEN_MAX not defined
// _SC_MAPPED_FILES not defined
// _SC_RTSIG_MAX not defined
_SC_SEM_NSEMS_MAX(31),
_SC_SEM_VALUE_MAX(32),
// _SC_SIGQUEUE_MAX not defined
// _SC_TIMER_MAX not defined
// _SC_NPROCESSORS_CONF not defined
// _SC_NPROCESSORS_ONLN not defined
// _SC_2_PBS not defined
// _SC_2_PBS_ACCOUNTING not defined
// _SC_2_PBS_CHECKPOINT not defined
// _SC_2_PBS_LOCATE not defined
// _SC_2_PBS_MESSAGE not defined
// _SC_2_PBS_TRACK not defined
// _SC_ADVISORY_INFO not defined
// _SC_BARRIERS not defined
// _SC_CLOCK_SELECTION not defined
// _SC_CPUTIME not defined
// _SC_FILE_LOCKING not defined
// _SC_GETGR_R_SIZE_MAX not defined
// _SC_GETPW_R_SIZE_MAX not defined
// _SC_HOST_NAME_MAX not defined
// _SC_LOGIN_NAME_MAX not defined
// _SC_MONOTONIC_CLOCK not defined
// _SC_MQ_PRIO_MAX not defined
// _SC_READER_WRITER_LOCKS not defined
// _SC_REGEXP not defined
// _SC_SHELL not defined
// _SC_SPAWN not defined
// _SC_SPIN_LOCKS not defined
// _SC_SPORADIC_SERVER not defined
// _SC_THREAD_ATTR_STACKADDR not defined
// _SC_THREAD_ATTR_STACKSIZE not defined
// _SC_THREAD_CPUTIME not defined
// _SC_THREAD_DESTRUCTOR_ITERATIONS not defined
// _SC_THREAD_KEYS_MAX not defined
// _SC_THREAD_PRIO_INHERIT not defined
// _SC_THREAD_PRIO_PROTECT not defined
// _SC_THREAD_PRIORITY_SCHEDULING not defined
// _SC_THREAD_PROCESS_SHARED not defined
// _SC_THREAD_SAFE_FUNCTIONS not defined
// _SC_THREAD_SPORADIC_SERVER not defined
// _SC_THREAD_STACK_MIN not defined
// _SC_THREAD_THREADS_MAX not defined
// _SC_TIMEOUTS not defined
// _SC_THREADS not defined
// _SC_TRACE not defined
// _SC_TRACE_EVENT_FILTER not defined
// _SC_TRACE_INHERIT not defined
// _SC_TRACE_LOG not defined
// _SC_TTY_NAME_MAX not defined
// _SC_TYPED_MEMORY_OBJECTS not defined
// _SC_V6_ILP32_OFF32 not defined
// _SC_V6_ILP32_OFFBIG not defined
// _SC_V6_LP64_OFF64 not defined
// _SC_V6_LPBIG_OFFBIG not defined
// _SC_IPV6 not defined
// _SC_RAW_SOCKETS not defined
// _SC_SYMLOOP_MAX not defined
// _SC_ATEXIT_MAX not defined
// _SC_IOV_MAX not defined
_SC_PAGE_SIZE(28),
// _SC_XOPEN_CRYPT not defined
// _SC_XOPEN_ENH_I18N not defined
// _SC_XOPEN_LEGACY not defined
// _SC_XOPEN_REALTIME not defined
// _SC_XOPEN_REALTIME_THREADS not defined
_SC_XOPEN_SHM(30);
// _SC_XOPEN_STREAMS not defined
// _SC_XOPEN_UNIX not defined
// _SC_XOPEN_VERSION not defined
// _SC_XOPEN_XCU_VERSION not defined
// _SC_XBS5_ILP32_OFF32 not defined
// _SC_XBS5_ILP32_OFFBIG not defined
// _SC_XBS5_LP64_OFF64 not defined
// _SC_XBS5_LPBIG_OFFBIG not defined
// _SC_SS_REPL_MAX not defined
// _SC_TRACE_EVENT_NAME_MAX not defined
// _SC_TRACE_NAME_MAX not defined
// _SC_TRACE_SYS_MAX not defined
// _SC_TRACE_USER_EVENT_MAX not defined
// _SC_PASS_MAX not defined
private final int value;
private Sysconf(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 32;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/openbsd/TCP.java 0000664 0000000 0000000 00000001607 12442353370 0031150 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Wed Feb 25 18:33:25 +1000 2009
package jnr.constants.platform.openbsd;
public enum TCP implements jnr.constants.Constant {
TCP_MAX_SACK(3),
TCP_MSS(512),
// TCP_MINMSS not defined
// TCP_MINMSSOVERLOAD not defined
TCP_MAXWIN(65535),
TCP_MAX_WINSHIFT(14),
TCP_MAXBURST(4),
// TCP_MAXHLEN not defined
// TCP_MAXOLEN not defined
TCP_NODELAY(1),
TCP_MAXSEG(2);
// TCP_NOPUSH not defined
// TCP_NOOPT not defined
// TCP_KEEPALIVE not defined
// TCP_NSTATES not defined
// TCP_RETRANSHZ not defined
private final int value;
private TCP(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 65535;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/openbsd/WaitFlags.java 0000664 0000000 0000000 00000001217 12442353370 0032400 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Wed Feb 25 18:33:26 +1000 2009
package jnr.constants.platform.openbsd;
public enum WaitFlags implements jnr.constants.Constant {
WNOHANG(0x1),
WUNTRACED(0x2),
WSTOPPED(0x7f),
// WEXITED not defined
WCONTINUED(0x8);
// WNOWAIT not defined
private final int value;
private WaitFlags(int value) { this.value = value; }
public static final long MIN_VALUE = 0x1;
public static final long MAX_VALUE = 0x7f;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/sunos/ 0000775 0000000 0000000 00000000000 12442353370 0027370 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/sunos/AddressFamily.java 0000664 0000000 0000000 00000002472 12442353370 0032767 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 23:19:30 +0000 2009
package jnr.constants.platform.sunos;
public enum AddressFamily implements jnr.constants.Constant {
AF_UNSPEC(0),
// AF_LOCAL not defined
AF_UNIX(1),
AF_INET(2),
AF_IMPLINK(3),
AF_PUP(4),
AF_CHAOS(5),
AF_NS(6),
// AF_ISO not defined
AF_OSI(19),
AF_ECMA(8),
AF_DATAKIT(9),
AF_CCITT(10),
AF_SNA(11),
AF_DECnet(12),
AF_DLI(13),
AF_LAT(14),
AF_HYLINK(15),
AF_APPLETALK(16),
AF_ROUTE(24),
AF_LINK(25),
// pseudo_AF_XTP not defined
// AF_COIP not defined
// AF_CNT not defined
// pseudo_AF_RTIP not defined
AF_IPX(23),
// AF_SIP not defined
// pseudo_AF_PIP not defined
// AF_NDRV not defined
// AF_ISDN not defined
// AF_E164 not defined
// pseudo_AF_KEY not defined
AF_INET6(26),
// AF_NATM not defined
// AF_SYSTEM not defined
// AF_NETBIOS not defined
// AF_PPP not defined
// AF_ATM not defined
// pseudo_AF_HDRCMPLT not defined
// AF_NETGRAPH not defined
// AF_AX25 not defined
AF_MAX(30);
private final int value;
private AddressFamily(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 30;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/sunos/Errno.java 0000664 0000000 0000000 00000013671 12442353370 0031330 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 23:19:31 +0000 2009
package jnr.constants.platform.sunos;
public enum Errno implements jnr.constants.Constant {
EPERM(1),
ENOENT(2),
ESRCH(3),
EINTR(4),
EIO(5),
ENXIO(6),
E2BIG(7),
ENOEXEC(8),
EBADF(9),
ECHILD(10),
EDEADLK(45),
ENOMEM(12),
EACCES(13),
EFAULT(14),
ENOTBLK(15),
EBUSY(16),
EEXIST(17),
EXDEV(18),
ENODEV(19),
ENOTDIR(20),
EISDIR(21),
EINVAL(22),
ENFILE(23),
EMFILE(24),
ENOTTY(25),
ETXTBSY(26),
EFBIG(27),
ENOSPC(28),
ESPIPE(29),
EROFS(30),
EMLINK(31),
EPIPE(32),
EDOM(33),
ERANGE(34),
EWOULDBLOCK(11),
EAGAIN(11),
EINPROGRESS(150),
EALREADY(149),
ENOTSOCK(95),
EDESTADDRREQ(96),
EMSGSIZE(97),
EPROTOTYPE(98),
ENOPROTOOPT(99),
EPROTONOSUPPORT(120),
ESOCKTNOSUPPORT(121),
EOPNOTSUPP(122),
EPFNOSUPPORT(123),
EAFNOSUPPORT(124),
EADDRINUSE(125),
EADDRNOTAVAIL(126),
ENETDOWN(127),
ENETUNREACH(128),
ENETRESET(129),
ECONNABORTED(130),
ECONNRESET(131),
ENOBUFS(132),
EISCONN(133),
ENOTCONN(134),
ESHUTDOWN(143),
ETOOMANYREFS(144),
ETIMEDOUT(145),
ECONNREFUSED(146),
ELOOP(90),
ENAMETOOLONG(78),
EHOSTDOWN(147),
EHOSTUNREACH(148),
ENOTEMPTY(93),
EUSERS(94),
EDQUOT(49),
ESTALE(151),
EREMOTE(66),
ENOLCK(46),
ENOSYS(89),
EOVERFLOW(79),
EIDRM(36),
ENOMSG(35),
EILSEQ(88),
EBADMSG(77),
EMULTIHOP(74),
ENODATA(61),
ENOLINK(67),
ENOSR(63),
ENOSTR(60),
EPROTO(71),
ETIME(62);
private final int value;
private Errno(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 151;
static final class StringTable {
public static final java.util.Map descriptions = generateTable();
public static final java.util.Map generateTable() {
java.util.Map map = new java.util.EnumMap(Errno.class);
map.put(EPERM, "Not owner");
map.put(ENOENT, "No such file or directory");
map.put(ESRCH, "No such process");
map.put(EINTR, "Interrupted system call");
map.put(EIO, "I/O error");
map.put(ENXIO, "No such device or address");
map.put(E2BIG, "Arg list too long");
map.put(ENOEXEC, "Exec format error");
map.put(EBADF, "Bad file number");
map.put(ECHILD, "No child processes");
map.put(EDEADLK, "Deadlock situation detected/avoided");
map.put(ENOMEM, "Not enough space");
map.put(EACCES, "Permission denied");
map.put(EFAULT, "Bad address");
map.put(ENOTBLK, "Block device required");
map.put(EBUSY, "Device busy");
map.put(EEXIST, "File exists");
map.put(EXDEV, "Cross-device link");
map.put(ENODEV, "No such device");
map.put(ENOTDIR, "Not a directory");
map.put(EISDIR, "Is a directory");
map.put(EINVAL, "Invalid argument");
map.put(ENFILE, "File table overflow");
map.put(EMFILE, "Too many open files");
map.put(ENOTTY, "Inappropriate ioctl for device");
map.put(ETXTBSY, "Text file busy");
map.put(EFBIG, "File too large");
map.put(ENOSPC, "No space left on device");
map.put(ESPIPE, "Illegal seek");
map.put(EROFS, "Read-only file system");
map.put(EMLINK, "Too many links");
map.put(EPIPE, "Broken pipe");
map.put(EDOM, "Argument out of domain");
map.put(ERANGE, "Result too large");
map.put(EWOULDBLOCK, "Resource temporarily unavailable");
map.put(EAGAIN, "Resource temporarily unavailable");
map.put(EINPROGRESS, "Operation now in progress");
map.put(EALREADY, "Operation already in progress");
map.put(ENOTSOCK, "Socket operation on non-socket");
map.put(EDESTADDRREQ, "Destination address required");
map.put(EMSGSIZE, "Message too long");
map.put(EPROTOTYPE, "Protocol wrong type for socket");
map.put(ENOPROTOOPT, "Option not supported by protocol");
map.put(EPROTONOSUPPORT, "Protocol not supported");
map.put(ESOCKTNOSUPPORT, "Socket type not supported");
map.put(EOPNOTSUPP, "Operation not supported on transport endpoint");
map.put(EPFNOSUPPORT, "Protocol family not supported");
map.put(EAFNOSUPPORT, "Address family not supported by protocol family");
map.put(EADDRINUSE, "Address already in use");
map.put(EADDRNOTAVAIL, "Cannot assign requested address");
map.put(ENETDOWN, "Network is down");
map.put(ENETUNREACH, "Network is unreachable");
map.put(ENETRESET, "Network dropped connection because of reset");
map.put(ECONNABORTED, "Software caused connection abort");
map.put(ECONNRESET, "Connection reset by peer");
map.put(ENOBUFS, "No buffer space available");
map.put(EISCONN, "Transport endpoint is already connected");
map.put(ENOTCONN, "Transport endpoint is not connected");
map.put(ESHUTDOWN, "Cannot send after socket shutdown");
map.put(ETOOMANYREFS, "Too many references: cannot splice");
map.put(ETIMEDOUT, "Connection timed out");
map.put(ECONNREFUSED, "Connection refused");
map.put(ELOOP, "Number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS");
map.put(ENAMETOOLONG, "File name too long");
map.put(EHOSTDOWN, "Host is down");
map.put(EHOSTUNREACH, "No route to host");
map.put(ENOTEMPTY, "Directory not empty");
map.put(EUSERS, "Too many users");
map.put(EDQUOT, "Disc quota exceeded");
map.put(ESTALE, "Stale NFS file handle");
map.put(EREMOTE, "Object is remote");
map.put(ENOLCK, "No record locks available");
map.put(ENOSYS, "Operation not applicable");
map.put(EOVERFLOW, "Value too large for defined data type");
map.put(EIDRM, "Identifier removed");
map.put(ENOMSG, "No message of desired type");
map.put(EILSEQ, "Illegal byte sequence");
map.put(EBADMSG, "Not a data message");
map.put(EMULTIHOP, "Multihop attempted");
map.put(ENODATA, "No data available");
map.put(ENOLINK, "Link has been severed");
map.put(ENOSR, "Out of stream resources");
map.put(ENOSTR, "Not a stream device");
map.put(EPROTO, "Protocol error");
map.put(ETIME, "Timer expired");
return map;
}
}
public final String toString() { return StringTable.descriptions.get(this); }
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/sunos/Fcntl.java 0000664 0000000 0000000 00000002550 12442353370 0031303 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 23:52:41 +0000 2009
package jnr.constants.platform.sunos;
public enum Fcntl implements jnr.constants.Constant {
F_DUPFD(0),
// FREAD not defined
// FWRITE not defined
// FAPPEND not defined
// FASYNC not defined
// FFSYNC not defined
// FNONBLOCK not defined
// FNDELAY not defined
F_GETFD(1),
F_SETFD(2),
F_GETFL(3),
F_SETFL(4),
F_GETOWN(23),
F_SETOWN(24),
F_GETLK(33),
F_SETLK(34),
F_SETLKW(35),
// F_CHKCLEAN not defined
// F_PREALLOCATE not defined
// F_SETSIZE not defined
// F_RDADVISE not defined
// F_RDAHEAD not defined
// F_READBOOTSTRAP not defined
// F_WRITEBOOTSTRAP not defined
// F_NOCACHE not defined
// F_LOG2PHYS not defined
// F_GETPATH not defined
// F_FULLFSYNC not defined
// F_PATHPKG_CHECK not defined
// F_FREEZE_FS not defined
// F_THAW_FS not defined
// F_GLOBAL_NOCACHE not defined
// F_ADDSIGS not defined
// F_MARKDEPENDENCY not defined
F_RDLCK(1),
F_UNLCK(3),
F_WRLCK(2);
// F_ALLOCATECONTIG not defined
// F_ALLOCATEALL not defined
private final int value;
private Fcntl(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 35;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/sunos/INAddr.java 0000664 0000000 0000000 00000001413 12442353370 0031333 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 23:19:31 +0000 2009
package jnr.constants.platform.sunos;
public enum INAddr implements jnr.constants.Constant {
INADDR_ANY(0),
INADDR_BROADCAST(0xffffffff),
INADDR_NONE(0xffffffff),
INADDR_LOOPBACK(0x7f000001),
INADDR_UNSPEC_GROUP(0xe0000000),
INADDR_ALLHOSTS_GROUP(0xe0000001),
INADDR_ALLRTRS_GROUP(0xe0000002),
INADDR_MAX_LOCAL_GROUP(0xe00000ff);
private final int value;
private INAddr(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 0xffffffff;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/sunos/IPProto.java 0000664 0000000 0000000 00000002077 12442353370 0031575 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 23:19:31 +0000 2009
package jnr.constants.platform.sunos;
public enum IPProto implements jnr.constants.Constant {
IPPROTO_IP(0),
IPPROTO_HOPOPTS(0),
IPPROTO_ICMP(1),
IPPROTO_IGMP(2),
// IPPROTO_IPIP not defined
IPPROTO_TCP(6),
IPPROTO_EGP(8),
IPPROTO_PUP(12),
IPPROTO_UDP(17),
IPPROTO_IDP(22),
// IPPROTO_TP not defined
IPPROTO_IPV6(41),
IPPROTO_ROUTING(43),
IPPROTO_FRAGMENT(44),
IPPROTO_RSVP(46),
// IPPROTO_GRE not defined
IPPROTO_ESP(50),
IPPROTO_AH(51),
IPPROTO_ICMPV6(58),
IPPROTO_NONE(59),
IPPROTO_DSTOPTS(60),
// IPPROTO_MTP not defined
IPPROTO_ENCAP(4),
IPPROTO_PIM(103),
// IPPROTO_COMP not defined
IPPROTO_SCTP(132),
IPPROTO_RAW(255),
IPPROTO_MAX(256);
private final int value;
private IPProto(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 256;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/sunos/NameInfo.java 0000664 0000000 0000000 00000001244 12442353370 0031730 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 23:19:33 +0000 2009
package jnr.constants.platform.sunos;
public enum NameInfo implements jnr.constants.Constant {
NI_MAXHOST(1025),
NI_MAXSERV(32),
NI_NOFQDN(1),
NI_NUMERICHOST(2),
NI_NAMEREQD(4),
NI_NUMERICSERV(8),
NI_DGRAM(16),
NI_WITHSCOPEID(32);
private final int value;
private NameInfo(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 1025;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/sunos/OpenFlags.java 0000664 0000000 0000000 00000001546 12442353370 0032117 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 23:52:42 +0000 2009
package jnr.constants.platform.sunos;
public enum OpenFlags implements jnr.constants.Constant {
O_RDONLY(0),
O_WRONLY(1),
O_RDWR(2),
O_ACCMODE(3),
O_NONBLOCK(128),
O_APPEND(8),
O_SYNC(16),
// O_SHLOCK not defined
// O_EXLOCK not defined
// O_ASYNC not defined
// O_FSYNC not defined
O_NOFOLLOW(131072),
O_CREAT(256),
O_TRUNC(512),
O_EXCL(1024);
// O_EVTONLY not defined
// O_DIRECTORY not defined
// O_SYMLINK not defined
private final int value;
private OpenFlags(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 131072;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/sunos/PRIO.java 0000664 0000000 0000000 00000001156 12442353370 0031007 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 23:19:33 +0000 2009
package jnr.constants.platform.sunos;
public enum PRIO implements jnr.constants.Constant {
PRIO_PROCESS(0),
// PRIO_MIN not defined
PRIO_PGRP(1),
PRIO_USER(2);
// PRIO_MAX not defined
private final int value;
private PRIO(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 2;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/sunos/ProtocolFamily.java 0000664 0000000 0000000 00000002306 12442353370 0033177 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 23:19:32 +0000 2009
package jnr.constants.platform.sunos;
public enum ProtocolFamily implements jnr.constants.Constant {
PF_UNSPEC(0),
// PF_LOCAL not defined
PF_UNIX(1),
PF_INET(2),
PF_IMPLINK(3),
PF_PUP(4),
PF_CHAOS(5),
PF_NS(6),
// PF_ISO not defined
PF_OSI(19),
PF_ECMA(8),
PF_DATAKIT(9),
PF_CCITT(10),
PF_SNA(11),
PF_DECnet(12),
PF_DLI(13),
PF_LAT(14),
PF_HYLINK(15),
PF_APPLETALK(16),
PF_ROUTE(24),
PF_LINK(25),
// PF_XTP not defined
// PF_COIP not defined
// PF_CNT not defined
// PF_SIP not defined
PF_IPX(23),
// PF_RTIP not defined
// PF_PIP not defined
// PF_NDRV not defined
// PF_ISDN not defined
PF_KEY(27),
PF_INET6(26),
// PF_NATM not defined
// PF_SYSTEM not defined
// PF_NETBIOS not defined
// PF_PPP not defined
// PF_ATM not defined
// PF_NETGRAPH not defined
PF_MAX(30);
private final int value;
private ProtocolFamily(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 30;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/sunos/RLIM.java 0000664 0000000 0000000 00000001202 12442353370 0030771 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 23:19:33 +0000 2009
package jnr.constants.platform.sunos;
public enum RLIM implements jnr.constants.Constant {
RLIM_NLIMITS(0x7),
RLIM_INFINITY(0xfffffffd),
RLIM_SAVED_MAX(0xfffffffe),
RLIM_SAVED_CUR(0xffffffff);
private final int value;
private RLIM(int value) { this.value = value; }
public static final long MIN_VALUE = 0x7;
public static final long MAX_VALUE = 0xffffffff;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/sunos/RLIMIT.java 0000664 0000000 0000000 00000001705 12442353370 0031236 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 23:19:34 +0000 2009
package jnr.constants.platform.sunos;
public enum RLIMIT implements jnr.constants.Constant {
RLIMIT_AS(6),
RLIMIT_CORE(4),
RLIMIT_CPU(0),
RLIMIT_DATA(2),
RLIMIT_FSIZE(1),
// RLIMIT_LOCKS not defined
// RLIMIT_MEMLOCK not defined
// RLIMIT_MSGQUEUE not defined
// RLIMIT_NICE not defined
// RLIMIT_NLIMITS not defined
RLIMIT_NOFILE(5),
// RLIMIT_NPROC not defined
// RLIMIT_OFILE not defined
// RLIMIT_RSS not defined
// RLIMIT_RTPRIO not defined
// RLIMIT_RTTIME not defined
// RLIMIT_SIGPENDING not defined
RLIMIT_STACK(3);
private final int value;
private RLIMIT(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 6;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/sunos/Shutdown.java 0000664 0000000 0000000 00000001077 12442353370 0032053 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 23:19:32 +0000 2009
package jnr.constants.platform.sunos;
public enum Shutdown implements jnr.constants.Constant {
SHUT_RD(0),
SHUT_WR(1),
SHUT_RDWR(2);
private final int value;
private Shutdown(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 2;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/sunos/Signal.java 0000664 0000000 0000000 00000002011 12442353370 0031442 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 23:19:36 +0000 2009
package jnr.constants.platform.sunos;
public enum Signal implements jnr.constants.Constant {
SIGHUP(1),
SIGINT(2),
SIGQUIT(3),
SIGILL(4),
SIGTRAP(5),
SIGABRT(6),
SIGIOT(6),
SIGBUS(10),
SIGFPE(8),
SIGKILL(9),
SIGUSR1(16),
SIGSEGV(11),
SIGUSR2(17),
SIGPIPE(13),
SIGALRM(14),
SIGTERM(15),
// SIGSTKFLT not defined
SIGCLD(18),
SIGCHLD(18),
SIGCONT(25),
SIGSTOP(23),
SIGTSTP(24),
SIGTTIN(26),
SIGTTOU(27),
SIGURG(21),
SIGXCPU(30),
SIGXFSZ(31),
SIGVTALRM(28),
SIGPROF(29),
SIGWINCH(20),
SIGPOLL(22),
SIGIO(22),
SIGPWR(19),
SIGSYS(12),
// SIGUNUSED not defined
SIGRTMIN(41),
SIGRTMAX(48),
NSIG(49);
private final int value;
private Signal(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 49;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/sunos/Sock.java 0000664 0000000 0000000 00000001174 12442353370 0031135 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 23:19:34 +0000 2009
package jnr.constants.platform.sunos;
public enum Sock implements jnr.constants.Constant {
SOCK_STREAM(2),
SOCK_DGRAM(1),
SOCK_RAW(4),
SOCK_RDM(5),
SOCK_SEQPACKET(6);
// SOCK_MAXADDRLEN not defined
private final int value;
private Sock(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 6;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/sunos/SocketLevel.java 0000664 0000000 0000000 00000001176 12442353370 0032460 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 23:19:34 +0000 2009
package jnr.constants.platform.sunos;
public enum SocketLevel implements jnr.constants.Constant {
SOL_SOCKET(65535);
// SOL_IP not defined
// SOL_TCP not defined
// SOL_UDP not defined
private final int value;
private SocketLevel(int value) { this.value = value; }
public static final long MIN_VALUE = 65535;
public static final long MAX_VALUE = 65535;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/sunos/SocketOption.java 0000664 0000000 0000000 00000003137 12442353370 0032660 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 23:19:33 +0000 2009
package jnr.constants.platform.sunos;
public enum SocketOption implements jnr.constants.Constant {
SO_DEBUG(0x1),
SO_ACCEPTCONN(0x2),
SO_REUSEADDR(0x4),
SO_KEEPALIVE(0x8),
SO_DONTROUTE(0x10),
SO_BROADCAST(0x20),
SO_USELOOPBACK(0x40),
SO_LINGER(0x80),
SO_OOBINLINE(0x100),
// SO_REUSEPORT not defined
// SO_TIMESTAMP not defined
// SO_ACCEPTFILTER not defined
// SO_DONTTRUNC not defined
// SO_WANTMORE not defined
// SO_WANTOOBFLAG not defined
SO_SNDBUF(0x1001),
SO_RCVBUF(0x1002),
SO_SNDLOWAT(0x1003),
SO_RCVLOWAT(0x1004),
SO_SNDTIMEO(0x1005),
SO_RCVTIMEO(0x1006),
SO_ERROR(0x1007),
SO_TYPE(0x1008);
// SO_NREAD not defined
// SO_NKE not defined
// SO_NOSIGPIPE not defined
// SO_NOADDRERR not defined
// SO_NWRITE not defined
// SO_REUSESHAREUID not defined
// SO_LABEL not defined
// SO_PEERLABEL not defined
// SO_ATTACH_FILTER not defined
// SO_BINDTODEVICE not defined
// SO_DETACH_FILTER not defined
// SO_NO_CHECK not defined
// SO_PASSCRED not defined
// SO_PEERCRED not defined
// SO_PEERNAME not defined
// SO_PRIORITY not defined
// SO_SECURITY_AUTHENTICATION not defined
// SO_SECURITY_ENCRYPTION_NETWORK not defined
// SO_SECURITY_ENCRYPTION_TRANSPORT not defined
private final int value;
private SocketOption(int value) { this.value = value; }
public static final long MIN_VALUE = 0x1;
public static final long MAX_VALUE = 0x1008;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/sunos/Sysconf.java 0000664 0000000 0000000 00000006663 12442353370 0031672 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 23:19:35 +0000 2009
package jnr.constants.platform.sunos;
public enum Sysconf implements jnr.constants.Constant {
_SC_ARG_MAX(1),
_SC_CHILD_MAX(2),
_SC_CLK_TCK(3),
_SC_NGROUPS_MAX(4),
_SC_OPEN_MAX(5),
_SC_JOB_CONTROL(6),
_SC_SAVED_IDS(7),
_SC_VERSION(8),
_SC_BC_BASE_MAX(54),
_SC_BC_DIM_MAX(55),
_SC_BC_SCALE_MAX(56),
_SC_BC_STRING_MAX(57),
_SC_COLL_WEIGHTS_MAX(58),
_SC_EXPR_NEST_MAX(59),
_SC_LINE_MAX(60),
_SC_RE_DUP_MAX(61),
_SC_2_VERSION(53),
_SC_2_C_BIND(45),
_SC_2_C_DEV(46),
_SC_2_CHAR_TERM(66),
_SC_2_FORT_DEV(48),
_SC_2_FORT_RUN(49),
_SC_2_LOCALEDEF(50),
_SC_2_SW_DEV(51),
_SC_2_UPE(52),
_SC_STREAM_MAX(16),
_SC_TZNAME_MAX(17),
_SC_ASYNCHRONOUS_IO(21),
_SC_PAGESIZE(11),
_SC_MEMLOCK(25),
_SC_MEMLOCK_RANGE(26),
_SC_MEMORY_PROTECTION(27),
_SC_MESSAGE_PASSING(28),
_SC_PRIORITIZED_IO(31),
_SC_PRIORITY_SCHEDULING(32),
_SC_REALTIME_SIGNALS(33),
_SC_SEMAPHORES(35),
_SC_FSYNC(23),
_SC_SHARED_MEMORY_OBJECTS(38),
_SC_SYNCHRONIZED_IO(42),
_SC_TIMERS(43),
_SC_AIO_LISTIO_MAX(18),
_SC_AIO_MAX(19),
_SC_AIO_PRIO_DELTA_MAX(20),
_SC_DELAYTIMER_MAX(22),
_SC_MQ_OPEN_MAX(29),
_SC_MAPPED_FILES(24),
_SC_RTSIG_MAX(34),
_SC_SEM_NSEMS_MAX(36),
_SC_SEM_VALUE_MAX(37),
_SC_SIGQUEUE_MAX(39),
_SC_TIMER_MAX(44),
_SC_NPROCESSORS_CONF(14),
_SC_NPROCESSORS_ONLN(15),
_SC_2_PBS(724),
_SC_2_PBS_ACCOUNTING(725),
_SC_2_PBS_CHECKPOINT(726),
_SC_2_PBS_LOCATE(728),
_SC_2_PBS_MESSAGE(729),
_SC_2_PBS_TRACK(730),
_SC_ADVISORY_INFO(731),
_SC_BARRIERS(732),
_SC_CLOCK_SELECTION(733),
_SC_CPUTIME(734),
// _SC_FILE_LOCKING not defined
_SC_GETGR_R_SIZE_MAX(569),
_SC_GETPW_R_SIZE_MAX(570),
_SC_HOST_NAME_MAX(735),
_SC_LOGIN_NAME_MAX(571),
_SC_MONOTONIC_CLOCK(736),
_SC_MQ_PRIO_MAX(30),
_SC_READER_WRITER_LOCKS(737),
_SC_REGEXP(738),
_SC_SHELL(739),
_SC_SPAWN(740),
_SC_SPIN_LOCKS(741),
_SC_SPORADIC_SERVER(742),
_SC_THREAD_ATTR_STACKADDR(577),
_SC_THREAD_ATTR_STACKSIZE(578),
_SC_THREAD_CPUTIME(745),
_SC_THREAD_DESTRUCTOR_ITERATIONS(568),
_SC_THREAD_KEYS_MAX(572),
_SC_THREAD_PRIO_INHERIT(580),
_SC_THREAD_PRIO_PROTECT(581),
_SC_THREAD_PRIORITY_SCHEDULING(579),
_SC_THREAD_PROCESS_SHARED(582),
_SC_THREAD_SAFE_FUNCTIONS(583),
_SC_THREAD_SPORADIC_SERVER(746),
_SC_THREAD_STACK_MIN(573),
_SC_THREAD_THREADS_MAX(574),
_SC_TIMEOUTS(747),
_SC_THREADS(576),
_SC_TRACE(748),
_SC_TRACE_EVENT_FILTER(749),
_SC_TRACE_INHERIT(751),
_SC_TRACE_LOG(752),
_SC_TTY_NAME_MAX(575),
_SC_TYPED_MEMORY_OBJECTS(756),
_SC_V6_ILP32_OFF32(757),
_SC_V6_ILP32_OFFBIG(758),
_SC_V6_LP64_OFF64(759),
_SC_V6_LPBIG_OFFBIG(760),
_SC_IPV6(762),
_SC_RAW_SOCKETS(763),
_SC_SYMLOOP_MAX(744),
_SC_ATEXIT_MAX(76),
_SC_IOV_MAX(77),
_SC_PAGE_SIZE(11),
_SC_XOPEN_CRYPT(62),
_SC_XOPEN_ENH_I18N(63),
_SC_XOPEN_LEGACY(717),
_SC_XOPEN_REALTIME(718),
_SC_XOPEN_REALTIME_THREADS(719),
_SC_XOPEN_SHM(64),
_SC_XOPEN_STREAMS(761),
_SC_XOPEN_UNIX(78),
_SC_XOPEN_VERSION(12),
_SC_XOPEN_XCU_VERSION(67),
_SC_XBS5_ILP32_OFF32(720),
_SC_XBS5_ILP32_OFFBIG(721),
_SC_XBS5_LP64_OFF64(722),
_SC_XBS5_LPBIG_OFFBIG(723),
_SC_SS_REPL_MAX(743),
_SC_TRACE_EVENT_NAME_MAX(750),
_SC_TRACE_NAME_MAX(753),
_SC_TRACE_SYS_MAX(754),
_SC_TRACE_USER_EVENT_MAX(755),
_SC_PASS_MAX(9);
private final int value;
private Sysconf(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 763;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/sunos/TCP.java 0000664 0000000 0000000 00000001637 12442353370 0030670 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 23:19:35 +0000 2009
package jnr.constants.platform.sunos;
public enum TCP implements jnr.constants.Constant {
TCP_MSS(536),
// TCP_MAX_SACK not defined
// TCP_MINMSS not defined
// TCP_MINMSSOVERLOAD not defined
// TCP_MAXWIN not defined
// TCP_MAX_WINSHIFT not defined
// TCP_MAXBURST not defined
// TCP_MAXHLEN not defined
// TCP_MAXOLEN not defined
TCP_NODELAY(1),
TCP_MAXSEG(2),
// TCP_NOPUSH not defined
// TCP_NOOPT not defined
TCP_KEEPALIVE(8);
// TCP_NSTATES not defined
// TCP_RETRANSHZ not defined
private final int value;
private TCP(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 536;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/sunos/WaitFlags.java 0000664 0000000 0000000 00000001174 12442353370 0032117 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Feb 23 23:19:36 +0000 2009
package jnr.constants.platform.sunos;
public enum WaitFlags implements jnr.constants.Constant {
WNOHANG(0x40),
WUNTRACED(0x4),
WSTOPPED(0x4),
WEXITED(0x1),
WCONTINUED(0x8),
WNOWAIT(0x80);
private final int value;
private WaitFlags(int value) { this.value = value; }
public static final long MIN_VALUE = 0x1;
public static final long MAX_VALUE = 0x80;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/windows/ 0000775 0000000 0000000 00000000000 12442353370 0027713 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/windows/Errno.java 0000664 0000000 0000000 00000010217 12442353370 0031644 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Dec 28 13:51:49 +0100 2009
package jnr.constants.platform.windows;
public enum Errno implements jnr.constants.Constant {
E2BIG(7),
// ENOMSG not defined
// ENETDOWN not defined
// ECONNABORTED not defined
ENFILE(23),
// ESHUTDOWN not defined
// ENETUNREACH not defined
EPERM(1),
EDEADLK(36),
EBADF(9),
EMFILE(24),
// EADDRNOTAVAIL not defined
// EREMOTE not defined
// ETIMEDOUT not defined
// EMSGSIZE not defined
ENXIO(6),
// EMULTIHOP not defined
// EHOSTDOWN not defined
// EOPNOTSUPP not defined
ECHILD(10),
ERANGE(34),
// ELOOP not defined
// ESTALE not defined
EBUSY(16),
// ENOBUFS not defined
EAGAIN(11),
// ETIME not defined
// EALREADY not defined
// ETXTBSY not defined
ESPIPE(29),
// EPROTONOSUPPORT not defined
// EPROTO not defined
EFBIG(27),
EINVAL(22),
// ENOTSOCK not defined
// EHOSTUNREACH not defined
// ENOSTR not defined
// ETOOMANYREFS not defined
// EAFNOSUPPORT not defined
EXDEV(18),
// EDESTADDRREQ not defined
// ENOTCONN not defined
EACCES(13),
// ECONNRESET not defined
EIO(5),
// ENOSR not defined
// ENODATA not defined
EDOM(33),
// ENOPROTOOPT not defined
// EINPROGRESS not defined
// EADDRINUSE not defined
ENOTEMPTY(41),
// EWOULDBLOCK not defined
// ENOTBLK not defined
ENOLCK(39),
// EDQUOT not defined
EINTR(4),
ENOTDIR(20),
EROFS(30),
// ECONNREFUSED not defined
// EBADMSG not defined
EISDIR(21),
ENOMEM(12),
ENODEV(19),
ENOSPC(28),
// ENOLINK not defined
// EISCONN not defined
// ESOCKTNOSUPPORT not defined
ENOEXEC(8),
// ENETRESET not defined
// EIDRM not defined
ENOSYS(40),
EEXIST(17),
ENOTTY(25),
ENAMETOOLONG(38),
EPIPE(32),
// EOVERFLOW not defined
// EUSERS not defined
// EPFNOSUPPORT not defined
ESRCH(3),
// EPROTOTYPE not defined
EILSEQ(42),
EFAULT(14),
ENOENT(2),
EMLINK(31);
private final int value;
private Errno(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 42;
static final class StringTable {
public static final java.util.Map descriptions = generateTable();
public static final java.util.Map generateTable() {
java.util.Map map = new java.util.EnumMap(Errno.class);
map.put(E2BIG, "Arg list too long");
map.put(ENFILE, "Too many open files in system");
map.put(EPERM, "Operation not permitted");
map.put(EDEADLK, "Resource deadlock avoided");
map.put(EBADF, "Bad file descriptor");
map.put(EMFILE, "Too many open files");
map.put(ENXIO, "No such device or address");
map.put(ECHILD, "No child processes");
map.put(ERANGE, "Result too large");
map.put(EBUSY, "Resource device");
map.put(EAGAIN, "Resource temporarily unavailable");
map.put(ESPIPE, "Invalid seek");
map.put(EFBIG, "File too large");
map.put(EINVAL, "Invalid argument");
map.put(EXDEV, "Improper link");
map.put(EACCES, "Permission denied");
map.put(EIO, "Input/output error");
map.put(EDOM, "Domain error");
map.put(ENOTEMPTY, "Directory not empty");
map.put(ENOLCK, "No locks available");
map.put(EINTR, "Interrupted function call");
map.put(ENOTDIR, "Not a directory");
map.put(EROFS, "Read-only file system");
map.put(EISDIR, "Is a directory");
map.put(ENOMEM, "Not enough space");
map.put(ENODEV, "No such device");
map.put(ENOSPC, "No space left on device");
map.put(ENOEXEC, "Exec format error");
map.put(ENOSYS, "Function not implemented");
map.put(EEXIST, "File exists");
map.put(ENOTTY, "Inappropriate I/O control operation");
map.put(ENAMETOOLONG, "Filename too long");
map.put(EPIPE, "Broken pipe");
map.put(ESRCH, "No such process");
map.put(EILSEQ, "Illegal byte sequence");
map.put(EFAULT, "Bad address");
map.put(ENOENT, "No such file or directory");
map.put(EMLINK, "Too many links");
return map;
}
}
public final String toString() { return StringTable.descriptions.get(this); }
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/windows/LastError.java 0000664 0000000 0000000 00000042237 12442353370 0032503 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Sat Apr 17 21:01:31 -0700 2010
package jnr.constants.platform.windows;
public enum LastError implements jnr.constants.Constant {
ERROR_INVALID_FUNCTION(1),
ERROR_FILE_NOT_FOUND(2),
ERROR_PATH_NOT_FOUND(3),
ERROR_TOO_MANY_OPEN_FILES(4),
ERROR_ACCESS_DENIED(5),
ERROR_INVALID_HANDLE(6),
ERROR_ARENA_TRASHED(7),
ERROR_NOT_ENOUGH_MEMORY(8),
ERROR_INVALID_BLOCK(9),
ERROR_BAD_ENVIRONMENT(10),
ERROR_BAD_FORMAT(11),
ERROR_INVALID_ACCESS(12),
ERROR_INVALID_DATA(13),
ERROR_INVALID_DRIVE(15),
ERROR_CURRENT_DIRECTORY(16),
ERROR_NOT_SAME_DEVICE(17),
ERROR_NO_MORE_FILES(18),
ERROR_WRITE_PROTECT(19),
ERROR_BAD_UNIT(20),
ERROR_NOT_READY(21),
ERROR_BAD_COMMAND(22),
ERROR_CRC(23),
ERROR_BAD_LENGTH(24),
ERROR_SEEK(25),
ERROR_NOT_DOS_DISK(26),
ERROR_SECTOR_NOT_FOUND(27),
ERROR_OUT_OF_PAPER(28),
ERROR_WRITE_FAULT(29),
ERROR_READ_FAULT(30),
ERROR_GEN_FAILURE(31),
ERROR_LOCK_VIOLATION(33),
ERROR_SHARING_VIOLATION(32),
ERROR_WRONG_DISK(34),
ERROR_SHARING_BUFFER_EXCEEDED(36),
ERROR_BAD_NETPATH(53),
ERROR_NETWORK_ACCESS_DENIED(65),
ERROR_BAD_NET_NAME(67),
ERROR_FILE_EXISTS(80),
ERROR_CANNOT_MAKE(82),
ERROR_FAIL_I24(83),
ERROR_INVALID_PARAMETER(87),
ERROR_NO_PROC_SLOTS(89),
ERROR_DRIVE_LOCKED(108),
ERROR_BROKEN_PIPE(109),
ERROR_DISK_FULL(112),
ERROR_INVALID_TARGET_HANDLE(114),
ERROR_WAIT_NO_CHILDREN(128),
ERROR_CHILD_NOT_COMPLETE(129),
ERROR_DIRECT_ACCESS_HANDLE(130),
ERROR_NEGATIVE_SEEK(131),
ERROR_SEEK_ON_DEVICE(132),
ERROR_DIR_NOT_EMPTY(145),
ERROR_DIRECTORY(267),
ERROR_NOT_LOCKED(158),
ERROR_BAD_PATHNAME(161),
ERROR_MAX_THRDS_REACHED(164),
ERROR_LOCK_FAILED(167),
ERROR_ALREADY_EXISTS(183),
ERROR_INVALID_STARTING_CODESEG(188),
ERROR_INVALID_STACKSEG(189),
ERROR_INVALID_MODULETYPE(190),
ERROR_INVALID_EXE_SIGNATURE(191),
ERROR_EXE_MARKED_INVALID(192),
ERROR_BAD_EXE_FORMAT(193),
ERROR_ITERATED_DATA_EXCEEDS_64k(194),
ERROR_INVALID_MINALLOCSIZE(195),
ERROR_DYNLINK_FROM_INVALID_RING(196),
ERROR_IOPL_NOT_ENABLED(197),
ERROR_INVALID_SEGDPL(198),
ERROR_AUTODATASEG_EXCEEDS_64k(199),
ERROR_RING2SEG_MUST_BE_MOVABLE(200),
ERROR_RELOC_CHAIN_XEEDS_SEGLIM(201),
ERROR_INFLOOP_IN_RELOC_CHAIN(202),
ERROR_FILENAME_EXCED_RANGE(206),
ERROR_NESTING_NOT_ALLOWED(215),
// ERROR_PIPE_LOCAL not defined
ERROR_BAD_PIPE(230),
ERROR_PIPE_BUSY(231),
ERROR_NO_DATA(232),
ERROR_PIPE_NOT_CONNECTED(233),
ERROR_OPERATION_ABORTED(995),
ERROR_NOT_ENOUGH_QUOTA(1816),
ERROR_MOD_NOT_FOUND(126),
WSAEINTR(10004),
WSAEBADF(10009),
WSAEACCES(10013),
WSAEFAULT(10014),
WSAEINVAL(10022),
WSAEMFILE(10024),
WSAEWOULDBLOCK(10035),
WSAEINPROGRESS(10036),
WSAEALREADY(10037),
WSAENOTSOCK(10038),
WSAEDESTADDRREQ(10039),
WSAEMSGSIZE(10040),
WSAEPROTOTYPE(10041),
WSAENOPROTOOPT(10042),
WSAEPROTONOSUPPORT(10043),
WSAESOCKTNOSUPPORT(10044),
WSAEOPNOTSUPP(10045),
WSAEPFNOSUPPORT(10046),
WSAEAFNOSUPPORT(10047),
WSAEADDRINUSE(10048),
WSAEADDRNOTAVAIL(10049),
WSAENETDOWN(10050),
WSAENETUNREACH(10051),
WSAENETRESET(10052),
WSAECONNABORTED(10053),
WSAECONNRESET(10054),
WSAENOBUFS(10055),
WSAEISCONN(10056),
WSAENOTCONN(10057),
WSAESHUTDOWN(10058),
WSAETOOMANYREFS(10059),
WSAETIMEDOUT(10060),
WSAECONNREFUSED(10061),
WSAELOOP(10062),
WSAENAMETOOLONG(10063),
WSAEHOSTDOWN(10064),
WSAEHOSTUNREACH(10065),
WSAENOTEMPTY(10066),
WSAEPROCLIM(10067),
WSAEUSERS(10068),
WSAEDQUOT(10069),
WSAESTALE(10070),
WSAEREMOTE(10071),
WSASYSNOTREADY(10091),
WSAVERNOTSUPPORTED(10092),
WSANOTINITIALISED(10093),
WSAEDISCON(10101),
WSAENOMORE(10102),
WSAECANCELLED(10103),
WSAEINVALIDPROCTABLE(10104),
WSAEINVALIDPROVIDER(10105),
WSAEPROVIDERFAILEDINIT(10106),
WSASYSCALLFAILURE(10107),
WSASERVICE_NOT_FOUND(10108),
WSATYPE_NOT_FOUND(10109),
WSA_E_NO_MORE(10110),
WSA_E_CANCELLED(10111),
WSAEREFUSED(10112),
WSAHOST_NOT_FOUND(11001),
WSATRY_AGAIN(11002),
WSANO_RECOVERY(11003),
WSANO_DATA(11004);
private final int value;
private LastError(int value) { this.value = value; }
public static final long MIN_VALUE = 1;
public static final long MAX_VALUE = 11004;
static final class StringTable {
public static final java.util.Map descriptions = generateTable();
public static final java.util.Map generateTable() {
java.util.Map map = new java.util.EnumMap(LastError.class);
map.put(ERROR_INVALID_FUNCTION, "Incorrect function");
map.put(ERROR_FILE_NOT_FOUND, "The system cannot find the file specified");
map.put(ERROR_PATH_NOT_FOUND, "The system cannot find the path specified");
map.put(ERROR_TOO_MANY_OPEN_FILES, "The system cannot open the file");
map.put(ERROR_ACCESS_DENIED, "Access is denied");
map.put(ERROR_INVALID_HANDLE, "The handle is invalid");
map.put(ERROR_ARENA_TRASHED, "The storage control blocks were destroyed");
map.put(ERROR_NOT_ENOUGH_MEMORY, "Not enough storage is available to process this command");
map.put(ERROR_INVALID_BLOCK, "The storage control block address is invalid");
map.put(ERROR_BAD_ENVIRONMENT, "The environment is incorrect");
map.put(ERROR_BAD_FORMAT, "An attempt was made to load a program with an incorrect format");
map.put(ERROR_INVALID_ACCESS, "The access code is invalid");
map.put(ERROR_INVALID_DATA, "The data is invalid");
map.put(ERROR_INVALID_DRIVE, "The system cannot find the drive specified");
map.put(ERROR_CURRENT_DIRECTORY, "The directory cannot be removed");
map.put(ERROR_NOT_SAME_DEVICE, "The system cannot move the file to a different disk drive");
map.put(ERROR_NO_MORE_FILES, "There are no more files");
map.put(ERROR_WRITE_PROTECT, "The media is write protected");
map.put(ERROR_BAD_UNIT, "The system cannot find the device specified");
map.put(ERROR_NOT_READY, "The device is not ready");
map.put(ERROR_BAD_COMMAND, "The device does not recognize the command");
map.put(ERROR_CRC, "Data error (cyclic redundancy check)");
map.put(ERROR_BAD_LENGTH, "The program issued a command but the command length is incorrect");
map.put(ERROR_SEEK, "The drive cannot locate a specific area or track on the disk");
map.put(ERROR_NOT_DOS_DISK, "The specified disk or diskette cannot be accessed");
map.put(ERROR_SECTOR_NOT_FOUND, "The drive cannot find the sector requested");
map.put(ERROR_OUT_OF_PAPER, "The printer is out of paper");
map.put(ERROR_WRITE_FAULT, "The system cannot write to the specified device");
map.put(ERROR_READ_FAULT, "The system cannot read from the specified device");
map.put(ERROR_GEN_FAILURE, "A device attached to the system is not functioning");
map.put(ERROR_LOCK_VIOLATION, "The process cannot access the file because another process has locked a portion of the file");
map.put(ERROR_SHARING_VIOLATION, "The process cannot access the file because it is being used by another process");
map.put(ERROR_WRONG_DISK, "ERROR_WRONG_DISK");
map.put(ERROR_SHARING_BUFFER_EXCEEDED, "Too many files opened for sharing");
map.put(ERROR_BAD_NETPATH, "The network path was not found");
map.put(ERROR_NETWORK_ACCESS_DENIED, "Network access is denied");
map.put(ERROR_BAD_NET_NAME, "The network name cannot be found");
map.put(ERROR_FILE_EXISTS, "The file exists");
map.put(ERROR_CANNOT_MAKE, "The directory or file cannot be created");
map.put(ERROR_FAIL_I24, "Fail on INT 24");
map.put(ERROR_INVALID_PARAMETER, "The parameter is incorrect");
map.put(ERROR_NO_PROC_SLOTS, "The system cannot start another process at this time");
map.put(ERROR_DRIVE_LOCKED, "The disk is in use or locked by another process");
map.put(ERROR_BROKEN_PIPE, "The pipe has been ended");
map.put(ERROR_DISK_FULL, "There is not enough space on the disk");
map.put(ERROR_INVALID_TARGET_HANDLE, "The target internal file identifier is incorrect");
map.put(ERROR_WAIT_NO_CHILDREN, "There are no child processes to wait for");
map.put(ERROR_CHILD_NOT_COMPLETE, "ERROR_CHILD_NOT_COMPLETE");
map.put(ERROR_DIRECT_ACCESS_HANDLE, "Attempt to use a file handle to an open disk partition for an operation other than raw disk I/O");
map.put(ERROR_NEGATIVE_SEEK, "An attempt was made to move the file pointer before the beginning of the file");
map.put(ERROR_SEEK_ON_DEVICE, "The file pointer cannot be set on the specified device or file");
map.put(ERROR_DIR_NOT_EMPTY, "The directory is not empty");
map.put(ERROR_DIRECTORY, "The directory name is invalid");
map.put(ERROR_NOT_LOCKED, "The segment is already unlocked");
map.put(ERROR_BAD_PATHNAME, "The specified path is invalid");
map.put(ERROR_MAX_THRDS_REACHED, "No more threads can be created in the system");
map.put(ERROR_LOCK_FAILED, "Unable to lock a region of a file");
map.put(ERROR_ALREADY_EXISTS, "Cannot create a file when that file already exists");
map.put(ERROR_INVALID_STARTING_CODESEG, "ERROR_INVALID_STARTING_CODESEG");
map.put(ERROR_INVALID_STACKSEG, "ERROR_INVALID_STACKSEG");
map.put(ERROR_INVALID_MODULETYPE, "ERROR_INVALID_MODULETYPE");
map.put(ERROR_INVALID_EXE_SIGNATURE, "ERROR_INVALID_EXE_SIGNATURE");
map.put(ERROR_EXE_MARKED_INVALID, "ERROR_EXE_MARKED_INVALID");
map.put(ERROR_BAD_EXE_FORMAT, "ERROR_BAD_EXE_FORMAT");
map.put(ERROR_ITERATED_DATA_EXCEEDS_64k, "ERROR_ITERATED_DATA_EXCEEDS_64k");
map.put(ERROR_INVALID_MINALLOCSIZE, "ERROR_INVALID_MINALLOCSIZE");
map.put(ERROR_DYNLINK_FROM_INVALID_RING, "The operating system cannot run this application program");
map.put(ERROR_IOPL_NOT_ENABLED, "The operating system is not presently configured to run this application");
map.put(ERROR_INVALID_SEGDPL, "ERROR_INVALID_SEGDPL");
map.put(ERROR_AUTODATASEG_EXCEEDS_64k, "The operating system cannot run this application program");
map.put(ERROR_RING2SEG_MUST_BE_MOVABLE, "The code segment cannot be greater than or equal to 64K");
map.put(ERROR_RELOC_CHAIN_XEEDS_SEGLIM, "ERROR_RELOC_CHAIN_XEEDS_SEGLIM");
map.put(ERROR_INFLOOP_IN_RELOC_CHAIN, "ERROR_INFLOOP_IN_RELOC_CHAIN");
map.put(ERROR_FILENAME_EXCED_RANGE, "The filename or extension is too long");
map.put(ERROR_NESTING_NOT_ALLOWED, "Cannot nest calls to LoadModule");
map.put(ERROR_BAD_PIPE, "The pipe state is invalid");
map.put(ERROR_PIPE_BUSY, "All pipe instances are busy");
map.put(ERROR_NO_DATA, "The pipe is being closed");
map.put(ERROR_PIPE_NOT_CONNECTED, "No process is on the other end of the pipe");
map.put(ERROR_OPERATION_ABORTED, "The I/O operation has been aborted because of either a thread exit or an application request");
map.put(ERROR_NOT_ENOUGH_QUOTA, "Not enough quota is available to process this command");
map.put(ERROR_MOD_NOT_FOUND, "The specified module could not be found");
map.put(WSAEINTR, "A blocking operation was interrupted by a call to WSACancelBlockingCall");
map.put(WSAEBADF, "The file handle supplied is not valid");
map.put(WSAEACCES, "An attempt was made to access a socket in a way forbidden by its access permissions");
map.put(WSAEFAULT, "The system detected an invalid pointer address in attempting to use a pointer argument in a call");
map.put(WSAEINVAL, "An invalid argument was supplied");
map.put(WSAEMFILE, "Too many open sockets");
map.put(WSAEWOULDBLOCK, "A non-blocking socket operation could not be completed immediately");
map.put(WSAEINPROGRESS, "A blocking operation is currently executing");
map.put(WSAEALREADY, "An operation was attempted on a non-blocking socket that already had an operation in progress");
map.put(WSAENOTSOCK, "An operation was attempted on something that is not a socket");
map.put(WSAEDESTADDRREQ, "A required address was omitted from an operation on a socket");
map.put(WSAEMSGSIZE, "A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself");
map.put(WSAEPROTOTYPE, "A protocol was specified in the socket function call that does not support the semantics of the socket type requested");
map.put(WSAENOPROTOOPT, "An unknown, invalid, or unsupported option or level was specified in a getsockopt or setsockopt call");
map.put(WSAEPROTONOSUPPORT, "The requested protocol has not been configured into the system, or no implementation for it exists");
map.put(WSAESOCKTNOSUPPORT, "The support for the specified socket type does not exist in this address family");
map.put(WSAEOPNOTSUPP, "The attempted operation is not supported for the type of object referenced");
map.put(WSAEPFNOSUPPORT, "The protocol family has not been configured into the system or no implementation for it exists");
map.put(WSAEAFNOSUPPORT, "An address incompatible with the requested protocol was used");
map.put(WSAEADDRINUSE, "Only one usage of each socket address (protocol/network address/port) is normally permitted");
map.put(WSAEADDRNOTAVAIL, "The requested address is not valid in its context");
map.put(WSAENETDOWN, "A socket operation encountered a dead network");
map.put(WSAENETUNREACH, "A socket operation was attempted to an unreachable network");
map.put(WSAENETRESET, "The connection has been broken due to keep-alive activity detecting a failure while the operation was in progress");
map.put(WSAECONNABORTED, "An established connection was aborted by the software in your host machine");
map.put(WSAECONNRESET, "An existing connection was forcibly closed by the remote host");
map.put(WSAENOBUFS, "An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full");
map.put(WSAEISCONN, "A connect request was made on an already connected socket");
map.put(WSAENOTCONN, "A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied");
map.put(WSAESHUTDOWN, "A request to send or receive data was disallowed because the socket had already been shut down in that direction with a previous shutdown call");
map.put(WSAETOOMANYREFS, "Too many references to some kernel object");
map.put(WSAETIMEDOUT, "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond");
map.put(WSAECONNREFUSED, "No connection could be made because the target machine actively refused it");
map.put(WSAELOOP, "Cannot translate name");
map.put(WSAENAMETOOLONG, "Name component or name was too long");
map.put(WSAEHOSTDOWN, "A socket operation failed because the destination host was down");
map.put(WSAEHOSTUNREACH, "A socket operation was attempted to an unreachable host");
map.put(WSAENOTEMPTY, "Cannot remove a directory that is not empty");
map.put(WSAEPROCLIM, "A Windows Sockets implementation may have a limit on the number of applications that may use it simultaneously");
map.put(WSAEUSERS, "Ran out of quota");
map.put(WSAEDQUOT, "Ran out of disk quota");
map.put(WSAESTALE, "File handle reference is no longer available");
map.put(WSAEREMOTE, "Item is not available locally");
map.put(WSASYSNOTREADY, "WSAStartup cannot function at this time because the underlying system it uses to provide network services is currently unavailable");
map.put(WSAVERNOTSUPPORTED, "The Windows Sockets version requested is not supported");
map.put(WSANOTINITIALISED, "Either the application has not called WSAStartup, or WSAStartup failed");
map.put(WSAEDISCON, "Returned by WSARecv or WSARecvFrom to indicate the remote party has initiated a graceful shutdown sequence");
map.put(WSAENOMORE, "No more results can be returned by WSALookupServiceNext");
map.put(WSAECANCELLED, "A call to WSALookupServiceEnd was made while this call was still processing. The call has been canceled");
map.put(WSAEINVALIDPROCTABLE, "The procedure call table is invalid");
map.put(WSAEINVALIDPROVIDER, "The requested service provider is invalid");
map.put(WSAEPROVIDERFAILEDINIT, "The requested service provider could not be loaded or initialized");
map.put(WSASYSCALLFAILURE, "A system call that should never fail has failed");
map.put(WSASERVICE_NOT_FOUND, "No such service is known. The service cannot be found in the specified name space");
map.put(WSATYPE_NOT_FOUND, "The specified class was not found");
map.put(WSA_E_NO_MORE, "No more results can be returned by WSALookupServiceNext");
map.put(WSA_E_CANCELLED, "A call to WSALookupServiceEnd was made while this call was still processing. The call has been canceled");
map.put(WSAEREFUSED, "A database query failed because it was actively refused");
map.put(WSAHOST_NOT_FOUND, "No such host is known");
map.put(WSATRY_AGAIN, "This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server");
map.put(WSANO_RECOVERY, "A non-recoverable error occurred during a database lookup");
map.put(WSANO_DATA, "The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for");
return map;
}
}
public final String toString() { return StringTable.descriptions.get(this); }
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/windows/OpenFlags.java 0000664 0000000 0000000 00000001710 12442353370 0032433 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Dec 28 13:23:34 +0100 2009
package jnr.constants.platform.windows;
public enum OpenFlags implements jnr.constants.Constant {
O_APPEND(8),
// O_NOCTTY not defined
// O_DIRECTORY not defined
// O_EVTONLY not defined
// O_SYNC not defined
O_ACCMODE(3),
O_CREAT(256),
// O_EXLOCK not defined
O_WRONLY(1),
O_EXCL(1024),
// O_ASYNC not defined
// O_SHLOCK not defined
// O_NONBLOCK not defined
O_RDONLY(0),
O_BINARY(32768),
// O_SYMLINK not defined
// O_NOFOLLOW not defined
// O_FSYNC not defined
O_RDWR(2),
O_TRUNC(512);
private final int value;
private OpenFlags(int value) { this.value = value; }
public static final long MIN_VALUE = 0;
public static final long MAX_VALUE = 32768;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/main/java/jnr/constants/platform/windows/Signal.java 0000664 0000000 0000000 00000002533 12442353370 0031776 0 ustar 00root root 0000000 0000000 // WARNING: This file is autogenerated. DO NOT EDIT!
// Generated Mon Dec 28 13:23:34 +0100 2009
package jnr.constants.platform.windows;
public enum Signal implements jnr.constants.Constant {
SIGTERM(15),
// SIGRTMIN not defined
// SIGTTIN not defined
// SIGPIPE not defined
SIGSEGV(11),
SIGABRT(22),
// SIGPROF not defined
// SIGTTOU not defined
// SIGTSTP not defined
// SIGSTOP not defined
// SIGCLD not defined
// SIGSTKFLT not defined
SIGFPE(8),
// SIGQUIT not defined
// SIGIO not defined
// SIGXCPU not defined
// SIGALRM not defined
// SIGUSR1 not defined
// SIGUSR2 not defined
SIGILL(4),
NSIG(23),
// SIGURG not defined
// SIGPWR not defined
SIGKILL(9),
// SIGBUS not defined
// SIGUNUSED not defined
// SIGPOLL not defined
// SIGWINCH not defined
// SIGCONT not defined
// SIGCHLD not defined
// SIGRTMAX not defined
// SIGSYS not defined
// SIGXFSZ not defined
// SIGTRAP not defined
// SIGIOT not defined
// SIGHUP not defined
// SIGVTALRM not defined
SIGINT(2);
private final int value;
private Signal(int value) { this.value = value; }
public static final long MIN_VALUE = 2;
public static final long MAX_VALUE = 23;
public final int value() { return value; }
public final int intValue() { return value; }
public final long longValue() { return value; }
public final boolean defined() { return true; }
}
jnr-constants-jnr-constants-0.8.6/src/test/ 0000775 0000000 0000000 00000000000 12442353370 0020702 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/test/java/ 0000775 0000000 0000000 00000000000 12442353370 0021623 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/test/java/jnr/ 0000775 0000000 0000000 00000000000 12442353370 0022414 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/test/java/jnr/constants/ 0000775 0000000 0000000 00000000000 12442353370 0024430 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/src/test/java/jnr/constants/DefinedTest.java 0000664 0000000 0000000 00000002331 12442353370 0027470 0 ustar 00root root 0000000 0000000 package jnr.constants;
import jnr.constants.platform.*;
import junit.framework.Assert;
import org.junit.Test;
/**
* Created by headius on 5/24/14.
*/
public class DefinedTest {
@Test
public void testDefined() throws Throwable {
// At least one constant should be undefined on any given platform, right?
boolean allDefined = true;
for (Constant[] constants : new Constant[][]{
AddressFamily.values(),
Errno.values(),
Fcntl.values(),
INAddr.values(),
IPProto.values(),
NameInfo.values(),
OpenFlags.values(),
PRIO.values(),
ProtocolFamily.values(),
RLIM.values(),
Shutdown.values(),
Signal.values(),
Sock.values(),
SocketLevel.values(),
SocketOption.values(),
Sysconf.values(),
TCP.values(),
WaitFlags.values()
}) for (Constant constant : AddressFamily.values()) {
allDefined = allDefined & constant.defined();
}
Assert.assertFalse("no constants were undefined", allDefined);
}
}
jnr-constants-jnr-constants-0.8.6/src/test/java/jnr/constants/ErrnoTest.java 0000664 0000000 0000000 00000004761 12442353370 0027230 0 ustar 00root root 0000000 0000000
package jnr.constants;
import jnr.constants.platform.Errno;
import jnr.constants.ConstantSet;
import java.util.EnumSet;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
/**
*
*/
public class ErrnoTest {
private ConstantSet constants;
public ErrnoTest() {
}
@BeforeClass
public static void setUpClass() throws Exception {
}
@AfterClass
public static void tearDownClass() throws Exception {
}
@Before
public void setUp() {
constants = ConstantSet.getConstantSet("Errno");
}
@After
public void tearDown() {
}
@Test public void intValue() {
for (Errno errno : EnumSet.allOf(Errno.class)) {
if (errno == Errno.__UNKNOWN_CONSTANT__) {
continue;
}
long val = constants.getValue(errno.name());
assertEquals("Incorrect integer value for " + errno.name() + ",", val, errno.longValue());
}
}
@Test public void valueOf() {
for (Errno errno : EnumSet.allOf(Errno.class)) {
if (errno == Errno.__UNKNOWN_CONSTANT__) {
continue;
}
Errno e = Errno.valueOf(errno.longValue());
assertEquals("Incorrect integer value for " + errno.name() + ",", errno.longValue(), e.longValue());
}
}
@Test public void description() {
for (Errno errno : Errno.values()) {
if (errno == Errno.__UNKNOWN_CONSTANT__) {
continue;
}
assertNotSame("Lack of description for " + errno.name(), errno.name(), errno.toString());
}
}
@Test public void expected() {
for (Errno e : new Errno[] {Errno.ENOENT, Errno.EINVAL, Errno.EISDIR}) {
assertNotSame(e.name() + " is unknown", Errno.__UNKNOWN_CONSTANT__, e);
}
}
@Test public void unknownConstant() {
Errno none = Errno.valueOf(~0);
assertEquals("Incorrect errno for unknown value", Errno.__UNKNOWN_CONSTANT__, none);
}
@Test public void reverseLookupCache() {
for (Errno errno : EnumSet.allOf(Errno.class)) {
if (errno == Errno.__UNKNOWN_CONSTANT__) {
continue;
}
Errno e1 = Errno.valueOf(errno.longValue());
Errno e2 = Errno.valueOf(errno.longValue());
assertEquals("Cached Enum values differ for " + errno.name() + ",", e1, e2);
}
}
} jnr-constants-jnr-constants-0.8.6/test/ 0000775 0000000 0000000 00000000000 12442353370 0020113 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/test/constantine/ 0000775 0000000 0000000 00000000000 12442353370 0022440 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/test/constantine/platform/ 0000775 0000000 0000000 00000000000 12442353370 0024264 5 ustar 00root root 0000000 0000000 jnr-constants-jnr-constants-0.8.6/test/constantine/platform/BitmaskTest.java 0000664 0000000 0000000 00000001632 12442353370 0027363 0 ustar 00root root 0000000 0000000
package constantine.platform;
import com.kenai.constantine.platform.OpenFlags;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
public class BitmaskTest {
public BitmaskTest() {
}
@BeforeClass
public static void setUpClass() throws Exception {
}
@AfterClass
public static void tearDownClass() throws Exception {
}
@Before
public void setUp() {
}
@After
public void tearDown() {
}
@Test public void openflags() {
int mask = 0;
for (OpenFlags f : OpenFlags.values()) {
if (f != OpenFlags.O_ACCMODE && f != OpenFlags.O_FSYNC) {
assertFalse("OpenFlag " + f.name() + " already found",
(mask & f.value()) != 0);
}
mask |= f.value();
}
}
}