Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!husc6!harvard!caip!nike!styx!fair From: fair@styx.UUCP (Erik E. Fair) Newsgroups: net.bugs.4bsd,net.news.b Subject: Re: Limits on 4.2BSD lseek(2)? Message-ID: <20656@styx.UUCP> Date: Thu, 15-May-86 13:26:05 EDT Article-I.D.: styx.20656 Posted: Thu May 15 13:26:05 1986 Date-Received: Sat, 17-May-86 02:20:17 EDT References: <717@smeagol.UUCP> Organization: Lawrence Livermore Laboratory, Livermore, CA Lines: 12 Keywords: lseek "Netnews 2.10.3 4.3bsd-beta 6/6/85" Xref: watmath net.bugs.4bsd:2094 net.news.b:1374 This comes about because the dbm(3) library does not guarantee to deliver things aligned on the appropriate boundary. What you need to do is (approximately): dp = fetch(key); bcopy(offp, dp->d_data, sizeof(offp)); lseek(fd, *offp, 0); Declare offp so that it is guaranteed to be aligned, and copy all pointers you wish to dereference into it before dereff'ing them. Erik E. Fair styx!fair fair@lll-tis-b.arpa