|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67188 phpdbg_utils.c needs termio.h
Submitted: 2014-05-03 10:32 UTC Modified: 2014-12-30 14:07 UTC
From: rainer dot jung at kippdata dot de Assigned: tyrael (profile)
Status: Closed Package: phpdbg
PHP Version: 5.6.0beta2 OS: Solaris 10 Sparc
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
13 + 42 = ?
Subscribe to this entry?

 [2014-05-03 10:32 UTC] rainer dot jung at kippdata dot de
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"
+#      include "termio.h"


Needed Autofoo adjustments probably (untested):

---      2014-05-01 16:42:03.000000000 +0200
+++        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/      2014-05-02 00:05:58.000000000 +0200
+++ main/        2014-05-03 12:30:49.051849000 +0200
@@ -1921,6 +1921,9 @@
 /* Define to 1 if you have the `tempnam' function. */

+/* Define to 1 if you have the <termio.h> header file. */
 /* Define to 1 if you have the <termios.h> header file. */

Test script:
No test script, compilation already fails.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-05-06 08:38 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: krakjoe
 [2014-06-22 17:05 UTC]
-Assigned To: krakjoe +Assigned To: tyrael
 [2014-06-22 17:05 UTC]
after fixing #67212 the compilation should finish, albeit we would fallback to the default terminal width (80).
I'm not sure it is worth the trouble for adding additional HAVE_TERMIO_H checks, considering that termio.h isn't posix compliant, and solaris 11 is out for a while now(and has termios.h).
what do you think?
 [2014-07-02 19:45 UTC]
-Status: Assigned +Status: Feedback
 [2014-12-30 10:42 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 [2014-12-30 14:07 UTC] rainer dot jung at kippdata dot de
-Status: No Feedback +Status: Closed
 [2014-12-30 14:07 UTC] rainer dot jung at kippdata dot de
Sorry for taking so long to respond: the current solution seems OK to me.
Since the Status field only allows values "Re-Opened" and "Closed", I'm setting it to "Closed".
Thank you!
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 17 11:01:28 2024 UTC