commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r762729 - in /commons/sandbox/runtime/trunk: NOTICE.txt src/main/java/overview.html src/main/native/Makefile.in src/main/native/configure src/main/native/include/acr.h xdocs/images/logo.png xdocs/proposal.xml
Date Tue, 07 Apr 2009 12:09:09 GMT
Author: mturk
Date: Tue Apr  7 12:09:08 2009
New Revision: 762729

URL: http://svn.apache.org/viewvc?rev=762729&view=rev
Log:
Some initial commits

Added:
    commons/sandbox/runtime/trunk/src/main/native/Makefile.in   (with props)
    commons/sandbox/runtime/trunk/src/main/native/configure   (with props)
    commons/sandbox/runtime/trunk/src/main/native/include/acr.h   (with props)
    commons/sandbox/runtime/trunk/xdocs/images/logo.png   (with props)
Modified:
    commons/sandbox/runtime/trunk/NOTICE.txt
    commons/sandbox/runtime/trunk/src/main/java/overview.html
    commons/sandbox/runtime/trunk/xdocs/proposal.xml

Modified: commons/sandbox/runtime/trunk/NOTICE.txt
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/NOTICE.txt?rev=762729&r1=762728&r2=762729&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/NOTICE.txt (original)
+++ commons/sandbox/runtime/trunk/NOTICE.txt Tue Apr  7 12:09:08 2009
@@ -1,2 +1,5 @@
+Apache Commons Runtime
+Copyright 2009 The Apache Software Foundation
+
 This product includes software developed by
 The Apache Software Foundation (http://www.apache.org/).

Modified: commons/sandbox/runtime/trunk/src/main/java/overview.html
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/overview.html?rev=762729&r1=762728&r2=762729&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/overview.html (original)
+++ commons/sandbox/runtime/trunk/src/main/java/overview.html Tue Apr  7 12:09:08 2009
@@ -1,5 +1,7 @@
 <html>
 <!--
+   Apache Commons Runtime
+   Copyright 2009 The Apache Software Foundation
 
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with

Added: commons/sandbox/runtime/trunk/src/main/native/Makefile.in
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/Makefile.in?rev=762729&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/Makefile.in (added)
+++ commons/sandbox/runtime/trunk/src/main/native/Makefile.in Tue Apr  7 12:09:08 2009
@@ -0,0 +1,112 @@
+# Apache Commons Runtime
+# Copyright 2009 The Apache Software Foundation
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+# ====================================================================
+#
+# Apache Commons Runtime Makefile
+# 
+# XXX: Do not use GNU make extensions
+#      because it breaks the Solaris build.
+#
+# ====================================================================
+#
+
+NAME=@name@
+HOST=@host@
+MACH=@mach@
+BITS=@bits@
+CC=@cc@
+SO=@so@
+OBJ=@obj@
+EXE=@exe@
+AR=@ar@
+RANLIB=@ranlib@
+PREFIX=@prefix@
+LIBDIR=@libdir@
+TOPDIR=@topdir@
+CPP=@cpp@
+CXX=@cxx@
+CFLAGS=@ccflags@ -DACR_DECLARE_EXPORT -DACR_CORE_PRIVATE
+CPPFLAGS=@cppopts@
+CXXFLAGS=@cxxopts@
+LDFLAGS=@ldflags@
+SHFLAGS=@shflags@
+INCLUDES=@includes@
+
+DESTDIR=$(PREFIX)
+SONAME=lib$(NAME)$(SO)
+SHAREDLIB=lib$(NAME)$(SO)
+
+SRCDIR=$(TOPDIR)/src
+INCDIR=$(TOPDIR)/include
+BLDDIR=$(TOPDIR)/.libs
+PWDDIR=$(PWD)
+
+ARCH_DIRS=\
+	$(SRCDIR)/shared \
+	$(SRCDIR)/os/unix \
+	$(SRCDIR)/os/linux \
+	$(SRCDIR)/os/solaris \
+	$(SRCDIR)/os/darwin \
+	$(SRCDIR)/os/unix \
+	$(SRCDIR)/os/hpux \
+	$(SRCDIR)/os/win32
+	
+COMMON_OBJS=\
+	$(SRCDIR)/main.$(OBJ) \
+	$(SRCDIR)/buildmark.$(OBJ) \
+	$(SRCDIR)/shared/error.$(OBJ) \
+	$(SRCDIR)/shared/utils.$(OBJ) \
+
+LINUX_OBJS= \
+	$(SRCDIR)/os/linux/os.$(OBJ) \
+	$(SRCDIR)/os/linux/cpu.$(OBJ)
+
+SOLARIS_OBJS= \
+	$(SRCDIR)/os/solaris/os.$(OBJ) \
+	$(SRCDIR)/os/solaris/cpu.$(OBJ)
+
+
+all: setup $(SHAREDLIB)
+
+.c.$(OBJ):
+	$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
+
+.cpp.$(OBJ):
+	$(CXX) $(CFLAGS) $(CXXFLAGS) $(INCLUDES) -c -o $@ $<
+
+$(SHAREDLIB): $(COMMON_OBJS) $(@platform@_OBJS)
+	$(CC) $(SHFLAGS) $(LDFLAGS) -o $(BLDDIR)/$@ $(COMMON_OBJS) $(@platform@_OBJS)
+
+setup:
+	@mkdir -p $(BLDDIR)
+
+clean:
+	for i in $(SRCDIR) $(ARCH_DIRS) ; do rm -f $$i/*.$(OBJ) ; done
+	rm -f $(BLDDIR)/*
+
+distclean: clean
+	rm -f $(TOPDIR)/Makefile
+	rm -f $(INCDIR)/cconfig.h
+	rm -rf $(BLDDIR)
+
+install: all
+	@mkdir -p $(DESTDIR)/include
+	@mkdir -p $(DESTDIR)/$(LIBDIR)
+	cp -f $(INCDIR)/* $(DESTDIR)/include/
+	cp -f $(BLDDIR)/$(SHAREDLIB) $(DESTDIR)/lib/

Propchange: commons/sandbox/runtime/trunk/src/main/native/Makefile.in
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/runtime/trunk/src/main/native/configure
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/configure?rev=762729&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/configure (added)
+++ commons/sandbox/runtime/trunk/src/main/native/configure Tue Apr  7 12:09:08 2009
@@ -0,0 +1,477 @@
+#!/bin/sh
+# Apache Commons Runtime
+# Copyright 2009 The Apache Software Foundation
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+# ====================================================================
+#
+# configure   Simple configure script with no dependency on
+#             GNU autoconf tools.
+#
+# Important environment variables
+#
+#   CC          Compiler used defaults to gcc
+#   CPP         Preprocessor used defaults to gcc -E
+#   CFLAGS      Compile task flags
+#   CPPFLAGS    C Preprocessor flags
+#   CXXFLAGS    C++ Preprocessor flags
+#   LDFLAGS     Library flags added to the linked
+#               Usually -L<dir> and -llibrary
+#   SHFLAGS     Ling task flags
+#   RCFLAGS     Resuurce compile task flags
+#               Used only on windows.
+#   TOPDIR      Top directory defaults to .
+#   JAVA_HOME   Home of the Java SDK
+#               Overridable by --with-java-home option
+#
+# ====================================================================
+#
+
+name=acr
+prefix="${PREFIX:=/usr/local}"
+libdir="lib"
+cc="${CC:=gcc}"
+cxx="${CXX:=g++}"
+ar="${AR:=ar}"
+ranlib="${RANLIB:=ranlib}"
+topdir="${TOPDIR:=.}"
+cpp="${CPP:=$cc -E}"
+ccflags="$CFLAGS"
+cppopts="$CPPFLAGS"
+cxxopts="$CXXFLAGS"
+ldflags="$LDFLAGS"
+shflags="$SHFLAGS"
+rcflags="$RCFLAGS"
+includes="-I$topdir/include"
+bige="0"
+so=".so"
+exe=""
+obj="o"
+bits=""
+nmake=""
+java_home="$JAVA_HOME"
+java_pinc=""
+has_dso_test=false
+has_jni=false
+has_64_bit=false
+
+for o
+do
+    case "$o" in
+    -*=*) a=`echo "$o" | sed 's/^[-_a-zA-Z0-9]*=//'`
+     ;;
+    --enable-*) a=`echo "$o" | sed -e 's/--enable-//' -e 's/-/_/'`
+        eval has_$a=true
+        shift
+        continue
+     ;;
+    --disable-*) a=`echo "$o" | sed -e 's/--disable-//' -e 's/-/_/'`
+        eval has_$a=false
+        shift
+        continue
+     ;;
+    *=*) a=`echo "$o" | sed 's/^[_a-zA-Z0-9]*=//'`
+     ;;
+    *) a=''
+     ;;
+    esac
+    case "$o" in
+        --name=*  )
+            name="$a"
+            shift
+        ;;
+        --prefix=*  )
+            prefix="$a"
+            shift
+        ;;
+        --libdir=*  )
+            libdir="$a"
+            shift
+        ;;
+        --with-cc=* )
+            cc="$a"
+            shift
+        ;;
+        --with-cxx=* )
+            cxx="$a"
+            shift
+        ;;
+        --with-cpp=* )
+            cpp="$a"
+            shift
+        ;;
+        --with-java-home=* )
+            java_home="$a"
+            shift
+        ;;
+        --with-java-platform=* )
+            java_pinc="$a"
+            shift
+        ;;
+        CC=*)       cc="$a" ;       shift ;;
+        CXX=*)      cxx="$a" ;      shift ;;
+        CPP=*)      cpp="$a" ;      shift ;;
+        CFLAGS=*)   ccflags="$a" ;  shift ;;
+        CPPFLAGS=*) cppopts="$a" ;  shift ;;
+        CXXFLAGS=*) cxxopts="$a" ;  shift ;;
+        LDFLAGS=*)  ldflags="$a" ;  shift ;;
+        SHFLAGS=*)  shflags="$a" ;  shift ;;
+        RCFLAGS=*)  rcflags="$a" ;  shift ;;
+        * )
+        cat 1>&2 << EOH
+Usage: ./configure [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Usage: configure [options]
+
+Installation directories:
+  --prefix=PREFIX    install architecture-independent files in PREFIX
+                          [/usr/local]
+  --libdir=LPREFIX   install architecture-dependent files in LPREFIX
+                          [PREFIX/lib]
+
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  CPP         C preprocessor
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  SHFLAGS     Linker command flags
+
+EOH
+        exit 1
+        ;;
+    esac
+done
+
+varadds()
+{
+    if [ ".$2" = ".::" ]; then
+        eval "$1=\"\""
+    else
+        eval e="\$$1"
+        if [ ".$e" = . ]; then
+            eval "$1=\"$2\""
+        else
+            for v in $2
+            do
+                do_adds=true
+                for i in $e
+                do
+                    if [ ".$v" = ".$i" ]; then
+                        do_adds=false
+                        break
+                    fi
+                done
+                if $do_adds; then
+                    e="$e $v"
+                fi
+            done
+            eval "$1=\"$e\""
+        fi
+    fi
+}
+
+toupper()
+{
+    echo "$1" | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+}
+
+tolower()
+{
+    echo "$1" | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'
+}
+
+if [ ".$java_home" = . ]; then
+    echo Missing JAVA_HOME environment variable
+    exit 1
+fi
+if [ ! -d "$java_home" ]; then
+    echo "\`$java_home' is not valid JAVA_HOME directory"
+fi
+
+varadds includes "-I$java_home/include"
+
+mach=`(uname -m) 2>/dev/null` || mach="unknown"
+host=`(uname -s) 2>/dev/null` || host="unknown"
+host=`tolower "$host"`
+
+if $has_64_bit; then
+    bits="64"
+fi
+
+case "$host" in
+    hp-ux   )
+        platform="HPUX"
+        host="hpux"
+    ;;
+    sunos   )
+        platform="SOLARIS"
+        host="solaris"
+    ;;
+    cygwin* )
+        platform="WINDOWS"
+        host="windows"
+    ;;
+    *       )
+        platform=`toupper "$host"`
+    ;;
+esac
+
+case "$mach" in
+    amd64    )
+        mach="x86_64"
+    ;;
+    i[3-6]86 )
+        mach="i386"
+    ;;
+    i86pc    )
+        mach="i386"
+    ;;
+    sun4*    )
+        mach="sparc"
+        bige="1"
+    ;;
+    9000/[678][0-9][0-9] )
+        mach="parisc"
+        bige="1"
+    ;;
+esac
+
+case "$host-$cc" in
+    linux-gcc )
+        varadds cppopts "-DLINUX=2 -D_GNU_SOURCE"
+        varadds ccflags "-fPIC -O3 -Wall -g"
+        varadds ldflags "-lrt -lpthread -ldl"
+        varadds shflags "-shared -fPIC -Wl,-soname -Wl,lib$name$so"
+        if [ ".$java_pinc" = . ]; then java_pinc=linux; fi
+        ;;
+    darwin-gcc )
+        r="`uname -r | sed 's/\.//g'`"
+        varadds cppopts "-DDARWIN=$r"
+        varadds ccflags "-fPIC -O3 -g"
+        varadds ldflags "-lrt -lpthread -ldl"
+        varadds shflags "-shared -fPIC -Wl,-soname -Wl,lib$name$so"
+        if $has_jni ; then so=".jnilib"; else so=".dynlib"; fi
+        ;;
+    solaris-cc )
+        r="`uname -r | sed 's/5.//'`"
+        varadds ccflags "-fast -O -Xa -KPIC"
+        varadds cppopts "-D_POSIX_PTHREAD_SEMANTICS -DSOLARIS2=$r"
+        varadds ldflags "-lrt -lthread -lsocket -lnsl -ldl"
+        varadds shflags "-G -KPIC -dy"
+        if [ ".$java_pinc" = . ]; then java_pinc=solaris; fi
+        ;;
+    hpux-cc    )
+        r="`uname -r | sed 's/[A-Z].[0-9]*.//'`"
+        varadds ccflags "-Ae +O2 -z"
+        varadds cppopts "-D_HPUX_SOURCE -DHPUX11=$r"
+        varadds ldflags "-lrt -lpthread -ldl"
+        varadds shflags "+Z -b"
+        so=".sl"
+        if [ ".$java_pinc" = . ]; then java_pinc="hp-ux"; fi
+        ;;
+    windows-cl )
+        varadds ccflags "-nologo -O2 -Ob2 -Oy- -Zi -D_MD -MD -W3"
+        varadds cppopts "-DWIN32 -D_WIN32 -D_WINDOWS -D_WINNT"
+        varadds cppopts "-D_WIN32_WINNT=0x0501 -D_WIN32_IE=0x0600"
+        varadds cxxopts "/TP"
+        varadds ldflags "kernel32.lib advapi32.lib ws2_32.lib mswsock.lib"
+        varadds ldflags "ole32.lib shell32.lib rpcrt4.lib"
+        varadds shflags "/NOLOGO /OPT:REF"
+        so=".dll"
+        exe=".exe"
+        obj="obj"
+        nmake=".msc"
+        if [ ".$java_pinc" = . ]; then java_pinc="win32"; fi
+        ;;
+    *       )
+        echo "$host$bits-$cc platform is not supported!"
+        exit 1
+        ;;
+esac
+
+case "$host$bits-$cc" in
+    hpux64-cc    )
+        varadds ccflags "+DD64"
+        varadds shflags "+DD64"
+        ;;
+    windows-cl   )
+        varadds ccflags "-D_X86_=1"
+        varadds shflags "/MACHINE:X86"
+        ;;
+    windows64-cl )
+        varadds ccflags "-DWIN64 -D_WIN64 -Wp64 -D_AMD64_=1"
+        varadds shflags "/MACHINE:AMD64"
+        ;;
+    *64-*        )
+        varadds ccflags "-m64"
+        varadds shflags "-m64"
+        ;;
+esac
+
+if [ -n "$java_pinc" ]; then
+    if [ -d "$java_home/include/$java_pinc" ]; then
+        varadds includes "-I$java_home/include/$java_pinc"
+    else
+        echo ""
+        echo "Warning: \`$java_home/include/$java_pinc' in not a directory"
+    fi
+fi
+
+varadds cppopts "-D_REENTRANT -D_LARGEFILE64_SOURCE"
+
+test=ctest$$
+
+if $has_dso_test; then
+    cat > $test.c << EOF
+extern int getchar();
+int hello() {return getchar();}
+EOF
+
+    echo "Checking for shared library support..."
+    ok=false
+    if [ "`($cc -c $ccflags $cppflags $test.c) 2>&1`" = "" ]; then
+        if [ "`($cc $shflags $ldflags -o $test$so $test.$obj) 2>&1`" = "" ]; then
+           echo "Building shared library for $host-$cc."
+           ok=true
+           fi
+    fi
+    if ! $ok; then
+           echo "No shared library support!"
+           exit 1
+    fi
+    rm -f $test.* $test >/dev/null 2>&1 || true
+fi
+
+have_include()
+{
+    cat > $test.c << EOF
+#include <stdlib.h>
+#include <$1.h>
+int main() {return 0;}
+EOF
+    co="`$cc $ccflags $cppopts $test.c -o $test$exe 2>&1`"
+    if [ ".$co" = "." ]; then
+        echo 1
+    else
+        if [ -x $test$exe ]; then
+            echo 1
+        else
+            echo 0
+        fi
+    fi
+    rm -f $test.* $test *.pdb >/dev/null 2>&1 || true
+}
+
+test_csizeof()
+{
+    cat > $test.c << EOF
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+
+int main() {printf("%d", sizeof($1));return 0;}
+EOF
+    $cc $ccflags $cppopts $test.c -o $test$exe >/dev/null 2>&1
+    if [ -x $test$exe ]; then
+        ./$test$exe 2>&1
+    else
+        echo 0
+    fi
+    rm -f $test.* $test *.pdb >/dev/null 2>&1 || true
+}
+
+# Generate configuration header file
+#
+cat > $topdir/include/ccconfig.h << EOF
+# AUTOMATICALY GENERATED -- DO NOT EDIT
+#
+#ifndef _CCCONFIG_H
+#define _CCCONFIG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define HAVE_UNISTD_H         `have_include unistd`
+#define HAVE_STRING_H         `have_include string`
+#define HAVE_STRINGS_H        `have_include strings`
+#define HAVE_WINDOWS_H        `have_include windows`
+#define HAVE_INTTYPES_H       `have_include inttypes`
+#define HAVE_DLFCN_H          `have_include dlfcn`
+#define HAVE_LINK_H           `have_include link`
+#define HAVE_SYS_TYPES_H      `have_include sys/types`
+#define HAVE_SYS_CDEFS_H      `have_include sys/cdefs`
+#define HAVE_SYS_RESOURCE_H   `have_include sys/resource`
+#define HAVE_SYS_SOCKET_H     `have_include sys/socket`
+#define HAVE_SYS_WAIT_H       `have_include sys/wait`
+#define HAVE_SYS_SYSLIMITS_H  `have_include sys/syslimits`
+#define HAVE_LIMITS_H         `have_include limits`
+
+#define HAS_BIG_ENDIAN        $bige
+
+#define CC_SIZEOF_INT         `test_csizeof int`
+#define CC_SIZEOF_LONG        `test_csizeof long`
+#define CC_SIZEOF_LONG_LONG   `test_csizeof 'long long'`
+#define CC_SIZEOF_VOIDP       `test_csizeof 'void *'`
+#define CC_SIZEOF_SIZE_T      `test_csizeof size_t`
+#define CC_SIZEOF_OFF64_T     `test_csizeof off64_t`
+
+EOF
+
+cat >> $topdir/include/ccconfig.h << EOF
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* _CCCONFIG_H */
+EOF
+
+sed -e "s;=@cc@;=$cc;g" \
+    -e "s;=@cpp@;=$cpp;g" \
+    -e "s;=@cxx@;=$cxx;g" \
+    -e "s;=@so@;=$so;g" \
+    -e "s;=@obj@;=$obj;g" \
+    -e "s;=@exe@;=$exe;g" \
+    -e "s;=@ar@;=$ar;g" \
+    -e "s;=@host@;=$host;g" \
+    -e "s;=@mach@;=$mach;g" \
+    -e "s;=@bits@;=$bits;g" \
+    -e "s;@platform@;$platform;g" \
+    -e "s;=@ranlib@;=$ranlib;g" \
+    -e "s;=@prefix@;=$prefix;g" \
+    -e "s;=@libdir@;=$libdir;g" \
+    -e "s;=@topdir@;=$topdir;g" \
+    -e "s;=@ccflags@;=$ccflags;g" \
+    -e "s;=@cppopts@;=$cppopts;g" \
+    -e "s;=@cxxopts@;=$cxxopts;g" \
+    -e "s;=@ldflags@;=$ldflags;g" \
+    -e "s;=@shflags@;=$shflags;g" \
+    -e "s;=@rcflags@;=$rcflags;g" \
+    -e "s;=@includes@;=$includes;g" \
+    -e "s;=@name@;=$name;g" \
+    Makefile$nmake.in > Makefile$nmake
+
+echo "Configured for $host$bits-$cc."

Propchange: commons/sandbox/runtime/trunk/src/main/native/configure
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: commons/sandbox/runtime/trunk/src/main/native/configure
------------------------------------------------------------------------------
    svn:executable = *

Added: commons/sandbox/runtime/trunk/src/main/native/include/acr.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr.h?rev=762729&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr.h (added)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr.h Tue Apr  7 12:09:08 2009
@@ -0,0 +1,252 @@
+/* Apache Commons Runtime
+ * Copyright 2009 The Apache Software Foundation
+ *
+ *Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+
+#ifndef _ACR_H
+#define _ACR_H
+
+#include "ccconfig.h"
+#if HAVE_WINDOWS_H
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+
+#include <windows.h>
+
+#ifdef _M_IA64
+/* Fix bug in PlatforSDK headers */
+#define TMP_IA64 _M_IA64
+#undef _M_IA64
+#include <winternl.h>
+#define _M_IA64 TMP_IA64
+#else
+#include <winternl.h>
+#endif
+#include <winsock2.h>
+#include <mswsock.h>
+#include <ws2tcpip.h>
+#endif /* HAVE_WINDOWS_H */
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_STRING_H
+#include <string.h>
+#endif
+#if HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+#define HAVE_LINK_H
+#include <link.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_SYS_CDEFS_H
+#include <sys/cdefs.h>
+#endif
+#if HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
+#if HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#if HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+/* Header files for PATH_MAX, _POSIX_PATH_MAX */
+#if HAVE_LIMITS_H
+#include <limits.h>
+#else
+#if HAVE_SYS_SYSLIMITS_H
+#include <sys/syslimits.h>
+#endif
+#endif
+
+/* JNI header */
+#include <jni.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+#define ACR_BEGIN_DECLS     extern "C" {
+#define ACR_END_DECLS       }
+#else
+#define ACR_BEGIN_DECLS
+#define ACR_END_DECLS
+#endif
+
+/* Typedefs that ACR needs. */
+typedef  unsigned char      acr_byte_t;
+typedef  short              acr_int16_t;
+typedef  unsigned short     acr_uint16_t;
+typedef  int                acr_int32_t;
+typedef  unsigned int       acr_uint32_t;
+typedef  unsigned long      apr_ino_t;
+typedef  size_t             acr_size_t;
+
+#if defined(_MSC_VER)
+typedef  ptrdiff_t          acr_ssize_t;
+typedef  __int64            acr_int64_t;
+typedef  unsigned __int64   acr_uint64_t;
+typedef  __int64            acr_off_t;
+typedef  int                acr_socklen_t;
+#else
+typedef  ssize_t            acr_ssize_t;
+typedef  long long          acr_int64_t;
+typedef  unsigned long long acr_uint64_t;
+typedef  off64_t            acr_off_t;
+typedef  socklen_t          acr_socklen_t;
+#endif
+
+
+#if CC_SIZEOF_VOIDP == 8
+typedef  acr_uint64_t       acr_ptr_t;
+#else
+typedef  acr_uint32_t       acr_ptr_t;
+#endif
+
+/**
+ * ACR_DECLARE_EXPORT is defined when building the ANNEX dynamic library,
+ * so that all public symbols are exported.
+ *
+ * ACR_DECLARE_STATIC is defined when including the ACR public headers,
+ * to provide static linkage when the dynamic library may be unavailable.
+ *
+ * ACR_DECLARE_STATIC and ACR_DECLARE_EXPORT are left undefined when
+ * including the ACR public headers, to import and link the symbols from
+ * the dynamic ACR library and assure appropriate indirection and calling
+ * conventions at compile time.
+ */
+
+#if !defined(_WIN32)
+/**
+ * The public ACR functions are declared with ACR_DECLARE(), so they may
+ * use the most appropriate calling convention.  Public ACR functions with
+ * variable arguments must use ACR_DECLARE_NONSTD().
+ *
+ * @deffunc ACR_DECLARE(rettype) apr_func(args);
+ */
+#define ACR_DECLARE(type)            type
+/**
+ * The public ACR functions using variable arguments are declared with
+ * ACR_DECLARE_NONSTD(), as they must use the C language calling convention.
+ *
+ * @deffunc ACR_DECLARE_NONSTD(rettype) apr_func(args, ...);
+ */
+#define ACR_DECLARE_NONSTD(type)     type
+/**
+ * The public ACR variables are declared with ACR_DECLARE_DATA.
+ * This assures the appropriate indirection is invoked at compile time.
+ *
+ * @deffunc ACR_DECLARE_DATA type apr_variable;
+ * @tip extern ACR_DECLARE_DATA type apr_variable; syntax is required for
+ * declarations within headers to properly import the variable.
+ */
+#define ACR_DECLARE_DATA
+#elif defined(ACR_DECLARE_STATIC)
+#define ACR_DECLARE(type)            type __stdcall
+#define ACR_DECLARE_NONSTD(type)     type
+#define ACR_DECLARE_DATA
+#elif defined(ACR_DECLARE_EXPORT)
+#define ACR_DECLARE(type)            __declspec(dllexport) type __stdcall
+#define ACR_DECLARE_NONSTD(type)     __declspec(dllexport) type
+#define ACR_DECLARE_DATA             __declspec(dllexport)
+#else
+/**
+ * The public ACR functions are declared with ACR_DECLARE(), so they may
+ * use the most appropriate calling convention.  Public ACR functions with
+ * variable arguments must use ACR_DECLARE_NONSTD().
+ *
+ */
+#define ACR_DECLARE(type)            __declspec(dllimport) type __stdcall
+/**
+ * The public ACR functions using variable arguments are declared with
+ * ACR_DECLARE_NONSTD(), as they must use the C language calling convention.
+ *
+ */
+#define ACR_DECLARE_NONSTD(type)     __declspec(dllimport) type
+/**
+ * The public ACR variables are declared with ACR_DECLARE_DATA.
+ * This assures the appropriate indirection is invoked at compile time.
+ *
+ * @remark extern ACR_DECLARE_DATA type apr_variable; syntax is required for
+ * declarations within headers to properly import the variable.
+ */
+#define ACR_DECLARE_DATA             __declspec(dllimport)
+#endif
+
+#if !defined(_WIN32) || defined(ACR_MODULE_DECLARE_STATIC)
+/**
+ * Declare a dso module's exported module structure as ACR_MODULE_DECLARE_DATA.
+ *
+ * Unless ACR_MODULE_DECLARE_STATIC is defined at compile time, symbols
+ * declared with ACR_MODULE_DECLARE_DATA are always exported.
+ * @code
+ * module ACR_MODULE_DECLARE_DATA mod_tag
+ * @endcode
+ */
+#if defined(_WIN32)
+#define ACR_MODULE_DECLARE(type)            type __stdcall
+#else
+#define ACR_MODULE_DECLARE(type)            type
+#endif
+#define ACR_MODULE_DECLARE_NONSTD(type)     type
+#define ACR_MODULE_DECLARE_DATA
+#else
+/**
+ * ACR_MODULE_DECLARE_EXPORT is a no-op.  Unless contradicted by the
+ * ACR_MODULE_DECLARE_STATIC compile-time symbol, it is assumed and defined.
+ */
+#define ACR_MODULE_DECLARE_EXPORT
+#define ACR_MODULE_DECLARE(type)          __declspec(dllexport) type __stdcall
+#define ACR_MODULE_DECLARE_NONSTD(type)   __declspec(dllexport) type
+#define ACR_MODULE_DECLARE_DATA           __declspec(dllexport)
+#endif
+
+#define ACR_OS_WINDOWS                    0x1000
+#define ACR_OS_WIN64                      0x1001
+#define ACR_OS_WIN64                      0x1002
+#define ACR_OS_UNIX                       0x2000
+#define ACR_OS_LINUX                      0x2001
+#define ACR_OS_SOLARIS                    0x2002
+#define ACR_OS_DARWIN                     0x2004
+#define ACR_OS_HPUX                       0x2008
+
+#define ACR_CLASS_PATH                    "org/apache/commons/runtime/"
+#define ACR_JNI_EXPORT_DECLARE(RT, CL, MN)  \
+    JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_##CL##_##MN
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* _ACR_H *

Propchange: commons/sandbox/runtime/trunk/src/main/native/include/acr.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/runtime/trunk/xdocs/images/logo.png
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/xdocs/images/logo.png?rev=762729&view=auto
==============================================================================
Binary file - no diff available.

Propchange: commons/sandbox/runtime/trunk/xdocs/images/logo.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Modified: commons/sandbox/runtime/trunk/xdocs/proposal.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/xdocs/proposal.xml?rev=762729&r1=762728&r2=762729&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/xdocs/proposal.xml (original)
+++ commons/sandbox/runtime/trunk/xdocs/proposal.xml Tue Apr  7 12:09:08 2009
@@ -7,8 +7,6 @@
 
 <section name="Proposal for Runtime Package">
 
-
-
 <subsection name="(0) Rationale">
 
 <p>Apache Commons Runtime provide Java classes and
@@ -18,7 +16,7 @@
 </subsection>
 <subsection name="(1) Scope of the Package">
 
-<p>Provide JNI abstraction layer of various operating features
+<p>Provide JNI abstraction layer of various operating system features
 in a portable way.</p>
 
 </subsection>



Mime
View raw message