Mail Archives: cygwin/2006/02/15/12:41:40
On 15 February 2006 16:48, skaller wrote:
> On Wed, 2006-02-15 at 07:22 -0700, Eric Blake wrote:
>> There is no such thing as ming - it is mingw or mingw32. Furthermore,
>> cygwin only provides -mno-cygwin as a convenience, but it is NOT SUPPORTED
>> on this list. Ask the mingw list instead.
>
> I wasn't asking for support/bug fixes or whatever --
That's a shame, because this is the Cygwin support/bugfix list.
>I was
> asking for advice on the best programming practice to
> handle this kind of issue.
This is /NOT/ a list about best programming practices, or the theory of
computer engineering, or any other such thing. There *are* plenty of other
such lists, and they are populated with people who have the subject-specific
knowledge to actually _help_ you.
> But it isn't the same platform. On cygwin, the build
> scripts can be written with bash, and the generated
> executables can be run and passed Unix filenames.
> With MingW or MSVC++ targets, executables have to be
> passed Windows filenames.
Yes, and if you build _on_ cygwin _using_ -mno-cygwin, you will get an
executable that has to be passed a windows filename.
The cygwin dll hides this for you when you launch your exe from a bash
shell, because it knows when a new process is being created whether the
executable is a cygwin exe or a win32/mingw exe, and if it's win/ming, it
translates the paths for you.
> Since our product is itself a cross-cross-compiler,
That's too cross! Your product needs to take a chill pill!
> So, to give one of the original problems again: to emulate
> Posix on non-posix platforms, I found I had to define EAGAIN.
Emulating posix on non-posix platforms is not the topic of the list. This
is the cygwin list, and in the cygwin world, EAGAIN is defined in errno.h.
> I just did
>
> #ifdef _WIN32
> #define EAGAIN TIMEOUT_WAIT
> #endif
>
> but then we found Mingw seems to define it too.
That has nothing to do with Cygwin.
>So now the code reads:
>
> #ifdef _WIN32
> #ifndef EAGAIN
> #define EAGAIN WAIT_TIMEOUT
> #endif
> #endif
>
> However it is a hack. It will do temporarily. A better
> solution would be to test if EAGAIN is already defined
> in the configuration script. Perhaps.
ITYM 'indubitably'.
> The problem is
> that I don't know if it is a macro, and I don't know
> which file it might be defined in (on a non-posix system
> one can't assume it is in the standard place, indeed that
> idea seems like a contradiction).
Well, the only advice that Cygwin can give is to point you at the open-group
POSIX spec, which tells you where EAGAIN must be defined and in what way. As
to what any non-POSIX systems out there might do, I have to ask you /yet
again/:
Why are you asking this on the Cygwin list?
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -