Return-Path: Delivered-To: apache-cvs-archive@hyperreal.org Received: (qmail 25401 invoked by uid 6000); 10 Dec 1999 11:04:07 -0000 Received: (qmail 25393 invoked by uid 2016); 10 Dec 1999 11:04:05 -0000 Delivered-To: apcore-apache-1.3-cvs@apache.org Received: (qmail 25390 invoked by uid 177); 10 Dec 1999 11:04:04 -0000 Date: 10 Dec 1999 11:04:04 -0000 Message-ID: <19991210110404.25389.qmail@hyperreal.org> From: martin@hyperreal.org To: apache-1.3-cvs@apache.org Subject: cvs commit: apache-1.3/src/os/mpeix dlopen.c gettimeofday.c mpe_dl_stub.c os-inline.c os.c os.h Makefile.tmpl README Sender: apache-cvs-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org martin 99/12/10 03:04:03 Modified: . configure src Configure src/ap ap_getpass.c src/helpers TestCompile install.sh src/include ap_config.h src/main http_main.c rfc1413.c src/support ab.c Added: src/os/mpeix dlopen.c gettimeofday.c mpe_dl_stub.c os-inline.c os.c os.h Makefile.tmpl README Log: Freshen up the MPE port. MPE/iX now supports dynamic loading of modules. Submitted by: Mark Bixby Reviewed by: Martin Kraemer Revision Changes Path 1.114 +3 -0 apache-1.3/configure Index: configure =================================================================== RCS file: /export/home/cvs/apache-1.3/configure,v retrieving revision 1.113 retrieving revision 1.114 diff -u -r1.113 -r1.114 --- configure 1999/12/09 17:19:35 1.113 +++ configure 1999/12/10 11:03:00 1.114 @@ -355,6 +355,9 @@ set -- --with-layout="$default_layout" "$@" fi ;; + *MPE/iX* ) + iflags_program="-m 755" + ;; esac ## 1.379 +13 -6 apache-1.3/src/Configure Index: Configure =================================================================== RCS file: /export/home/cvs/apache-1.3/src/Configure,v retrieving revision 1.378 retrieving revision 1.379 diff -u -r1.378 -r1.379 --- Configure 1999/12/09 17:19:30 1.378 +++ Configure 1999/12/10 11:03:07 1.379 @@ -278,10 +278,11 @@ DEF_WANTHSREGEX=yes ;; *MPE/iX*) - OS='MPE/iX' + export OS='MPE/iX' + OSDIR='os/mpeix' CFLAGS="$CFLAGS -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE" - LIBS="$LIBS -lsocket -lsvipc" - LDFLAGS="$LDFLAGS -Xlinker \"-WL,cap=ia,ba,ph,pm;nmstack=1024000\"" + LIBS="$LIBS -lsocket -lsvipc -lcurses" + LDFLAGS="$LDFLAGS -Xlinker \"-WL,cap=ia,ba,ph;nmstack=1024000\"" CAT="/bin/cat" # built-in cat is badly broken for stdin redirection ;; *-apple-aux3*) @@ -906,9 +907,9 @@ ## TCPP=`egrep '^CPP=' Makefile.config | tail -1 | awk -F= '{print $2}'` if [ "x$TCPP" != "x" ]; then - CPP=`CC=$CC CPP=$TCPP ./helpers/findcpp.sh` + CPP=`env CC="$CC" CPP=$TCPP ./helpers/findcpp.sh` else - CPP=`CC=$CC ./helpers/findcpp.sh` + CPP=`env CC="$CC" ./helpers/findcpp.sh` fi if [ "x$TCPP" = "x" ]; then echo "CPP=$CPP" >> Makefile.config @@ -934,7 +935,7 @@ echo "" >>$AP_CONFIG_AUTO_H echo "/* check: #include <$header> */" >>$AP_CONFIG_AUTO_H name="`echo $header | sed -e 's:/:_:g' -e 's:\.:_:g' | tr '[a-z]' '[A-Z]'`" - CPP=$CPP ./helpers/checkheader.sh $header + env CPP="$CPP" ./helpers/checkheader.sh $header if [ $? -eq 0 ]; then echo "#ifndef HAVE_${name}" >>$AP_CONFIG_AUTO_H echo "#define HAVE_${name} 1" >>$AP_CONFIG_AUTO_H @@ -1002,6 +1003,12 @@ SHARED_CORE_EP='lib$(TARGET).ep' SHCORE_IMPLIB='' case "$PLAT" in + *MPE/iX*) + LD_SHLIB=ld + LDFLAGS_SHLIB='-b -a archive' + LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB + LIBS_SHLIB='$(OSDIR)/mpe_dl_stub.o' + ;; *-linux1) CFLAGS_SHLIB="-fpic" LDFLAGS_SHLIB="-Bshareable" 1.3 +41 -14 apache-1.3/src/ap/ap_getpass.c Index: ap_getpass.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/ap/ap_getpass.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ap_getpass.c 1999/10/21 20:44:09 1.2 +++ ap_getpass.c 1999/12/10 11:03:13 1.3 @@ -85,26 +85,53 @@ #define ERR_OVERFLOW 5 #ifdef MPE -/* - * MPE lacks getpass() and a way to suppress stdin echo. So for now, just - * issue the prompt and read the results with echo. (Ugh). - */ +#include -static char *getpass(const char *prompt) +char * +getpass(const char *prompt) { - static char password[MAX_STRING_LEN]; + static char buf[MAX_STRING_LEN+1]; /* null byte at end */ + char *ptr; + sigset_t sig, sigsave; + struct termios term, termsave; + FILE *fp,*outfp; + int c; - fputs(prompt, stderr); - gets((char *) &password); + if ((outfp = fp = fopen("/dev/tty", "w+")) == NULL) { + outfp = stderr; + fp = stdin; + } - if (strlen((char *) &password) > (MAX_STRING_LEN - 1)) { - password[MAX_STRING_LEN - 1] = '\0'; - } + sigemptyset(&sig); /* block SIGINT & SIGTSTP, save signal mask */ + sigaddset(&sig, SIGINT); + sigaddset(&sig, SIGTSTP); + sigprocmask(SIG_BLOCK, &sig, &sigsave); - return (char *) &password; -} + tcgetattr(fileno(fp), &termsave); /* save tty state */ + term = termsave; /* structure copy */ + term.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL); + tcsetattr(fileno(fp), TCSAFLUSH, &term); + + fputs(prompt, outfp); + + ptr = buf; + while ( (c = getc(fp)) != EOF && c != '\n') { + if (ptr < &buf[MAX_STRING_LEN]) + *ptr++ = c; + } + *ptr = 0; /* null terminate */ + putc('\n', outfp); /* we echo a newline */ -#endif + /* restore tty state */ + tcsetattr(fileno(fp), TCSAFLUSH, &termsave); + + /* restore signal mask */ + sigprocmask(SIG_SETMASK, &sigsave, NULL); + if (fp != stdin) fclose(fp); + + return(buf); +} +#endif /* MPE */ #if defined(WIN32) || defined(NETWARE) /* 1.36 +7 -0 apache-1.3/src/helpers/TestCompile Index: TestCompile =================================================================== RCS file: /export/home/cvs/apache-1.3/src/helpers/TestCompile,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- TestCompile 1999/12/09 17:19:42 1.35 +++ TestCompile 1999/12/10 11:03:19 1.36 @@ -217,6 +217,13 @@ # have PrintPath just search this directory. if ./PrintPath -s -p`pwd` $TARGET ; then + if [ "x$OS" = "xMPE/iX" ]; then + # clever hack to check for unresolved externals without actually + # executing the test program + if eval "callci run `pwd`/$TARGET\;stdin=\*notfound 2>&1 | /bin/grep ^UNRESOLVED $ERRDIR >&2"; then + exit 1 # there were unresolved externals + fi + fi if [ "x$TCRUNIT" = "xyes" ]; then `pwd`/$TARGET fi 1.8 +1 -1 apache-1.3/src/helpers/install.sh Index: install.sh =================================================================== RCS file: /export/home/cvs/apache-1.3/src/helpers/install.sh,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- install.sh 1999/04/28 08:01:45 1.7 +++ install.sh 1999/12/10 11:03:20 1.8 @@ -93,7 +93,7 @@ # Make a temp file name in the proper directory. dstdir=`dirname $dst` -dsttmp=$dstdir/#inst.$$# +dsttmp=$dstdir/inst.$$ # Move or copy the file name to the temp name $instcmd $src $dsttmp 1.280 +0 -1 apache-1.3/src/include/ap_config.h Index: ap_config.h =================================================================== RCS file: /export/home/cvs/apache-1.3/src/include/ap_config.h,v retrieving revision 1.279 retrieving revision 1.280 diff -u -r1.279 -r1.280 --- ap_config.h 1999/12/09 17:19:43 1.279 +++ ap_config.h 1999/12/10 11:03:29 1.280 @@ -145,7 +145,6 @@ extern void GETUSERMODE(); extern char *inet_ntoa(); #define NO_SLACK -#define NO_GETTIMEOFDAY #define S_IEXEC S_IXUSR #define S_IREAD S_IRUSR #define S_IWRITE S_IWUSR 1.485 +9 -4 apache-1.3/src/main/http_main.c Index: http_main.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/main/http_main.c,v retrieving revision 1.484 retrieving revision 1.485 diff -u -r1.484 -r1.485 --- http_main.c 1999/12/09 17:19:44 1.484 +++ http_main.c 1999/12/10 11:03:33 1.485 @@ -3285,8 +3285,6 @@ #endif /* TPF */ #endif -#ifndef MPE -/* MPE does not support SO_REUSEADDR and SO_KEEPALIVE */ #ifndef _OSD_POSIX if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *) &one, sizeof(int)) < 0) { ap_log_error(APLOG_MARK, APLOG_CRIT, server_conf, @@ -3301,7 +3299,7 @@ } #endif /*_OSD_POSIX*/ one = 1; -#ifdef SO_KEEPALIVE +#if defined(SO_KEEPALIVE) && !defined(MPE) if (setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, (char *) &one, sizeof(int)) < 0) { ap_log_error(APLOG_MARK, APLOG_CRIT, server_conf, "make_sock: for %s, setsockopt: (SO_KEEPALIVE)", addr); @@ -3315,7 +3313,6 @@ return -1; } #endif -#endif sock_disable_nagle(s); sock_enable_linger(s); @@ -6951,6 +6948,14 @@ char **envpnew; int c, i, l; +#ifdef MPE + /* + * MPE doesn't currently initialize the envp parameter. Instead, we must + * use the global variable environ. + */ + envp = environ; +#endif + /* * parse argument line, * but only handle the -L option 1.33 +3 -0 apache-1.3/src/main/rfc1413.c Index: rfc1413.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/main/rfc1413.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- rfc1413.c 1999/12/09 17:05:28 1.32 +++ rfc1413.c 1999/12/10 11:03:35 1.33 @@ -130,6 +130,9 @@ our_query_sin = *our_sin; our_query_sin.sin_port = htons(ANY_PORT); +#ifdef MPE + our_query_sin.sin_addr.s_addr = INADDR_ANY; +#endif rmt_query_sin = *rmt_sin; rmt_query_sin.sin_port = htons(RFC1413_PORT); 1.37 +4 -2 apache-1.3/src/support/ab.c Index: ab.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/support/ab.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- ab.c 1999/10/27 22:38:53 1.36 +++ ab.c 1999/12/10 11:03:40 1.37 @@ -128,7 +128,9 @@ #include "ebcdic.h" #endif #include +#ifndef MPE #include +#endif #ifndef NO_WRITEV #include @@ -882,14 +884,14 @@ static void copyright(void) { if (!use_html) { - printf("This is ApacheBench, Version %s\n", VERSION " <$Revision: 1.36 $> apache-1.3"); + printf("This is ApacheBench, Version %s\n", VERSION " <$Revision: 1.37 $> apache-1.3"); printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n"); printf("Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/\n"); printf("\n"); } else { printf("

