diff options
Diffstat (limited to 'os/os2')
-rw-r--r-- | os/os2/Makefile.in | 5 | ||||
-rw-r--r-- | os/os2/config.m4 | 3 | ||||
-rw-r--r-- | os/os2/core.mk | 7 | ||||
-rw-r--r-- | os/os2/core_header.def | 19 | ||||
-rw-r--r-- | os/os2/os.h | 40 | ||||
-rw-r--r-- | os/os2/util_os2.c | 39 |
6 files changed, 113 insertions, 0 deletions
diff --git a/os/os2/Makefile.in b/os/os2/Makefile.in new file mode 100644 index 0000000..fba4972 --- /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 0000000..b62d214 --- /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 0000000..639417e --- /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 0000000..ec3703a --- /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 0000000..1f8c9ba --- /dev/null +++ b/os/os2/os.h @@ -0,0 +1,40 @@ +/* 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 +#define AP_PLATFORM_REWRITE_ARGS_HOOK NULL + +#endif /* ! APACHE_OS_H */ +/** @} */ diff --git a/os/os2/util_os2.c b/os/os2/util_os2.c new file mode 100644 index 0000000..9156fb3 --- /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); +} |