Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96253 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71660 invoked from network); 5 Oct 2016 16:51:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Oct 2016 16:51:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=dclarke@blastwave.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=dclarke@blastwave.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain blastwave.org from 209.17.115.49 cause and error) X-PHP-List-Original-Sender: dclarke@blastwave.org X-Host-Fingerprint: 209.17.115.49 atl4mhob11.myregisteredsite.com Received: from [209.17.115.49] ([209.17.115.49:46942] helo=atl4mhob11.myregisteredsite.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B6/B5-23443-AAF25F75 for ; Wed, 05 Oct 2016 12:51:54 -0400 Received: from mailpod.hostingplatform.com ([10.30.77.35]) by atl4mhob11.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id u95GpnIi019364 for ; Wed, 5 Oct 2016 12:51:49 -0400 Received: (qmail 29055 invoked by uid 0); 5 Oct 2016 16:51:49 -0000 X-TCPREMOTEIP: 99.247.223.96 X-Authenticated-UID: dclarke@blastwave.org Received: from unknown (HELO ?172.16.35.41?) (dclarke@blastwave.org@99.247.223.96) by 0 with ESMTPA; 5 Oct 2016 16:51:49 -0000 To: internals@lists.php.net References: <090bbd8e-ebe9-0806-ca69-4ec28a56ce05@blastwave.org> <809f35f2-8018-5d13-377a-dd9c55e1392f@gmx.de> Message-ID: <12ac5812-8fd8-488c-aca4-0116b590201b@blastwave.org> Date: Wed, 5 Oct 2016 12:51:48 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <809f35f2-8018-5d13-377a-dd9c55e1392f@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: ext/fileinfo/libmagic/apprentice.c", line 2195: error: syntax error From: dclarke@blastwave.org (Dennis Clarke) >> 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? hrmmm ... I don't think that is the issue here. Definately have that header and this is a POSIX compliant system for sure. In fact, from my $HOME/.profile : # # ident "@(#)local.profile 1.10 Dec 11 20:25:36 GMT 2014 ccode" stty istrip MAIL=/usr/mail/${LOGNAME:?} # Standards, Environments, and Macros fully supported within UNIX # --------------------------------------------------------------- # This system supports IEEE Std 1003.1 and IEEE Std 1003.2, # commonly known as POSIX.1 and POSIX.2, respectively. # Solaris 10 also supports the X/Open Common Applications # Environment (CAE) Portability Guide Issue 3 (XPG3) and Issue # 4 (XPG4); Single UNIX Specification (SUS, also known as # XPG4v2); Single UNIX Specification, Version 2 (SUSv2); and # Single UNIX Specification, Version 3 (SUSv3). Both XPG4 and # SUS include Networking Services Issue 4 (XNS4). SUSv2 # includes Networking Services Issue 5 (XNS5). # # This is a fully LP64 (64-bit) environment and is fully # compliant with The Open Group's UNIX 03 Product Standard. # An application that wants to use standard-conforming utili- # tues must set the PATH (sh(1) or ksh(1)) or path (csh(1)) # environment variable to specify the directories listed below # in the order specified to get the appropriate utilities: # # POSIX.1-2001, SUSv3 # # 1. /usr/xpg6/bin # # 2. /usr/xpg4/bin # # 3. /usr/ccs/bin # # 4. /usr/bin # # 5. directory containing binaries for your compiler # # 6. other directories containing binaries needed by # the application # # When an application uses execlp() or execvp() (see exec(2)) # to execute a shell file, or uses system(3C), the shell used # to interpret the shell file depends on the standard to which # the caller conforms. # # See full details in standards(5) and at The OPEN Group(tm) or # Oracle web sites. # # --------------------------------------------------------------- PATH=/usr/xpg6/bin:/usr/xpg4/bin:/usr/ccs/bin:/usr/jdk/latest/bin:/usr/local/ssl/bin:/usr/bin:/opt/developerstudio12.5/bin:/sbin:/bin:/usr/sbin:/usr/dt/bin:/usr/openwin/bin:/usr/X11/bin:/opt/schily/bin:/usr/local/texlive/2012/bin/sparc-solaris export PATH pretty sure I can carve that back to just items 1 to 6 above and use C99 compiler /opt/developerstudio12.5/bin/c99 and cflags options -Xc to be really really strict. I think the error message is about the use of the "struct" keyword there. > [1] yep .. know it well. I may just have to change the sources a wee bit and see what happens here. Maybe this is a GCC GNUism that snuck in. dc