Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96256 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79899 invoked from network); 5 Oct 2016 18:41:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Oct 2016 18:41:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=anatol.php@belski.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=anatol.php@belski.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain belski.net from 85.214.73.107 cause and error) X-PHP-List-Original-Sender: anatol.php@belski.net X-Host-Fingerprint: 85.214.73.107 klapt.com Received: from [85.214.73.107] ([85.214.73.107:44799] helo=h1123647.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D7/F6-23443-96945F75 for ; Wed, 05 Oct 2016 14:41:46 -0400 Received: by h1123647.serverkompetenz.net (Postfix, from userid 1006) id A9B6A7842AE; Wed, 5 Oct 2016 20:41:42 +0200 (CEST) Received: from w530phpdev (p54A76BB0.dip0.t-ipconnect.de [84.167.107.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by h1123647.serverkompetenz.net (Postfix) with ESMTPSA id 73EE5784232; Wed, 5 Oct 2016 20:41:40 +0200 (CEST) To: "'Dennis Clarke'" , References: <090bbd8e-ebe9-0806-ca69-4ec28a56ce05@blastwave.org> In-Reply-To: <090bbd8e-ebe9-0806-ca69-4ec28a56ce05@blastwave.org> Date: Wed, 5 Oct 2016 20:41:36 +0200 Message-ID: <073a01d21f38$1c9b38d0$55d1aa70$@belski.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQD4aoIKlAh+57pmJ78FzDwxuHxlC6JNmHpw Content-Language: en-us Subject: RE: [PHP-DEV] ext/fileinfo/libmagic/apprentice.c", line 2195: error: syntax error From: anatol.php@belski.net ("Anatol Belski") > -----Original Message----- > From: Dennis Clarke [mailto:dclarke@blastwave.org] > Sent: Wednesday, October 5, 2016 5:00 PM > To: internals@lists.php.net > Subject: [PHP-DEV] ext/fileinfo/libmagic/apprentice.c", line 2195: = error: syntax > error >=20 >=20 > I tried the php-install mail list but saw no reply thus I will try = here. >=20 >=20 > While attempting a build of 7.0.11 I was presented with : >=20 > "/usr/local/build/php- > 7.0.11_SunOS5.10_sparcv9.001/ext/fileinfo/libmagic/apprentice.c", >=20 > 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", >=20 > 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 >=20 >=20 > The problem appears to be in a strange placement of the keyword = "struct" : >=20 What is strange with the struct? Looks more like there is some missing = some datatype or macro. > 2189 private int > 2190 parse_apple(struct magic_set *ms, struct magic_entry *me, = const char > *line) > 2191 { > 2192 struct magic *m =3D &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 >=20 > also >=20 > 2203 private int > 2204 parse_mime(struct magic_set *ms, struct magic_entry *me, = const char > *line) > 2205 { > 2206 struct magic *m =3D &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 >=20 >=20 > Not sure where the definition of "offsetof()" is located but something = seems > clearly not C compliant here. >=20 Just to be sure. If you include stddef.h directly, does it fix it? = Normally stddef.h were included from php.h already,=20 It could make sense otherwise to generate the preprocessed source and = check the exact code produced. If you see something strange, it might be = helpful to ifdef out some piece of code to check it were the cause. = Otherwise, quite hard to guess what's happening, but likely some missing = macro or datatype. Regards Anatol