[jnr-constants] 06/09: Imported Upstream version 0.8.5

Tim Potter tpot-guest at moszumanska.debian.org
Tue Feb 10 03:09:08 UTC 2015


This is an automated email from the git hooks/post-receive script.

tpot-guest pushed a commit to branch master
in repository jnr-constants.

commit d34d74141be966737d7b31ae4f6e8ce6cc50609b
Author: Tim Potter <tpot at hp.com>
Date:   Mon Dec 1 16:38:32 2014 +1100

    Imported Upstream version 0.8.5
---
 .classpath                                         |   8 +
 .gitignore                                         |   5 +
 .project                                           |  23 ++
 .settings/org.eclipse.jdt.core.prefs               |   6 +
 .settings/org.maven.ide.eclipse.prefs              |   9 +
 .travis.yml                                        |   4 +
 LICENSE                                            |  25 ++
 Rakefile                                           | 188 +++++++++++++
 gen/ConstGenerator.rb                              |   2 +
 gen/const/AddressFamily.rb                         |  50 ++++
 gen/const/Errno.rb                                 |  97 +++++++
 gen/const/Fcntl.rb                                 |  43 +++
 gen/const/INAddr.rb                                |  17 ++
 gen/const/IPProto.rb                               |  36 +++
 gen/const/LastError.rb                             | 161 +++++++++++
 gen/const/NameInfo.rb                              |  17 ++
 gen/const/OpenFlags.rb                             |  32 +++
 gen/const/PRIO.rb                                  |  13 +
 gen/const/ProtocolFamily.rb                        |  47 ++++
 gen/const/RLIM.rb                                  |  14 +
 gen/const/RLIMIT.rb                                |  28 ++
 gen/const/Shutdown.rb                              |  12 +
 gen/const/Signal.rb                                |  48 ++++
 gen/const/Sock.rb                                  |  14 +
 gen/const/SocketLevel.rb                           |  12 +
 gen/const/SocketOption.rb                          |  51 ++++
 gen/const/Sysconf.rb                               | 137 +++++++++
 gen/const/TCP.rb                                   |  26 ++
 gen/const/WaitFlags.rb                             |  15 +
 gen/const_generator.rb                             | 221 +++++++++++++++
 pom.xml                                            |  53 ++++
 src/main/java/com/kenai/constantine/Constant.java  |  29 ++
 .../java/com/kenai/constantine/ConstantSet.java    | 224 +++++++++++++++
 .../kenai/constantine/platform/AddressFamily.java  |  59 ++++
 .../constantine/platform/ConstantResolver.java     | 208 ++++++++++++++
 .../java/com/kenai/constantine/platform/Errno.java | 102 +++++++
 .../java/com/kenai/constantine/platform/Fcntl.java |  49 ++++
 .../com/kenai/constantine/platform/INAddr.java     |  25 ++
 .../com/kenai/constantine/platform/IPProto.java    |  45 +++
 .../com/kenai/constantine/platform/NameInfo.java   |  25 ++
 .../com/kenai/constantine/platform/OpenFlags.java  |  37 +++
 .../java/com/kenai/constantine/platform/PRIO.java  |  22 ++
 .../kenai/constantine/platform/ProtocolFamily.java |  56 ++++
 .../java/com/kenai/constantine/platform/RLIM.java  |  21 ++
 .../com/kenai/constantine/platform/RLIMIT.java     |  35 +++
 .../com/kenai/constantine/platform/Shutdown.java   |  20 ++
 .../com/kenai/constantine/platform/Signal.java     |  55 ++++
 .../java/com/kenai/constantine/platform/Sock.java  |  23 ++
 .../kenai/constantine/platform/SocketLevel.java    |  21 ++
 .../kenai/constantine/platform/SocketOption.java   |  59 ++++
 .../com/kenai/constantine/platform/Sysconf.java    | 145 ++++++++++
 .../java/com/kenai/constantine/platform/TCP.java   |  33 +++
 .../com/kenai/constantine/platform/WaitFlags.java  |  23 ++
 src/main/java/jnr/constants/Constant.java          |  30 ++
 src/main/java/jnr/constants/ConstantSet.java       | 232 +++++++++++++++
 src/main/java/jnr/constants/Platform.java          | 126 +++++++++
 .../java/jnr/constants/platform/AddressFamily.java |  57 ++++
 .../jnr/constants/platform/ConstantResolver.java   | 218 +++++++++++++++
 src/main/java/jnr/constants/platform/Errno.java    | 100 +++++++
 src/main/java/jnr/constants/platform/Fcntl.java    |  47 ++++
 src/main/java/jnr/constants/platform/INAddr.java   |  23 ++
 src/main/java/jnr/constants/platform/IPProto.java  |  43 +++
 src/main/java/jnr/constants/platform/NameInfo.java |  23 ++
 .../java/jnr/constants/platform/OpenFlags.java     |  35 +++
 src/main/java/jnr/constants/platform/PRIO.java     |  20 ++
 .../jnr/constants/platform/ProtocolFamily.java     |  54 ++++
 src/main/java/jnr/constants/platform/RLIM.java     |  19 ++
 src/main/java/jnr/constants/platform/RLIMIT.java   |  33 +++
 src/main/java/jnr/constants/platform/Shutdown.java |  18 ++
 src/main/java/jnr/constants/platform/Signal.java   |  53 ++++
 src/main/java/jnr/constants/platform/Sock.java     |  21 ++
 .../java/jnr/constants/platform/SocketLevel.java   |  19 ++
 .../java/jnr/constants/platform/SocketOption.java  |  57 ++++
 src/main/java/jnr/constants/platform/Sysconf.java  | 143 ++++++++++
 src/main/java/jnr/constants/platform/TCP.java      |  31 +++
 .../java/jnr/constants/platform/WaitFlags.java     |  21 ++
 .../constants/platform/darwin/AddressFamily.java   |  54 ++++
 .../java/jnr/constants/platform/darwin/Errno.java  | 190 +++++++++++++
 .../java/jnr/constants/platform/darwin/Fcntl.java  |  44 +++
 .../java/jnr/constants/platform/darwin/INAddr.java |  20 ++
 .../jnr/constants/platform/darwin/IPProto.java     |  40 +++
 .../jnr/constants/platform/darwin/NameInfo.java    |  20 ++
 .../jnr/constants/platform/darwin/OpenFlags.java   |  32 +++
 .../java/jnr/constants/platform/darwin/PRIO.java   |  17 ++
 .../constants/platform/darwin/ProtocolFamily.java  |  51 ++++
 .../java/jnr/constants/platform/darwin/RLIM.java   |  16 ++
 .../java/jnr/constants/platform/darwin/RLIMIT.java |  30 ++
 .../jnr/constants/platform/darwin/Shutdown.java    |  15 +
 .../java/jnr/constants/platform/darwin/Signal.java |  50 ++++
 .../java/jnr/constants/platform/darwin/Sock.java   |  18 ++
 .../jnr/constants/platform/darwin/SocketLevel.java |  16 ++
 .../constants/platform/darwin/SocketOption.java    |  54 ++++
 .../jnr/constants/platform/darwin/Sysconf.java     | 140 ++++++++++
 .../java/jnr/constants/platform/darwin/TCP.java    |  28 ++
 .../jnr/constants/platform/darwin/WaitFlags.java   |  18 ++
 .../jnr/constants/platform/fake/AddressFamily.java |  53 ++++
 .../java/jnr/constants/platform/fake/Errno.java    |  96 +++++++
 .../java/jnr/constants/platform/fake/Fcntl.java    |  43 +++
 .../java/jnr/constants/platform/fake/INAddr.java   |  19 ++
 .../java/jnr/constants/platform/fake/IPProto.java  |  39 +++
 .../java/jnr/constants/platform/fake/NameInfo.java |  19 ++
 .../jnr/constants/platform/fake/OpenFlags.java     |  31 +++
 .../java/jnr/constants/platform/fake/PRIO.java     |  16 ++
 .../constants/platform/fake/ProtocolFamily.java    |  50 ++++
 .../java/jnr/constants/platform/fake/RLIM.java     |  15 +
 .../java/jnr/constants/platform/fake/RLIMIT.java   |  29 ++
 .../java/jnr/constants/platform/fake/Shutdown.java |  14 +
 .../java/jnr/constants/platform/fake/Signal.java   |  49 ++++
 .../java/jnr/constants/platform/fake/Sock.java     |  17 ++
 .../jnr/constants/platform/fake/SocketLevel.java   |  15 +
 .../jnr/constants/platform/fake/SocketOption.java  |  53 ++++
 .../java/jnr/constants/platform/fake/Sysconf.java  | 139 +++++++++
 src/main/java/jnr/constants/platform/fake/TCP.java |  27 ++
 .../jnr/constants/platform/fake/WaitFlags.java     |  17 ++
 .../constants/platform/freebsd/AddressFamily.java  |  55 ++++
 .../java/jnr/constants/platform/freebsd/Errno.java | 187 +++++++++++++
 .../java/jnr/constants/platform/freebsd/Fcntl.java |  52 ++++
 .../jnr/constants/platform/freebsd/INAddr.java     |  21 ++
 .../jnr/constants/platform/freebsd/IPProto.java    |  41 +++
 .../jnr/constants/platform/freebsd/NameInfo.java   |  21 ++
 .../jnr/constants/platform/freebsd/OpenFlags.java  |  31 +++
 .../java/jnr/constants/platform/freebsd/PRIO.java  |  18 ++
 .../constants/platform/freebsd/ProtocolFamily.java |  52 ++++
 .../java/jnr/constants/platform/freebsd/RLIM.java  |  17 ++
 .../jnr/constants/platform/freebsd/RLIMIT.java     |  31 +++
 .../jnr/constants/platform/freebsd/Shutdown.java   |  16 ++
 .../jnr/constants/platform/freebsd/Signal.java     |  51 ++++
 .../java/jnr/constants/platform/freebsd/Sock.java  |  19 ++
 .../constants/platform/freebsd/SocketLevel.java    |  17 ++
 .../constants/platform/freebsd/SocketOption.java   |  55 ++++
 .../jnr/constants/platform/freebsd/Sysconf.java    | 141 ++++++++++
 .../java/jnr/constants/platform/freebsd/TCP.java   |  29 ++
 .../jnr/constants/platform/freebsd/WaitFlags.java  |  19 ++
 .../constants/platform/linux/AddressFamily.java    |  55 ++++
 .../java/jnr/constants/platform/linux/Errno.java   | 191 +++++++++++++
 .../java/jnr/constants/platform/linux/Fcntl.java   |  52 ++++
 .../java/jnr/constants/platform/linux/INAddr.java  |  21 ++
 .../java/jnr/constants/platform/linux/IPProto.java |  41 +++
 .../jnr/constants/platform/linux/NameInfo.java     |  21 ++
 .../jnr/constants/platform/linux/OpenFlags.java    |  31 +++
 .../java/jnr/constants/platform/linux/PRIO.java    |  18 ++
 .../constants/platform/linux/ProtocolFamily.java   |  52 ++++
 .../java/jnr/constants/platform/linux/RLIM.java    |  17 ++
 .../java/jnr/constants/platform/linux/RLIMIT.java  |  31 +++
 .../jnr/constants/platform/linux/Shutdown.java     |  16 ++
 .../java/jnr/constants/platform/linux/Signal.java  |  51 ++++
 .../java/jnr/constants/platform/linux/Sock.java    |  19 ++
 .../jnr/constants/platform/linux/SocketLevel.java  |  17 ++
 .../jnr/constants/platform/linux/SocketOption.java |  55 ++++
 .../java/jnr/constants/platform/linux/Sysconf.java | 141 ++++++++++
 .../java/jnr/constants/platform/linux/TCP.java     |  29 ++
 .../jnr/constants/platform/linux/WaitFlags.java    |  19 ++
 .../constants/platform/openbsd/AddressFamily.java  |  55 ++++
 .../java/jnr/constants/platform/openbsd/Errno.java | 183 ++++++++++++
 .../java/jnr/constants/platform/openbsd/Fcntl.java |  52 ++++
 .../jnr/constants/platform/openbsd/INAddr.java     |  21 ++
 .../jnr/constants/platform/openbsd/IPProto.java    |  41 +++
 .../jnr/constants/platform/openbsd/NameInfo.java   |  21 ++
 .../jnr/constants/platform/openbsd/OpenFlags.java  |  31 +++
 .../java/jnr/constants/platform/openbsd/PRIO.java  |  18 ++
 .../constants/platform/openbsd/ProtocolFamily.java |  52 ++++
 .../java/jnr/constants/platform/openbsd/RLIM.java  |  17 ++
 .../jnr/constants/platform/openbsd/RLIMIT.java     |  31 +++
 .../jnr/constants/platform/openbsd/Shutdown.java   |  16 ++
 .../jnr/constants/platform/openbsd/Signal.java     |  51 ++++
 .../java/jnr/constants/platform/openbsd/Sock.java  |  19 ++
 .../constants/platform/openbsd/SocketLevel.java    |  17 ++
 .../constants/platform/openbsd/SocketOption.java   |  55 ++++
 .../jnr/constants/platform/openbsd/Sysconf.java    | 141 ++++++++++
 .../java/jnr/constants/platform/openbsd/TCP.java   |  29 ++
 .../jnr/constants/platform/openbsd/WaitFlags.java  |  19 ++
 .../constants/platform/sunos/AddressFamily.java    |  55 ++++
 .../java/jnr/constants/platform/sunos/Errno.java   | 191 +++++++++++++
 .../java/jnr/constants/platform/sunos/Fcntl.java   |  52 ++++
 .../java/jnr/constants/platform/sunos/INAddr.java  |  21 ++
 .../java/jnr/constants/platform/sunos/IPProto.java |  41 +++
 .../jnr/constants/platform/sunos/NameInfo.java     |  21 ++
 .../jnr/constants/platform/sunos/OpenFlags.java    |  31 +++
 .../java/jnr/constants/platform/sunos/PRIO.java    |  18 ++
 .../constants/platform/sunos/ProtocolFamily.java   |  52 ++++
 .../java/jnr/constants/platform/sunos/RLIM.java    |  17 ++
 .../java/jnr/constants/platform/sunos/RLIMIT.java  |  31 +++
 .../jnr/constants/platform/sunos/Shutdown.java     |  16 ++
 .../java/jnr/constants/platform/sunos/Signal.java  |  51 ++++
 .../java/jnr/constants/platform/sunos/Sock.java    |  19 ++
 .../jnr/constants/platform/sunos/SocketLevel.java  |  17 ++
 .../jnr/constants/platform/sunos/SocketOption.java |  55 ++++
 .../java/jnr/constants/platform/sunos/Sysconf.java | 141 ++++++++++
 .../java/jnr/constants/platform/sunos/TCP.java     |  29 ++
 .../jnr/constants/platform/sunos/WaitFlags.java    |  19 ++
 .../java/jnr/constants/platform/windows/Errno.java | 144 ++++++++++
 .../jnr/constants/platform/windows/LastError.java  | 310 +++++++++++++++++++++
 .../jnr/constants/platform/windows/OpenFlags.java  |  33 +++
 .../jnr/constants/platform/windows/Signal.java     |  51 ++++
 src/test/java/jnr/constants/ErrnoTest.java         |  85 ++++++
 test/constantine/platform/BitmaskTest.java         |  44 +++
 196 files changed, 9910 insertions(+)

diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..a6476d7
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="build/classes" path="src"/>
+	<classpathentry kind="src" output="build/test/classes" path="test"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="output" path="build/classes"/>
+</classpath>
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..10ba75d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+build
+target
+nbproject/private
+dist
+/.settings/
\ No newline at end of file
diff --git a/.project b/.project
new file mode 100644
index 0000000..1abcb37
--- /dev/null
+++ b/.project
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>constantine</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..19d4e4a
--- /dev/null
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,6 @@
+#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
diff --git a/.settings/org.maven.ide.eclipse.prefs b/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 0000000..eca66ec
--- /dev/null
+++ b/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#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
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..21f8524
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,4 @@
+language: java
+jdk:
+  - oraclejdk7
+  - openjdk6
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..a3a8343
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,25 @@
+  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 <http://www.gnu.org/licenses/>.
diff --git a/Rakefile b/Rakefile
new file mode 100644
index 0000000..f5679f1
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,188 @@
+$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 "}"
+  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 "}"
+  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 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
diff --git a/gen/ConstGenerator.rb b/gen/ConstGenerator.rb
new file mode 100644
index 0000000..a2fd6f7
--- /dev/null
+++ b/gen/ConstGenerator.rb
@@ -0,0 +1,2 @@
+require 'gen/const_generator'
+ConstGenerator = Constantine::ConstGenerator
\ No newline at end of file
diff --git a/gen/const/AddressFamily.rb b/gen/const/AddressFamily.rb
new file mode 100644
index 0000000..c570df8
--- /dev/null
+++ b/gen/const/AddressFamily.rb
@@ -0,0 +1,50 @@
+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
diff --git a/gen/const/Errno.rb b/gen/const/Errno.rb
new file mode 100644
index 0000000..e14a4dc
--- /dev/null
+++ b/gen/const/Errno.rb
@@ -0,0 +1,97 @@
+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
diff --git a/gen/const/Fcntl.rb b/gen/const/Fcntl.rb
new file mode 100644
index 0000000..d7cb4df
--- /dev/null
+++ b/gen/const/Fcntl.rb
@@ -0,0 +1,43 @@
+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
diff --git a/gen/const/INAddr.rb b/gen/const/INAddr.rb
new file mode 100644
index 0000000..8e88853
--- /dev/null
+++ b/gen/const/INAddr.rb
@@ -0,0 +1,17 @@
+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
diff --git a/gen/const/IPProto.rb b/gen/const/IPProto.rb
new file mode 100644
index 0000000..f6b99ef
--- /dev/null
+++ b/gen/const/IPProto.rb
@@ -0,0 +1,36 @@
+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
diff --git a/gen/const/LastError.rb b/gen/const/LastError.rb
new file mode 100644
index 0000000..3b23804
--- /dev/null
+++ b/gen/const/LastError.rb
@@ -0,0 +1,161 @@
+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
diff --git a/gen/const/NameInfo.rb b/gen/const/NameInfo.rb
new file mode 100644
index 0000000..5ab2a22
--- /dev/null
+++ b/gen/const/NameInfo.rb
@@ -0,0 +1,17 @@
+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
\ No newline at end of file
diff --git a/gen/const/OpenFlags.rb b/gen/const/OpenFlags.rb
new file mode 100644
index 0000000..c9b1b26
--- /dev/null
+++ b/gen/const/OpenFlags.rb
@@ -0,0 +1,32 @@
+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
diff --git a/gen/const/PRIO.rb b/gen/const/PRIO.rb
new file mode 100644
index 0000000..b8eb7d8
--- /dev/null
+++ b/gen/const/PRIO.rb
@@ -0,0 +1,13 @@
+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
diff --git a/gen/const/ProtocolFamily.rb b/gen/const/ProtocolFamily.rb
new file mode 100644
index 0000000..bd17308
--- /dev/null
+++ b/gen/const/ProtocolFamily.rb
@@ -0,0 +1,47 @@
+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
\ No newline at end of file
diff --git a/gen/const/RLIM.rb b/gen/const/RLIM.rb
new file mode 100644
index 0000000..d8cf9f0
--- /dev/null
+++ b/gen/const/RLIM.rb
@@ -0,0 +1,14 @@
+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
\ No newline at end of file
diff --git a/gen/const/RLIMIT.rb b/gen/const/RLIMIT.rb
new file mode 100644
index 0000000..c91e6a2
--- /dev/null
+++ b/gen/const/RLIMIT.rb
@@ -0,0 +1,28 @@
+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
\ No newline at end of file
diff --git a/gen/const/Shutdown.rb b/gen/const/Shutdown.rb
new file mode 100644
index 0000000..e5f1f62
--- /dev/null
+++ b/gen/const/Shutdown.rb
@@ -0,0 +1,12 @@
+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
\ No newline at end of file
diff --git a/gen/const/Signal.rb b/gen/const/Signal.rb
new file mode 100644
index 0000000..73e752d
--- /dev/null
+++ b/gen/const/Signal.rb
@@ -0,0 +1,48 @@
+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
diff --git a/gen/const/Sock.rb b/gen/const/Sock.rb
new file mode 100644
index 0000000..1e25b1e
--- /dev/null
+++ b/gen/const/Sock.rb
@@ -0,0 +1,14 @@
+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
\ No newline at end of file
diff --git a/gen/const/SocketLevel.rb b/gen/const/SocketLevel.rb
new file mode 100644
index 0000000..9d3ad50
--- /dev/null
+++ b/gen/const/SocketLevel.rb
@@ -0,0 +1,12 @@
+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
\ No newline at end of file
diff --git a/gen/const/SocketOption.rb b/gen/const/SocketOption.rb
new file mode 100644
index 0000000..9b3153f
--- /dev/null
+++ b/gen/const/SocketOption.rb
@@ -0,0 +1,51 @@
+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
+    
diff --git a/gen/const/Sysconf.rb b/gen/const/Sysconf.rb
new file mode 100644
index 0000000..de027c8
--- /dev/null
+++ b/gen/const/Sysconf.rb
@@ -0,0 +1,137 @@
+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
diff --git a/gen/const/TCP.rb b/gen/const/TCP.rb
new file mode 100644
index 0000000..4ab620e
--- /dev/null
+++ b/gen/const/TCP.rb
@@ -0,0 +1,26 @@
+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
\ No newline at end of file
diff --git a/gen/const/WaitFlags.rb b/gen/const/WaitFlags.rb
new file mode 100644
index 0000000..a2f97c0
--- /dev/null
+++ b/gen/const/WaitFlags.rb
@@ -0,0 +1,15 @@
+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
diff --git a/gen/const_generator.rb b/gen/const_generator.rb
new file mode 100644
index 0000000..0c8ce3c
--- /dev/null
+++ b/gen/const_generator.rb
@@ -0,0 +1,221 @@
+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 <stdio.h>"
+
+        @includes.each do |inc|
+          f.puts "#include <#{inc}>"
+        end
+
+        f.puts "#include <stddef.h>\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
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..7b099c8
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,53 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.sonatype.oss</groupId>
+    <artifactId>oss-parent</artifactId>
+    <version>7</version>
+  </parent>
+
+  <groupId>com.github.jnr</groupId>
+  <artifactId>jnr-constants</artifactId>
+  <packaging>jar</packaging>
+  <version>0.8.5</version>
+  <name>jnr-constants</name>
+  <description>A set of platform constants (e.g. errno values)</description>
+  <url>http://github.com/jnr/jnr-constants</url>
+
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+
+  <scm>
+    <connection>scm:git:git at github.com:jnr/jnr-constants.git</connection>
+    <developerConnection>scm:git:git at github.com:jnr/jnr-constants.git</developerConnection>
+    <url>git at github.com:jnr/jnr-constants.git</url>
+  </scm>
+
+  <developers>
+    <developer>
+      <id>wmeissner</id>
+      <name>Wayne Meissner</name>
+      <email>wmeissner at gmail.com</email>
+    </developer>
+  </developers>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.8.2</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven.compiler.source>1.5</maven.compiler.source>
+    <maven.compiler.target>1.5</maven.compiler.target>
+  </properties>
+</project>
diff --git a/src/main/java/com/kenai/constantine/Constant.java b/src/main/java/com/kenai/constantine/Constant.java
new file mode 100644
index 0000000..4bfdcfb
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/Constant.java
@@ -0,0 +1,29 @@
+/*
+ * 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
+ */
+ at Deprecated
+public interface Constant extends jnr.constants.Constant {
+    int value();
+}
diff --git a/src/main/java/com/kenai/constantine/ConstantSet.java b/src/main/java/com/kenai/constantine/ConstantSet.java
new file mode 100644
index 0000000..21980b9
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/ConstantSet.java
@@ -0,0 +1,224 @@
+/*
+ * 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
+ */
+ at Deprecated
+public class ConstantSet extends AbstractSet<Constant> {
+    private final ConcurrentMap<String, Constant> nameToConstant;
+    private final ConcurrentMap<Integer, Constant> valueToConstant;
+    private final jnr.constants.ConstantSet constants;
+
+    private static final ConcurrentMap<String, ConstantSet> constantSets = new ConcurrentHashMap<String, ConstantSet>();
+    private static final Object lock = new Object();
+
+    /**
+     * Gets a <tt>ConstantSet</tt>
+     *
+     * @param name The name of the constant set to get.
+     * @return A <tt>ConstantSet</tt>.
+     */
+    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 <tt>ConstantSet</tt>
+     *
+     * @param constants The JNR constants to lookup real values in
+     */
+    @SuppressWarnings("unchecked")
+    private ConstantSet(jnr.constants.ConstantSet constants) {
+        nameToConstant = new ConcurrentHashMap<String, Constant>();
+        valueToConstant = new ConcurrentHashMap<Integer, Constant>();
+        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 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<Constant> {
+        private final Iterator<jnr.constants.Constant> 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<Constant> 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());
+    }
+}
diff --git a/src/main/java/com/kenai/constantine/platform/AddressFamily.java b/src/main/java/com/kenai/constantine/platform/AddressFamily.java
new file mode 100644
index 0000000..ece4b98
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/platform/AddressFamily.java
@@ -0,0 +1,59 @@
+// WARNING: This file is autogenerated. DO NOT EDIT!
+// Generated Sat May 02 18:23:28 +1000 2009
+package com.kenai.constantine.platform;
+ at 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<AddressFamily> 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 String toString() { return description(); }
+public final static AddressFamily valueOf(int value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/com/kenai/constantine/platform/ConstantResolver.java b/src/main/java/com/kenai/constantine/platform/ConstantResolver.java
new file mode 100644
index 0000000..f1c7520
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/platform/ConstantResolver.java
@@ -0,0 +1,208 @@
+/*
+ * 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
+ */
+ at Deprecated
+class ConstantResolver<E extends Enum<E>> {
+    public static final String __UNKNOWN_CONSTANT__ = "__UNKNOWN_CONSTANT__";
+    private final Object modLock = new Object();
+    private final Class<E> enumType;
+    private final Map<Integer, E> reverseLookupMap = new ConcurrentHashMap<Integer, E>();
+    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<E> enumType) {
+        this(enumType, Integer.MIN_VALUE, Integer.MIN_VALUE + 1000, false);
+    }
+
+    private ConstantResolver(Class<E> enumType, int firstUnknown, int lastUnknown, boolean bitmask) {
+        this.enumType = enumType;
+        this.nextUnknown = new AtomicInteger(firstUnknown);
+        this.lastUnknown = lastUnknown;
+        this.bitmask = bitmask;
+    }
+    
+    static final <T extends Enum<T>> ConstantResolver<T> getResolver(Class<T> enumType) {
+        return new ConstantResolver<T>(enumType);
+    }
+    static final <T extends Enum<T>> ConstantResolver<T> getResolver(Class<T> enumType, int first, int last) {
+        return new ConstantResolver<T>(enumType, first, last, false);
+    }
+
+    static final <T extends Enum<T>> ConstantResolver<T> getBitmaskResolver(Class<T> enumType) {
+        return new ConstantResolver<T>(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;
+        }
+        @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<E> 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;
+    }
+}
diff --git a/src/main/java/com/kenai/constantine/platform/Errno.java b/src/main/java/com/kenai/constantine/platform/Errno.java
new file mode 100644
index 0000000..96ddd65
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/platform/Errno.java
@@ -0,0 +1,102 @@
+// WARNING: This file is autogenerated. DO NOT EDIT!
+// Generated Sat May 02 18:23:29 +1000 2009
+package com.kenai.constantine.platform;
+ at 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<Errno> 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 String toString() { return description(); }
+public final static Errno valueOf(int value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/com/kenai/constantine/platform/Fcntl.java b/src/main/java/com/kenai/constantine/platform/Fcntl.java
new file mode 100644
index 0000000..c4df339
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/platform/Fcntl.java
@@ -0,0 +1,49 @@
+// WARNING: This file is autogenerated. DO NOT EDIT!
+// Generated Sat May 02 18:23:30 +1000 2009
+package com.kenai.constantine.platform;
+ at 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<Fcntl> 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 String toString() { return description(); }
+public final static Fcntl valueOf(int value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/com/kenai/constantine/platform/INAddr.java b/src/main/java/com/kenai/constantine/platform/INAddr.java
new file mode 100644
index 0000000..894d083
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/platform/INAddr.java
@@ -0,0 +1,25 @@
+// WARNING: This file is autogenerated. DO NOT EDIT!
+// Generated Sat May 02 18:23:30 +1000 2009
+package com.kenai.constantine.platform;
+ at 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<INAddr> 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 String toString() { return description(); }
+public final static INAddr valueOf(int value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/com/kenai/constantine/platform/IPProto.java b/src/main/java/com/kenai/constantine/platform/IPProto.java
new file mode 100644
index 0000000..2ba7e47
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/platform/IPProto.java
@@ -0,0 +1,45 @@
+// WARNING: This file is autogenerated. DO NOT EDIT!
+// Generated Sat May 02 18:23:30 +1000 2009
+package com.kenai.constantine.platform;
+ at 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<IPProto> 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 String toString() { return description(); }
+public final static IPProto valueOf(int value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/com/kenai/constantine/platform/NameInfo.java b/src/main/java/com/kenai/constantine/platform/NameInfo.java
new file mode 100644
index 0000000..b512d6a
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/platform/NameInfo.java
@@ -0,0 +1,25 @@
+// WARNING: This file is autogenerated. DO NOT EDIT!
+// Generated Sat May 02 18:23:32 +1000 2009
+package com.kenai.constantine.platform;
+ at 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<NameInfo> 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 String toString() { return description(); }
+public final static NameInfo valueOf(int value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/com/kenai/constantine/platform/OpenFlags.java b/src/main/java/com/kenai/constantine/platform/OpenFlags.java
new file mode 100644
index 0000000..79007a4
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/platform/OpenFlags.java
@@ -0,0 +1,37 @@
+// WARNING: This file is autogenerated. DO NOT EDIT!
+// Generated Sat May 02 18:23:29 +1000 2009
+package com.kenai.constantine.platform;
+ at 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<OpenFlags> 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 String toString() { return description(); }
+public final static OpenFlags valueOf(int value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/com/kenai/constantine/platform/PRIO.java b/src/main/java/com/kenai/constantine/platform/PRIO.java
new file mode 100644
index 0000000..c6c5d5a
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/platform/PRIO.java
@@ -0,0 +1,22 @@
+// WARNING: This file is autogenerated. DO NOT EDIT!
+// Generated Sat May 02 18:23:31 +1000 2009
+package com.kenai.constantine.platform;
+ at 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<PRIO> 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 String toString() { return description(); }
+public final static PRIO valueOf(int value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/com/kenai/constantine/platform/ProtocolFamily.java b/src/main/java/com/kenai/constantine/platform/ProtocolFamily.java
new file mode 100644
index 0000000..9676aac
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/platform/ProtocolFamily.java
@@ -0,0 +1,56 @@
+// WARNING: This file is autogenerated. DO NOT EDIT!
+// Generated Sat May 02 18:23:30 +1000 2009
+package com.kenai.constantine.platform;
+ at 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<ProtocolFamily> 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 String toString() { return description(); }
+public final static ProtocolFamily valueOf(int value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/com/kenai/constantine/platform/RLIM.java b/src/main/java/com/kenai/constantine/platform/RLIM.java
new file mode 100644
index 0000000..b09b5e3
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/platform/RLIM.java
@@ -0,0 +1,21 @@
+// WARNING: This file is autogenerated. DO NOT EDIT!
+// Generated Sat May 02 18:23:29 +1000 2009
+package com.kenai.constantine.platform;
+ at 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<RLIM> 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 String toString() { return description(); }
+public final static RLIM valueOf(int value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/com/kenai/constantine/platform/RLIMIT.java b/src/main/java/com/kenai/constantine/platform/RLIMIT.java
new file mode 100644
index 0000000..1701579
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/platform/RLIMIT.java
@@ -0,0 +1,35 @@
+// WARNING: This file is autogenerated. DO NOT EDIT!
+// Generated Sat May 02 18:23:30 +1000 2009
+package com.kenai.constantine.platform;
+ at 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<RLIMIT> 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 String toString() { return description(); }
+public final static RLIMIT valueOf(int value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/com/kenai/constantine/platform/Shutdown.java b/src/main/java/com/kenai/constantine/platform/Shutdown.java
new file mode 100644
index 0000000..c7fbf41
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/platform/Shutdown.java
@@ -0,0 +1,20 @@
+// WARNING: This file is autogenerated. DO NOT EDIT!
+// Generated Sat May 02 18:23:30 +1000 2009
+package com.kenai.constantine.platform;
+ at Deprecated
+public enum Shutdown implements com.kenai.constantine.Constant {
+SHUT_RD,
+SHUT_WR,
+SHUT_RDWR,
+__UNKNOWN_CONSTANT__;
+private static final ConstantResolver<Shutdown> 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 String toString() { return description(); }
+public final static Shutdown valueOf(int value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/com/kenai/constantine/platform/Signal.java b/src/main/java/com/kenai/constantine/platform/Signal.java
new file mode 100644
index 0000000..4254f93
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/platform/Signal.java
@@ -0,0 +1,55 @@
+// WARNING: This file is autogenerated. DO NOT EDIT!
+// Generated Sat May 02 18:23:29 +1000 2009
+package com.kenai.constantine.platform;
+ at 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<Signal> 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 String toString() { return description(); }
+public final static Signal valueOf(int value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/com/kenai/constantine/platform/Sock.java b/src/main/java/com/kenai/constantine/platform/Sock.java
new file mode 100644
index 0000000..b773b68
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/platform/Sock.java
@@ -0,0 +1,23 @@
+// WARNING: This file is autogenerated. DO NOT EDIT!
+// Generated Sat May 02 18:23:31 +1000 2009
+package com.kenai.constantine.platform;
+ at 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<Sock> 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 String toString() { return description(); }
+public final static Sock valueOf(int value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/com/kenai/constantine/platform/SocketLevel.java b/src/main/java/com/kenai/constantine/platform/SocketLevel.java
new file mode 100644
index 0000000..61064c7
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/platform/SocketLevel.java
@@ -0,0 +1,21 @@
+// WARNING: This file is autogenerated. DO NOT EDIT!
+// Generated Sat May 02 18:23:31 +1000 2009
+package com.kenai.constantine.platform;
+ at Deprecated
+public enum SocketLevel implements com.kenai.constantine.Constant {
+SOL_SOCKET,
+SOL_IP,
+SOL_TCP,
+SOL_UDP,
+__UNKNOWN_CONSTANT__;
+private static final ConstantResolver<SocketLevel> 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 String toString() { return description(); }
+public final static SocketLevel valueOf(int value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/com/kenai/constantine/platform/SocketOption.java b/src/main/java/com/kenai/constantine/platform/SocketOption.java
new file mode 100644
index 0000000..cd0da9c
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/platform/SocketOption.java
@@ -0,0 +1,59 @@
+// WARNING: This file is autogenerated. DO NOT EDIT!
+// Generated Sat May 02 18:23:31 +1000 2009
+package com.kenai.constantine.platform;
+ at 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<SocketOption> 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 String toString() { return description(); }
+public final static SocketOption valueOf(int value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/com/kenai/constantine/platform/Sysconf.java b/src/main/java/com/kenai/constantine/platform/Sysconf.java
new file mode 100644
index 0000000..9627bf4
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/platform/Sysconf.java
@@ -0,0 +1,145 @@
+// WARNING: This file is autogenerated. DO NOT EDIT!
+// Generated Sat May 02 18:23:28 +1000 2009
+package com.kenai.constantine.platform;
+ at 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<Sysconf> 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 String toString() { return description(); }
+public final static Sysconf valueOf(int value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/com/kenai/constantine/platform/TCP.java b/src/main/java/com/kenai/constantine/platform/TCP.java
new file mode 100644
index 0000000..a4c0df4
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/platform/TCP.java
@@ -0,0 +1,33 @@
+// WARNING: This file is autogenerated. DO NOT EDIT!
+// Generated Sat May 02 18:23:31 +1000 2009
+package com.kenai.constantine.platform;
+ at 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<TCP> 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 String toString() { return description(); }
+public final static TCP valueOf(int value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/com/kenai/constantine/platform/WaitFlags.java b/src/main/java/com/kenai/constantine/platform/WaitFlags.java
new file mode 100644
index 0000000..108ddfb
--- /dev/null
+++ b/src/main/java/com/kenai/constantine/platform/WaitFlags.java
@@ -0,0 +1,23 @@
+// WARNING: This file is autogenerated. DO NOT EDIT!
+// Generated Sat May 02 18:23:28 +1000 2009
+package com.kenai.constantine.platform;
+ at Deprecated
+public enum WaitFlags implements com.kenai.constantine.Constant {
+WNOHANG,
+WUNTRACED,
+WSTOPPED,
+WEXITED,
+WCONTINUED,
+WNOWAIT,
+__UNKNOWN_CONSTANT__;
+private static final ConstantResolver<WaitFlags> 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 String toString() { return description(); }
+public final static WaitFlags valueOf(int value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/jnr/constants/Constant.java b/src/main/java/jnr/constants/Constant.java
new file mode 100644
index 0000000..72f4879
--- /dev/null
+++ b/src/main/java/jnr/constants/Constant.java
@@ -0,0 +1,30 @@
+/*
+ * 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();
+}
diff --git a/src/main/java/jnr/constants/ConstantSet.java b/src/main/java/jnr/constants/ConstantSet.java
new file mode 100644
index 0000000..0ddac42
--- /dev/null
+++ b/src/main/java/jnr/constants/ConstantSet.java
@@ -0,0 +1,232 @@
+/*
+ * 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<Constant> {
+    private final Map<String, Constant> nameToConstant;
+    private final Map<Long, Constant> valueToConstant;
+    private final Set<Enum> constants;
+    private final Class<Enum> enumClass;
+    private volatile Long minValue;
+    private volatile Long maxValue;
+    
+    private static final ConcurrentMap<String, ConstantSet> constantSets
+            = new ConcurrentHashMap<String, ConstantSet>();
+    private static final Object lock = new Object();
+
+    /**
+     * Gets a <tt>ConstantSet</tt>
+     *
+     * @param name The name of the constant set to get.
+     * @return A <tt>ConstantSet</tt>.
+     */
+    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<Enum> 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<Enum> getEnumClass(String name) {
+        String[] prefixes = Platform.getPlatform().getPackagePrefixes();
+
+        for (String prefix : prefixes) {
+            try {
+                return (Class<Enum>) Class.forName(prefix + "." + name).asSubclass(Enum.class);
+            } catch (ClassNotFoundException ex) {
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Creates a new instance of <tt>ConstantSet</tt>
+     *
+     * @param enumClass The Enum subclass to load constants from.
+     */
+    @SuppressWarnings("unchecked")
+    private ConstantSet(Class<Enum> enumClass) {
+        this.enumClass = enumClass;
+        this.constants = EnumSet.allOf(enumClass);
+
+        Map<String, Constant> names = new HashMap<String, Constant>();
+        Map<Long, Constant> values = new HashMap<Long, Constant>();
+        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<Constant> {
+        private final Iterator<Enum> it;
+        private Constant next = null;
+        
+        ConstantIterator(Collection<Enum> 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<Constant> 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);
+    }
+}
diff --git a/src/main/java/jnr/constants/Platform.java b/src/main/java/jnr/constants/Platform.java
new file mode 100644
index 0000000..2e3cf09
--- /dev/null
+++ b/src/main/java/jnr/constants/Platform.java
@@ -0,0 +1,126 @@
+/*
+ * 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<String, String> OS_NAMES = new HashMap<String, String>() {{
+            put("Mac OS X", "darwin");
+        }
+        public static final long serialVersionUID = 1L;
+    };
+
+    public static final Map<String, String> ARCH_NAMES = new HashMap<String, String>() {{
+            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;
+        }
+    }
+}
diff --git a/src/main/java/jnr/constants/platform/AddressFamily.java b/src/main/java/jnr/constants/platform/AddressFamily.java
new file mode 100644
index 0000000..022ff5a
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/AddressFamily.java
@@ -0,0 +1,57 @@
+// 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<AddressFamily> 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 String toString() { return description(); }
+public static AddressFamily valueOf(long value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/jnr/constants/platform/ConstantResolver.java b/src/main/java/jnr/constants/platform/ConstantResolver.java
new file mode 100644
index 0000000..b4c6bca
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/ConstantResolver.java
@@ -0,0 +1,218 @@
+/*
+ * 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<E extends Enum<E>> {
+    public static final String __UNKNOWN_CONSTANT__ = "__UNKNOWN_CONSTANT__";
+    private final Object modLock = new Object();
+    private final Class<E> enumType;
+    private final Map<Long, E> reverseLookupMap = new ConcurrentHashMap<Long, E>();
+    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<E> enumType) {
+        this(enumType, Integer.MIN_VALUE, Integer.MIN_VALUE + 1000, false);
+    }
+
+    private ConstantResolver(Class<E> enumType, int firstUnknown, int lastUnknown, boolean bitmask) {
+        this.enumType = enumType;
+        this.nextUnknown = new AtomicLong(firstUnknown);
+        this.bitmask = bitmask;
+    }
+    
+    static <T extends Enum<T>> ConstantResolver<T> getResolver(Class<T> enumType) {
+        return new ConstantResolver<T>(enumType);
+    }
+
+    static <T extends Enum<T>> ConstantResolver<T> getResolver(Class<T> enumType, int first, int last) {
+        return new ConstantResolver<T>(enumType, first, last, false);
+    }
+
+    static <T extends Enum<T>> ConstantResolver<T> getBitmaskResolver(Class<T> enumType) {
+        return new ConstantResolver<T>(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;
+        }
+
+        @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<E> 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();
+    }
+
+
+    @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;
+    }
+}
diff --git a/src/main/java/jnr/constants/platform/Errno.java b/src/main/java/jnr/constants/platform/Errno.java
new file mode 100644
index 0000000..7ab96ed
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/Errno.java
@@ -0,0 +1,100 @@
+// 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<Errno> 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 String toString() { return description(); }
+public static Errno valueOf(long value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/jnr/constants/platform/Fcntl.java b/src/main/java/jnr/constants/platform/Fcntl.java
new file mode 100644
index 0000000..dc64304
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/Fcntl.java
@@ -0,0 +1,47 @@
+// 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<Fcntl> 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 String toString() { return description(); }
+public static Fcntl valueOf(long value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/jnr/constants/platform/INAddr.java b/src/main/java/jnr/constants/platform/INAddr.java
new file mode 100644
index 0000000..f184fac
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/INAddr.java
@@ -0,0 +1,23 @@
+// 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<INAddr> 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 String toString() { return description(); }
+public static INAddr valueOf(long value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/jnr/constants/platform/IPProto.java b/src/main/java/jnr/constants/platform/IPProto.java
new file mode 100644
index 0000000..45397d6
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/IPProto.java
@@ -0,0 +1,43 @@
+// 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<IPProto> 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 String toString() { return description(); }
+public static IPProto valueOf(long value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/jnr/constants/platform/NameInfo.java b/src/main/java/jnr/constants/platform/NameInfo.java
new file mode 100644
index 0000000..6350821
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/NameInfo.java
@@ -0,0 +1,23 @@
+// 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<NameInfo> 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 String toString() { return description(); }
+public static NameInfo valueOf(long value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/jnr/constants/platform/OpenFlags.java b/src/main/java/jnr/constants/platform/OpenFlags.java
new file mode 100644
index 0000000..7b5a288
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/OpenFlags.java
@@ -0,0 +1,35 @@
+// 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<OpenFlags> 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 String toString() { return description(); }
+public static OpenFlags valueOf(long value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/jnr/constants/platform/PRIO.java b/src/main/java/jnr/constants/platform/PRIO.java
new file mode 100644
index 0000000..ec9e715
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/PRIO.java
@@ -0,0 +1,20 @@
+// 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<PRIO> 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 String toString() { return description(); }
+public static PRIO valueOf(long value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/jnr/constants/platform/ProtocolFamily.java b/src/main/java/jnr/constants/platform/ProtocolFamily.java
new file mode 100644
index 0000000..4c50fff
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/ProtocolFamily.java
@@ -0,0 +1,54 @@
+// 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<ProtocolFamily> 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 String toString() { return description(); }
+public static ProtocolFamily valueOf(long value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/jnr/constants/platform/RLIM.java b/src/main/java/jnr/constants/platform/RLIM.java
new file mode 100644
index 0000000..1156e62
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/RLIM.java
@@ -0,0 +1,19 @@
+// 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<RLIM> 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 String toString() { return description(); }
+public static RLIM valueOf(long value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/jnr/constants/platform/RLIMIT.java b/src/main/java/jnr/constants/platform/RLIMIT.java
new file mode 100644
index 0000000..0e6bb9f
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/RLIMIT.java
@@ -0,0 +1,33 @@
+// 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<RLIMIT> 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 String toString() { return description(); }
+public static RLIMIT valueOf(long value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/jnr/constants/platform/Shutdown.java b/src/main/java/jnr/constants/platform/Shutdown.java
new file mode 100644
index 0000000..bc3fe09
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/Shutdown.java
@@ -0,0 +1,18 @@
+// 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<Shutdown> 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 String toString() { return description(); }
+public static Shutdown valueOf(long value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/jnr/constants/platform/Signal.java b/src/main/java/jnr/constants/platform/Signal.java
new file mode 100644
index 0000000..edf1137
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/Signal.java
@@ -0,0 +1,53 @@
+// 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<Signal> 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 String toString() { return description(); }
+public static Signal valueOf(long value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/jnr/constants/platform/Sock.java b/src/main/java/jnr/constants/platform/Sock.java
new file mode 100644
index 0000000..8dab686
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/Sock.java
@@ -0,0 +1,21 @@
+// 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<Sock> 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 String toString() { return description(); }
+public static Sock valueOf(long value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/jnr/constants/platform/SocketLevel.java b/src/main/java/jnr/constants/platform/SocketLevel.java
new file mode 100644
index 0000000..fcf5420
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/SocketLevel.java
@@ -0,0 +1,19 @@
+// 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<SocketLevel> 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 String toString() { return description(); }
+public static SocketLevel valueOf(long value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/jnr/constants/platform/SocketOption.java b/src/main/java/jnr/constants/platform/SocketOption.java
new file mode 100644
index 0000000..c299aa8
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/SocketOption.java
@@ -0,0 +1,57 @@
+// 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<SocketOption> 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 String toString() { return description(); }
+public static SocketOption valueOf(long value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/jnr/constants/platform/Sysconf.java b/src/main/java/jnr/constants/platform/Sysconf.java
new file mode 100644
index 0000000..125a015
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/Sysconf.java
@@ -0,0 +1,143 @@
+// 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<Sysconf> 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 String toString() { return description(); }
+public static Sysconf valueOf(long value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/jnr/constants/platform/TCP.java b/src/main/java/jnr/constants/platform/TCP.java
new file mode 100644
index 0000000..9f19364
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/TCP.java
@@ -0,0 +1,31 @@
+// 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<TCP> 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 String toString() { return description(); }
+public static TCP valueOf(long value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/jnr/constants/platform/WaitFlags.java b/src/main/java/jnr/constants/platform/WaitFlags.java
new file mode 100644
index 0000000..756d8af
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/WaitFlags.java
@@ -0,0 +1,21 @@
+// 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<WaitFlags> 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 String toString() { return description(); }
+public static WaitFlags valueOf(long value) { 
+    return resolver.valueOf(value);
+}
+}
diff --git a/src/main/java/jnr/constants/platform/darwin/AddressFamily.java b/src/main/java/jnr/constants/platform/darwin/AddressFamily.java
new file mode 100644
index 0000000..c375f36
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/darwin/AddressFamily.java
@@ -0,0 +1,54 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/darwin/Errno.java b/src/main/java/jnr/constants/platform/darwin/Errno.java
new file mode 100644
index 0000000..e13eba4
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/darwin/Errno.java
@@ -0,0 +1,190 @@
+// 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<Errno, String> descriptions = generateTable();
+  public static final java.util.Map<Errno, String> generateTable() {
+    java.util.Map<Errno, String> map = new java.util.EnumMap<Errno, String>(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; }
+}
diff --git a/src/main/java/jnr/constants/platform/darwin/Fcntl.java b/src/main/java/jnr/constants/platform/darwin/Fcntl.java
new file mode 100644
index 0000000..86e5f36
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/darwin/Fcntl.java
@@ -0,0 +1,44 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/darwin/INAddr.java b/src/main/java/jnr/constants/platform/darwin/INAddr.java
new file mode 100644
index 0000000..b975267
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/darwin/INAddr.java
@@ -0,0 +1,20 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/darwin/IPProto.java b/src/main/java/jnr/constants/platform/darwin/IPProto.java
new file mode 100644
index 0000000..bf82c7e
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/darwin/IPProto.java
@@ -0,0 +1,40 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/darwin/NameInfo.java b/src/main/java/jnr/constants/platform/darwin/NameInfo.java
new file mode 100644
index 0000000..99ad127
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/darwin/NameInfo.java
@@ -0,0 +1,20 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/darwin/OpenFlags.java b/src/main/java/jnr/constants/platform/darwin/OpenFlags.java
new file mode 100644
index 0000000..24b9142
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/darwin/OpenFlags.java
@@ -0,0 +1,32 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/darwin/PRIO.java b/src/main/java/jnr/constants/platform/darwin/PRIO.java
new file mode 100644
index 0000000..0f2690e
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/darwin/PRIO.java
@@ -0,0 +1,17 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/darwin/ProtocolFamily.java b/src/main/java/jnr/constants/platform/darwin/ProtocolFamily.java
new file mode 100644
index 0000000..1c8860c
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/darwin/ProtocolFamily.java
@@ -0,0 +1,51 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/darwin/RLIM.java b/src/main/java/jnr/constants/platform/darwin/RLIM.java
new file mode 100644
index 0000000..5351659
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/darwin/RLIM.java
@@ -0,0 +1,16 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/darwin/RLIMIT.java b/src/main/java/jnr/constants/platform/darwin/RLIMIT.java
new file mode 100644
index 0000000..8ceeefd
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/darwin/RLIMIT.java
@@ -0,0 +1,30 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/darwin/Shutdown.java b/src/main/java/jnr/constants/platform/darwin/Shutdown.java
new file mode 100644
index 0000000..9fdc9b4
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/darwin/Shutdown.java
@@ -0,0 +1,15 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/darwin/Signal.java b/src/main/java/jnr/constants/platform/darwin/Signal.java
new file mode 100644
index 0000000..ade3c7f
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/darwin/Signal.java
@@ -0,0 +1,50 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/darwin/Sock.java b/src/main/java/jnr/constants/platform/darwin/Sock.java
new file mode 100644
index 0000000..4b7104b
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/darwin/Sock.java
@@ -0,0 +1,18 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/darwin/SocketLevel.java b/src/main/java/jnr/constants/platform/darwin/SocketLevel.java
new file mode 100644
index 0000000..b56c355
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/darwin/SocketLevel.java
@@ -0,0 +1,16 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/darwin/SocketOption.java b/src/main/java/jnr/constants/platform/darwin/SocketOption.java
new file mode 100644
index 0000000..365a306
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/darwin/SocketOption.java
@@ -0,0 +1,54 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/darwin/Sysconf.java b/src/main/java/jnr/constants/platform/darwin/Sysconf.java
new file mode 100644
index 0000000..1ab2b60
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/darwin/Sysconf.java
@@ -0,0 +1,140 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/darwin/TCP.java b/src/main/java/jnr/constants/platform/darwin/TCP.java
new file mode 100644
index 0000000..26afb7d
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/darwin/TCP.java
@@ -0,0 +1,28 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/darwin/WaitFlags.java b/src/main/java/jnr/constants/platform/darwin/WaitFlags.java
new file mode 100644
index 0000000..5553b2c
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/darwin/WaitFlags.java
@@ -0,0 +1,18 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/fake/AddressFamily.java b/src/main/java/jnr/constants/platform/fake/AddressFamily.java
new file mode 100644
index 0000000..673a62d
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/fake/AddressFamily.java
@@ -0,0 +1,53 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/fake/Errno.java b/src/main/java/jnr/constants/platform/fake/Errno.java
new file mode 100644
index 0000000..ef71a6a
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/fake/Errno.java
@@ -0,0 +1,96 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/fake/Fcntl.java b/src/main/java/jnr/constants/platform/fake/Fcntl.java
new file mode 100644
index 0000000..6a88a1d
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/fake/Fcntl.java
@@ -0,0 +1,43 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/fake/INAddr.java b/src/main/java/jnr/constants/platform/fake/INAddr.java
new file mode 100644
index 0000000..a98edba
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/fake/INAddr.java
@@ -0,0 +1,19 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/fake/IPProto.java b/src/main/java/jnr/constants/platform/fake/IPProto.java
new file mode 100644
index 0000000..0665276
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/fake/IPProto.java
@@ -0,0 +1,39 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/fake/NameInfo.java b/src/main/java/jnr/constants/platform/fake/NameInfo.java
new file mode 100644
index 0000000..8a7f19a
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/fake/NameInfo.java
@@ -0,0 +1,19 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/fake/OpenFlags.java b/src/main/java/jnr/constants/platform/fake/OpenFlags.java
new file mode 100644
index 0000000..cea9cff
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/fake/OpenFlags.java
@@ -0,0 +1,31 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/fake/PRIO.java b/src/main/java/jnr/constants/platform/fake/PRIO.java
new file mode 100644
index 0000000..e969147
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/fake/PRIO.java
@@ -0,0 +1,16 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/fake/ProtocolFamily.java b/src/main/java/jnr/constants/platform/fake/ProtocolFamily.java
new file mode 100644
index 0000000..558111a
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/fake/ProtocolFamily.java
@@ -0,0 +1,50 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/fake/RLIM.java b/src/main/java/jnr/constants/platform/fake/RLIM.java
new file mode 100644
index 0000000..1134df9
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/fake/RLIM.java
@@ -0,0 +1,15 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/fake/RLIMIT.java b/src/main/java/jnr/constants/platform/fake/RLIMIT.java
new file mode 100644
index 0000000..0205a55
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/fake/RLIMIT.java
@@ -0,0 +1,29 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/fake/Shutdown.java b/src/main/java/jnr/constants/platform/fake/Shutdown.java
new file mode 100644
index 0000000..9f5b8d8
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/fake/Shutdown.java
@@ -0,0 +1,14 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/fake/Signal.java b/src/main/java/jnr/constants/platform/fake/Signal.java
new file mode 100644
index 0000000..88ad372
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/fake/Signal.java
@@ -0,0 +1,49 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/fake/Sock.java b/src/main/java/jnr/constants/platform/fake/Sock.java
new file mode 100644
index 0000000..0b30282
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/fake/Sock.java
@@ -0,0 +1,17 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/fake/SocketLevel.java b/src/main/java/jnr/constants/platform/fake/SocketLevel.java
new file mode 100644
index 0000000..d6aa02e
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/fake/SocketLevel.java
@@ -0,0 +1,15 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/fake/SocketOption.java b/src/main/java/jnr/constants/platform/fake/SocketOption.java
new file mode 100644
index 0000000..7da47a9
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/fake/SocketOption.java
@@ -0,0 +1,53 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/fake/Sysconf.java b/src/main/java/jnr/constants/platform/fake/Sysconf.java
new file mode 100644
index 0000000..0750280
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/fake/Sysconf.java
@@ -0,0 +1,139 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/fake/TCP.java b/src/main/java/jnr/constants/platform/fake/TCP.java
new file mode 100644
index 0000000..6bdcd8c
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/fake/TCP.java
@@ -0,0 +1,27 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/fake/WaitFlags.java b/src/main/java/jnr/constants/platform/fake/WaitFlags.java
new file mode 100644
index 0000000..a8a5e7d
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/fake/WaitFlags.java
@@ -0,0 +1,17 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/freebsd/AddressFamily.java b/src/main/java/jnr/constants/platform/freebsd/AddressFamily.java
new file mode 100644
index 0000000..1d9a7c8
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/freebsd/AddressFamily.java
@@ -0,0 +1,55 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/freebsd/Errno.java b/src/main/java/jnr/constants/platform/freebsd/Errno.java
new file mode 100644
index 0000000..b960bb2
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/freebsd/Errno.java
@@ -0,0 +1,187 @@
+// 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<Errno, String> descriptions = generateTable();
+  public static final java.util.Map<Errno, String> generateTable() {
+    java.util.Map<Errno, String> map = new java.util.EnumMap<Errno, String>(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; }
+}
diff --git a/src/main/java/jnr/constants/platform/freebsd/Fcntl.java b/src/main/java/jnr/constants/platform/freebsd/Fcntl.java
new file mode 100644
index 0000000..5cd32b6
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/freebsd/Fcntl.java
@@ -0,0 +1,52 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/freebsd/INAddr.java b/src/main/java/jnr/constants/platform/freebsd/INAddr.java
new file mode 100644
index 0000000..174439b
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/freebsd/INAddr.java
@@ -0,0 +1,21 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/freebsd/IPProto.java b/src/main/java/jnr/constants/platform/freebsd/IPProto.java
new file mode 100644
index 0000000..b1822de
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/freebsd/IPProto.java
@@ -0,0 +1,41 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/freebsd/NameInfo.java b/src/main/java/jnr/constants/platform/freebsd/NameInfo.java
new file mode 100644
index 0000000..d2bf796
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/freebsd/NameInfo.java
@@ -0,0 +1,21 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/freebsd/OpenFlags.java b/src/main/java/jnr/constants/platform/freebsd/OpenFlags.java
new file mode 100644
index 0000000..1b58efa
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/freebsd/OpenFlags.java
@@ -0,0 +1,31 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/freebsd/PRIO.java b/src/main/java/jnr/constants/platform/freebsd/PRIO.java
new file mode 100644
index 0000000..772bd70
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/freebsd/PRIO.java
@@ -0,0 +1,18 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/freebsd/ProtocolFamily.java b/src/main/java/jnr/constants/platform/freebsd/ProtocolFamily.java
new file mode 100644
index 0000000..6f98bff
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/freebsd/ProtocolFamily.java
@@ -0,0 +1,52 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/freebsd/RLIM.java b/src/main/java/jnr/constants/platform/freebsd/RLIM.java
new file mode 100644
index 0000000..d5b72ef
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/freebsd/RLIM.java
@@ -0,0 +1,17 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/freebsd/RLIMIT.java b/src/main/java/jnr/constants/platform/freebsd/RLIMIT.java
new file mode 100644
index 0000000..1162bae
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/freebsd/RLIMIT.java
@@ -0,0 +1,31 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/freebsd/Shutdown.java b/src/main/java/jnr/constants/platform/freebsd/Shutdown.java
new file mode 100644
index 0000000..208ae4d
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/freebsd/Shutdown.java
@@ -0,0 +1,16 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/freebsd/Signal.java b/src/main/java/jnr/constants/platform/freebsd/Signal.java
new file mode 100644
index 0000000..7102253
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/freebsd/Signal.java
@@ -0,0 +1,51 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/freebsd/Sock.java b/src/main/java/jnr/constants/platform/freebsd/Sock.java
new file mode 100644
index 0000000..847a143
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/freebsd/Sock.java
@@ -0,0 +1,19 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/freebsd/SocketLevel.java b/src/main/java/jnr/constants/platform/freebsd/SocketLevel.java
new file mode 100644
index 0000000..902d432
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/freebsd/SocketLevel.java
@@ -0,0 +1,17 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/freebsd/SocketOption.java b/src/main/java/jnr/constants/platform/freebsd/SocketOption.java
new file mode 100644
index 0000000..5ae2d49
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/freebsd/SocketOption.java
@@ -0,0 +1,55 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/freebsd/Sysconf.java b/src/main/java/jnr/constants/platform/freebsd/Sysconf.java
new file mode 100644
index 0000000..a9c9d9e
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/freebsd/Sysconf.java
@@ -0,0 +1,141 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/freebsd/TCP.java b/src/main/java/jnr/constants/platform/freebsd/TCP.java
new file mode 100644
index 0000000..229f530
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/freebsd/TCP.java
@@ -0,0 +1,29 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/freebsd/WaitFlags.java b/src/main/java/jnr/constants/platform/freebsd/WaitFlags.java
new file mode 100644
index 0000000..3427d7e
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/freebsd/WaitFlags.java
@@ -0,0 +1,19 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/linux/AddressFamily.java b/src/main/java/jnr/constants/platform/linux/AddressFamily.java
new file mode 100644
index 0000000..fdacdf3
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/linux/AddressFamily.java
@@ -0,0 +1,55 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/linux/Errno.java b/src/main/java/jnr/constants/platform/linux/Errno.java
new file mode 100644
index 0000000..e76c0ae
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/linux/Errno.java
@@ -0,0 +1,191 @@
+// 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<Errno, String> descriptions = generateTable();
+  public static final java.util.Map<Errno, String> generateTable() {
+    java.util.Map<Errno, String> map = new java.util.EnumMap<Errno, String>(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; }
+}
diff --git a/src/main/java/jnr/constants/platform/linux/Fcntl.java b/src/main/java/jnr/constants/platform/linux/Fcntl.java
new file mode 100644
index 0000000..0f36480
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/linux/Fcntl.java
@@ -0,0 +1,52 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/linux/INAddr.java b/src/main/java/jnr/constants/platform/linux/INAddr.java
new file mode 100644
index 0000000..4cac090
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/linux/INAddr.java
@@ -0,0 +1,21 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/linux/IPProto.java b/src/main/java/jnr/constants/platform/linux/IPProto.java
new file mode 100644
index 0000000..41acdd2
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/linux/IPProto.java
@@ -0,0 +1,41 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/linux/NameInfo.java b/src/main/java/jnr/constants/platform/linux/NameInfo.java
new file mode 100644
index 0000000..d6b34d8
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/linux/NameInfo.java
@@ -0,0 +1,21 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/linux/OpenFlags.java b/src/main/java/jnr/constants/platform/linux/OpenFlags.java
new file mode 100644
index 0000000..a5f5d11
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/linux/OpenFlags.java
@@ -0,0 +1,31 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/linux/PRIO.java b/src/main/java/jnr/constants/platform/linux/PRIO.java
new file mode 100644
index 0000000..7e420a5
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/linux/PRIO.java
@@ -0,0 +1,18 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/linux/ProtocolFamily.java b/src/main/java/jnr/constants/platform/linux/ProtocolFamily.java
new file mode 100644
index 0000000..bc98796
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/linux/ProtocolFamily.java
@@ -0,0 +1,52 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/linux/RLIM.java b/src/main/java/jnr/constants/platform/linux/RLIM.java
new file mode 100644
index 0000000..dc8b712
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/linux/RLIM.java
@@ -0,0 +1,17 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/linux/RLIMIT.java b/src/main/java/jnr/constants/platform/linux/RLIMIT.java
new file mode 100644
index 0000000..e89e866
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/linux/RLIMIT.java
@@ -0,0 +1,31 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/linux/Shutdown.java b/src/main/java/jnr/constants/platform/linux/Shutdown.java
new file mode 100644
index 0000000..cb7d7a3
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/linux/Shutdown.java
@@ -0,0 +1,16 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/linux/Signal.java b/src/main/java/jnr/constants/platform/linux/Signal.java
new file mode 100644
index 0000000..519ff30
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/linux/Signal.java
@@ -0,0 +1,51 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/linux/Sock.java b/src/main/java/jnr/constants/platform/linux/Sock.java
new file mode 100644
index 0000000..cff88ba
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/linux/Sock.java
@@ -0,0 +1,19 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/linux/SocketLevel.java b/src/main/java/jnr/constants/platform/linux/SocketLevel.java
new file mode 100644
index 0000000..6d3181b
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/linux/SocketLevel.java
@@ -0,0 +1,17 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/linux/SocketOption.java b/src/main/java/jnr/constants/platform/linux/SocketOption.java
new file mode 100644
index 0000000..c667db6
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/linux/SocketOption.java
@@ -0,0 +1,55 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/linux/Sysconf.java b/src/main/java/jnr/constants/platform/linux/Sysconf.java
new file mode 100644
index 0000000..5a0ba2b
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/linux/Sysconf.java
@@ -0,0 +1,141 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/linux/TCP.java b/src/main/java/jnr/constants/platform/linux/TCP.java
new file mode 100644
index 0000000..936d689
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/linux/TCP.java
@@ -0,0 +1,29 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/linux/WaitFlags.java b/src/main/java/jnr/constants/platform/linux/WaitFlags.java
new file mode 100644
index 0000000..409fee7
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/linux/WaitFlags.java
@@ -0,0 +1,19 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/openbsd/AddressFamily.java b/src/main/java/jnr/constants/platform/openbsd/AddressFamily.java
new file mode 100644
index 0000000..c5b2062
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/openbsd/AddressFamily.java
@@ -0,0 +1,55 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/openbsd/Errno.java b/src/main/java/jnr/constants/platform/openbsd/Errno.java
new file mode 100644
index 0000000..fd0f398
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/openbsd/Errno.java
@@ -0,0 +1,183 @@
+// 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<Errno, String> descriptions = generateTable();
+  public static final java.util.Map<Errno, String> generateTable() {
+    java.util.Map<Errno, String> map = new java.util.EnumMap<Errno, String>(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; }
+}
diff --git a/src/main/java/jnr/constants/platform/openbsd/Fcntl.java b/src/main/java/jnr/constants/platform/openbsd/Fcntl.java
new file mode 100644
index 0000000..421fad5
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/openbsd/Fcntl.java
@@ -0,0 +1,52 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/openbsd/INAddr.java b/src/main/java/jnr/constants/platform/openbsd/INAddr.java
new file mode 100644
index 0000000..c8116ec
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/openbsd/INAddr.java
@@ -0,0 +1,21 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/openbsd/IPProto.java b/src/main/java/jnr/constants/platform/openbsd/IPProto.java
new file mode 100644
index 0000000..f9864d0
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/openbsd/IPProto.java
@@ -0,0 +1,41 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/openbsd/NameInfo.java b/src/main/java/jnr/constants/platform/openbsd/NameInfo.java
new file mode 100644
index 0000000..c72cfd6
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/openbsd/NameInfo.java
@@ -0,0 +1,21 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/openbsd/OpenFlags.java b/src/main/java/jnr/constants/platform/openbsd/OpenFlags.java
new file mode 100644
index 0000000..cd63286
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/openbsd/OpenFlags.java
@@ -0,0 +1,31 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/openbsd/PRIO.java b/src/main/java/jnr/constants/platform/openbsd/PRIO.java
new file mode 100644
index 0000000..438c5b0
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/openbsd/PRIO.java
@@ -0,0 +1,18 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/openbsd/ProtocolFamily.java b/src/main/java/jnr/constants/platform/openbsd/ProtocolFamily.java
new file mode 100644
index 0000000..10da80e
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/openbsd/ProtocolFamily.java
@@ -0,0 +1,52 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/openbsd/RLIM.java b/src/main/java/jnr/constants/platform/openbsd/RLIM.java
new file mode 100644
index 0000000..5815cdb
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/openbsd/RLIM.java
@@ -0,0 +1,17 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/openbsd/RLIMIT.java b/src/main/java/jnr/constants/platform/openbsd/RLIMIT.java
new file mode 100644
index 0000000..bb307ea
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/openbsd/RLIMIT.java
@@ -0,0 +1,31 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/openbsd/Shutdown.java b/src/main/java/jnr/constants/platform/openbsd/Shutdown.java
new file mode 100644
index 0000000..4fa71de
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/openbsd/Shutdown.java
@@ -0,0 +1,16 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/openbsd/Signal.java b/src/main/java/jnr/constants/platform/openbsd/Signal.java
new file mode 100644
index 0000000..76bb57b
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/openbsd/Signal.java
@@ -0,0 +1,51 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/openbsd/Sock.java b/src/main/java/jnr/constants/platform/openbsd/Sock.java
new file mode 100644
index 0000000..789a836
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/openbsd/Sock.java
@@ -0,0 +1,19 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/openbsd/SocketLevel.java b/src/main/java/jnr/constants/platform/openbsd/SocketLevel.java
new file mode 100644
index 0000000..6846966
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/openbsd/SocketLevel.java
@@ -0,0 +1,17 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/openbsd/SocketOption.java b/src/main/java/jnr/constants/platform/openbsd/SocketOption.java
new file mode 100644
index 0000000..7577ef7
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/openbsd/SocketOption.java
@@ -0,0 +1,55 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/openbsd/Sysconf.java b/src/main/java/jnr/constants/platform/openbsd/Sysconf.java
new file mode 100644
index 0000000..08d884e
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/openbsd/Sysconf.java
@@ -0,0 +1,141 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/openbsd/TCP.java b/src/main/java/jnr/constants/platform/openbsd/TCP.java
new file mode 100644
index 0000000..ca7c8d4
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/openbsd/TCP.java
@@ -0,0 +1,29 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/openbsd/WaitFlags.java b/src/main/java/jnr/constants/platform/openbsd/WaitFlags.java
new file mode 100644
index 0000000..0e361b3
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/openbsd/WaitFlags.java
@@ -0,0 +1,19 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/sunos/AddressFamily.java b/src/main/java/jnr/constants/platform/sunos/AddressFamily.java
new file mode 100644
index 0000000..e362898
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/sunos/AddressFamily.java
@@ -0,0 +1,55 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/sunos/Errno.java b/src/main/java/jnr/constants/platform/sunos/Errno.java
new file mode 100644
index 0000000..872e128
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/sunos/Errno.java
@@ -0,0 +1,191 @@
+// 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<Errno, String> descriptions = generateTable();
+  public static final java.util.Map<Errno, String> generateTable() {
+    java.util.Map<Errno, String> map = new java.util.EnumMap<Errno, String>(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; }
+}
diff --git a/src/main/java/jnr/constants/platform/sunos/Fcntl.java b/src/main/java/jnr/constants/platform/sunos/Fcntl.java
new file mode 100644
index 0000000..4379413
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/sunos/Fcntl.java
@@ -0,0 +1,52 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/sunos/INAddr.java b/src/main/java/jnr/constants/platform/sunos/INAddr.java
new file mode 100644
index 0000000..184c3d2
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/sunos/INAddr.java
@@ -0,0 +1,21 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/sunos/IPProto.java b/src/main/java/jnr/constants/platform/sunos/IPProto.java
new file mode 100644
index 0000000..33c72e2
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/sunos/IPProto.java
@@ -0,0 +1,41 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/sunos/NameInfo.java b/src/main/java/jnr/constants/platform/sunos/NameInfo.java
new file mode 100644
index 0000000..7afe024
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/sunos/NameInfo.java
@@ -0,0 +1,21 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/sunos/OpenFlags.java b/src/main/java/jnr/constants/platform/sunos/OpenFlags.java
new file mode 100644
index 0000000..6eb87f3
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/sunos/OpenFlags.java
@@ -0,0 +1,31 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/sunos/PRIO.java b/src/main/java/jnr/constants/platform/sunos/PRIO.java
new file mode 100644
index 0000000..b7b2e43
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/sunos/PRIO.java
@@ -0,0 +1,18 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/sunos/ProtocolFamily.java b/src/main/java/jnr/constants/platform/sunos/ProtocolFamily.java
new file mode 100644
index 0000000..6446923
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/sunos/ProtocolFamily.java
@@ -0,0 +1,52 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/sunos/RLIM.java b/src/main/java/jnr/constants/platform/sunos/RLIM.java
new file mode 100644
index 0000000..80841a3
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/sunos/RLIM.java
@@ -0,0 +1,17 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/sunos/RLIMIT.java b/src/main/java/jnr/constants/platform/sunos/RLIMIT.java
new file mode 100644
index 0000000..b37a4c7
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/sunos/RLIMIT.java
@@ -0,0 +1,31 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/sunos/Shutdown.java b/src/main/java/jnr/constants/platform/sunos/Shutdown.java
new file mode 100644
index 0000000..b226fa6
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/sunos/Shutdown.java
@@ -0,0 +1,16 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/sunos/Signal.java b/src/main/java/jnr/constants/platform/sunos/Signal.java
new file mode 100644
index 0000000..90ebf05
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/sunos/Signal.java
@@ -0,0 +1,51 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/sunos/Sock.java b/src/main/java/jnr/constants/platform/sunos/Sock.java
new file mode 100644
index 0000000..90713b2
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/sunos/Sock.java
@@ -0,0 +1,19 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/sunos/SocketLevel.java b/src/main/java/jnr/constants/platform/sunos/SocketLevel.java
new file mode 100644
index 0000000..44ecacf
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/sunos/SocketLevel.java
@@ -0,0 +1,17 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/sunos/SocketOption.java b/src/main/java/jnr/constants/platform/sunos/SocketOption.java
new file mode 100644
index 0000000..1c9e1d3
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/sunos/SocketOption.java
@@ -0,0 +1,55 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/sunos/Sysconf.java b/src/main/java/jnr/constants/platform/sunos/Sysconf.java
new file mode 100644
index 0000000..ba29311
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/sunos/Sysconf.java
@@ -0,0 +1,141 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/sunos/TCP.java b/src/main/java/jnr/constants/platform/sunos/TCP.java
new file mode 100644
index 0000000..8a65417
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/sunos/TCP.java
@@ -0,0 +1,29 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/sunos/WaitFlags.java b/src/main/java/jnr/constants/platform/sunos/WaitFlags.java
new file mode 100644
index 0000000..934e0b9
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/sunos/WaitFlags.java
@@ -0,0 +1,19 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/windows/Errno.java b/src/main/java/jnr/constants/platform/windows/Errno.java
new file mode 100644
index 0000000..941b994
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/windows/Errno.java
@@ -0,0 +1,144 @@
+// 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<Errno, String> descriptions = generateTable();
+  public static final java.util.Map<Errno, String> generateTable() {
+    java.util.Map<Errno, String> map = new java.util.EnumMap<Errno, String>(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; }
+}
diff --git a/src/main/java/jnr/constants/platform/windows/LastError.java b/src/main/java/jnr/constants/platform/windows/LastError.java
new file mode 100644
index 0000000..6339632
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/windows/LastError.java
@@ -0,0 +1,310 @@
+// 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<LastError, String> descriptions = generateTable();
+  public static final java.util.Map<LastError, String> generateTable() {
+    java.util.Map<LastError, String> map = new java.util.EnumMap<LastError, String>(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; }
+}
diff --git a/src/main/java/jnr/constants/platform/windows/OpenFlags.java b/src/main/java/jnr/constants/platform/windows/OpenFlags.java
new file mode 100644
index 0000000..17154e2
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/windows/OpenFlags.java
@@ -0,0 +1,33 @@
+// 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; }
+}
diff --git a/src/main/java/jnr/constants/platform/windows/Signal.java b/src/main/java/jnr/constants/platform/windows/Signal.java
new file mode 100644
index 0000000..692da90
--- /dev/null
+++ b/src/main/java/jnr/constants/platform/windows/Signal.java
@@ -0,0 +1,51 @@
+// 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; }
+}
diff --git a/src/test/java/jnr/constants/ErrnoTest.java b/src/test/java/jnr/constants/ErrnoTest.java
new file mode 100644
index 0000000..dde0f3c
--- /dev/null
+++ b/src/test/java/jnr/constants/ErrnoTest.java
@@ -0,0 +1,85 @@
+
+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);
+        }
+    }
+}
\ No newline at end of file
diff --git a/test/constantine/platform/BitmaskTest.java b/test/constantine/platform/BitmaskTest.java
new file mode 100644
index 0000000..9eab18a
--- /dev/null
+++ b/test/constantine/platform/BitmaskTest.java
@@ -0,0 +1,44 @@
+
+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();
+        }
+    }
+
+}
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jnr-constants.git



More information about the pkg-java-commits mailing list