httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@hyperreal.org
Subject cvs commit: apache-1.3/src/os/tpf TPFExport
Date Wed, 08 Dec 1999 23:03:28 GMT
manoj       99/12/08 15:03:21

  Modified:    src      CHANGES
               src/include ap_config.h
               src/main buff.c
               src/modules/proxy proxy_cache.c proxy_ftp.c proxy_http.c
                        proxy_util.c
               src/os/tpf TPFExport
  Log:
  Make mod_proxy work on TPF.
  
  Submitted by:	Joe Moenich <moenich@us.ibm.com>
  
  Revision  Changes    Path
  1.1474    +3 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1473
  retrieving revision 1.1474
  diff -u -d -u -r1.1473 -r1.1474
  --- CHANGES	1999/12/08 19:01:13	1.1473
  +++ CHANGES	1999/12/08 23:01:46	1.1474
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.10
   
  +  *) mod_proxy now works on TPF.
  +     [Joe Moenich <moenich@us.ibm.com>]
  +
     *) Enhance mod_actions' Script handling to be able to deal with
        arbitrary methods and not just the well-known ones.  This allows
        experimental or organisation-private methods to be used without
  
  
  
  1.278     +3 -0      apache-1.3/src/include/ap_config.h
  
  Index: ap_config.h
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/include/ap_config.h,v
  retrieving revision 1.277
  retrieving revision 1.278
  diff -u -d -u -r1.277 -r1.278
  --- ap_config.h	1999/12/07 12:19:50	1.277
  +++ ap_config.h	1999/12/08 23:02:23	1.278
  @@ -937,6 +937,9 @@
   /*#define USE_TPF_DAEMON*/
   #define USE_TPF_SCOREBOARD
   #define USE_TPF_SELECT
  +#define S_IREAD S_IRUSR
  +#define S_IWRITE S_IWUSR
  +#define S_IEXEC S_IXUSR
   #define crypt(buf,salt) ((char *)buf)
   #undef  offsetof
   #define offsetof(s_type,field) ((size_t)&(((s_type*)0)->field))
  
  
  
  1.92      +1 -2      apache-1.3/src/main/buff.c
  
  Index: buff.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/buff.c,v
  retrieving revision 1.91
  retrieving revision 1.92
  diff -u -d -u -r1.91 -r1.92
  --- buff.c	1999/12/01 20:24:56	1.91
  +++ buff.c	1999/12/08 23:02:34	1.92
  @@ -285,10 +285,9 @@
   
       ap_check_signals();
       if (fb->flags & B_SOCKET) {
  -        alarm(rv = alarm(0));
           FD_ZERO(&fds);
           FD_SET(fb->fd_in, &fds);
  -        tv.tv_sec = rv+1;
  +        tv.tv_sec = 1;
           tv.tv_usec = 0;
           rv = ap_select(fb->fd_in + 1, &fds, NULL, NULL, &tv);
           if (rv > 0)
  
  
  
  1.65      +29 -6     apache-1.3/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -d -u -r1.64 -r1.65
  --- proxy_cache.c	1999/10/21 20:45:03	1.64
  +++ proxy_cache.c	1999/12/08 23:02:43	1.65
  @@ -73,6 +73,9 @@
   #include <sys/types.h>
   #include <sys/stat.h>
   #endif
  +#ifdef TPF
  +#include "os.h"
  +#endif
   
   DEF_Explain
   
  @@ -123,7 +126,7 @@
   			    const char *cachedir, const char *cachesubdir);
   static void help_proxy_garbage_coll(request_rec *r);
   static int should_proxy_garbage_coll(request_rec *r);
  -#if !defined(WIN32) && !defined(MPE) && !defined(OS2) && !defined(NETWARE)
  +#if !defined(WIN32) && !defined(MPE) && !defined(OS2) && !defined(NETWARE)
&& !defined(TPF)
   static void detached_proxy_garbage_coll(request_rec *r);
   #endif
   
  @@ -143,7 +146,7 @@
   
       ap_block_alarms();		/* avoid SIGALRM on big cache cleanup */
       if (should_proxy_garbage_coll(r))
  -#if !defined(WIN32) && !defined(MPE) && !defined(OS2) && !defined(NETWARE)
  +#if !defined(WIN32) && !defined(MPE) && !defined(OS2) && !defined(NETWARE)
&& !defined(TPF)
           detached_proxy_garbage_coll(r);
   #else
           help_proxy_garbage_coll(r);
  @@ -203,7 +206,7 @@
   	return 0;
   }
   
  -#if !defined(WIN32) && !defined(MPE) && !defined(OS2) && !defined(NETWARE)
  +#if !defined(WIN32) && !defined(MPE) && !defined(OS2) && !defined(NETWARE)
