Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96252 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69912 invoked from network); 5 Oct 2016 16:44:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Oct 2016 16:44:25 -0000 Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.15.15 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.15.15 mout.gmx.net Received: from [212.227.15.15] ([212.227.15.15:57356] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1A/55-23443-2ED25F75 for ; Wed, 05 Oct 2016 12:44:19 -0400 Received: from [192.168.2.103] ([79.243.112.45]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MaZWz-1bcD9k0ZeD-00KA7I; Wed, 05 Oct 2016 18:44:09 +0200 To: Dennis Clarke , internals@lists.php.net References: <090bbd8e-ebe9-0806-ca69-4ec28a56ce05@blastwave.org> Message-ID: <809f35f2-8018-5d13-377a-dd9c55e1392f@gmx.de> Date: Wed, 5 Oct 2016 18:44:26 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <090bbd8e-ebe9-0806-ca69-4ec28a56ce05@blastwave.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:LlgvAIwkZdQc17nyltZuxDIJ5BAI0mxAS0RDuAjdjAe6PzCKeAw UXC4eNBvIxU8lTHe/ZrLSYwORAeRUJeVemPyVWT9OEmITv7TkfblJq2q7UIYqA4hnvXwv8u oGSI3fiFjs9ICUan/qQP69k2IMdBceilaUQPHXKPSb6UFTFh7E+pueZ/nSPJ3BWEA3UkKUS QYeCJapcgxJePPjCvyTkw== X-UI-Out-Filterresults: notjunk:1;V01:K0:D9hFpZqPfw4=:3p+nYazk07O3fH08fu1xcz XK+0n5j0sdbGJOknYOuRiUKbaefwqY0WAfl5SOf3dQW8QCdZ5j5809GFWbnCx3MnG25/8mma5 ugorv1YxBr7qndEm1SA5/g4WsJigZCxJSXWPkrh4yeuPVAGLdd2GaPEKR/ToZUrZB3zW6FywW F4sVwFlANhtlX0zhgskYoEyRqA0k+yc3uo7gIEiJFk9UkAvy4bohOUgFk1cMJpdEQzGKIKmM1 ipcYQSjfCygdsvcjhlqjn5+8L4kXlfX0ey+Era7jhVqQuYXtvGj3rdYOUNUqR8XS7huLNuyrl Unxiy0T0fF9moNBu8YJcN7nZOrLzuaJsJ731/IxNqg2czigDbbB31xBsHtmDy5f8bh3CUhsyZ de/3wHZwgLECY+MLrxgVxc2OkswbZvl6kbB4xiqQJh3Qx+XMwehn4be0CbX2K4XwLcf7MmEOl nfWPkxNhVSn42Kb+6dZWFUf+95/Hh8nm3YzQCxmnowD/45V9hzNj0x8p9QqWyvzBRKuro4YFv NeYC4I8vL4nDAXQIOmjwIYoLvG6Bj89Mngj97WLqco7dIAhUzE+CHBP12wkry8kNxxJRVFetQ l5grAjuouuvl3260SqO+kEeabBFutgrKigNDl2qE0cs26TNOBpbv2cB2C/sCphetItGSqYupk KQlCnEnYe42Th4DndYqyv/6Q9GFYSiE2isOTp8dyDk55LvxpuLuVAeU/G1AivgeDeRMGu/ssM yc4ezfaKQaM9ygzPX4J9guCQmREATiibD6iqQVmhA+poczvHwN4NHq0PcuUyL0jgCiq89wtHN 79jDbSX Subject: Re: ext/fileinfo/libmagic/apprentice.c", line 2195: error: syntax error From: cmbecker69@gmx.de ("Christoph M. Becker") On 05.10.2016 at 16:59, Dennis Clarke wrote: > 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. offsetof() is supposed to be declared in [1]. Perhaps it would need a typedef for your system? [1] -- Christoph M. Becker