Bug #67188 [Opn->Asn]: phpdbg_utils.c needs termio.h

From: Date: Tue, 06 May 2014 08:38:10 +0000
Subject: Bug #67188 [Opn->Asn]: phpdbg_utils.c needs termio.h
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-185657@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67188&edit=1 ID: 67188 Updated by: johannes@php.net Reported by: rainer dot jung at kippdata dot de Summary: phpdbg_utils.c needs termio.h -Status: Open +Status: Assigned Type: Bug Package: phpdbg Operating System: Solaris 10 Sparc PHP Version: 5.6.0beta2 -Assigned To: +Assigned To: krakjoe Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2014-05-03 10:32:54] rainer dot jung at kippdata dot de Description: ------------ The new function phpdbg_get_terminal_width() in phpdbg_utils.c needs #include <termio.h> on Solaris 10. Otherwise compilations stops with: .../phpdbg_utils.c: In function 'phpdbg_get_terminal_width': .../phpdbg_utils.c:444:17: error: storage size of 'w' isn't known .../phpdbg_utils.c:446:34: error: 'TIOCGWINSZ' undeclared (first use in this function) The code is only used when HAVE_SYS_IOCTL_H is set. I suggest to add a configure test for HAVE_TERMIO_H and is both are defined add #include <termio.h> Patch would be --- sapi/phpdbg/phpdbg_utils.c 2014-05-01 16:42:03.000000000 +0200 +++ sapi/phpdbg/phpdbg_utils.c 2014-05-03 12:27:23.964463000 +0200 @@ -32,6 +32,9 @@ # include "win32/time.h" #elif defined(HAVE_SYS_IOCTL_H) # include "sys/ioctl.h" +#ifdef HAVE_TERMIO_H +# include "termio.h" +#endif #endif ZEND_EXTERN_MODULE_GLOBALS(phpdbg); Needed Autofoo adjustments probably (untested): --- configure.in 2014-05-01 16:42:03.000000000 +0200 +++ configure.in 2014-05-03 12:30:32.696237000 +0200 @@ -518,6 +518,7 @@ sys/varargs.h \ sys/wait.h \ sys/loadavg.h \ +termio.h \ termios.h \ unistd.h \ unix.h \ --- main/php_config.h.in 2014-05-02 00:05:58.000000000 +0200 +++ main/php_config.h.in 2014-05-03 12:30:49.051849000 +0200 @@ -1921,6 +1921,9 @@ /* Define to 1 if you have the `tempnam' function. */ #undef HAVE_TEMPNAM +/* Define to 1 if you have the <termio.h> header file. */ +#undef HAVE_TERMIO_H + /* Define to 1 if you have the <termios.h> header file. */ #undef HAVE_TERMIOS_H Test script: --------------- No test script, compilation already fails. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67188&edit=1

« previous php.bugs (#185657) next »