summaryrefslogtreecommitdiff
path: root/os/os2
diff options
context:
space:
mode:
authorBrian Havard <bjh@apache.org>2009-08-26 08:56:13 +0000
committerBrian Havard <bjh@apache.org>2009-08-26 08:56:13 +0000
commit60fbe11de19b807cbc9e372eecd3a86ceed74893 (patch)
tree53cecd61ce8930955243e594a333d488758000b2 /os/os2
parent3144af1e111eb85e9275da07d702cb79b352102d (diff)
downloadhttpd-60fbe11de19b807cbc9e372eecd3a86ceed74893.tar.gz
Bring back OS/2 support.
Reverses r758929 with a little bit of conflict resolution. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@807930 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'os/os2')
-rw-r--r--os/os2/Makefile.in5
-rw-r--r--os/os2/config.m43
-rw-r--r--os/os2/core.mk7
-rw-r--r--os/os2/core_header.def19
-rw-r--r--os/os2/os.h39
-rw-r--r--os/os2/util_os2.c39
6 files changed, 112 insertions, 0 deletions
diff --git a/os/os2/Makefile.in b/os/os2/Makefile.in
new file mode 100644
index 0000000000..fba497279b
--- /dev/null
+++ b/os/os2/Makefile.in
@@ -0,0 +1,5 @@
+
+LTLIBRARY_NAME = libos.la
+LTLIBRARY_SOURCES = util_os2.c
+
+include $(top_srcdir)/build/ltlib.mk
diff --git a/os/os2/config.m4 b/os/os2/config.m4
new file mode 100644
index 0000000000..b62d214e1d
--- /dev/null
+++ b/os/os2/config.m4
@@ -0,0 +1,3 @@
+if test "$OS" = "os2" ; then
+ APR_ADDTO(CFLAGS, [-DOS2 -O2])
+fi
diff --git a/os/os2/core.mk b/os/os2/core.mk
new file mode 100644
index 0000000000..639417e8e7
--- /dev/null
+++ b/os/os2/core.mk
@@ -0,0 +1,7 @@
+# Some rules for making a shared core dll on OS/2
+
+os2core: httpd.dll $(CORE_IMPLIB)
+ $(LIBTOOL) --mode=link gcc -Zstack 512 $(LDFLAGS) $(EXTRA_LDFLAGS) -o httpd $(CORE_IMPLIB)
+
+httpd.dll: $(PROGRAM_DEPENDENCIES) $(CORE_IMPLIB)
+ $(LINK) -Zdll $(EXTRA_LDFLAGS) -s -o $@ server/exports.lo modules.lo $(PROGRAM_DEPENDENCIES) $(AP_LIBS) server/ApacheCoreOS2.def
diff --git a/os/os2/core_header.def b/os/os2/core_header.def
new file mode 100644
index 0000000000..ec3703a669
--- /dev/null
+++ b/os/os2/core_header.def
@@ -0,0 +1,19 @@
+LIBRARY httpd INITINSTANCE
+DESCRIPTION "Apache Server Core"
+DATA NONSHARED
+
+EXPORTS
+ "main"
+
+; One for mod_dav from socket library
+ "_swaps"
+
+; And some more for mod_unique_id
+ "gethostname"
+ "gethostbyname"
+ "_swapl"
+ "h_errno"
+ "inet_ntoa"
+
+; mod_proxy needs this one
+ "inet_addr"
diff --git a/os/os2/os.h b/os/os2/os.h
new file mode 100644
index 0000000000..085dacf053
--- /dev/null
+++ b/os/os2/os.h
@@ -0,0 +1,39 @@
+/* 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.
+ */
+
+/**
+ * @file os2/os.h
+ * @brief This file in included in all Apache source code. It contains definitions
+ * of facilities available on _this_ operating system (HAVE_* macros),
+ * and prototypes of OS specific functions defined in os.c or os-inline.c
+ *
+ * @defgroup APACHE_OS_OS2 os2
+ * @ingroup APACHE_OS
+ * @{
+ */
+
+#ifndef APACHE_OS_H
+#define APACHE_OS_H
+
+#define PLATFORM "OS/2"
+
+/* going away shortly... */
+#define HAVE_DRIVE_LETTERS
+#define HAVE_UNC_PATHS
+#define CASE_BLIND_FILESYSTEM
+
+#endif /* ! APACHE_OS_H */
+/** @} */
diff --git a/os/os2/util_os2.c b/os/os2/util_os2.c
new file mode 100644
index 0000000000..9156fb39ef
--- /dev/null
+++ b/os/os2/util_os2.c
@@ -0,0 +1,39 @@
+/* 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.
+ */
+
+#define INCL_DOS
+#define INCL_DOSERRORS
+#include <os2.h>
+#include "ap_config.h"
+#include "httpd.h"
+#include "http_log.h"
+#include "os.h"
+#include <sys/time.h>
+#include <sys/signal.h>
+#include <ctype.h>
+#include <string.h>
+#include "apr_strings.h"
+
+
+AP_DECLARE(apr_status_t) ap_os_create_privileged_process(
+ const request_rec *r,
+ apr_proc_t *newproc, const char *progname,
+ const char * const *args,
+ const char * const *env,
+ apr_procattr_t *attr, apr_pool_t *p)
+{
+ return apr_proc_create(newproc, progname, args, env, attr, p);
+}