delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/01/25/05:58:45

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 25 Jan 2008 11:58:09 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com, emacs-devel AT gnu DOT org
Subject: Re: A warning building Emacs-cvs with recent Cygwin DLL
Message-ID: <20080125105809.GB30866@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com, emacs-devel AT gnu DOT org
Mail-Followup-To: cygwin AT cygwin DOT com, emacs-devel AT gnu DOT org
References: <4799A7E4 DOT 9020203 AT alice DOT it> <umyqumcqp DOT fsf AT gnu DOT org>
MIME-Version: 1.0
In-Reply-To: <umyqumcqp.fsf@gnu.org>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Jan 25 12:16, Eli Zaretskii wrote:
> > From: Angelo Graziosi <XXXXXXXXXXXXXXX AT XXXXX DOT XX>
> > 
> > With Cygwin DLL 1.5.25 (and the changes to 'tz...', I suppose), building 
> > Emacs from CVS gives this warning:
> > 
> > ...
> > gcc -c  -Demacs -DHAVE_CONFIG_H -DUSE_LUCID  -I. -I/tmp/emacs/src 
> > -I/usr/X11R6/include    -g -O2 -Wno-pointer-sign  /tmp/emacs/src/strftime.c
> > 
> > /tmp/emacs/src/strftime.c:58: warning: '_tzname' redeclared without 
> > dllimport attribute: previous dllimport ignored
> > ...

Btw., nothing has changed in the way tzname (_tzname) is declared in
newlib's time.h header for years.

> > It seems that the following simple patch avoid it:
> > =================================================
> > --- strftime.c.orig	2007-01-14 04:24:37.000000000 +0100
> > +++ strftime.c	2008-01-24 12:04:40.031250000 +0100
> > @@ -55,9 +55,13 @@
> >   #endif
> >   #if HAVE_TZNAME
> >   #ifndef USE_CRT_DLL
> > +#ifdef __CYGWIN__
> > +extern __IMPORT char *tzname[];
> > +#else
> >   extern char *tzname[];
> >   #endif
> >   #endif
> > +#endif
> 
> Thanks.  But it's better to put this kind of platform-dependent stuff
> in src/s/cygwin.h, not in general source files.  Would that work for
> you?

As I wrote in my reply on the Cygwin list, there should be no reason
to declare tzname on POSIX conformant systems at all.  Just including
<time.h> is the way to go.

The extern declaration should be guarded by an OS-agnostic configure
test which checks whether tzname is declared in time.h or not.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019