git pull and branch v9.0.1827 or latermake # This will succeedmake install # This will fail due to STDOUT_FILENO not defined errorError occurs when compiling xxd.c
gcc -ggdb -O2 -pipe -w -fstack-protector-strong --param=ssp-buffer-size=4 -fstack-protector-strong -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -L/usr/local/lib -Wl,--as-needed -DUNIX -o xxd xxd.c
xxd.c: In function ‘main’:
xxd.c:569:18: error: ‘STDOUT_FILENO’ undeclared (first use in this function)
569 | color = isatty(STDOUT_FILENO);
| ^~~~~~~~~~~~~
xxd.c:569:18: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [Makefile:4: xxd] Error 1
make[1]: Leaving directory '/home/smartin/src/github/vim/src/xxd'
make: *** [Makefile:2065: xxd/xxd.exe] Error 2
xxd should compile and be installed as before
9.0.1827
Operating System: Cygwin (Windows)
This was introduced with 1827 by adding the following lines to xxd.c: 568-#ifdef UNIX 569: color = isatty(STDOUT_FILENO); 570-#endif For UNIX this was added: #include <unistd.h> However, this also needs to be in the Cygwin section, here is my fix: diff --git a/src/xxd/xxd.c b/src/xxd/xxd.c index 590cd44aad..5c6e549da3 100644 --- a/src/xxd/xxd.c +++ b/src/xxd/xxd.c @@ -87,6 +87,9 @@ #endif #if defined(WIN32) || defined(CYGWIN) # include <io.h> /* for setmode() */ +# if defined(CYGWIN) +# include <unistd.h> +# endif #else # ifdef UNIX # include <unistd.h>
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #12991 as completed via f6fc255.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()