On Monday, 5th April 1999, Matthew Dillon wrote:

>:char sccs[] = { '@', '(', '#', ')' };
>:char version[] = blahhhfoooooo;
>:Was contiguous.

>    'what' is broken.  C does not impose any sort of address ordering
>    restriction on globals or autos that are declared next to each other.   

Well, it's really an abuse of 'what', and not anything wrong with 'what'
ifself.  It will continue to work fine doing the job it was designed to do.

The NetBSD folks faced this problem some time ago, and I believe their
solution was to duplicate the version information.  So, version[] is the
same as it used to be, and sccs[] is 4 bytes longer than version[] to hold
a complete copy, and the @(#) prefix.  This is then completely portable.

Alternately, we could jimmy around with the current hack, and prefix it
with 4 NULs, and see what happened.  Sorry, I haven't tested this idea, as
I've not yet made the EGCS jump.

Stephen.


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to