[U-Boot-Users] [PATCH] cygwin build fixes

Yuli Barcohen yuli at arabellasw.com
Mon Jul 26 12:07:04 CEST 2004


>>>>> Lars Munch writes:

    Lars> The attached patch fixes cygwin builds. inttypes.h has been
    Lars> included in cygwin for quite some time now, so we do not need
    Lars> all the __WIN32__ ifdef's.

    Yuli> First of all, Cygwin is a Linux-like environment and not WIN32
    Yuli> so there is no need to #define __WIN32__ in the Makefile.

    Lars> That is true, but on older cygwin systems that define was
    Lars> needed in order to build the tools. To me it looks like
    Lars> __WIN32__ should have been named __CYGWIN__ in the first
    Lars> place, since all the "#ifdef __WIN32__" in the tools directory
    Lars> are cygwin related and not VC++ nor mingw related.

Probably you're right. I don't know the history of this #define but
according to GCC documentation, "All names which begin with two
underscores, or an underscore and a capital letter, are reserved for the
compiler and library to use as they wish." So __WIN32__ should not be
defined for the tools, which are just applications, if it's not
pre-defined by the compiler. But #define is not the only problem. When I
worked around the #define, mkimage was built with incorrect endianness,
so I had to investigate the problem and found the includes order issue,
which is fixed by the patch.

    Lars> Maybe we should just remove all the "#ifdef __WIN32__" from
    Lars> the tools directory since they are not needed any more for
    Lars> cygwin builds and has nothing to do VC++ nor mingw?

I don't know if anybody needs them. There is Makefile.win32 in the tools
directory so maybe somebody builds the tools on Win32 platform, though I
suspect that nobody does. Maybe Wolfgang can answer your question...

-- 
========================================================================
 Yuli Barcohen       | Phone +972-9-765-1788 |  Software Project Leader
 yuli at arabellasw.com | Fax   +972-9-765-7494 | Arabella Software, Israel
========================================================================





More information about the U-Boot mailing list