summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Src/prototypes.h24
2 files changed, 24 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 38e927e78..90d19f19b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-03  Peter Stephenson  <pws@csr.com>
+
+	* 29134: Src/prototypes.h: change termcap prototypes for AIX
+	locally until we find the header.
+
 2011-05-02  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* 29129: Src/exec.c: reading off end of file descriptor array
@@ -14560,5 +14565,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5272 $
+* $Revision: 1.5273 $
 *****************************************************
diff --git a/Src/prototypes.h b/Src/prototypes.h
index bedde8df1..f059b6620 100644
--- a/Src/prototypes.h
+++ b/Src/prototypes.h
@@ -34,12 +34,24 @@ char *calloc _((size_t, size_t));
 #endif
 
 #if !(defined(USES_TERMCAP_H) || defined(USES_TERM_H))
-extern int tgetent _((char *bp, const char *name));
-extern int tgetnum _((const char *id));
-extern int tgetflag _((const char *id));
-extern char *tgetstr _((const char *id, char **area));
-extern char *tgoto _((const char *cm, int destcol, int destline));
-extern int tputs _((const char *cp, int affcnt, int (*outc) (int)));
+/*
+ * These prototypes are only used where we don't have the
+ * headers.  In some cases they need tweaking.
+ * TBD: we'd much prefer to get hold of the header where
+ * these are defined.
+ */
+#ifdef _AIX
+#define TC_CONST const
+#else
+#define TC_CONST
+#endif
+extern int tgetent _((char *bp, TC_CONST char *name));
+extern int tgetnum _((char *id));
+extern int tgetflag _((char *id));
+extern char *tgetstr _((char *id, char **area));
+extern char *tgoto _((TC_CONST char *cm, int destcol, int destline));
+extern int tputs _((TC_CONST char *cp, int affcnt, int (*outc) (int)));
+#undef TC_CONST
 #endif
 
 /* MISSING PROTOTYPES FOR VARIOUS OPERATING SYSTEMS */