>>>'what' is broken.  C does not impose any sort of address ordering
>>>restriction on globals or autos that are declared next to each other.
> Right, except that 'what' isn't broken.  It is vers.c (and conf/newvers.sh)
> that is broken, believing that the two variables will be allocating in 
> contiguous memory.
> Changing newvers.sh to generate
>       char sccs[] = "@(" "#)" "FreeBSD ...";
>       char version = "FreeBSD ...";

I will assume you meant "char *version" here.

> will make "what" on the kernel work again, at the expense of about 100
> duplicated
> bytes.

Check me if I'm wrong, but could we not do the same thing without the
duplication:

   char sccs[] = "@(" "#)" "FreeBSD ...";
   char *version = sccs + 4;

Happy hacking,
joelh

-- 
Joel Ray Holveck - jo...@gnu.org
   Fourth law of programming:
   Anything that can go wrong wi
sendmail: segmentation violation - core dumped


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

Reply via email to