On Thu, Mar 30, 2006 at 01:16:56PM +0200, Abdelrazak Younes wrote: > Enrico Forestieri a écrit :
> >That indeed would be great, but I think that the cygwin target has > >some peculiarities not easily mimicked by a native build. > > IMHO, no need to mimic anything, he who want a cygwin functionality > should use the cygwin mode... I am not sure I am not saying something > stupid her :-0 I don't think it's stupid. That would mean detecting at runtime if we are a cygwin app or not. See below. > >So, I agree with you that a part of the fix can also be applied > >to the plain win32 target, but I do not think that we can avoid > >all the "#ifdef __CYGWIN__" switches. > > Maybe not all but any which can be deleted is good. Is there a simple > way to check at runtime if we are running in a cygwin environment? > If yes, this check could be used as a replacement for the #ifdef, > couldn't it? (I hate #ifdef ;-)) The following C program prints "I am a cygwin app" when compiled with the cygwin gcc, and "I am a native win32 app" when compiled with mingw (-mno-cygwin, in my case). #include <stdio.h> #include <unistd.h> int main(void) { if (access("/cygdrive", F_OK) == 0) puts("I am a cygwin app"); else puts("I am a native win32 app"); return 0; } > >I think I can also tweak os_win32.C, but I do not dare to do that > >without permission. I dared to modify the cygwin target because it > >was my impression that it was being left behind and I didn't want > >it going down the sink like the OS2 target... > > Well, Angus is "retired", at least that's what he says ;-)... I am sure > that Michael Gerz would be happy and _I_ would happy that you take the > leadership for the windows platform :-). That makes the count for > potential windows developers, or did I forget somebody? Also I am very > short of time these days and you seem to have a lot knowledge in all > that stuff. Once your cygwin patch is accepted for 1.4.x, I would > suggest that you base your work against trunk. > > What do you think? I think I should be considered in the same position as Angus ;-) I cannot assure neither a continuous commitment nor a prompt reply to the list, due to my workload. Anyway, it is fun for me and I find that I am spending some night hours on the LyX sources. It seems that LyX has some addictive effect ;-) Then you should consider that, even if I am very proficient in C, I should be regarded as a real C++ newbie. I also think that Michael or you are good candidates to that leadership ;-) > Thanks for all the good explanations, You're welcome -- Enrico