From 02e0363afac537a428acd616ee8124a475fddcdf Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Fri, 13 Apr 2001 16:29:28 +0000 Subject: Fix term*.h header file collisions. --- Src/Modules/termcap.c | 4 ++++ Src/Modules/terminfo.c | 13 +++++++++++++ Src/prototypes.h | 2 +- Src/system.h | 8 -------- 4 files changed, 18 insertions(+), 9 deletions(-) (limited to 'Src') diff --git a/Src/Modules/termcap.c b/Src/Modules/termcap.c index dad47aa17..db79a65a9 100644 --- a/Src/Modules/termcap.c +++ b/Src/Modules/termcap.c @@ -27,12 +27,16 @@ * */ +#define USES_TERMCAP_H 1 #include "termcap.mdh" #include "termcap.pro" /* echotc: output a termcap */ #ifdef HAVE_TGETENT +# ifdef HAVE_TERMCAP_H +# include +# endif /**/ static int diff --git a/Src/Modules/terminfo.c b/Src/Modules/terminfo.c index b3c3c2876..0bd318fc6 100644 --- a/Src/Modules/terminfo.c +++ b/Src/Modules/terminfo.c @@ -27,6 +27,7 @@ * */ +#define USES_TERM_H 1 #include "terminfo.mdh" #include "terminfo.pro" @@ -34,9 +35,21 @@ static char terminfo_nam[] = "terminfo"; /**/ #ifdef HAVE_TIGETSTR + +/* The following two undefs are needed for Solaris 2.6 */ +# ifdef VINTR +# undef VINTR +# endif +# ifdef offsetof +# undef offsetof +# endif + # ifdef HAVE_CURSES_H # include # endif +# ifdef HAVE_TERM_H +# include +# endif static Param terminfo_pm; diff --git a/Src/prototypes.h b/Src/prototypes.h index 5b34b93b4..3dc5badf2 100644 --- a/Src/prototypes.h +++ b/Src/prototypes.h @@ -33,7 +33,7 @@ char *realloc _((void *, size_t)); char *calloc _((size_t, size_t)); #endif -#if !(defined(HAVE_TERMCAP_H) || defined(HAVE_TERM_H)) +#if !(defined(USES_TERMCAP_H) || defined(USES_TERM_H)) extern int tgetent _((char *bp, char *name)); extern int tgetnum _((char *id)); extern int tgetflag _((char *id)); diff --git a/Src/system.h b/Src/system.h index 6966f517b..1540e421f 100644 --- a/Src/system.h +++ b/Src/system.h @@ -310,14 +310,6 @@ struct timezone { # endif /* HAVE_TERMIO_H */ #endif /* HAVE_TERMIOS_H */ -#ifdef HAVE_TERMCAP_H -# include -#else -# ifdef HAVE_TERM_H -# include -# endif -#endif - #if defined(GWINSZ_IN_SYS_IOCTL) || defined(CLOBBERS_TYPEAHEAD) # include #endif -- cgit 1.4.1