[U-Boot] [PATCH] Fix breakage after removing common.h from export.h

Wolfgang Denk wd at denx.de
Fri Dec 9 13:41:23 CET 2011


Dear Stefano Babic,

In message <4EE2006C.8070505 at denx.de> you wrote:
>
> >> breaks all boards - the fact is that common.h is not included anymore
> >> by exports.h, and this breaks the build of several file.
> > 
> > Do we accept such a patch?
> 
> Yes - it is already in mainline

breaks all boards?  I did not observe this yet.

Which boards are broken?

> This seems to be, it is not - or not strictly. The problem rises with
> lib/qsort.c, that could be used (am I right ?) by standalone program and
> can import only export.h

No.  qsort() is not exported to standalone applications.

> >  Also, we should then remove the "#include <assert.h>"
> > from files that have this and also include common.h (that would be at
> > least common/hwconfig.c).
> 
> There is not yet an assert.h, I have introduced with this patch. This

-> find * -name '*.[ch]' | xargs egrep '#include.*assert.h'
common/hwconfig.c:#include <assert.h>
fs/yaffs2/ydirectenv.h:#include "assert.h"
tools/getline.c:#include <assert.h>
tools/mingw_support.c:#include <assert.h>


> avoid to include common.h in qsort.c, if qsort can be used in standalone
> programs and importing common.h is not allowed. Of course, if I am
> wrong, qsort can include directly common.h.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Die meisten Menschen pflegen im Kindesalter vom Zeigen auf Gegenstän-
de (Mausbewegung) und "ga" sagen  (Mausklick)  abzukommen,  zugunsten
eines  mächtigeren  und langwierig zu erlernenden Tools (Sprache).
                             -- Achim Linder in de.comp.os.linux.misc


More information about the U-Boot mailing list