commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r818458 - in /commons/sandbox/runtime/trunk/src/main/native: configure include/arch/aix/ include/arch/aix/acr_arch_private.h os/hpux/shm.c
Date Thu, 24 Sep 2009 12:16:47 GMT
Author: mturk
Date: Thu Sep 24 12:16:47 2009
New Revision: 818458

URL: http://svn.apache.org/viewvc?rev=818458&view=rev
Log:
Add aix arch file

Added:
    commons/sandbox/runtime/trunk/src/main/native/include/arch/aix/
    commons/sandbox/runtime/trunk/src/main/native/include/arch/aix/acr_arch_private.h   (with
props)
Modified:
    commons/sandbox/runtime/trunk/src/main/native/configure
    commons/sandbox/runtime/trunk/src/main/native/os/hpux/shm.c

Modified: commons/sandbox/runtime/trunk/src/main/native/configure
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/configure?rev=818458&r1=818457&r2=818458&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/configure (original)
+++ commons/sandbox/runtime/trunk/src/main/native/configure Thu Sep 24 12:16:47 2009
@@ -503,9 +503,11 @@
         ;;
     aix-gcc    )
         r="`uname -v``uname -r`"
-        varadds cppopts -DAIX=$r
-        varadds ccflags -fPIC -O3 -g
+        varadds cppopts -DAIX=$r -U__STR__ -D_THREAD_SAFE -D_USE_IRS
+        varadds ccflags -fPIC -O2 -g -pthread
         varadds ldflags -lrt -lpthreads -lnsl
+        varadds shflags -shared -fPIC -Wl,-soname '-Wl,??@' -Wl,-brtl
+        varadds exflags '-Wl,-rpath,??(PREFIX)/??(LIBDIR):????ORIGIN'
         echo "Warning : WORK IN PROGRESS"
         ;;
     *       )

Added: commons/sandbox/runtime/trunk/src/main/native/include/arch/aix/acr_arch_private.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/arch/aix/acr_arch_private.h?rev=818458&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/arch/aix/acr_arch_private.h (added)
+++ commons/sandbox/runtime/trunk/src/main/native/include/arch/aix/acr_arch_private.h Thu
Sep 24 12:16:47 2009
@@ -0,0 +1,91 @@
+/* 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_ARCH_PRIVATE_H
+#define _ACR_ARCH_PRIVATE_H
+
+/* Platform specific includes
+ */
+#include <sys/stat.h>
+#include <sys/utsname.h>
+#include <signal.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @file acr_arch_private.h
+ * @brief
+ *
+ * ACR AIX platform private macros and defines
+ *
+ */
+#define ACR_PLATFORM_CLASS_PATH   ACR_CLASS_PATH "platform/aix/"
+#define ACR_JNI_PLATFORM_DECLARE(RT, CL, FN)  \
+    JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_platform_aix_##CL##_##FN
+
+#define NOTREACHED(X)    return (X)
+
+/**
+ * Include needed functions from portable layer
+ */
+#define ACR_WANT_PMATCH                     1
+#define ACR_WANT_SHQUOTE                    1
+#define ACR_WANT_STRSIGNAL                  1
+#define ACR_WANT_STRLCAT                    1
+#define ACR_WANT_STRLCPY                    1
+#define ACR_WANT_WCSLCAT                    1
+#define ACR_WANT_WCSLCPY                    1
+#define ACR_WANT_FNMATCH                    1
+
+/**
+ * Temporary APR flags
+ */
+#define APR_USE_SHMEM_SHMGET                1
+#define APR_USE_SHMEM_SHMGET_ANON           1
+#define APR_USE_SYSVSEM_SERIALIZE           1
+#define APR_USE_PTHREAD_SERIALIZE           1
+#define APR_PROCESS_LOCK_IS_GLOBAL          0
+#define APR_HAVE_CORKABLE_TCP               0
+#define APR_HAVE_SA_STORAGE                 0
+#define APR_HAVE_UNION_SEMUN                0
+#define APR_HAVE_SCTP                       0
+#define APR_HAS_SO_ACCEPTFILTER             0
+#define APR_HAS_UNICODE_FS                  0
+#define APR_HAS_PROC_INVOKED                0
+#define APR_HAS_XTHREAD_FILES               0
+#define APR_HAS_OS_UUID                     0
+#define APR_TCP_NOPUSH_FLAG                 0
+#define APR_TCP_NODELAY_INHERITED           1
+#define APR_O_NONBLOCK_INHERITED            1
+#define APR_HAS_LARGE_FILES                 1
+
+/**
+ * Temporary APR private flags
+ */
+#define DEV_RANDOM              "/dev/urandom"
+#define DSO_USE_DLFCN           1
+#define DIRENT_INODE            d_ino
+#undef  DIRENT_TYPE
+#define HAVE_DECL_SYS_SIGLIST   0
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ACR_ARCH_PRIVATE_H */
+

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

Modified: commons/sandbox/runtime/trunk/src/main/native/os/hpux/shm.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/hpux/shm.c?rev=818458&r1=818457&r2=818458&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/hpux/shm.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/hpux/shm.c Thu Sep 24 12:16:47 2009
@@ -458,8 +458,8 @@
         rc = ACR_EBADF;
         goto finally;
     }
-    shmbuf.shm_perm.uid  = uid;
-    shmbuf.shm_perm.gid  = gid;
+    shmbuf.shm_perm.uid  = uid == -1 ? getuid() : uid;
+    shmbuf.shm_perm.gid  = gid == -1 ? getgid() : gid;
     shmbuf.shm_perm.mode = ACR_UnixPermsToMode(perms);
     if (shmctl(m->shmid, IPC_SET, &shmbuf) == -1) {
         rc = ACR_GET_OS_ERROR();



Mime
View raw message