[BusyBox] The mount rewrite is in.

Rainer Weikusat rainer.weikusat at sncag.com
Tue Aug 23 18:10:19 UTC 2005


Rob Landley <rob at landley.net> writes:

> On Wednesday 17 August 2005 03:15, Thomas Fröhlich wrote:
>> compilation failed with
>> busybox/util-linux/util-linux.a(umount.o)(.text+0x2b8): In function
>
> Here's a thought:
>
> Change the erase_mtab() line to read:
>
>  if(ENABLE_FEATURE_MTAB_SUPPORT && useMtab && m) erase_mtab(m->dir);
>
> In theory, that's redundant but if your compiler is so broken it can't handle 
> simple constant propogation on local variables, that might beat it over the 
> head to work right.

The compiler is fine. Your code violates a shall-constraint of ISO/IEC
9899:1999 (E):

	5 An external definition is an external declaration that is
	  also a definition of a function (other than an inline
	  definition) or an object. If an identifier declared with
	  external linkage is used in an expression (other than as
	  part of the operand of a sizeof operator whose result is an
	  integer constant), somewhere in the entire program there
	  shall be exactly one external definition for the identifier;

and its behaviour is therefore undefined. It happens to work with some
versions of gcc, and one of them is the one you are using.



          




More information about the busybox mailing list