From: Brian Havard Date: Wed, 26 Jan 2000 07:51:45 +0000 (+0000) Subject: Get OS/2 working with new configure system. Yay! :) X-Git-Tag: 1.3.13~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=90ea71ab2e77804e0e314a5348cf51664d8d3f61;p=apache Get OS/2 working with new configure system. Yay! :) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84522 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/os/config.m4 b/os/config.m4 index 4bd86a3dd6..0c2486c7b4 100644 --- a/os/config.m4 +++ b/os/config.m4 @@ -5,6 +5,8 @@ PLATFORM=`${CONFIG_SHELL-/bin/sh} $ac_config_guess` case "$PLATFORM" in *beos*) OS="beos";; +*pc-os2_emx*) + OS="os2";; *) OS="unix";; esac diff --git a/os/os2/Makefile.in b/os/os2/Makefile.in new file mode 100644 index 0000000000..c03ac3fca1 --- /dev/null +++ b/os/os2/Makefile.in @@ -0,0 +1,10 @@ + +DEPTH = ../.. +topsrcdir = @topsrcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +LTLIBRARY_NAME = libos.la +LTLIBRARY_SOURCES = os.c os-inline.c util_os2.c iol_socket.c + +include $(topsrcdir)/build/ltlib.mk diff --git a/os/os2/config.m4 b/os/os2/config.m4 new file mode 100644 index 0000000000..d6bab02dd4 --- /dev/null +++ b/os/os2/config.m4 @@ -0,0 +1,4 @@ +if test "$OS" = "os2" ; then + CFLAGS="$CFLAGS -DOS2 -O2" + LDFLAGS="$LDFLAGS -Zexe" +fi diff --git a/os/os2/os.h b/os/os2/os.h index 22355ab4cf..20ebcec9f4 100644 --- a/os/os2/os.h +++ b/os/os2/os.h @@ -5,6 +5,8 @@ #define HAVE_CANONICAL_FILENAME #define HAVE_DRIVE_LETTERS +#include + /* * This file in included in all Apache source code. It contains definitions * of facilities available on _this_ operating system (HAVE_* macros), @@ -29,7 +31,7 @@ INLINE int ap_os_is_path_absolute(const char *file); extern int ap_os_is_path_absolute(const char *file); #endif -API_EXPORT(char *) ap_os_canonical_filename(ap_context_t *p, const char *file); +char *ap_os_canonical_filename(ap_context_t *p, const char *file); #define ap_os_case_canonical_filename(p,f) ap_os_canonical_filename(p,f) #define ap_os_systemcase_filename(p,f) ap_os_canonical_filename(p,f) /* FIXME: the following should be implemented on this platform */ diff --git a/os/os2/util_os2.c b/os/os2/util_os2.c index a49d392975..536c40946d 100644 --- a/os/os2/util_os2.c +++ b/os/os2/util_os2.c @@ -3,6 +3,11 @@ #include #include "httpd.h" #include "http_log.h" +#include "os.h" +#include +#include +#include +#include API_EXPORT(char *)ap_os_canonical_filename(ap_context_t *pPool, const char *szFile) diff --git a/server/mpm/spmt_os2/Makefile.in b/server/mpm/spmt_os2/Makefile.in new file mode 100644 index 0000000000..081a91bf80 --- /dev/null +++ b/server/mpm/spmt_os2/Makefile.in @@ -0,0 +1,10 @@ + +DEPTH = ../../.. +topsrcdir = @topsrcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +LTLIBRARY_NAME = libspmt_os2.la +LTLIBRARY_SOURCES = spmt_os2.c + +include $(topsrcdir)/build/ltlib.mk diff --git a/server/mpm/spmt_os2/config.m4 b/server/mpm/spmt_os2/config.m4 new file mode 100644 index 0000000000..73b1b16aaa --- /dev/null +++ b/server/mpm/spmt_os2/config.m4 @@ -0,0 +1,6 @@ +if test "$MPM_NAME" = "spmt_os2" ; then + AC_CACHE_SAVE + APACHE_FAST_OUTPUT(modules/mpm/$MPM_NAME/Makefile) + CFLAGS="$CFLAGS -Zmt" + LDFLAGS="$LDFLAGS -Zmt" +fi diff --git a/server/mpm/spmt_os2/spmt_os2.c b/server/mpm/spmt_os2/spmt_os2.c index 907c5a76b4..a60b96e097 100644 --- a/server/mpm/spmt_os2/spmt_os2.c +++ b/server/mpm/spmt_os2/spmt_os2.c @@ -62,6 +62,7 @@ #define INCL_DOSERRORS #include "httpd.h" +#include "ap_config.h" #include "mpm_default.h" #include "http_main.h" #include "http_log.h" @@ -76,6 +77,7 @@ #include #include +#include /* config globals */ @@ -175,7 +177,6 @@ static void clean_child_exit(int code) } -#if defined(USE_OS2SEM_SERIALIZED_ACCEPT) static HMTX lock_sem = -1; @@ -242,7 +243,6 @@ static void accept_mutex_off(void) } } -#endif /* On some architectures it's safe to do unserialized accept()s in the single