ext/fileinfo/libmagic/apprentice.c", line 2195: error: syntax error

From: Date: Wed, 05 Oct 2016 14:59:32 +0000
Subject: ext/fileinfo/libmagic/apprentice.c", line 2195: error: syntax error
Groups: php.internals 
Request: Send a blank email to internals+get-96250@lists.php.net to get a copy of this message
I tried the php-install mail list but saw no reply thus I will try here. While attempting a build of 7.0.11 I was presented with : "/usr/local/build/php-7.0.11_SunOS5.10_sparcv9.001/ext/fileinfo/libmagic/apprentice.c", line 2195: error: syntax error before or at: struct "/usr/local/build/php-7.0.11_SunOS5.10_sparcv9.001/ext/fileinfo/libmagic/apprentice.c", line 2209: error: syntax error before or at: struct cc: acomp failed for /usr/local/build/php-7.0.11_SunOS5.10_sparcv9.001/ext/fileinfo/libmagic/apprentice.c gmake: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1 The problem appears to be in a strange placement of the keyword "struct" : 2189 private int 2190 parse_apple(struct magic_set *ms, struct magic_entry *me, const char *line) 2191 {
   2192          struct magic *m = &me->mp[0];
2193
   2194          return parse_extra(ms, me, line,
   2195              CAST(off_t, offsetof(struct magic, apple)),
   2196              sizeof(m->apple), "APPLE", "!+-./", 0);
2197 } 2198 also 2203 private int 2204 parse_mime(struct magic_set *ms, struct magic_entry *me, const char *line) 2205 {
   2206          struct magic *m = &me->mp[0];
2207
   2208          return parse_extra(ms, me, line,
   2209              CAST(zend_off_t, offsetof(struct magic, mimetype)),
   2210              sizeof(m->mimetype), "MIME", "+-/.", 1);
2211 } 2212 Not sure where the definition of "offsetof()" is located but something seems clearly not C compliant here. So this is using the Oracle Studio 12.5 compiler tools on a big old SPARC box running Solaris 10. Any input would be appreciated. The cflags were permissive and allowed for transition type elements as I note that C99 with strict compliance will fail horribly. The configure stage was reasonably clean also. In any case .. any input would be greatly appreciated. Dennis

« previous php.internals (#96250) next »