unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Igor Peshansky <pechtcha@cs.nyu.edu>
Cc: djh <henman@it.to-be.co.jp>, emacs-devel@gnu.org, cygwin@cygwin.com
Subject: Re: New platform independent problem
Date: Fri, 20 Jan 2006 08:29:20 -0500 (EST)	[thread overview]
Message-ID: <Pine.GSO.4.63.0601200821540.17119@access1.cims.nyu.edu> (raw)
In-Reply-To: <ur773qhq5.fsf@gnu.org>

On Fri, 20 Jan 2006, Eli Zaretskii wrote:

> > Date: Fri, 20 Jan 2006 14:47:40 +0900
> > From: djh <henman@XX.XX-XX.XX.XX>
> >
> > In December of last year, 2005, the cygwin developers deprecated d_ino
> > out of the dirent.h defined dirent structure.

...changing it to __deprecated_d_ino, I believe.

> > This break emac's dired.c (from compiling)
> > Ref: http://www.cygwin.com/ml/cygwin/2005-12/msg00205.html
>
> Without knowing the full details, I'd risk saying that this was not
> the best decision.  Is there really no way of making d_ino be
> consistent with what `stat' returns about the same directory?

Corinna already covered that.

> In any case, I think removing the member is a solution that is much
> worse than the problem: many programs refer to d_ino, but don't
> require too much from its contents.  These programs will now fail to
> compile.  I don't think that the goal of educating the maintainers of
> Bash and Find (a worthy goal in itself) justifies breaking the other
> packages.
>
> If making d_ino consistent with st_ino is impossible, a better way of
> dealing with problems in Bash and Find is to make changes in those
> packages' sources that are specific to Cygwin.

Frankly, many programs expect that if d_ino is present, it has the correct
value (i.e., the same as st_ino).  Having the member and not setting it
correctly is essentially lying to the application.  Is it so bad for
Cygwin to be honest?

> > This change causes a "make bootstrap" error in building my emacs vers.
> > 22.0.50 source.
> >
> > "gcc -c  -Demacs -DHAVE_CONFIG_H -DUSE_GTK  -I. ..snipped...-O2 dired.c
> > dired.c: In function `directory_files_internal':
> > dired.c:230: error: structure has no member named `d_ino'
> > dired.c: In function `file_name_completion':
> > dired.c:538: error: structure has no member named `d_ino'
> > make[1]: *** [dired.o] Error 1 "
> >
> > Under the prior version of cygwin this built successfully.
> >
> > I unfortunatley am not expert enough to suggest any fixes for this,
> > but, I wanted to bring it to your attension to those of you out there
> > who are and want emacs to continue to be usable on the newer version
> > of cygwin.
>
> The immediate fix seems to be to modify the definition of
> DIRENTRY_NONEMPTY for Cygwin so that it uses the same trick as on
> MS-DOS.  (Isn't it sad that Cygwin needs old MS-DOS era tricks?)

If the content of d_ino isn't required to be anything specific, a simpler
solution could be something like

#ifdef __CYGWIN__
#define d_ino __deprecated_d_ino
#endif

Though why would a program refer to d_ino if it doesn't expect to do
anything with its content is beyond me.
HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha@cs.nyu.edu | igor@watson.ibm.com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"


  parent reply	other threads:[~2006-01-20 13:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-20  5:47 New platform independent problem djh
2006-01-20 11:08 ` Eli Zaretskii
2006-01-20 12:25   ` Corinna Vinschen
2006-01-20 13:59     ` Eric Blake
2006-01-20 14:14       ` Corinna Vinschen
2006-01-20 13:29   ` Igor Peshansky [this message]
2006-01-20 13:56     ` Eli Zaretskii
2006-01-20 14:18       ` Eric Blake
2006-01-20 16:48         ` Eli Zaretskii
2006-01-20 21:24         ` Andreas Schwab
2006-01-20 14:21       ` Corinna Vinschen
2006-01-27 20:45 ` Eli Zaretskii
2006-02-23  9:20   ` djh
  -- strict thread matches above, loose matches on Subject: below --
2006-01-20 17:01 Eric Blake
2006-01-20 17:22 ` Eli Zaretskii
2006-01-28 14:18   ` Corinna Vinschen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=Pine.GSO.4.63.0601200821540.17119@access1.cims.nyu.edu \
    --to=pechtcha@cs.nyu.edu \
    --cc=cygwin@cygwin.com \
    --cc=emacs-devel@gnu.org \
    --cc=henman@it.to-be.co.jp \
    /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 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).