From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maurilio Longo Subject: Re: dosemu 1.1.x and 1.1.4.13 bug (?) on CPUs faster than 2.0GHz Date: Thu, 13 Mar 2003 12:21:59 +0100 Sender: linux-msdos-owner@vger.kernel.org Message-ID: <3E7069D7.CDAFE36A@libero.it> References: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: List-Id: Content-Type: text/plain; charset="us-ascii" To: linux-msdos@vger.kernel.org Ok, with this patch it works ok :) So I've switched to 1.1.4.13, but now my clipper program is not able to print to a serial printer anymore :( even if a dir > com1: from dos prompt works ok, but my program uses a third party library to communicate with serial devices I fear it has to do with latest changes to serial code... I'll try to dig a little more, but I'm not familiar with dosemu code and linux programming in general... regards. Bart Oldeman ha scritto: > On Wed, 12 Mar 2003, Maurilio Longo wrote: > > > I fear that cpu speed is inside a long int and this shoud explain why it happens, I'd > > > > like to know from someone who writes dosemu if this is true and how they plan to fix > > this. > > it's a multiplication that overflows from an int -- try this patch: > > --- dosemu-1.1.4.13/src/base/init/config.c Sat Feb 15 14:49:31 2003 > +++ dosemu-1.1.4.14/src/base/init/config.c Wed Mar 12 14:38:28 2003 > @@ -484,7 +484,7 @@ > cdd[6]=0; sscanf(cdd,"%d",&df); > /* speed division factor to get 1us from CPU clocks - for > * details on fast division see timers.h */ > - chz = (di * 1000000) + df; > + chz = (di * 1000000LL) + df; > > /* speed division factor to get 1us from CPU clock */ > config.cpu_spd = (LLF_US*1000000)/chz; -- __________ | | | |__| md2520@mclink.it |_|_|_|____| Team OS/2 Italia