about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2011-05-03 12:03:46 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2011-05-03 12:03:46 +0000
commit8e0a5b0aa0d377e979b87249d96390498ffbeeea (patch)
treea3b5ad980427935dfb886fc16c065e8bb112bb51
parent17e3f742f15313d7f44537f03bf85cf6e6ed4216 (diff)
downloadzsh-8e0a5b0aa0d377e979b87249d96390498ffbeeea.tar.gz
zsh-8e0a5b0aa0d377e979b87249d96390498ffbeeea.tar.xz
zsh-8e0a5b0aa0d377e979b87249d96390498ffbeeea.zip
29134: change termcap prototypes locally for AIX
-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 */