public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ray Donnelly <mingw.android@gmail.com>
To: Kai Tietz <ktietz70@googlemail.com>
Cc: Pedro Alves <palves@redhat.com>, Kai Tietz <ktietz@redhat.com>,
		GCC Patches <gcc-patches@gcc.gnu.org>,
	Kai Tietz <ktietz70@gmail.com>
Subject: Re: [PATCH 2/2] Windows libcpp: Make path-exists semantics more Posix-like
Date: Tue, 18 Aug 2015 20:23:00 -0000	[thread overview]
Message-ID: <CAOYw7dsWX=i+wsh5Lnjr9NEP00uOhhi2XFRPz-3vxdkm44u1Og@mail.gmail.com> (raw)
In-Reply-To: <CAEwic4YR-iGhNOx82GqaGqA+pD=MVMG-df0rEhhwp2e1QP_vtw@mail.gmail.com>

On Fri, Apr 25, 2014 at 9:33 PM, Kai Tietz <ktietz70@googlemail.com> wrote:
> 2014-04-25 21:24 GMT+02:00 Pedro Alves <palves@redhat.com>:
>> On 04/25/2014 08:05 PM, Kai Tietz wrote:
>>> 2014-04-25 18:53 GMT+02:00 Pedro Alves <palves@redhat.com>:
>>>> On 04/19/2014 09:41 PM, Kai Tietz wrote:
>>>>
>>>>> Isn't this function something better placed in libiberty?  Also this name looks a bit confusing.  Wouldn't be a an function calling for _WIN32 case also stat, and just overrides the st_mode member, if it is a link better.  So I would put this function to the file_... API of libiberty.
>>>>
>>>> I'd even suspect that e.g., GNU Make / Makefiles would be likewise affected
>>>> by this.  A solution for this in gcc, or in a few selected programs
>>>> only, looks brittle to me.  Perhaps it should be mingw itself that provides
>>>> a _non-default_ replacement as option (similarly to __mingw_printf).
>>>
>>> Of course we could change default-behavior of stat-function within
>>> mingw.
>>
>> Huh?  I said exactly the opposite.  To expose it as a __non-default__
>> replacement.  I pointed at __mingw_printf, so to suggest programs
>> would call it like __mingw_stat or something, or by defining
>> __USE_MINGW_POSIX_STAT or something, just like one can define
>> __USE_MINGW_ANSI_STDIO before including stdio.h.  I'll understand
>> if you wouldn't want to support that as an option, but I did _not_
>> suggest making it the default.
>
> As none-default replacement it makes even less sense in mingw IMO.
> the __mingw_printf (and related functions) are there for providing C99
> functionality.  What standard shall __mingw_stat satisfy?
>
>>> I think that libiberty is exactly present to unify functionality (and
>>> API) for different operation systems.  Exactly for this libiberty was
>>> made, isn't it?
>>
>> libiberty is actually a kitchen sink, and specific to gcc and src.
> Well it is shared with binutils.  And in the past gdb used it too (I
> think it still does in some way, as not everything is in glib.  I
> might be wrong about this).
>
>> It does more than host abstraction.  Gnulib fills that role much better
>> nowdays.  I'd be nice if gcc used that instead for the host abstraction
>> parts (gdb does), but nobody's working on that afaik...
>
> That's true for gdb.  I don't see that binutils or gcc use glib.  So I
> can only talk in this thread about what gcc/binutils uses right now.
> Actually I am not really interested in what kind of compatibility
> library is used.
> Nevertheless to hi-jack this thread to start a discussion about
> preferring glib over other (already existing) library in gcc/binutils
> isn't ok.  Please start for such a discussion a separate RFC-thread.
>
>>> I agree that there are other venture, which might be affected by same
>>> problem.  So those venture could either use libiberty to solve this
>>> problem too, or need to reimplement it as they do now.
>>
>> And then we'll have reinvented Cygwin all over the map.  ;-)
>
> Huh?  mingw != cygwin.  and mingw's internal libraries aren't a
> kitchen-sink too.
>
>>>> Can't glibc be changed to not rely on this?  /me hides.

Yes mingw != cygwin, but we'd still like to be able to cross compile
glibc on Windows targeting GNU/Linux and this patch is necessary for
that to work. I see benefits in normalizing the behavior over three
build machine OSes (GNU/Linux, OS X and WIndows) and for all projects
being built (rather than just changing glibc). If I hear any positive
noises, I'll send a re-based version of the patch.

--
Ray

>>
>> --
>> Pedro Alves
>
> ---
> Kai Tietz

  reply	other threads:[~2015-08-18 20:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-19 19:41 [PATCH 0/2] Windows: Two improvements Ray Donnelly
2014-04-19 19:41 ` [PATCH 1/2] Windows libibery: Don't quote args unnecessarily Ray Donnelly
2014-04-19 20:41   ` Kai Tietz
2014-04-20  6:37     ` Eli Zaretskii
2014-04-21 15:38     ` Joel Brobecker
2014-04-19 20:23 ` [PATCH 2/2] Windows libcpp: Make path-exists semantics more Posix-like Ray Donnelly
2014-04-20  6:07   ` Kai Tietz
2014-04-25 16:58     ` Pedro Alves
2014-04-25 19:24       ` Kai Tietz
2014-04-25 19:35         ` Pedro Alves
2014-04-25 20:34           ` Kai Tietz
2015-08-18 20:23             ` Ray Donnelly [this message]
2014-04-25 17:06   ` Pedro Alves
2014-05-07  6:56 ` [PATCH] Windows libiberty: Don't quote args unnecessarily (v2) Ray Donnelly
2014-05-07  6:56   ` [PATCH] Windows libibery: Don't quote args unnecessarily Ray Donnelly
2014-05-08  7:22     ` Kai Tietz
2014-05-09  5:08     ` Ian Lance Taylor
2014-05-08  7:19   ` [PATCH] Windows libiberty: Don't quote args unnecessarily (v2) Kai Tietz

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='CAOYw7dsWX=i+wsh5Lnjr9NEP00uOhhi2XFRPz-3vxdkm44u1Og@mail.gmail.com' \
    --to=mingw.android@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=ktietz70@gmail.com \
    --cc=ktietz70@googlemail.com \
    --cc=ktietz@redhat.com \
    --cc=palves@redhat.com \
    /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.
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).