\n"); - printf(" This is ApacheBench, Version %s <%s> apache-1.3
\n", VERSION, "$Revision: 1.36 $"); + printf(" This is ApacheBench, Version %s <%s> apache-1.3
\n", VERSION, "$Revision: 1.37 $"); printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
\n"); printf(" Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/
\n"); printf("

\n

\n"); 1.1 apache-1.3/src/os/mpeix/dlopen.c Index: dlopen.c =================================================================== /* * dlopen()/dlsym()/dlclose()/dlerror() emulation code for MPE * * This is not intended to be a 100% complete implementation. */ #include "httpd.h" typedef struct { char libname[PATH_MAX + 3]; } t_mpe_dld, *p_mpe_dld; /* * hpunload() is an undocumented and unsupported function used to unload * NMXL library symbols. While it isn't listed in the Intrinsics manual * or SYSINTR.PUB.SYS, it performs the same level of parameter checking * that a regular intrinsic does. The parameter contents are the same * as for HPGETPROCPLABEL(), with the exception of symbolname which can * use the wildcard of " @ " which means unload ALL symbols RIGHT NOW. */ extern void hpunload( int parms, /* option extensible hidden parameter */ char * symbolname, char * libname, int * status, int * symboltype, int casesensitive); #ifdef __GNUC__ extern void HPGETPROCPLABEL( int parms, /* option extensible hidden parameter */ char * symbolname, void * symboladdr, int * status, char * libname, int casesensitive, int symboltype, int * datasize, int position, int searchpath, int binding); extern void HPERRMSG( int parms, /* option extensible hidden parameter */ int displaycode, int depth, short errorproc, int errornum, char * buffer, short * buflength, int * status); #else #pragma intrinsic HPERRMSG #pragma intrinsic HPGETPROCPLABEL #endif int mpe_dl_status = 0; char mpe_dl_errmsg[1024]; char mpe_dl_symname[128]; int mpe_dl_symtype; /* 0=proc, 1=data, 2=malloc, 3=hpunload */ /* * dlopen() */ void *dlopen(const char *libname, int flag) { t_mpe_dld *handle; char cwd[PATH_MAX+3]; char library[PATH_MAX+3]; void *symaddr; int datalen; /* Save the library name in absolute format for later use */ if (libname[0] != '/') { getcwd(cwd, sizeof(cwd)); ap_snprintf(library, sizeof(library), " %s/%s ", cwd, libname); } else ap_snprintf(library, sizeof(library), " %s ", libname); /* Unfortunately if we simply tried to load the module structure data item directly in dlsym(), it would complain about unresolved function pointer references. However, if we first load an actual dummy procedure, we can then subsequently load the data item without trouble. Go figure. */ /* Load the dummy procedure mpe_dl_stub */ ap_cpystrn(mpe_dl_symname, " mpe_dl_stub ", sizeof(mpe_dl_symname)); mpe_dl_symtype = 0; HPGETPROCPLABEL( #ifdef __GNUC__ 8, #endif mpe_dl_symname, &symaddr, &mpe_dl_status, library, 1, mpe_dl_symtype, &datalen, 1, 0, 0); /* We consider it to be a failure if the dummy procedure doesn't exist */ if (mpe_dl_status != 0) return NULL; mpe_dl_symtype = 2; /* Allocate a handle */ if ((handle = (t_mpe_dld *)malloc(sizeof(t_mpe_dld))) == NULL) return NULL; /* Initialize the handle fields */ memset(handle, 0, sizeof(t_mpe_dld)); ap_cpystrn(handle->libname,library,sizeof(handle->libname)); return handle; } /* * dlsym() */ void *dlsym(void *handle, const char *symbol) { t_mpe_dld *myhandle = handle; int datalen; void * symaddr = NULL; ap_snprintf(mpe_dl_symname, sizeof(mpe_dl_symname), " %s ", symbol); mpe_dl_symtype = 1; HPGETPROCPLABEL( #ifdef __GNUC__ 8, #endif mpe_dl_symname, &symaddr, &mpe_dl_status, myhandle->libname, 1, mpe_dl_symtype, &datalen, 1, 0, 0); if (mpe_dl_status != 0) { return NULL; } else { return symaddr; } } /* * dlclose() */ int dlclose(void *handle) { p_mpe_dld myhandle = handle; mpe_dl_symtype = 3; /* unload ALL symbols from the library RIGHT NOW */ hpunload(5, " @ ", myhandle->libname, &mpe_dl_status, NULL, 0); free(handle); if (mpe_dl_status == 0) return 0; else return -1; } /* * dlerror() */ const char *dlerror(void) { char errmsg[1024]; short buflen = sizeof(errmsg)-1; int status; char prefix[80]; if (mpe_dl_status == 0) return NULL; switch (mpe_dl_symtype) { case 0: ap_snprintf(prefix,sizeof(prefix), "HPGETPROCPLABEL() failed on procedure%s",mpe_dl_symname); break; case 1: ap_snprintf(prefix,sizeof(prefix), "HPGETPROCPLABEL() failed on data item%s",mpe_dl_symname); break; case 3: ap_cpystrn(prefix,"hpunload() failed",sizeof(prefix)); break; default: ap_cpystrn(prefix,"Unknown MPE dynaloader error",sizeof(prefix)); break; } /* Obtain the error message for the most recent mpe_dl_status value */ HPERRMSG( #ifdef __GNUC__ 7, #endif 3, 0, 0, mpe_dl_status, (char *)&errmsg, &buflen, &status); if (status == 0) errmsg[buflen] = '\0'; else ap_snprintf(errmsg,sizeof(errmsg), "HPERRMSG failed (status=%x); MPE loader status = %x", status, mpe_dl_status); ap_snprintf(mpe_dl_errmsg,sizeof(mpe_dl_errmsg),"%s\n%s",prefix,errmsg); return (char *)&mpe_dl_errmsg; } 1.1 apache-1.3/src/os/mpeix/gettimeofday.c Index: gettimeofday.c =================================================================== /* stub for gettimeofday(): gettimeofday() is UNIX, not POSIX */ /*-------------------------------------------------------------------*/ /* */ /* gettimeofday */ /* */ /*-------------------------------------------------------------------*/ /* */ /* #include */ /* */ /* int gettimeofday( */ /* struct timeval *tp, */ /* struct timezone *tzp, */ /* ); */ /* */ /*-------------------------------------------------------------------*/ /* */ /* This function returns seconds and microseconds since midnight */ /* January 1, 1970. The microseconds is actually only accurate to */ /* the millisecond. */ /* */ /* Note: To pick up the definitions of structs timeval and timezone */ /* from the include file, the directive */ /* _SOCKET_SOURCE must be used. */ /* */ /*-------------------------------------------------------------------*/ /* */ /* RETURN VALUE */ /* A 0 return value indicates that the call succeeded. A -1 return */ /* value indicates an error occurred; errno is set to indicate the */ /* error. */ /* */ /*-------------------------------------------------------------------*/ /* */ /* ERRORS */ /* EFAULT not implemented yet. */ /* */ /*-------------------------------------------------------------------*/ /* Changes: */ /* 2-91 DR. Created. */ /* */ /*-------------------------------------------------------------------*/ /* need _SOCKET_SOURCE to pick up structs timeval and timezone in time.h */ #ifndef _SOCKET_SOURCE # define _SOCKET_SOURCE #endif #include /* structs timeval & timezone, difftime(), localtime(), mktime(), time() */ #pragma intrinsic TIMER int gettimeofday(struct timeval *tp, struct timezone *tpz) { static unsigned long basetime = 0; static int dsttime = 0; static int minuteswest = 0; static int oldtime = 0; register int newtime; int TIMER(); /*-------------------------------------------------------------------*/ /* Setup a base from which all future time will be computed. */ /*-------------------------------------------------------------------*/ if ( basetime == 0 ) { time_t gmt_time; time_t loc_time; struct tm *loc_time_tm; gmt_time = time( NULL ); loc_time_tm = localtime( &gmt_time ) ; loc_time = mktime( loc_time_tm ); oldtime = TIMER(); basetime = (unsigned long) ( loc_time - (oldtime/1000) ); /*----------------------------------------------------------------*/ /* The calling process must be restarted if timezone or dst */ /* changes. */ /*----------------------------------------------------------------*/ minuteswest = (int) (difftime( loc_time, gmt_time ) / 60); dsttime = loc_time_tm->tm_isdst; } /*-------------------------------------------------------------------*/ /* Get the new time value. The timer value rolls over every 24 days, */ /* so if the delta is negative, the basetime value is adjusted. */ /*-------------------------------------------------------------------*/ newtime = TIMER(); if ( newtime < oldtime ) basetime += 2073600; oldtime = newtime; /*-------------------------------------------------------------------*/ /* Return the timestamp info. */ /*-------------------------------------------------------------------*/ tp->tv_sec = basetime + newtime/1000; tp->tv_usec = (newtime%1000) * 1000; /* only accurate to milli */ if (tpz) { tpz->tz_minuteswest = minuteswest; tpz->tz_dsttime = dsttime; } return 0; } /* gettimeofday() */ 1.1 apache-1.3/src/os/mpeix/mpe_dl_stub.c Index: mpe_dl_stub.c =================================================================== int mpe_dl_stub(void) { return 0; }; 1.1 apache-1.3/src/os/mpeix/os-inline.c Index: os-inline.c =================================================================== #include "../unix/os-inline.c" 1.1 apache-1.3/src/os/mpeix/os.c Index: os.c =================================================================== #include "../unix/os.c" 1.1 apache-1.3/src/os/mpeix/os.h Index: os.h =================================================================== /* ==================================================================== * Copyright (c) 1998-1999 The Apache Group. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. All advertising materials mentioning features or use of this * software must display the following acknowledgment: * "This product includes software developed by the Apache Group * for use in the Apache HTTP server project (http://www.apache.org/)." * * 4. The names "Apache Server" and "Apache Group" must not be used to * endorse or promote products derived from this software without * prior written permission. For written permission, please contact * apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * 6. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by the Apache Group * for use in the Apache HTTP server project (http://www.apache.org/)." * * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Group and was originally based * on public domain software written at the National Center for * Supercomputing Applications, University of Illinois, Urbana-Champaign. * For more information on the Apache Group and the Apache HTTP server * project, please see . * */ #ifndef APACHE_OS_H #define APACHE_OS_H #include "ap_config.h" #ifndef PLATFORM #define PLATFORM "MPE/iX" #endif /* * 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 */ #if !defined(INLINE) && defined(USE_GNU_INLINE) /* Compiler supports inline, so include the inlineable functions as * part of the header */ #define INLINE extern ap_inline INLINE int ap_os_is_path_absolute(const char *file); #include "os-inline.c" #else /* Compiler does not support inline, so prototype the inlineable functions * as normal */ extern int ap_os_is_path_absolute(const char *file); #endif /* Other ap_os_ routines not used by this platform */ #define ap_os_is_filename_valid(f) (1) #define ap_os_kill(pid, sig) kill(pid, sig) /* * Abstraction layer for loading * Apache modules under run-time via * dynamic shared object (DSO) mechanism */ #ifdef HAVE_DL_H #include #endif /* * Do not use native AIX DSO support */ #ifdef AIX #undef HAVE_DLFCN_H #endif #ifdef HAVE_DLFCN_H #include #else void *dlopen(const char *, int); int dlclose(void *); void *dlsym(void *, const char *); const char *dlerror(void); #endif /* probably on an older system that doesn't support RTLD_NOW or RTLD_LAZY. * The below define is a lie since we are really doing RTLD_LAZY since the * system doesn't support RTLD_NOW. */ #ifndef RTLD_NOW #define RTLD_NOW 1 #endif #ifndef RTLD_GLOBAL #define RTLD_GLOBAL 0 #endif #if (defined(__FreeBSD__) ||\ defined(__OpenBSD__) ||\ defined(__NetBSD__) ) && !defined(__ELF__) #define DLSYM_NEEDS_UNDERSCORE #endif #define ap_os_dso_handle_t void * void ap_os_dso_init(void); void * ap_os_dso_load(const char *); void ap_os_dso_unload(void *); void * ap_os_dso_sym(void *, const char *); const char *ap_os_dso_error(void); #endif /* !APACHE_OS_H */ 1.1 apache-1.3/src/os/mpeix/Makefile.tmpl Index: Makefile.tmpl =================================================================== CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS) LIBS=$(EXTRA_LIBS) $(LIBS1) INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES) LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS) LIBOBJS= os.o os-inline.o dlopen.o gettimeofday.o OBJS= $(LIBOBJS) mpe_dl_stub.o LIB= libos.a all: $(LIB) mpe_dl_stub.o $(LIB): $(LIBOBJS) rm -f $@ ar cr $@ $(LIBOBJS) $(RANLIB) $@ .c.o: $(CC) -c $(INCLUDES) $(CFLAGS) $< clean: rm -f $(OBJS) $(LIB) distclean: clean -rm -f Makefile # We really don't expect end users to use this rule. It works only with # gcc, and rebuilds Makefile.tmpl. You have to re-run Configure after # using it. depend: cp Makefile.tmpl Makefile.tmpl.bak \ && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.tmpl > Makefile.new \ && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \ && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \ -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \ > Makefile.tmpl \ && rm Makefile.new $(OBJS): Makefile # DO NOT REMOVE dlopen.o: dlopen.c gettimeofday.o: gettimeofday.c mpe_dl_stub.o: mpe_dl_stub.c os-inline.o: os-inline.c $(INCDIR)/ap_config.h \ $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h \ $(OSDIR)/os.h $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h os.o: os.c $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \ $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \ $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h os.h 1.1 apache-1.3/src/os/mpeix/README Index: README =================================================================== For the latest info about Apache for MPE/iX, please see: http://jazz.external.hp.com/src/apache/index.html or http://www.bixby.org/mark/apacheix.html