newbie question nr 2: compile error when using php_stream_get_line

From: Date: Fri, 10 Nov 2006 20:03:49 +0000
Subject: newbie question nr 2: compile error when using php_stream_get_line
Groups: php.internals 
Request: Send a blank email to internals+get-26487@lists.php.net to get a copy of this message
Hi, I've got another newbie question. My .ini parser now works correctly when parsing a string (thanks to help of Matt Wilmas). With the same function I want to be able to parse content of a stream. I looked at fgets to see how to read a line from a stream. Unfortunately when I call php_stream_get_line. I get the following error: /root/php-5.1.6/ext/qconf/qconf_common.c: In function `qconf_readline_stream': /root/php-5.1.6/ext/qconf/qconf_common.c:42: error: `tsrm_ls' undeclared (first use in this function) /root/php-5.1.6/ext/qconf/qconf_common.c:42: error: (Each undeclared identifier is reported only once /root/php-5.1.6/ext/qconf/qconf_common.c:42: error: for each function it appears in.) make: *** [qconf_common.lo] Error 1 Googling the error returns lot's of websites, be I couldn't make out a real solution. This is the function: /** * Read a line out of a stream. */ char *qconf_readline_stream(zval *in, char **c) { char *line; php_stream *stream; size_t line_len = 0; PHP_STREAM_TO_ZVAL(stream, in); line = php_stream_get_line(stream, NULL, 0, &line_len); if (line != NULL) *(line + line_len) = (char)0; /* make the line into a null terminated string to use string functions link sscan */ return line; } Thanks a lot, Arnold

« previous php.internals (#26487) next »