Oops. Replied to Ben only not to the list. Here is my reply. Actually did a quick grep -r -w afterwards: there are roughly 475 .c files with extern in it. Guess this is a more widely spread issue.
(btw personally I feel that it is a sign of clean programming to declare all exported functions in a header file, and only to use header files to import functions, but maybe that is a personal thingie). Frans 2010/3/24 Frans Meulenbroeks <fransmeulenbro...@gmail.com>: > 2010/3/24 Ben Warren <biggerbadder...@gmail.com>: >> Hi Frans, >> >> On 3/24/2010 12:52 PM, Frans Meulenbroeks wrote: >>> >>> yet another potential cleanup: >>> >>> I see both: >>> extern char console_buffer[]; >>> and >>> extern char console_buffer[CONFIG_SYS_CBSIZE]; >>> >>> (and in fact console_buffer is declared as: >>> char console_buffer[CONFIG_SYS_CBSIZE + 1]; /* console I/O >>> buffer */ >>> so with a +1). >>> >>> Questions: >>> is the first or the 2nd form preferred? >>> and if it is the 2nd form should it not have the +1? >>> and wouldn't it be better to have this extern in a .h file (and if so >>> which one)? >>> >>> >> >> Your interest is definitely appreciated. As a general remark, you're more >> likely to get meaningful feedback if you just submit what you think is best. >> You'll get more feedback when people don't like what you did, but any EE >> will tell you that negative feedback is the path to stability :) > > You have a point. > Well, I have not too strong opinions on this one, but I like consistency. > But if I have a choice I prefer to have it in an include file (but I > am not too eager to create one for this sole declaration. > > Frans (who actually is an EE :-) ) > _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot