Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26487 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5025 invoked by uid 1010); 10 Nov 2006 20:04:16 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 5010 invoked from network); 10 Nov 2006 20:04:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Nov 2006 20:04:16 -0000 Authentication-Results: pb1.pair.com header.from=info@adaniels.nl; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=info@adaniels.nl; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain adaniels.nl from 82.94.235.198 cause and error) X-PHP-List-Original-Sender: info@adaniels.nl X-Host-Fingerprint: 82.94.235.198 hyak.bean-it.nl Received: from [82.94.235.198] ([82.94.235.198:53611] helo=hyak.bean-it.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4D/B9-27611-C3BD4554 for ; Fri, 10 Nov 2006 15:04:14 -0500 Received: from [127.0.0.1] (bean-it.xs4all.nl [213.84.27.165]) (authenticated bits=0) by hyak.bean-it.nl (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id kAAK3x88010007 for ; Fri, 10 Nov 2006 21:04:02 +0100 Message-ID: <4554DB25.4010701@adaniels.nl> Date: Fri, 10 Nov 2006 21:03:49 +0100 User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: internals@lists.php.net Content-Type: multipart/alternative; boundary="------------010607040805070804020005" X-Virus-Scanned: by amavisd-new X-Spam-Status: No, score=-2.6 required=4.0 tests=BAYES_00,HTML_MESSAGE autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on hyak.bean-it.nl Subject: newbie question nr 2: compile error when using php_stream_get_line From: info@adaniels.nl (Arnold Daniels) --------------010607040805070804020005 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------010607040805070804020005--