Date: Wed, 17 Mar 2004 00:03:59 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 316 ************************************************** Tuesday 16 March 2004 Number 316 ************************************************** Subjects for today 1 Re: Mozilla Calendar : John Poltorak 2 Re: GCC 3.2.2 Beta 4 - printf bug? : Knut St. Osmundsen" 3 Re: GCC 3.2.2 Beta 4 : Knut St. Osmundsen" 4 Re: GCC 3.2.2 Beta 4 - printf bug? : Henry Sobotka **= Email 1 ==========================** Date: Mon, 15 Mar 2004 23:31:14 +0000 From: John Poltorak Subject: Re: Mozilla Calendar On Sat, Mar 13, 2004 at 04:54:56PM -0500, Henry Sobotka wrote: > John Poltorak wrote: > > > > On Sat, Mar 13, 2004 at 02:51:20PM -0500, Henry Sobotka wrote: > > > John Poltorak wrote: > > > > > > > > Is Mozilla Calendar buildable with the latest version of gcc ? > > > > > > No because of missing dependencies: libart_lgpl (the version in the > > > Mozilla tree needs OS/2 patches) and a calendar library whose name I > > > forget but that has yet to be ported. And there may be others. > > > > Is anyone working on this? > > Not that I know of. I took a run at it about a year ago and see from my > notes that it was with the GTK build for XFree86/OS2, that libart_lgpl > built cleanly, and that the version of libical I had built was 23, which > was missing a struct icaltimezone that was in the version in the Mozilla > tree (23a). That's where I left off as I was more concerned with trying > to figure out why the GTK build wasn't launching, and ran short of time > due to work. It looks as though someone has just built it... It isn't available as a standalone app but comes integrated into a new Mozilla build here:- http://home.comcast.net/~abwillis/mozilla.zip > h~ > -- > Free software, free minds. -- John **= Email 2 ==========================** Date: Tue, 16 Mar 2004 02:12:03 +0100 From: "Knut St. Osmundsen" Subject: Re: GCC 3.2.2 Beta 4 - printf bug? Henry Sobotka wrote: > Hi Knut, > > While looking into the emxomfar foo.o bar/foo.o problem (thanks for > emxomfar.dbg!) I discovered that EMX's strrev is broken; it SIGSEGVs > on "*p = *q" and, even if it didn't, it returns the input "string" > after doing nothing with it other than the assignment to p and q. I've looked at the strrev() code, it looks very ok to me. Guess you've fed it a readonly string thus causing the SIGSEGV. > So I rolled my own (my_strrev in the revtest.c below) and found it works > fine with gcc 2.8.1 and 2.95.3. But with 3.2.2 b4 I get strange > behavior: [snip] > A look in sd386 with fix == 0 shows that the string is fine when > assigned to r, and the garbage suddenly gets added to r with the call > to printf in main(). I'm sorry to say but your code is bad, and happy to say that printf is working. You are returning stack storage: char q[len+1]; [..] p = (char*)&q; [..] return p; Try your test program with strrev() and you'll see that it's working. Kind Regards, knut **= Email 3 ==========================** Date: Tue, 16 Mar 2004 02:15:53 +0100 From: "Knut St. Osmundsen" Subject: Re: GCC 3.2.2 Beta 4 Stefan Neis wrote: > On Mon, 8 Mar 2004, Stefan Neis wrote: > > >>>Is there an easier alternative than rewriting dllar.cmd to Unix shell >>>language to work around that? > > > Aside from not suffering from length limitations of cmd for argument > passing, my dllar.sh also has the advantage of being able to handle OMF > and OMF libraries - the extensions required are rather trivial. > For the moment, I put it into wxWindows' CVS as DLL build of wxWindows > relies on it, in the long run, it might be a good idea to put it into > the gcc package, together with the .cmd version. > Knut, are you reading? If yes, how do you feel about this idea? If it looks ok and works ok I'll be happy to bundle it with gcc. Kind Regards, knut **= Email 4 ==========================** Date: Tue, 16 Mar 2004 01:33:54 -0500 From: Henry Sobotka Subject: Re: GCC 3.2.2 Beta 4 - printf bug? Knut St. Osmundsen wrote: > > I've looked at the strrev() code, it looks very ok to me. Guess you've > fed it a readonly string thus causing the SIGSEGV. Looked ok to me too, so I gather char* s = "foo" is now (I thought const was the readonly identifier) the same as const char* s = "foo" (unless -fwrite-strings is used?) because "foo" automatically goes into the DATA/TEXT segment and becomes readonly, or something like that? > I'm sorry to say but your code is bad Not to mention kludgugly. > You are returning stack storage: for (int lashes = 100; lashes > 0; lashes--) { printf("Camel dung! C refs are not Perl refs!\n"); } > Try your test program with strrev() and you'll see that it's working. Yes. Duh! Thanks, h~ -- Free software, free minds.