summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--misc/os2/Makefile.in7
-rw-r--r--misc/os2/start.c88
-rw-r--r--misc/unix/start.c2
3 files changed, 8 insertions, 89 deletions
diff --git a/misc/os2/Makefile.in b/misc/os2/Makefile.in
index c319d1ba8..f9bfe6027 100644
--- a/misc/os2/Makefile.in
+++ b/misc/os2/Makefile.in
@@ -51,7 +51,10 @@ depend:
&& rm Makefile.new
# DO NOT REMOVE
-start.o: start.c $(INCDIR1)/apr_general.h \
+getopt.o: getopt.c misc.h $(INCDIR1)/apr_general.h \
+ $(INCDIR1)/apr_config.h $(INCDIR1)/apr_errno.h \
+ $(INCDIR1)/apr_file_io.h
+start.o: start.c ../unix/start.c $(INCDIR1)/apr_general.h \
$(INCDIR1)/apr_config.h $(INCDIR1)/apr_errno.h \
$(INCDIR)/apr_pools.h $(INCDIR1)/apr_lib.h \
- $(INCDIR1)/apr_file_io.h $(INCDIR1)/hsregex.h misc.h
+ $(INCDIR1)/apr_file_io.h ../unix/misc.h
diff --git a/misc/os2/start.c b/misc/os2/start.c
index ad980bcaa..6d990ef83 100644
--- a/misc/os2/start.c
+++ b/misc/os2/start.c
@@ -53,90 +53,4 @@
*
*/
-#include "apr_general.h"
-#include "apr_errno.h"
-#include "apr_pools.h"
-#include "misc.h"
-#include <errno.h>
-#include <string.h>
-
-ap_status_t ap_create_context(ap_context_t **newcont, struct context_t *cont, void *data)
-{
- struct context_t *new;
- ap_pool_t *pool;
-
- if (cont) {
- pool = ap_make_sub_pool(cont->pool);
- }
- else {
- pool = ap_init_alloc();;
- }
-
- if (pool == NULL) {
- return APR_ENOPOOL;
- }
-
- if (cont) {
- new = (struct context_t *)ap_palloc(cont, sizeof(struct context_t));
- }
- else {
- new = (struct context_t *)malloc(sizeof(struct context_t));
- }
-
- new->pool = pool;
- if (data == NULL && cont) {
- new->prog_data = cont->prog_data;
- }
- else {
- new->prog_data = data;
- }
-
- *newcont = new;
- return APR_SUCCESS;
-}
-
-ap_status_t ap_destroy_context(struct context_t *cont)
-{
- ap_destroy_pool(cont);
- return APR_SUCCESS;
-}
-
-/* ***APRDOC********************************************************
- * ap_status_t ap_set_userdata(ap_context_t *, void *)
- * Set the data associated with the current context.
- * arg 1) The current context.
- * arg 2) The user data associated with the context.
- */
-ap_status_t ap_set_userdata(struct context_t *cont, void *data)
-{
- if (cont) {
- cont->prog_data = data;
- return APR_SUCCESS;
- }
- return APR_ENOCONT;
-}
-
-/* ***APRDOC********************************************************
- * ap_status_t ap_get_userdata(void **, ap_context_t *)
- * Return the data associated with the current context.
- * arg 1) The current context.
- * arg 2) The user data associated with the context.
- */
-ap_status_t ap_get_userdata(void **data, struct context_t *cont)
-{
- if (cont) {
- (*data) = cont->prog_data;
- return APR_SUCCESS;
- }
- return APR_ENOCONT;
-}
-
-/* ***APRDOC********************************************************
- * ap_status_t ap_initialize()
- * Setup any APR internal data structures. This MUST be the first
- * function called for any APR program.
- */
-ap_status_t ap_initialize(void)
-{
- return APR_SUCCESS;
-}
+#include "../unix/start.c"
diff --git a/misc/unix/start.c b/misc/unix/start.c
index 16d814d00..b98307d8d 100644
--- a/misc/unix/start.c
+++ b/misc/unix/start.c
@@ -57,7 +57,9 @@
#include "apr_errno.h"
#include "apr_pools.h"
#include "misc.h"
+#ifdef HAVE_PTHREAD_H
#include <pthread.h>
+#endif
#include <signal.h>
#include <errno.h>
#include <string.h>