unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* A warning building Emacs-cvs with recent Cygwin DLL
@ 2008-01-25  9:12 Angelo Graziosi
  2008-01-25 10:16 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Angelo Graziosi @ 2008-01-25  9:12 UTC (permalink / raw)
  To: emacs-devel; +Cc: cygwin

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
...

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

  /* Do multibyte processing if multibytes are supported, unless
     multibyte sequences are safe in formats.  Multibyte sequences are
=================================================

Could someone verify it and, eventually, apply ?


Thanks,
    Angelo.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: A warning building Emacs-cvs with recent Cygwin DLL
@ 2008-01-25 10:09 Angelo Graziosi
  0 siblings, 0 replies; 4+ messages in thread
From: Angelo Graziosi @ 2008-01-25 10:09 UTC (permalink / raw)
  To: emacs-devel; +Cc: cygwin

Having obtained this answer 
http://cygwin.com/ml/cygwin/2008-01/msg00491.html from Cygwin side, a 
'conservative' solution looks as the following

===========================
--- strftime.c.orig	2007-01-14 04:24:37.000000000 +0100
+++ strftime.c	2008-01-25 10:52:30.921875000 +0100
@@ -54,7 +54,7 @@
  # endif
  #endif
  #if HAVE_TZNAME
-#ifndef USE_CRT_DLL
+#if !defined (USE_CRT_DLL) && !defined (__CYGWIN__)
  extern char *tzname[];
  #endif
  #endif
===========================

But, perhaps, the Emacs/Cygwin guys have better one!


Cheers,
    Angelo.

---

O Captain! my Captain! our fearful trip is done,
The ship has weather'd every rack, the prize we sought is won,
The port is near, the bells I hear, the people all exulting...
-
                                            Walt WHITMAN

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: A warning building Emacs-cvs with recent Cygwin DLL
  2008-01-25  9:12 A warning building Emacs-cvs with recent Cygwin DLL Angelo Graziosi
@ 2008-01-25 10:16 ` Eli Zaretskii
  2008-01-25 10:58   ` Corinna Vinschen
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2008-01-25 10:16 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-devel, cygwin

> Date: Fri, 25 Jan 2008 10:12:04 +0100
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> Cc: cygwin@cygwin.com
> 
> 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
> ...
> 
> 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?



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: A warning building Emacs-cvs with recent Cygwin DLL
  2008-01-25 10:16 ` Eli Zaretskii
@ 2008-01-25 10:58   ` Corinna Vinschen
  0 siblings, 0 replies; 4+ messages in thread
From: Corinna Vinschen @ 2008-01-25 10:58 UTC (permalink / raw)
  To: cygwin, emacs-devel

On Jan 25 12:16, Eli Zaretskii wrote:
> > From: Angelo Graziosi <XXXXXXXXXXXXXXX@XXXXX.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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-01-25 10:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-25  9:12 A warning building Emacs-cvs with recent Cygwin DLL Angelo Graziosi
2008-01-25 10:16 ` Eli Zaretskii
2008-01-25 10:58   ` Corinna Vinschen
  -- strict thread matches above, loose matches on Subject: below --
2008-01-25 10:09 Angelo Graziosi

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).