Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 3449 invoked by uid 6000); 10 Apr 1998 22:05:58 -0000 Received: (qmail 3440 invoked from network); 10 Apr 1998 22:05:56 -0000 Received: from valis.worldgate.com (marcs@198.161.84.2) by taz.hyperreal.org with SMTP; 10 Apr 1998 22:05:56 -0000 Received: from localhost (marcs@localhost) by valis.worldgate.com (8.8.7/8.8.7) with SMTP id QAA21160 for ; Fri, 10 Apr 1998 16:05:52 -0600 (MDT) Date: Fri, 10 Apr 1998 16:05:51 -0600 (MDT) From: Marc Slemko To: new-httpd@apache.org Subject: Re: [PATCH] Resolve BUILD warnings under ULTRIX/mips (take 3) In-Reply-To: <199804102202.SAA05635@devsys.jaguNET.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org On Fri, 10 Apr 1998, Jim Jagielski wrote: > Ben Hyde wrote: > > > > > > This third version of this patch avoids touching alloc.h. > > It takes handful fewer lines, and uses a cast (Dean felt > > that inside a BRAIN_DEAD a cast was tolerable :) ). - ben hyde > > > > I'm not sure if I'm wild about the name hacked_fdopen Neither am I. It is not wise to throw such things in wildly without having a more defined setup. If we need a new *_fdopen, make a real one. Can still be an ifdef, the difference is just that it is not a hack. See ap_select for an example. > ------ > > But +1 > > > --- > > > cvs diff -u main/alloc.c modules/proxy/proxy_cache.c modules/standard/mod_autoindex.c > > 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 19:55:19 > > @@ -1536,6 +1536,12 @@ > > register_cleanup(p, (void *) fp, file_cleanup, file_child_cleanup); > > } > > > > +#ifdef ULTRIX_BRAIN_DEATH > > +#define hacked_fdopen(d,m) fdopen((d), (char *)(m)) > > +#else > > +#define hacked_fdopen(d,m) fdopen((d), (m)) > > +#endif > > + > > API_EXPORT(FILE *) pfopen(pool *a, const char *name, const char *mode) > > { > > FILE *fd = NULL; > > @@ -1557,7 +1563,7 @@ > > modeFlags); > > if (desc >= 0) { > > desc = ap_slack(desc, AP_SLACK_LOW); > > - fd = fdopen(desc, mode); > > + fd = hacked_fdopen(desc, mode); > > } > > } > > else { > > @@ -1575,7 +1581,7 @@ > > FILE *f; > > > > block_alarms(); > > - f = fdopen(fd, mode); > > + f = hacked_fdopen(fd, mode); > > if (f != NULL) > > note_cleanups_for_file(a, f); > > unblock_alarms(); > > 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 19:55:20 > > @@ -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 19:55:20 > > @@ -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); > > > > > -- > =========================================================================== > Jim Jagielski ||| jim@jaguNET.com ||| http://www.jaguNET.com/ > "That's no ordinary rabbit... that's the most foul, > cruel and bad-tempered rodent you ever laid eyes on" >