all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Daniel Colascione <dan.colascione@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] system-type cygwin with window-system w32
Date: Mon, 18 Jul 2011 04:53:08 -0400	[thread overview]
Message-ID: <E1QijZc-0004xp-Ho@fencepost.gnu.org> (raw)
In-Reply-To: <4E23D2BF.7080309@gmail.com> (message from Daniel Colascione on Sun, 17 Jul 2011 23:29:19 -0700)

> Date: Sun, 17 Jul 2011 23:29:19 -0700
> From: Daniel Colascione <dan.colascione@gmail.com>
> CC: emacs-devel@gnu.org
> 
> On 7/17/11 11:13 PM, Eli Zaretskii wrote:
> > Why did you need to change filemode.c?  Does it have anything to do
> > with Cygwin on w32?
> 
> S_ISCTG and such aren't being defined under Cygwin, causing compilation
> errors.  There's probably a better way to deal with the underlying problem.

Yes, the files in lib/sys_stat.in.h is supposed to do that already.
I'm curious why it didn't work for you.

> > What is this (and related) stuff about?  Why do you need to use HTML
> > wrt the clipboard?
> 
> Windows uses HTML as a data interchange format --- supporting it as a
> clipboard format allows formatting to be preserved in pastes into other
> programs.  This code could easily be structured as a separate package,
> however, and I'll end up doing that.

Yes, let's have this as a separate changeset.

> > I don't like the idea of moving this to w32fns.c, because it doesn't
> > belong there.  Can you come up with an alternative idea?
> 
> The fundamental problem is that we now have two Windows platforms:
> WINDOWSNT and (CYGWIN && HAVE_NTGUI).  The common code has to live
> somewhere; with my patch, we only build w32.o in the NTEMACS case
> because w32.c contains mostly compatibility wrappers; the
> non-compatibility portions I moved to w32fns.c, which we compile in both
> cases.  Cygwin-NT-specific code goes in the new file cygw32.c.
> 
> Another option would be to further refactor the Win32 code into distinct
> and explicit WINDOWSNT and HAVE_NTGUI files and introduce common headers
> for common functionality.  This approach would involve even more code
> movement, however, which is why I initially avoided it.

I'd prefer a separate file common to w2 and Cygwin-on-w32, if that's
needed.  w32fns.c tries to be as similar to xfns.c as possible, so
putting there stuff that's not relevant would be a disadvantage.

> >> +#define t(...)                                          \
> >> +    ({                                                  \
> >> +      fprintf (stderr, "T:%s:%u: ",                     \
> >> +               __FUNCTION__, __LINE__);                 \
> >> +      fprintf (stderr, __VA_ARGS__);                    \
> >> +      fputc ('\n', stderr);                             \
> >> +    })
> >> +
> > 
> > What is this stuff about?
> 
> Debug scaffolding --- in this case, generally useful, I think, at least
> as a replacement for the numerous bespoke tracing macros scattered
> everywhere in the code.

Fine, but (a) please see if there's no macro already available that
can be used instead; and (b) let's have this a separate changeset.

> >> +      /* DebPrint (("w32_msg_pump: %s time:%u\n", */
> >> +      /*            w32_name_of_message (msg.message), msg.time)); */
> >> +      
> > 
> > Can this be removed?  These DebPrint messages are a PITA when
> > debugging, so if it isn't absolutely necessary, let's not add new
> > ones.
> 
> Sure.  I'd actually prefer, though, to leave the existing tracing, but
> move it all to a common macro so that the debug spam is easier to
> disable and enable as needed.

Fine with me.

> > This is based on reviewing only a part of the patch, I will have more
> > later.  The patch is very large and complicated, and the lack of a
> > ChangeLog that describes the changes, particularly those which move
> > code between different files, does not help...
> 
> Of course. It's a work in progress --- a first stab, really.  Once I
> clean up the code a bit, I'll put it into a form that's easier to consume.

My point was that there are several issues here that need to be
discussed before you invest too much energy into them.  So please
consider starting these discussion sooner rather than later, and the
additional information I didn't find in the ChangeLog would be
instrumental at that time.

TIA



  reply	other threads:[~2011-07-18  8:53 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18  0:01 [PATCH] system-type cygwin with window-system w32 Daniel Colascione
2011-07-18  0:06 ` Daniel Colascione
2011-07-18  6:13 ` Eli Zaretskii
2011-07-18  6:29   ` Daniel Colascione
2011-07-18  8:53     ` Eli Zaretskii [this message]
2011-07-18 10:10       ` Daniel Colascione
2011-07-18 16:04         ` Paul Eggert
2011-07-18 16:19         ` Eli Zaretskii
2011-07-18 13:55     ` Jason Rumney
2011-07-18 16:13     ` Paul Eggert
2011-07-18 17:34       ` Andreas Schwab
2011-07-18  6:53 ` Eli Zaretskii
2011-07-18  7:01   ` Daniel Colascione
2011-07-18  9:04     ` Eli Zaretskii
2011-07-18  9:41       ` Daniel Colascione
2011-07-18 10:10         ` Eli Zaretskii
2011-07-18 10:49           ` Daniel Colascione
2011-07-18 11:22             ` Juanma Barranquero
2011-07-18 16:41             ` Eli Zaretskii
2011-07-18 16:48               ` Daniel Colascione
2011-07-18 17:08                 ` Eli Zaretskii
2011-07-18 22:08             ` Richard Stallman
2011-07-18 22:24               ` Daniel Colascione
2011-07-18 22:45                 ` David Kastrup
2011-07-18 22:56                   ` Daniel Colascione
2011-07-19 16:49                     ` Richard Stallman
2011-07-21  1:44               ` Lennart Borgman
2011-07-18 22:08             ` Richard Stallman
2011-07-18 13:31       ` Jason Rumney
2011-07-18 13:46         ` Richard Riley
2011-07-18  8:42 ` Eli Zaretskii
2011-07-18 10:33   ` Daniel Colascione
2011-07-18 16:29     ` Eli Zaretskii
2011-07-18 17:04       ` Daniel Colascione
2011-07-18 15:54 ` Stefan Monnier
2011-07-18 15:55 ` Stefan Monnier
2011-07-18 17:37 ` Andreas Schwab
  -- strict thread matches above, loose matches on Subject: below --
2011-07-18 17:33 grischka
2011-07-18 17:50 ` Daniel Colascione
2011-07-18 18:08   ` Daniel Colascione
2011-07-18 18:52     ` grischka
2011-07-18 19:11       ` Daniel Colascione
2011-07-18 21:01         ` grischka
2011-07-19  2:58           ` Eli Zaretskii
2011-07-19  2:59             ` Daniel Colascione
2011-07-21 17:44           ` Lennart Borgman
2011-07-22  7:30             ` Daniel Colascione
2011-07-22  7:41               ` Lennart Borgman
2011-07-22 21:24                 ` chad
2011-07-22 21:57                   ` Lennart Borgman
2011-07-18 18:38   ` grischka

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=E1QijZc-0004xp-Ho@fencepost.gnu.org \
    --to=eliz@gnu.org \
    --cc=dan.colascione@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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.