about summary refs log tree commit diff
path: root/Src/prototypes.h
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 /Src/prototypes.h
parent17e3f742f15313d7f44537f03bf85cf6e6ed4216 (diff)
downloadzsh-8e0a5b0aa0d377e979b87249d96390498ffbeeea.tar.gz
zsh-8e0a5b0aa0d377e979b87249d96390498ffbeeea.tar.xz
zsh-8e0a5b0aa0d377e979b87249d96390498ffbeeea.zip
29134: change termcap prototypes locally for AIX
Diffstat (limited to 'Src/prototypes.h')
-rw-r--r--Src/prototypes.h24
1 files changed, 18 insertions, 6 deletions
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 */