httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bh...@gensym.com (Ben Hyde)
Subject [PATCH] Resolve BUILD warnings under ULTRIX/mips
Date Fri, 10 Apr 1998 16:39:48 GMT

This patch resolves the remaining warnings 
when I compile the build on Ultrix/mips.

  gcc -c  -I../os/unix -I../include   -DULTRIX -DSTATUS -DUSE_HSREGEX '-DHTTPD_ROOT="/tmp/httpd"'
 alloc.c
  alloc.c: In function `pfopen':
  alloc.c:1560: warning: passing arg 2 of `fdopen' discards `const' from pointer target type
  alloc.c: In function `pfdopen':
  alloc.c:1578: warning: passing arg 2 of `fdopen' discards `const' from pointer target type

    No const under ULTRIX_BRAIN_DEATH

  gcc -c  -I../../os/unix -I../../include   -DULTRIX -DSTATUS -DUSE_HSREGEX '-DHTTPD_ROOT="/tmp/httpd"'
 mod_autoindex.c
  mod_autoindex.c: In function `index_directory':
  mod_autoindex.c:1117: warning: passing arg 4 of `qsort' from incompatible pointer type

    Remove previous ULTRIX_BRAIN_DEATH which doesn't work for me.

  gcc -c  -I../../os/unix -I../../include   -DULTRIX -DSTATUS -DUSE_HSREGEX '-DHTTPD_ROOT="/tmp/httpd"'
 proxy_cache.c
  proxy_cache.c: In function `proxy_cache_update':
  proxy_cache.c:852: warning: assignment makes pointer from integer without a cast
  
    Prototype mktemp by hand when ULTRIX_BRAIN_DEATH (yes it is in libc and works).

- ben hyde
  "Ascription is an anathema to any enthusiasm."

----
> cvs diff -u include/alloc.h main/alloc.c modules/proxy/proxy_cache.c modules/standard/mod_autoindex.c
Index: include/alloc.h
===================================================================
RCS file: /cvs/apache-1.3/src/include/alloc.h,v
retrieving revision 1.54
diff -u -r1.54 alloc.h
--- alloc.h	1998/04/09 08:20:24	1.54
+++ alloc.h	1998/04/10 16:37:42
@@ -245,8 +245,13 @@
  * the note_cleanups_for_foo routines are for 
  */
 
-API_EXPORT(FILE *) pfopen(struct pool *, const char *name, const char *fmode);
+#ifdef ULTRIX_BRAIN_DEATH
+API_EXPORT(FILE *) pfopen(struct pool *, const char *name,    char *fmode);
+API_EXPORT(FILE *) pfdopen(struct pool *, int fd,       char *fmode);
+#else
+API_EXPORT(FILE *) pfopen(struct pool *, const char *name,    char *fmode);
 API_EXPORT(FILE *) pfdopen(struct pool *, int fd, const char *fmode);
+#endif
 API_EXPORT(int) popenf(struct pool *, const char *name, int flg, int mode);
 
 API_EXPORT(void) note_cleanups_for_file(pool *, FILE *);
Index: main/alloc.c
===================================================================
RCS file: /cvs/apache-1.3/src/main/alloc.c,v
retrieving revision 1.86
diff -u -r1.86 alloc.c
--- alloc.c	1998/04/06 07:26:27	1.86
+++ alloc.c	1998/04/10 16:37:43
@@ -1536,7 +1536,11 @@
     register_cleanup(p, (void *) fp, file_cleanup, file_child_cleanup);
 }
 
+#ifdef ULTRIX /* _BRAIN_DEATH */
+API_EXPORT(FILE *) pfopen(pool *a, const char *name,      char *mode)
+#else
 API_EXPORT(FILE *) pfopen(pool *a, const char *name, const char *mode)
+#endif
 {
     FILE *fd = NULL;
     int baseFlag, desc;
@@ -1570,7 +1574,11 @@
     return fd;
 }
 
+#ifdef ULTRIX /* _BRAIN_DEATH */
+API_EXPORT(FILE *) pfdopen(pool *a, int fd,       char *mode)
+#else
 API_EXPORT(FILE *) pfdopen(pool *a, int fd, const char *mode)
+#endif
 {
     FILE *f;
 
Index: modules/proxy/proxy_cache.c
===================================================================
RCS file: /cvs/apache-1.3/src/modules/proxy/proxy_cache.c,v
retrieving revision 1.35
diff -u -r1.35 proxy_cache.c
--- proxy_cache.c	1998/03/31 12:53:01	1.35
+++ proxy_cache.c	1998/04/10 16:37:44
@@ -636,6 +636,9 @@
 int proxy_cache_update(struct cache_req *c, array_header *resp_hdrs,
 		       const int is_HTTP1, int nocache)
 {
+#ifdef ULTRIX_BRAIN_DEATH
+  extern char *mktemp(char *template);
+#endif 
     request_rec *r = c->req;
     char *p;
     int i;
Index: modules/standard/mod_autoindex.c
===================================================================
RCS file: /cvs/apache-1.3/src/modules/standard/mod_autoindex.c,v
retrieving revision 1.72
diff -u -r1.72 mod_autoindex.c
--- mod_autoindex.c	1998/03/31 12:53:09	1.72
+++ mod_autoindex.c	1998/04/10 16:37:44
@@ -1113,12 +1113,8 @@
 	    p = p->next;
 	}
 
-#ifdef ULTRIX_BRAIN_DEATH
-	qsort((void *) ar, num_ent, sizeof(struct ent *), (int (*)) dsortf);
-#else
 	qsort((void *) ar, num_ent, sizeof(struct ent *),
 	          (int (*)(const void *, const void *)) dsortf);
-#endif
     }
     output_directories(ar, num_ent, autoindex_conf, r, autoindex_opts, keyid,
 		       direction);

Mime
View raw message