Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] Include zshterm.h to silence a warning



Nick Bryda <nickbryda@xxxxxx> wrote:
> I'm getting a build error with 5.0.2 on Ubuntu 12.10.  The error is
>
> Function `tgoto' implicitly converted to pointer at
> ../../../Src/Zle/zle_refresh.c:2361
[...]
> This is often due to a missing function prototype definition.
>
> Since use of implicitly converted pointers is always fatal to the
> application on ia64, they are errors.  Please correct them for your
> next upload.
[...]

This looks like a missing header inclusion, that causes the missing
prototype. `tgoto()' should be defined in "term.h". For portability
reasons, zsh wraps that file into `Src/zshterm.h' - so include that.
---

The default zsh build doesn't trigger this warning, at least not with
gcc 4.7.2 on amd64.

I didn't see many explicit includes in module sources. So if there is
some magic going on, that I am not aware of, please tell me. If not,
if someone knowledgeable could ACK this, I'd push the change to the
central repository.

 Src/Zle/zle_refresh.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c
index 17b78ce..15fbdf1 100644
--- a/Src/Zle/zle_refresh.c
+++ b/Src/Zle/zle_refresh.c
@@ -28,6 +28,7 @@
  */
 
 #include "zle.mdh"
+#include "../zshterm.h"
 
 #ifdef MULTIBYTE_SUPPORT
 /*
-- 
1.8.2.rc1



Messages sorted by: Reverse Date, Date, Thread, Author