On 6/27/07, Jim Meyering <jim@xxxxxxxxxxxx> wrote:
"Alex Riesen" <raa.lkml@xxxxxxxxx> wrote: > On 6/27/07, Jim Meyering <jim@xxxxxxxxxxxx> wrote: >> "Alex Riesen" <raa.lkml@xxxxxxxxx> wrote: >> > Check if this works in some exotic but common >> > environments (like MacOSX, Cygwin or HP-UX). >> >> What do you mean? >> I know that dup and fdopen work in those environments. > > Exactly as you described? No, but why does that matter?
Your code will need additional tweaking on this systems.
> Are you sure fdopen on Cygwin > sets ENOMEM? Are you suggesting not to use errno because it won't contain useful information on Mingw32?
Yes. Mingw32 is just one example.
>> It's ok, but for the fact that when dup fails, all you get >> is the uninformative EINVAL from fdopen. > > EBADF on Cygwin, 0 on Mingw32. Can't even imagine what msvc EBADF is fine. Setting errno to 0 upon error is a bug. Don't cater to buggy systems.
It is my system at work. What should I do, throw it out of window?
> > Then put file name and the line number in! Surely you're playing devil's advocate, now...
No, I'm just thinking aloud about whether I should start preparing a reverting commit for your changes just to be able to continue using Git on that mismanaged, stupid, slow and very real system I have to work with. It is a Win2k laptop, in a Novell network and with Cygwin on (actually 2 cygwins at least, which cygwin does not support), and without a chance to _EVER_ use anything else. And I happen to depend on Git, because the alternative is, as someone noted, "badly mismanaged" Perforce. And I believe I am not that bad off, there are other systems on which you didn't test either. "Silly", as you say. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html