From ef35667117d071a07a1524bd259f625235caa1f8 Mon Sep 17 00:00:00 2001 From: Brian Havard Date: Wed, 13 Oct 1999 09:31:36 +0000 Subject: OS/2: Use the (slightly tweaked) unix start.c instead of our own. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@59335 13f79535-47bb-0310-9956-ffa450edef68 --- misc/os2/Makefile.in | 7 +++-- misc/os2/start.c | 88 +--------------------------------------------------- 2 files changed, 6 insertions(+), 89 deletions(-) (limited to 'misc/os2') 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 -#include - -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" -- cgit v1.2.1