From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-request@euclid.skiles.gatech.edu Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.6/8.7.3) with ESMTP id UAA00639 for ; Wed, 20 Nov 1996 20:20:41 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id DAA23558; Wed, 20 Nov 1996 03:56:41 -0500 (EST) Resent-Date: Wed, 20 Nov 1996 03:56:41 -0500 (EST) Message-Id: <199611200857.JAA23579@hydra.ifh.de> X-Authentication-Warning: hydra.ifh.de: Host pws@localhost didn't use HELO protocol To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Re: 3.1.0-test3: gcc -ansi -pedantic In-reply-to: "Thorsten Meinecke"'s message of "Tue, 19 Nov 1996 21:45:51 MET." Date: Wed, 20 Nov 1996 09:57:06 +0100 From: Peter Stephenson Resent-Message-ID: <"gz1KL2.0.zl5.9Viao"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2438 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Thorsten Meinecke wrote: > Hello, did anyone bother before to build zsh with gcc -ansi -pedantic? Might as well complete the job: (1) a pointer lacking a cast in bin_read() (2) the function casts in module.c (3) the variable-sized arrays in subst.c (which only affects gcc anyway). The IRIX has pairs of ?'s in comments which gcc thinks are supposed to be triglyphs, which is an additional annoyance. *** Src/builtin.c.ansi Mon Nov 18 09:27:19 1996 --- Src/builtin.c Wed Nov 20 09:38:00 1996 *************** *** 4974,4980 **** putchar('\n'); } if (!ops['e']) ! setsparam(reply, line); return 0; } --- 4974,4980 ---- putchar('\n'); } if (!ops['e']) ! setsparam(reply, (char *)line); return 0; } *** Src/module.c.ansi Mon Nov 18 09:27:21 1996 --- Src/module.c Wed Nov 20 09:50:41 1996 *************** *** 46,51 **** --- 46,53 ---- static LinkList modules; + typedef int (*Module_func) _((Module)); + /**/ void * load_module(char *name) *************** *** 77,83 **** { char *s, *t; char buf[PATH_MAX + 1]; ! int (*fn) _((Module)); s = strrchr(m->nam, '/'); if (s) { --- 79,85 ---- { char *s, *t; char buf[PATH_MAX + 1]; ! Module_func fn; s = strrchr(m->nam, '/'); if (s) { *************** *** 94,100 **** #else sprintf(buf, "boot_%s", s); #endif ! fn = dlsym(m->handle, buf); return fn ? fn(m) : 1; } --- 96,102 ---- #else sprintf(buf, "boot_%s", s); #endif ! fn = (Module_func)dlsym(m->handle, buf); return fn ? fn(m) : 1; } *************** *** 104,110 **** { char *s, *t; char buf[PATH_MAX + 1]; ! int (*fn) _((Module)); s = strrchr(m->nam, '/'); if (s) { --- 106,112 ---- { char *s, *t; char buf[PATH_MAX + 1]; ! Module_func fn; s = strrchr(m->nam, '/'); if (s) { *************** *** 121,127 **** #else sprintf(buf, "cleanup_%s", s); #endif ! fn = dlsym(m->handle, buf); return fn ? fn(m) : 0; } --- 123,129 ---- #else sprintf(buf, "cleanup_%s", s); #endif ! fn = (Module_func)dlsym(m->handle, buf); return fn ? fn(m) : 0; } *** Src/subst.c.ansi Thu Oct 10 12:05:11 1996 --- Src/subst.c Wed Nov 20 09:47:35 1996 *************** *** 447,453 **** cstrpcmp(const void *a, const void *b) { #ifdef HAVE_STRCOLL ! # ifdef __GNUC__ char c[strlen(*(char **) a) + 1]; char d[strlen(*(char **) b) + 1]; # else --- 447,453 ---- cstrpcmp(const void *a, const void *b) { #ifdef HAVE_STRCOLL ! # if defined(__GNUC__) && !defined(__STRICT_ANSI__) char c[strlen(*(char **) a) + 1]; char d[strlen(*(char **) b) + 1]; # else *************** *** 477,483 **** invcstrpcmp(const void *a, const void *b) { #ifdef HAVE_STRCOLL ! # ifdef __GNUC__ char c[strlen(*(char **) a) + 1]; char d[strlen(*(char **) b) + 1]; # else --- 477,483 ---- invcstrpcmp(const void *a, const void *b) { #ifdef HAVE_STRCOLL ! # if defined(__GNUC__) && !defined(__STRICT_ANSI__) char c[strlen(*(char **) a) + 1]; char d[strlen(*(char **) b) + 1]; # else -- Peter Stephenson Tel: +49 33762 77366 WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77413 Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen DESY-IfH, 15735 Zeuthen, Germany.