<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Tim A. wrote:
<blockquote cite="mid:47E2BA64.30201@goldenpath.org" type="cite">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
Michael Hernandez wrote:
  <blockquote
 cite="mid:A42E3194-82E5-401D-BAED-C947D397CED6@techally.com"
 type="cite">
    <pre wrap="">On Mar 18, 2008, at 3:36 PM, Marc Spitzer wrote:

  </pre>
    <blockquote type="cite">
      <pre wrap="">On Tue, Mar 18, 2008 at 2:46 PM, Michael Hernandez
<a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
 href="mailto:mhernandez@techally.com"><mhernandez@techally.com></a> wrote:
    </pre>
      <blockquote type="cite">
        <pre wrap="">I am trying to build the php5-spl port and I keep getting errors like
this:

/usr/ports/devel/php5-spl/work/php-5.2.5/ext/spl/php_spl.c:61: error:
invalid type argument of `->'

I looked at php_spl.c - I don't see what's wrong with it. The line  
is:

spl_globals->autoload_extensions     = NULL;


Is that not valid code? Is my gcc just old? I'm running out of ideas
here. Any help would be appreciated.
      </pre>
      </blockquote>
      <pre wrap="">is spl_globals a pointer?  Stupid question but it is complaining that
it can not do a pointer dereference and access structure field.

marc

    </pre>
    </blockquote>
    <pre wrap=""><!---->
To be quite honest, I'm not sure - I guess the PHP hackers might be  
too used to hacking in PHP and so their C is getting sloppy? Which  
isn't good since PHP is written in C, not PHP. :)

  </pre>
  </blockquote>
  <br>
I just gave it a go. Installed from port just fine on 6.2.<br>
Stupid question, but have you tried a portsnap?<br>
  <br>
</blockquote>
<br>
I've been brushing up on my C lately. (btw, O'Reilly's C Pocket
Reference is really good.)<br>
So, Mark's pointer question got me curious and I thought I'd look it up.<br>
It seems easy enough to determine.<br>
Assuming we're in <tt>/usr/ports/devel/php5-spl</tt><br>
After you've at least attempted to install the port once, you should
have a directory called work.<br>
<tt># find work -type f -exec grep -Hn spl_globals {} \;<br>
<br>
</tt>Which indicates as I might have suspected, the answer is in <tt>php_spl.h</tt><br>
<br>
I think the following lines indicate that spl_globals is a pointer
variable of type <tt>zend_spl_globals</tt> which would appear to be a
pointer to a structure but I can't find where <tt>zend_spl_globals</tt>
is implemented. It seems to not be in these source files.<br>
<br>
<tt>#ifdef ZTS<br>
</tt><tt># define SPL_G(v) TSRMG(spl_globals_id, zend_spl_globals *, v)<br>
extern int spl_globals_id;<br>
#else<br>
# define SPL_G(v) (spl_globals.v)<br>
extern zend_spl_globals spl_globals;<br>
#endif<br>
<br>
<br>
I don't understand preprocessing though. So, I'm not sure exactly what
the # define lines mean or how they work. (Coming up to that part).<br>
Only thing I ever used those for were including standard headers.<br>
<br>
<br>
<br>
</tt>
</body>
</html>