X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Date: Tue, 14 Jul 2015 12:56:14 +0200 (CEST) X-X-Sender: igor2 AT igor2priv To: "Vladimir Zhbanov (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com]" X-Debug: to=geda-user AT delorie DOT com from="gedau AT igor2 DOT repo DOT hu" From: gedau AT igor2 DOT repo DOT hu cc: geda-developers AT lists DOT launchpad DOT net Subject: Re: [geda-user] geda-gaf on FreeBSD and probably other architectures In-Reply-To: <20150714103959.GA17565@localhost.localdomain> Message-ID: References: <20150714103959 DOT GA17565 AT localhost DOT localdomain> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Hi, On Tue, 14 Jul 2015, Vladimir Zhbanov (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com] wrote: > > Hi, geda users and devs. > > Recently, some issues with the FreeBSD port were solved. (This may > apply to other systems as well.) > > The only question suspended is about non-portable 'date -d' > invocation [1]. As it turns out, compilation works with gnu make > but breaks with BSD make. > > So I believe we have two options: > - leave it in the current state and recommend users to compile > geda-gaf using GNU make (I don't like this option) > - fix the date invocation somehow (I don't know how to > gracefully do it for all platforms) > > Any ideas? One of my hobby projects is the second generation of a configuration system (./configure stuff). What I learned from the first generation was exactly this: you can't trust even the simplest utils will work consistently across systems. Not even echo. My solution is to use C89 for the configuration system, and simply do not target systems that don't comply with C89. In your specific case, a similar trick could work. A C fewliners around strftime() would be small, simple and reliable. Strftime is C89 for most features (don't use timezones and you'll be fine). The C code could compile with $(CC) directly into an executable in one step, without any extra configuration. Regards, Igor2