From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25463 invoked from network); 12 Apr 2001 16:21:22 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 12 Apr 2001 16:21:22 -0000 Received: (qmail 29692 invoked by alias); 12 Apr 2001 16:21:22 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13965 Received: (qmail 29678 invoked from network); 12 Apr 2001 16:21:21 -0000 From: "Bart Schaefer" Message-Id: <1010412162037.ZM32221@candle.brasslantern.com> Date: Thu, 12 Apr 2001 16:20:36 +0000 In-Reply-To: <1010412155741.ZM31500@candle.brasslantern.com> Comments: In reply to "Bart Schaefer" "Re: PATCH: Re: Build Failures on SunOS-4.1 and 5.5" (Apr 12, 3:57pm) References: <545wv8qb31n.fsf@icd.teradyne.com> <20010412105441.A24525@dman.com> <1010412153947.ZM31455@candle.brasslantern.com> <1010412155741.ZM31500@candle.brasslantern.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: PATCH: Re: Build Failures on SunOS-4.1 and 5.5 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Apr 12, 3:57pm, Bart Schaefer wrote: } Subject: Re: PATCH: Re: Build Failures on SunOS-4.1 and 5.5 } } [...] it's probably better to (1) change system.h to conditionally } include (only when not HAVE_TERMCAP_H) and (2) make the entire } block in prototypes.h be wrapped in } } #if !(defined(HAVE_TERMCAP_H) || defined(HAVE_TERM_H)) Ignoring my patch in 13962, which was the right fix for my local variant of Vin's symptoms but not for the actual bug report, here's the complete change: Index: Src/prototypes.h =================================================================== RCS file: /cvsroot/zsh/zsh/Src/prototypes.h,v retrieving revision 1.2 diff -u -r1.2 prototypes.h --- Src/prototypes.h 2001/04/12 14:56:15 1.2 +++ Src/prototypes.h 2001/04/12 16:16:00 @@ -33,15 +33,13 @@ char *calloc _((size_t, size_t)); #endif -#ifndef HAVE_TERMCAP_H +#if !(defined(HAVE_TERMCAP_H) || defined(HAVE_TERM_H)) extern int tgetent _((char *bp, char *name)); extern int tgetnum _((char *id)); extern int tgetflag _((char *id)); extern char *tgetstr _((char *id, char **area)); extern char *tgoto _((char *cm, int destcol, int destline)); -# ifndef HAVE_TERM_H extern int tputs _((char *cp, int affcnt, int (*outc) (int))); -# endif #endif /* MISSING PROTOTYPES FOR VARIOUS OPERATING SYSTEMS */ Index: Src/system.h =================================================================== RCS file: /cvsroot/zsh/zsh/Src/system.h,v retrieving revision 1.12 diff -u -r1.12 system.h --- Src/system.h 2001/02/19 10:26:54 1.12 +++ Src/system.h 2001/04/12 16:16:04 @@ -312,6 +312,10 @@ #ifdef HAVE_TERMCAP_H # include +#else +# ifdef HAVE_TERM_H +# include +# endif #endif #if defined(GWINSZ_IN_SYS_IOCTL) || defined(CLOBBERS_TYPEAHEAD) Index: Src/Modules/terminfo.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Modules/terminfo.c,v retrieving revision 1.12 diff -u -r1.12 terminfo.c --- Src/Modules/terminfo.c 2001/04/12 04:08:37 1.12 +++ Src/Modules/terminfo.c 2001/04/12 16:16:10 @@ -29,17 +29,14 @@ #include "terminfo.mdh" #include "terminfo.pro" -#ifdef HAVE_CURSES_H -# include -#endif -#ifdef HAVE_TERM_H -# include -#endif static char terminfo_nam[] = "terminfo"; /**/ #ifdef HAVE_TIGETSTR +# ifdef HAVE_CURSES_H +# include +# endif static Param terminfo_pm; -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net