Skip site navigation (1)Skip section navigation (2)
Date:      06 Apr 1999 17:16:16 -0500
From:      Joel Ray Holveck <joelh@gnu.org>
To:        loverso@sitaranetworks.com
Cc:        Matthew Dillon <dillon@apollo.backplane.com>, current@FreeBSD.ORG
Subject:   Re: EGCS breaks what(1)
Message-ID:  <86hfqtbdjj.fsf@detlev.UUCP>
In-Reply-To: "John R. LoVerso"'s message of "Tue, 06 Apr 1999 09:25:33 -0400"
References:  <Pine.BSF.4.05.9904052133460.42766-100000@janus.syracuse.net> <199904060156.SAA84557@apollo.backplane.com> <370A0B4D.2A710364@sitara.net>

next in thread | previous in thread | raw e-mail | index | archive | help
>>>'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 - joelh@gnu.org
   Fourth law of programming:
   Anything that can go wrong wi
sendmail: segmentation violation - core dumped


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86hfqtbdjj.fsf>