From owner-cvs-all Sat Mar 24 13:52:32 2001 Delivered-To: cvs-all@freebsd.org Received: from moby.geekhouse.net (moby.geekhouse.net [64.81.6.36]) by hub.freebsd.org (Postfix) with ESMTP id 7829B37B71B; Sat, 24 Mar 2001 13:52:21 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from laptop.baldwin.cx (john@dhcp152.geekhouse.net [192.168.1.152]) by moby.geekhouse.net (8.11.3/8.11.3) with ESMTP id f2OLqaj18821; Sat, 24 Mar 2001 13:52:38 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Sat, 24 Mar 2001 13:51:52 -0800 (PST) From: John Baldwin To: John Baldwin Subject: Re: cvs commit: src/usr.sbin/sysinstall label.c menus.c Cc: "Jordan K. Hubbard" , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, "David O'Brien" Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 24-Mar-01 John Baldwin wrote: > > On 24-Mar-01 David O'Brien wrote: >> On Fri, Mar 23, 2001 at 12:06:20AM -0800, Jordan K. Hubbard wrote: >>> Modified files: >>> usr.sbin/sysinstall label.c menus.c >>> Log: >>> Eliminate an old warning brought about by insufficient foresight when >>> creating >>> the Menu structure. Have I ever mentioned that sysinstall really needs >>> to >>> be rewritten? >> >> You broke the Alpha build: >> >> /usr/src/usr.sbin/sysinstall/menus.c:1323: initializer element is not >> computable at load time >> /usr/src/usr.sbin/sysinstall/menus.c:1323: (near initialization for >> `MenuNetworking.items[9].aux') >> >> Reverting the "(int)" cast fixes the problem. > > And is bogus. Int on the alpha is 32 bits, where as a const char * is 64 > bits. > Either libdialog needs to be fixed so that dialog.h defines > dialogMenuItem.aux > as a void * rather than a long, or we need to change to having the data field > point to a struct containing a pointer to a string and a pointer to a submenu > and have dmenuVarCheck and dmenuSubmenu (or suitable wrappers) just use the > appropriate pointer from that struct. This is probably the better solution > but > requires more work. :) Actually, what we can do is use 'aux' as a flag to dmenuVarCheck and dmenuSubmenu and if it is set, then the data member points to a structure containing both menu pointer and a const char *. If it is 0, then they both just use data directly, which means that only this one menu option needs to be fixed. Ugh, aux is abused again for the package stuff. :( Maybe it's just easier to do a local change to libdialog to make aux a void * or a uintptr_t. :( -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message