&& !defined(TPF)
   static void detached_proxy_garbage_coll(request_rec *r)
   {
       pid_t pid;
  @@ -465,9 +468,19 @@
   	/*      if (strlen(ent->d_name) != HASH_LEN) continue; */
   
   /* under OS/2 use dirent's d_attr to identify a diretory */
  -#ifdef OS2
  +/* under TPF use stat to identify a directory */
  +#if defined(OS2) || defined(TPF)
   /* is it a directory? */
  +#ifdef OS2
   	if (ent->d_attr & A_DIR) {
  +#elif defined(TPF)
  +    if (stat(filename, &buf) == -1) {
  +        if (errno != ENOENT)
  +            ap_log_error(APLOG_MARK, APLOG_ERR, r->server,
  +                 "proxy gc: stat(%s)", filename);
  +    }
  +    if (S_ISDIR(buf.st_mode)) {
  +#endif
   	    char newcachedir[HUGE_STRING_LEN];
   	    ap_snprintf(newcachedir, sizeof(newcachedir),
   			"%s%s/", cachesubdir, ent->d_name);
  @@ -500,8 +513,8 @@
   	    continue;
   	}
   
  -/* In OS/2 this has already been done above */
  -#ifndef OS2
  +/* In OS/2 and TPF this has already been done above */
  +#if !defined(OS2) && !defined(TPF)
   	if (S_ISDIR(buf.st_mode)) {
   	    char newcachedir[HUGE_STRING_LEN];
   	    close(fd);
  @@ -1029,6 +1042,7 @@
       buff[35] = ' ';
   
   /* open temporary file */
  +#ifndef TPF
   #define TMPFILESTR	"/tmpXXXXXX"
       if (conf->cache.root == NULL)
   	return DECLINED;
  @@ -1037,6 +1051,15 @@
       strcat(c->tempfile, TMPFILESTR);
   #undef TMPFILESTR
       p = mktemp(c->tempfile);
  +#else
  +    if (conf->cache.root == NULL)
  +    return DECLINED;
  +    c->tempfile = ap_palloc(r->pool, strlen(conf->cache.root) +1+ L_tmpnam);
  +    strcpy(c->tempfile, conf->cache.root);
  +    strcat(c->tempfile, "/");
  +    p = tmpnam(NULL);
  +    strcat(c->tempfile, p);
  +#endif
       if (p == NULL)
   	return DECLINED;
   
  
  
  
  1.79      +4 -0      apache-1.3/src/modules/proxy/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/proxy/proxy_ftp.c,v
  retrieving revision 1.78
  retrieving revision 1.79
  diff -u -d -u -r1.78 -r1.79
  --- proxy_ftp.c	1999/08/14 08:35:53	1.78
  +++ proxy_ftp.c	1999/12/08 23:02:48	1.79
  @@ -564,6 +564,7 @@
   	return HTTP_INTERNAL_SERVER_ERROR;
       }
   
  +#ifndef TPF
       if (conf->recv_buffer_size > 0
   	&& setsockopt(sock, SOL_SOCKET, SO_RCVBUF,
   		       (const char *) &conf->recv_buffer_size, sizeof(int))
  @@ -571,6 +572,7 @@
   	    ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
   			 "setsockopt(SO_RCVBUF): Failed to set ProxyReceiveBufferSize, using default");
       }
  +#endif
   
       if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *) &one,
   		   sizeof(one)) == -1) {
  @@ -816,6 +818,7 @@
   	return HTTP_INTERNAL_SERVER_ERROR;
       }
   
  +#ifndef TPF
       if (conf->recv_buffer_size) {
   	if (setsockopt(dsock, SOL_SOCKET, SO_RCVBUF,
   	       (const char *) &conf->recv_buffer_size, sizeof(int)) == -1) {
  @@ -823,6 +826,7 @@
   			 "setsockopt(SO_RCVBUF): Failed to set ProxyReceiveBufferSize, using default");
   	}
       }
  +#endif
   
       ap_bputs("PASV" CRLF, f);
       ap_bflush(f);
  
  
  
  1.65      +2 -0      apache-1.3/src/modules/proxy/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/proxy/proxy_http.c,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -d -u -r1.64 -r1.65
  --- proxy_http.c	1999/05/01 17:02:29	1.64
  +++ proxy_http.c	1999/12/08 23:02:52	1.65
  @@ -257,6 +257,7 @@
   	return HTTP_INTERNAL_SERVER_ERROR;
       }
   
  +#ifndef TPF
       if (conf->recv_buffer_size) {
   	if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF,
   		       (const char *) &conf->recv_buffer_size, sizeof(int))
  @@ -265,6 +266,7 @@
   			 "setsockopt(SO_RCVBUF): Failed to set ProxyReceiveBufferSize, using default");
   	}
       }
  +#endif
   
   #ifdef SINIX_D_RESOLVER_BUG
       {
  
  
  
  1.82      +2 -2      apache-1.3/src/modules/proxy/proxy_util.c
  
  Index: proxy_util.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/proxy/proxy_util.c,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -d -u -r1.81 -r1.82
  --- proxy_util.c	1999/10/21 20:45:04	1.81
  +++ proxy_util.c	1999/12/08 23:02:56	1.82
  @@ -280,7 +280,7 @@
   	if (!ap_isdigit(host[i]) && host[i] != '.')
   	    break;
       /* must be an IP address */
  -#if defined(WIN32) || defined(NETWARE)
  +#if defined(WIN32) || defined(NETWARE) || defined(TPF)
       if (host[i] == '\0' && (inet_addr(host) == -1))
   #else
       if (host[i] == '\0' && (ap_inet_addr(host) == -1 || inet_network(host) == -1))
  @@ -517,7 +517,7 @@
   
       ap_kill_timeout(r);
   
  -#ifdef WIN32
  +#if defined(WIN32) || defined(TPF)
       /* works fine under win32, so leave it */
       ap_hard_timeout("proxy send body", r);
       alternate_timeouts = 0;
  
  
  
  1.3       +2 -0      apache-1.3/src/os/tpf/TPFExport
  
  Index: TPFExport
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/os/tpf/TPFExport,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -d -u -r1.2 -r1.3
  --- TPFExport	1999/01/06 21:57:04	1.2
  +++ TPFExport	1999/12/08 23:03:11	1.3
  @@ -4,4 +4,6 @@
   # replace the following with the location of your TPF include files
   export _C89_INCDIRS="/u/tpf41/currentmaint/include /u/tpf41/currentmaint/include/oco" 
   export TPF=YES
  +export _C89_INCLIBS=""
  +export _C89_CSYSLIB=""
   echo "Done"
  
  
  

Mime
View raw message