all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Fabrice Popineau <fabrice.popineau@supelec.fr>
Cc: emacs-devel@gnu.org
Subject: Re: Windows 64 port
Date: Sat, 03 Mar 2012 09:58:10 +0200	[thread overview]
Message-ID: <83fwdqazfx.fsf@gnu.org> (raw)
In-Reply-To: <CAFgFV9Pbd7qXgd9M8dtwFW0_O8Uj27TqiTSQZv_O34CvvYgn0Q@mail.gmail.com>

> From: Fabrice Popineau <fabrice.popineau@supelec.fr>
> Date: Thu, 1 Mar 2012 08:24:40 +0100
> Cc: Eli Zaretskii <eliz@gnu.org>, ajmr@ilovetortilladepatatas.com, emacs-devel@gnu.org
> 
> >   /* Include <time.h> before defining tzname, to avoid DLL clash.  */
> >   #include <time.h>
> >   #define tzname _tzname
> > [...]
> The problem is trickier than this and probably need a careful
> rewrite of ms-w32.h.  In this file, names like tzname or fopen get
> rewired. Some of them need to be rewired to sys_fopen or _fopen
> (example) depending on whether it is for emacs or not.  So a more
> robust way of doing things would be to ensure that all system
> headers are read once for all, then doing the rewiring for emacs and
> for (not emacs). That should avoid the problem of tzname for
> example. In the mean time, this is the smallest change I could come
> with.  What you propose didn't work (resulting in either : some
> function returns an array, that is tzname, or _tzname being
> undefined at link time).

Can you show me the error messages, please, and perhaps also the
relevant portions of the MS headers that trigger them?  Including
time.h before redefining tzname is exactly what you proposed (for
system headers to be included before redefining), so I'm puzzled about
what exactly went wrong in the case of tzname, and why what you
suggest as a general method of fixing these problems didn't work in
this particular case.

> > >     >  #ifdef WINDOWSNT
> > >     >  extern Lisp_Object w32_get_internal_run_time (void);
> > >     > +
> > >     > +extern struct tm *localtime (const time_t *t);
> > >     >  #endif
> > >
> > >     Why is this needed?  It seems also unrelated to 64-bit Windows.
> 
> Sure but the definition needs to be put somewhere because an int is
> not the same size as a pointer in windows 64.

But editfns.c includes "systime.h", which does this:

  #ifdef TIME_WITH_SYS_TIME
  #include <sys/time.h>
  #include <time.h>
  #else
  #ifdef HAVE_SYS_TIME_H
  #include <sys/time.h>
  #else
  #include <time.h>
  #endif
  #endif

On Windows, ms-w32.h defines TIME_WITH_SYS_TIME to 1, so the above
should have included the system header time.h, which I believe
includes the prototype of localtime.  So could you please look into
this some more and find out why all this isn't working for you?

TIA



  parent reply	other threads:[~2012-03-03  7:58 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-19 20:18 Windows 64 port AJMR
2012-02-19 21:26 ` Eli Zaretskii
2012-02-19 22:05   ` Fabrice Popineau
2012-02-20  3:53     ` Eli Zaretskii
2012-02-20 17:48     ` Paul Eggert
2012-02-20 19:20       ` Fabrice Popineau
2012-02-20 20:43         ` Paul Eggert
2012-02-20 20:58           ` Eli Zaretskii
2012-02-20 23:11             ` Fabrice Popineau
2012-02-20 23:46               ` Paul Eggert
2012-02-21 13:22         ` Stefan Monnier
2012-02-21 18:26           ` Paul Eggert
2012-02-22 10:39         ` Richard Stallman
2012-02-22 16:27           ` Eli Zaretskii
2012-02-23 18:44             ` Richard Stallman
2012-02-23 19:16               ` Aurélien
2012-02-23 19:50                 ` Lennart Borgman
2012-02-23 20:48                 ` Fabrice Popineau
2012-02-24  5:52                   ` Aurélien
2012-02-28 21:00       ` Fabrice Popineau
2012-02-28 22:09         ` Paul Eggert
2012-02-28 22:39           ` Fabrice Popineau
2012-02-29 18:08             ` Eli Zaretskii
2012-02-29 22:08               ` Paul Eggert
2012-02-29 18:04           ` Eli Zaretskii
2012-02-29 19:43             ` Paul Eggert
2012-02-29 21:24               ` Eli Zaretskii
2012-03-01  3:34                 ` Paul Eggert
2012-03-01  4:03                   ` Eli Zaretskii
2012-03-01  6:28                     ` Paul Eggert
2012-03-01  7:04                       ` Fabrice Popineau
2012-03-22 17:31               ` Fabrice Popineau
2012-03-23 18:26                 ` Paul Eggert
2012-03-24  9:27                   ` Fabrice Popineau
2012-03-22 17:39           ` Fabrice Popineau
2012-03-22 18:02             ` Andreas Schwab
2012-03-22 18:34               ` Fabrice Popineau
2012-03-22 22:46                 ` Andreas Schwab
2012-03-22 23:06                   ` Fabrice Popineau
2012-03-22 23:38                     ` Andreas Schwab
2012-03-23  8:12                       ` Eli Zaretskii
2012-03-23  9:45                         ` Andreas Schwab
2012-03-23 10:27                           ` Fabrice Popineau
2012-03-23 10:42                             ` Andreas Schwab
2012-03-23 12:21                             ` Eli Zaretskii
2012-03-23 10:11                         ` Fabrice Popineau
2012-03-23 18:13                           ` Paul Eggert
2012-02-20 20:47     ` Eli Zaretskii
2012-02-26 20:17       ` AJMR
2012-02-26 21:25         ` Eli Zaretskii
2012-02-27 17:37           ` AJMR
2012-02-28 21:32       ` Fabrice Popineau
2012-03-01  3:23         ` Paul Eggert
2012-03-01  7:24           ` Fabrice Popineau
2012-03-01  8:58             ` Paul Eggert
2012-03-01 17:45               ` Eli Zaretskii
2012-03-01 20:05               ` Fabrice Popineau
2012-03-02  9:22               ` Eli Zaretskii
2012-03-02 20:35                 ` Paul Eggert
2012-03-02 21:32                   ` Fabrice Popineau
2012-03-02 22:06                   ` Eli Zaretskii
2012-03-03  5:42                     ` Paul Eggert
2012-03-03  7:18                       ` Eli Zaretskii
2012-03-04 21:48                         ` Paul Eggert
2012-03-03  7:58             ` Eli Zaretskii [this message]
2012-03-10 13:43               ` Eli Zaretskii
2012-03-22 17:15           ` Fabrice Popineau
2012-03-22 17:22           ` Fabrice Popineau
2012-03-22 18:29           ` Fabrice Popineau
2012-03-22 20:53             ` Stefan Monnier
2012-03-27 12:47           ` Fabrice Popineau
2012-03-27 16:08             ` Paul Eggert
2012-02-20  9:41 ` Richard Stallman
2012-02-20 10:28   ` Dani Moncayo
2012-02-21 12:10     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83fwdqazfx.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=fabrice.popineau@supelec.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.