From owner-fam@oss.sgi.com Mon Apr 3 13:04:45 2000 Received: by oss.sgi.com id ; Mon, 3 Apr 2000 13:04:25 -0700 Received: from svn.net ([167.160.200.10]:14604 "EHLO svn.net") by oss.sgi.com with ESMTP id ; Mon, 3 Apr 2000 13:04:15 -0700 Received: from hera (bastian@pm3-153.svn.net [167.160.201.153]) by svn.net (8.10.0/8.10.0) with SMTP id e33K51G27493 for ; Mon, 3 Apr 2000 13:05:01 -0700 From: Waldo Bastian To: fam@oss.sgi.com Subject: [fam] fam &imon &linux & KDE :-) Date: Mon, 3 Apr 2000 12:43:20 -0700 Content-Type: text/plain MIME-Version: 1.0 Message-Id: <00040313042408.01161@hera> Content-Transfer-Encoding: 8bit Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing Hiya, I'm Waldo Bastian and just subscribed to this list. :-) >> Do the GNOME & KDE folks know about this? > Sort of; I sent mail to a few GNOME & KDE people, and Rebecca Underwood > talked to them at LinuxWorld Expo last month, so they know it's out there, > but if they don't jump on it, it's our fault, not theirs. I'm not > subscribed to any of their development lists, and I'm not actively pushing > it the way it should be pushed. There are all kinds of things we should > be doing, but we can only do them a bit at a time, so it's all going > pretty slowly. > (Hey, the KDE people had support for fam in their KDirWatch class even > before fam was available (!), but I haven't been able to fiddle with it > yet.) Yes, I got a patch for it from Josef.Weidendorf (?). I guess at that time it only worked on SGI. Speaking on behalve of KDE, we like FAM very much and would like to see it supported on Linux. At the moment we use it in KDirWatch when available. KDirWatch notifies applications when a change occurs in a directory. With FAM widely available we will probably add a KFileWatch as well. If you need any help with the linux kernel support part I can try to see if there are any kernel hackers around at SuSE who want to help you out. Cheers, Waldo bastian@kde.org bastian@suse.de -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Mon Apr 3 16:31:27 2000 Received: by oss.sgi.com id ; Mon, 3 Apr 2000 16:31:07 -0700 Received: from pneumatic-tube.sgi.com ([204.94.214.22]:46639 "EHLO pneumatic-tube.sgi.com") by oss.sgi.com with ESMTP id ; Mon, 3 Apr 2000 16:30:46 -0700 Received: from rlyeh.engr.sgi.com (rlyeh.engr.sgi.com [163.154.5.94]) by pneumatic-tube.sgi.com (980327.SGI.8.8.8-aspam/980310.SGI-aspam) via ESMTP id QAA05231 for ; Mon, 3 Apr 2000 16:34:30 -0700 (PDT) mail_from (rusty@rlyeh.engr.sgi.com) Received: (from rusty@localhost) by rlyeh.engr.sgi.com (980427.SGI.8.8.8/960327.SGI.AUTOCF) id QAA21094; Mon, 3 Apr 2000 16:28:46 -0700 (PDT) From: "Rusty Ballinger" Message-Id: <10004031628.ZM21062@rlyeh.engr.sgi.com> Date: Mon, 3 Apr 2000 16:28:46 -0700 In-Reply-To: raster@rasterman.com "Re: [fam] patch to fix fam to compile when imon isn't there...." (Mar 30, 8:23pm) References: <200003310423.UAA06886@behemoth.su.varesearch.com> X-Face: #)4}U4e`O6YEe%oBzE}>ycmT!Xt?Myiqo~|p3Wh'UuQ[N7)&4\4?8:1n)bmPX]b@#k94%!VojpODdmk:sCr1b\-aXD&P:wjBqupMB:ag6}BwVseJZM@K{$E|0J9}&,Rpdg{&N4/Y8&PTm6>|r[,gI2T*qN!`AZhl>Bdy7JR`dDvP(/pz.}?Q@dg':mlV`RX51Z_ZG?Gta|Q!iA[MaOh Reply-To: rusty@sgi.com X-Mailer: Z-Mail (3.2.3 08feb96 MediaMail) To: raster@rasterman.com Subject: Re: [fam] patch to fix fam to compile when imon isn't there.... Cc: fam@oss.sgi.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing > poke me with a glowing hot iron rod.... but for renames shouldn't I get > a Move event? for the base dir that is... ? One would think... but according to the fam(3X) man page, "FAMMoved events never occur. The name remains defined so that programs that reference it will still compile." No idea why it's like that. (Maybe because the FAMEvent struct doesn't have a place for the new name? The filename field is only NAME_MAX, not PATH_MAX, so it wouldn't work...) --Rusty -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Mon Apr 3 16:38:57 2000 Received: by oss.sgi.com id ; Mon, 3 Apr 2000 16:38:37 -0700 Received: from pneumatic-tube.sgi.com ([204.94.214.22]:13617 "EHLO pneumatic-tube.sgi.com") by oss.sgi.com with ESMTP id ; Mon, 3 Apr 2000 16:38:34 -0700 Received: from rlyeh.engr.sgi.com (rlyeh.engr.sgi.com [163.154.5.94]) by pneumatic-tube.sgi.com (980327.SGI.8.8.8-aspam/980310.SGI-aspam) via ESMTP id QAA09920 for ; Mon, 3 Apr 2000 16:42:19 -0700 (PDT) mail_from (rusty@rlyeh.engr.sgi.com) Received: (from rusty@localhost) by rlyeh.engr.sgi.com (980427.SGI.8.8.8/960327.SGI.AUTOCF) id QAA21231; Mon, 3 Apr 2000 16:36:35 -0700 (PDT) From: "Rusty Ballinger" Message-Id: <10004031636.ZM21245@rlyeh.engr.sgi.com> Date: Mon, 3 Apr 2000 16:36:35 -0700 In-Reply-To: Waldo Bastian "[fam] fam &imon &linux & KDE :-)" (Apr 3, 12:43pm) References: <00040313042408.01161@hera> X-Face: #)4}U4e`O6YEe%oBzE}>ycmT!Xt?Myiqo~|p3Wh'UuQ[N7)&4\4?8:1n)bmPX]b@#k94%!VojpODdmk:sCr1b\-aXD&P:wjBqupMB:ag6}BwVseJZM@K{$E|0J9}&,Rpdg{&N4/Y8&PTm6>|r[,gI2T*qN!`AZhl>Bdy7JR`dDvP(/pz.}?Q@dg':mlV`RX51Z_ZG?Gta|Q!iA[MaOh Reply-To: rusty@sgi.com X-Mailer: Z-Mail (3.2.3 08feb96 MediaMail) To: bastian@suse.de Subject: Re: [fam] fam &imon &linux & KDE :-) Cc: fam@oss.sgi.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing > If you need any help with the linux kernel support part I can try to see > if there are any kernel hackers around at SuSE who want to help you out. That would be great! Any help would be appreciated. There are patches which "mostly" work, but the way they hook into the kernel's fs code is ugly. There are notes at http://oss.sgi.com/projects/fam/imon.txt (that file is also included in the patches). One thing those notes don't include is Andrew Morton's idea of separating the start- & stop-exec events from the rest of the imon patch. (That's the new fields added to the inode and task_struct, and the accounting in fs/exec.c, kernel/exit.c, and kernel/fork.c.) I still haven't posted a request for comments etc. on linux-kernel yet; I was hoping to have a working 2.3.99-preX version first, but my first quick attempt was broken. --Rusty -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Mon Apr 3 16:52:27 2000 Received: by oss.sgi.com id ; Mon, 3 Apr 2000 16:52:17 -0700 Received: from nat-su-33.valinux.com ([198.186.202.33]:10078 "EHLO rasterman.com") by oss.sgi.com with ESMTP id ; Mon, 3 Apr 2000 16:51:58 -0700 Received: (from raster@localhost) by rasterman.com (8.9.3/8.8.7) id RAA19247; Mon, 3 Apr 2000 17:51:44 -0700 Message-Id: <200004040051.RAA19247@rasterman.com> Date: Mon, 3 Apr 2000 17:51:44 -0700 (PDT) From: raster@rasterman.com Reply-To: raster@rasterman.com Subject: Re: [fam] patch to fix fam to compile when imon isn't there.... To: rusty@sgi.com cc: rusty@rlyeh.engr.sgi.com, fam@oss.sgi.com In-Reply-To: <10004031628.ZM21062@rlyeh.engr.sgi.com> MIME-Version: 1.0 Content-Type: TEXT/plain; CHARSET=US-ASCII Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing On 3 Apr, Rusty Ballinger scribbled: -> > poke me with a glowing hot iron rod.... but for renames shouldn't I get -> > a Move event? for the base dir that is... ? -> -> One would think... but according to the fam(3X) man page, "FAMMoved events -> never occur. The name remains defined so that programs that reference it -> will still compile." No idea why it's like that. (Maybe because the -> FAMEvent struct doesn't have a place for the new name? The filename field -> is only NAME_MAX, not PATH_MAX, so it wouldn't work...) hmm fair enough... so is the moved event ever goign to be used.... or am i just being silly in tryng to abstract it ? :) -- --------------- Codito, ergo sum - "I code, therefore I am" -------------------- The Rasterman (Carsten Haitzler) raster@rasterman.com raster@valinux.com raster@enlightenment.org raster@linux.com raster@zip.com.au -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Mon Apr 3 16:52:28 2000 Received: by oss.sgi.com id ; Mon, 3 Apr 2000 16:52:09 -0700 Received: from nat-su-33.valinux.com ([198.186.202.33]:12126 "EHLO rasterman.com") by oss.sgi.com with ESMTP id ; Mon, 3 Apr 2000 16:51:57 -0700 Received: (from raster@localhost) by rasterman.com (8.9.3/8.8.7) id RAA19250; Mon, 3 Apr 2000 17:51:44 -0700 Message-Id: <200004040051.RAA19250@rasterman.com> Date: Mon, 3 Apr 2000 17:51:44 -0700 (PDT) From: raster@rasterman.com Reply-To: raster@rasterman.com Subject: Re: [fam] fam &imon &linux & KDE :-) To: rusty@sgi.com cc: rusty@rlyeh.engr.sgi.com, bastian@suse.de, fam@oss.sgi.com In-Reply-To: <10004031636.ZM21245@rlyeh.engr.sgi.com> MIME-Version: 1.0 Content-Type: TEXT/plain; CHARSET=US-ASCII Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing On 3 Apr, Rusty Ballinger scribbled: -> > If you need any help with the linux kernel support part I can try to see -> > if there are any kernel hackers around at SuSE who want to help you out. -> -> That would be great! Any help would be appreciated. There are patches -> which "mostly" work, but the way they hook into the kernel's fs code is -> ugly. There are notes at http://oss.sgi.com/projects/fam/imon.txt (that -> file is also included in the patches). -> -> One thing those notes don't include is Andrew Morton's idea of separating -> the start- & stop-exec events from the rest of the imon patch. (That's -> the new fields added to the inode and task_struct, and the accounting in -> fs/exec.c, kernel/exit.c, and kernel/fork.c.) -> -> I still haven't posted a request for comments etc. on linux-kernel yet; -> I was hoping to have a working 2.3.99-preX version first, but my first -> quick attempt was broken. actually a question.. is imon at all destined to become part of the base kernel sometime (maybe 2.5 devel series) ? i got this question from E users after i nicely informed them they'll need fam from now on.. :) -- --------------- Codito, ergo sum - "I code, therefore I am" -------------------- The Rasterman (Carsten Haitzler) raster@rasterman.com raster@valinux.com raster@enlightenment.org raster@linux.com raster@zip.com.au -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Mon Apr 3 17:17:09 2000 Received: by oss.sgi.com id ; Mon, 3 Apr 2000 17:16:59 -0700 Received: from pneumatic-tube.sgi.com ([204.94.214.22]:42294 "EHLO pneumatic-tube.sgi.com") by oss.sgi.com with ESMTP id ; Mon, 3 Apr 2000 17:16:41 -0700 Received: from nodin.corp.sgi.com (fddi-nodin.corp.sgi.com [198.29.75.193]) by pneumatic-tube.sgi.com (980327.SGI.8.8.8-aspam/980310.SGI-aspam) via ESMTP id RAA02459 for ; Mon, 3 Apr 2000 17:20:25 -0700 (PDT) mail_from (rusty@rlyeh.engr.sgi.com) Received: from rlyeh.engr.sgi.com (rlyeh.engr.sgi.com [163.154.5.94]) by nodin.corp.sgi.com (980427.SGI.8.8.8/980728.SGI.AUTOCF) via ESMTP id RAA70184 for ; Mon, 3 Apr 2000 17:16:40 -0700 (PDT) Received: (from rusty@localhost) by rlyeh.engr.sgi.com (980427.SGI.8.8.8/960327.SGI.AUTOCF) id RAA21244; Mon, 3 Apr 2000 17:13:26 -0700 (PDT) From: "Rusty Ballinger" Message-Id: <10004031713.ZM21328@rlyeh.engr.sgi.com> Date: Mon, 3 Apr 2000 17:13:25 -0700 In-Reply-To: raster@rasterman.com "Re: [fam] fam &imon &linux & KDE :-)" (Apr 3, 5:51pm) References: <200004040051.RAA19250@rasterman.com> X-Face: #)4}U4e`O6YEe%oBzE}>ycmT!Xt?Myiqo~|p3Wh'UuQ[N7)&4\4?8:1n)bmPX]b@#k94%!VojpODdmk:sCr1b\-aXD&P:wjBqupMB:ag6}BwVseJZM@K{$E|0J9}&,Rpdg{&N4/Y8&PTm6>|r[,gI2T*qN!`AZhl>Bdy7JR`dDvP(/pz.}?Q@dg':mlV`RX51Z_ZG?Gta|Q!iA[MaOh Reply-To: rusty@sgi.com X-Mailer: Z-Mail (3.2.3 08feb96 MediaMail) To: raster@rasterman.com Subject: Re: [fam] fam &imon &linux & KDE :-) Cc: fam@oss.sgi.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing > -> I still haven't posted a request for comments etc. on linux-kernel yet; > -> I was hoping to have a working 2.3.99-preX version first, but my first > -> quick attempt was broken. > > actually a question.. is imon at all destined to become part of the > base kernel sometime (maybe 2.5 devel series) ? i got this question > from E users after i nicely informed them they'll need fam from now on.. > :) I hope so. And I think it will, eventually, but if it were my kernel I'd feel a lot better about imon if I didn't have to see a bunch of IMON_EVENT calls in my fs code. (And even if imon never gets in--if everyone hates the implementation or something--the idea of kernel notification of file operations is useful enough that something *just like* imon would go in, and then fam could just use that.) --Rusty -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Mon Apr 3 17:19:59 2000 Received: by oss.sgi.com id ; Mon, 3 Apr 2000 17:19:39 -0700 Received: from pneumatic-tube.sgi.com ([204.94.214.22]:64566 "EHLO pneumatic-tube.sgi.com") by oss.sgi.com with ESMTP id ; Mon, 3 Apr 2000 17:19:23 -0700 Received: from nodin.corp.sgi.com (fddi-nodin.corp.sgi.com [198.29.75.193]) by pneumatic-tube.sgi.com (980327.SGI.8.8.8-aspam/980310.SGI-aspam) via ESMTP id RAA09597 for ; Mon, 3 Apr 2000 17:23:08 -0700 (PDT) mail_from (rusty@rlyeh.engr.sgi.com) Received: from rlyeh.engr.sgi.com (rlyeh.engr.sgi.com [163.154.5.94]) by nodin.corp.sgi.com (980427.SGI.8.8.8/980728.SGI.AUTOCF) via ESMTP id RAA71109 for ; Mon, 3 Apr 2000 17:19:23 -0700 (PDT) Received: (from rusty@localhost) by rlyeh.engr.sgi.com (980427.SGI.8.8.8/960327.SGI.AUTOCF) id RAA21409; Mon, 3 Apr 2000 17:16:09 -0700 (PDT) From: "Rusty Ballinger" Message-Id: <10004031716.ZM21401@rlyeh.engr.sgi.com> Date: Mon, 3 Apr 2000 17:16:09 -0700 In-Reply-To: raster@rasterman.com "Re: [fam] patch to fix fam to compile when imon isn't there...." (Apr 3, 5:51pm) References: <200004040051.RAA19247@rasterman.com> X-Face: #)4}U4e`O6YEe%oBzE}>ycmT!Xt?Myiqo~|p3Wh'UuQ[N7)&4\4?8:1n)bmPX]b@#k94%!VojpODdmk:sCr1b\-aXD&P:wjBqupMB:ag6}BwVseJZM@K{$E|0J9}&,Rpdg{&N4/Y8&PTm6>|r[,gI2T*qN!`AZhl>Bdy7JR`dDvP(/pz.}?Q@dg':mlV`RX51Z_ZG?Gta|Q!iA[MaOh Reply-To: rusty@sgi.com X-Mailer: Z-Mail (3.2.3 08feb96 MediaMail) To: raster@rasterman.com Subject: Re: [fam] patch to fix fam to compile when imon isn't there.... Cc: fam@oss.sgi.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing > hmm fair enough... so is the moved event ever goign to be used.... "I hope not." I don't really want to mess with the API, because I'm afraid of breaking existing stuff on IRIX. If someone needs it, though, and they see a good way to implement it, I'll be happy to talk about it. --Rusty -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Mon Apr 3 17:28:40 2000 Received: by oss.sgi.com id ; Mon, 3 Apr 2000 17:28:30 -0700 Received: from nat-su-33.valinux.com ([198.186.202.33]:20315 "EHLO rasterman.com") by oss.sgi.com with ESMTP id ; Mon, 3 Apr 2000 17:28:13 -0700 Received: (from raster@localhost) by rasterman.com (8.9.3/8.8.7) id SAA22289; Mon, 3 Apr 2000 18:28:02 -0700 Message-Id: <200004040128.SAA22289@rasterman.com> Date: Mon, 3 Apr 2000 18:28:02 -0700 (PDT) From: raster@rasterman.com Reply-To: raster@rasterman.com Subject: Re: [fam] patch to fix fam to compile when imon isn't there.... To: rusty@sgi.com cc: rusty@rlyeh.engr.sgi.com, fam@oss.sgi.com In-Reply-To: <10004031716.ZM21401@rlyeh.engr.sgi.com> MIME-Version: 1.0 Content-Type: TEXT/plain; CHARSET=US-ASCII Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing On 3 Apr, Rusty Ballinger scribbled: -> > hmm fair enough... so is the moved event ever goign to be used.... -> -> "I hope not." I don't really want to mess with the API, because I'm -> afraid of breaking existing stuff on IRIX. If someone needs it, though, -> and they see a good way to implement it, I'll be happy to talk about it. hmmmmmmmm well i just thotught moved woudl beuseful to knwo if someoen renamed a file underneath the fielmanager so it didnt have to go mvoe the icon around - just redraw the text title.. :) -- --------------- Codito, ergo sum - "I code, therefore I am" -------------------- The Rasterman (Carsten Haitzler) raster@rasterman.com raster@valinux.com raster@enlightenment.org raster@linux.com raster@zip.com.au -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Mon Apr 3 17:28:40 2000 Received: by oss.sgi.com id ; Mon, 3 Apr 2000 17:28:30 -0700 Received: from nat-su-33.valinux.com ([198.186.202.33]:13147 "EHLO rasterman.com") by oss.sgi.com with ESMTP id ; Mon, 3 Apr 2000 17:28:10 -0700 Received: (from raster@localhost) by rasterman.com (8.9.3/8.8.7) id SAA22292; Mon, 3 Apr 2000 18:28:02 -0700 Message-Id: <200004040128.SAA22292@rasterman.com> Date: Mon, 3 Apr 2000 18:28:02 -0700 (PDT) From: raster@rasterman.com Reply-To: raster@rasterman.com Subject: Re: [fam] fam &imon &linux & KDE :-) To: rusty@sgi.com cc: rusty@rlyeh.engr.sgi.com, fam@oss.sgi.com In-Reply-To: <10004031713.ZM21328@rlyeh.engr.sgi.com> MIME-Version: 1.0 Content-Type: TEXT/plain; CHARSET=US-ASCII Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing On 3 Apr, Rusty Ballinger scribbled: -> > -> I still haven't posted a request for comments etc. on linux-kernel yet; -> > -> I was hoping to have a working 2.3.99-preX version first, but my first -> > -> quick attempt was broken. -> > -> > actually a question.. is imon at all destined to become part of the -> > base kernel sometime (maybe 2.5 devel series) ? i got this question -> > from E users after i nicely informed them they'll need fam from now on.. -> > :) -> -> I hope so. And I think it will, eventually, but if it were my kernel I'd -> feel a lot better about imon if I didn't have to see a bunch of IMON_EVENT -> calls in my fs code. (And even if imon never gets in--if everyone hates the -> implementation or something--the idea of kernel notification of file -> operations is useful enough that something *just like* imon would go in, and -> then fam could just use that.) true - well sofar imon at kernel level works fine... so i'm happy wiht it.. i havent spotted smp problems nor any noticable speed issues... hmmm i'd be temtped to - once the current issue you have is resolved and 2.4 is out to submit it for 2.5 ASAP so it goes in 2.5 early :) -- --------------- Codito, ergo sum - "I code, therefore I am" -------------------- The Rasterman (Carsten Haitzler) raster@rasterman.com raster@valinux.com raster@enlightenment.org raster@linux.com raster@zip.com.au -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Wed Apr 5 08:47:00 2000 Received: by oss.sgi.com id ; Wed, 5 Apr 2000 08:46:40 -0700 Received: from scherpo.student.earlham.edu ([159.28.163.144]:62470 "EHLO scherpo.student.earlham.edu") by oss.sgi.com with ESMTP id ; Wed, 5 Apr 2000 08:46:08 -0700 Received: (from elmoe@localhost) by scherpo.student.earlham.edu (8.10.0/8.10.0/Debian 8.10.0-1) id e35Amf804586 for fam@oss.sgi.com; Wed, 5 Apr 2000 10:48:41 GMT Date: Wed, 5 Apr 2000 10:48:41 +0000 From: Elmoe Gingrin To: fam@oss.sgi.com Subject: [fam] Fam OSS 2.6.2 Compile Errors Message-ID: <20000405104841.A4493@scherpo.student.earlham.edu> Reply-To: Porter Schermerhorn Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.1.9i Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing I have been getting the most bizaare errors when attempting to compile the latest open source version of fam (to my knowledge 2.6.2). I was able to patch my kernel (Linux 2.2.13) with imon and compile it as a module just fine. Then I attempt to run make on fam and recieve: c++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -DCONFIG_ETC_CONFIG_PATH=\"/etc/fam.conf\" -g -O2 -c Activity.c++ In file included from Activity.c++:28: Scheduler.h:97: ANSI C++ forbids data member `handler' with same name as enclosing class As I said, this is with Linux kernel 2.2.13 and libstdc++ 2.95.2. I found error to be most bizarre as I can't imagine why fam would not comply with ANSI C++ standards. Any light you all could shed on the situation would be greatly appreciated. Keep up the good work, although I haven't gotten it up and working yet, fam looks to be super cool. -- Porter -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Wed Apr 5 11:02:20 2000 Received: by oss.sgi.com id ; Wed, 5 Apr 2000 11:02:00 -0700 Received: from deliverator.sgi.com ([204.94.214.10]:43124 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Wed, 5 Apr 2000 11:01:51 -0700 Received: from nodin.corp.sgi.com (fddi-nodin.corp.sgi.com [198.29.75.193]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP id KAA22858 for ; Wed, 5 Apr 2000 10:57:09 -0700 (PDT) mail_from (rusty@rlyeh.engr.sgi.com) Received: from rlyeh.engr.sgi.com (rlyeh.engr.sgi.com [163.154.5.94]) by nodin.corp.sgi.com (980427.SGI.8.8.8/980728.SGI.AUTOCF) via ESMTP id LAA65468 for ; Wed, 5 Apr 2000 11:01:49 -0700 (PDT) Received: (from rusty@localhost) by rlyeh.engr.sgi.com (980427.SGI.8.8.8/960327.SGI.AUTOCF) id KAA26216; Wed, 5 Apr 2000 10:58:28 -0700 (PDT) From: "Rusty Ballinger" Message-Id: <10004051058.ZM26112@rlyeh.engr.sgi.com> Date: Wed, 5 Apr 2000 10:58:28 -0700 In-Reply-To: Elmoe Gingrin "[fam] Fam OSS 2.6.2 Compile Errors" (Apr 5, 10:48am) References: <20000405104841.A4493@scherpo.student.earlham.edu> X-Face: #)4}U4e`O6YEe%oBzE}>ycmT!Xt?Myiqo~|p3Wh'UuQ[N7)&4\4?8:1n)bmPX]b@#k94%!VojpODdmk:sCr1b\-aXD&P:wjBqupMB:ag6}BwVseJZM@K{$E|0J9}&,Rpdg{&N4/Y8&PTm6>|r[,gI2T*qN!`AZhl>Bdy7JR`dDvP(/pz.}?Q@dg':mlV`RX51Z_ZG?Gta|Q!iA[MaOh Reply-To: rusty@sgi.com X-Mailer: Z-Mail (3.2.3 08feb96 MediaMail) To: elmoe@scherpo.student.earlham.edu Subject: Re: [fam] Fam OSS 2.6.2 Compile Errors Cc: fam@oss.sgi.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing > I have been getting the most bizaare errors when attempting to compile > the latest open source version of fam (to my knowledge 2.6.2). I have no idea why, but the -O2 flag causes the compiler to "act weird," for want of a more descriptive technical term. (A similar thing happens to me with egcs-2.91.66.) If you try setting your CXXFLAGS environment variable to "" or "-g -O" etc. and then rerunning the configure script, does that fix the problem? --Rusty -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Wed Apr 5 14:15:21 2000 Received: by oss.sgi.com id ; Wed, 5 Apr 2000 14:15:02 -0700 Received: from deliverator.sgi.com ([204.94.214.10]:25906 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Wed, 5 Apr 2000 14:14:35 -0700 Received: from rlyeh.engr.sgi.com (rlyeh.engr.sgi.com [163.154.5.94]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP id OAA19096 for ; Wed, 5 Apr 2000 14:09:52 -0700 (PDT) mail_from (rusty@rlyeh.engr.sgi.com) Received: (from rusty@localhost) by rlyeh.engr.sgi.com (980427.SGI.8.8.8/960327.SGI.AUTOCF) id OAA29919; Wed, 5 Apr 2000 14:12:30 -0700 (PDT) From: "Rusty Ballinger" Message-Id: <10004051412.ZM29953@rlyeh.engr.sgi.com> Date: Wed, 5 Apr 2000 14:12:29 -0700 In-Reply-To: Elmoe Gingrin "Re: [fam] Fam OSS 2.6.2 Compile Errors" (Apr 5, 1:19pm) References: <20000405104841.A4493@scherpo.student.earlham.edu> <10004051058.ZM26112@rlyeh.engr.sgi.com> <20000405131908.A5781@scherpo.student.earlham.edu> X-Face: #)4}U4e`O6YEe%oBzE}>ycmT!Xt?Myiqo~|p3Wh'UuQ[N7)&4\4?8:1n)bmPX]b@#k94%!VojpODdmk:sCr1b\-aXD&P:wjBqupMB:ag6}BwVseJZM@K{$E|0J9}&,Rpdg{&N4/Y8&PTm6>|r[,gI2T*qN!`AZhl>Bdy7JR`dDvP(/pz.}?Q@dg':mlV`RX51Z_ZG?Gta|Q!iA[MaOh Reply-To: rusty@sgi.com X-Mailer: Z-Mail (3.2.3 08feb96 MediaMail) To: scherpo@earlham.edu Subject: Re: [fam] Fam OSS 2.6.2 Compile Errors Cc: fam@oss.sgi.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing > As the error states, you are declaring an i/o handler of the name handler > which is the same name as the structure which is a no-no if I am not > mistaken? Hrrmm... I think you're right. Using the SGI compilers on IRIX (which normally conform to the ARM), and turning on ANSI/ISO? conformance (-ansiE), fam fails to compile, so the problem really does seem to be the code. (I didn't see an equivalent flag for egcs-2.91.66, which is apparently also not ANSI C++ by default.) Ultimately the code should be fixed. (Hey, got a patch?) In the meantime, does your compiler have a --bogo-code=ENABLED flag or something, or can you use a different compiler? --Rusty P.S. If someone goes through and fixes up the places where fam doesn't conform to ANSI C++, it would probably also be a good time to make fam compile cleanly with full warnings turned on. (Currently, it definitely doesn't.) I probably won't do it myself anytime in the next couple of weeks, unless it really bothers you and you don't want to send a patch. -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Sun Apr 9 19:59:59 2000 Received: by oss.sgi.com id ; Sun, 9 Apr 2000 19:59:48 -0700 Received: from bellatrix.worldonline.fr ([212.83.128.15]:44807 "EHLO bellatrix.worldonline.fr") by oss.sgi.com with ESMTP id ; Sun, 9 Apr 2000 19:59:47 -0700 Received: from kea.worldonline.fr (ppp-1.dialup-160.worldonline.fr [212.83.160.1]) by bellatrix.worldonline.fr (Mail pour Wolf) with SMTP id EAA31720 for ; Mon, 10 Apr 2000 04:59:44 +0200 From: Raphael LANGELLA To: fam@oss.sgi.com Subject: [fam] problem compiling Date: Mon, 10 Apr 2000 05:00:39 +0200 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <00041005010803.04591@kea.worldonline.fr> Content-Transfer-Encoding: 8bit Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing the error isn't the different from the FAQ. I get In file included from Activity.c++:28: Scheduler.h:97: ANSI C++ forbids data member `handler' with same name as enclosing class when compiling fam-oss-2.6.2 on a Mandrake 7 linux. the version of egcs is 2.95.2 -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Mon Apr 10 04:01:01 2000 Received: by oss.sgi.com id ; Mon, 10 Apr 2000 04:00:50 -0700 Received: from mail.zrz.TU-Berlin.DE ([130.149.4.15]:21189 "EHLO mail.zrz.tu-berlin.de") by oss.sgi.com with ESMTP id ; Mon, 10 Apr 2000 04:00:32 -0700 Received: from mikro.physik.tu-berlin.de ([130.149.161.103]) by mail.zrz.tu-berlin.de with esmtp (exim-3.13) for id 12ebvi-00048o-00; Mon, 10 Apr 2000 13:00:30 +0200 Received: (from bose@localhost) by mikro.physik.TU-Berlin.DE (8.9.3/8.9.3) id NAA32187 for fam@oss.sgi.com; Mon, 10 Apr 2000 13:00:21 +0200 Date: Mon, 10 Apr 2000 13:00:21 +0200 From: Sumit Bose To: fam@oss.sgi.com Subject: [fam] fam-2.6.2 and gcc-2.95.2 Message-ID: <20000410130021.A29945@mikro.physik.tu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing Hi, the following two patches to Scheduler.h and Scheduler.c++ should prevent the Scheduler.h:97: ANSI C++ forbids data member `handler' with same name as enclosing class error when using gcc-2.95.2. I have changed handler to xxx_handler (I am sure that there will be a more sensible prefix than xxx_) and now everything works fine for me. I have also made a couple of changes to other files so that fam-oss-2.6.2 will compile on IRIX5.3 with gcc-2.95.2 (most of them are missing include files and missing functions in IRIX5.3), shall I also send them to this list? Sumit diff -Naur fam-oss-2.6.2/fam/Scheduler.h fam-oss-2.6.2-new/fam/Scheduler.h --- fam-oss-2.6.2/fam/Scheduler.h Thu Mar 2 01:51:24 2000 +++ fam-oss-2.6.2-new/fam/Scheduler.h Wed Apr 5 14:57:37 2000 @@ -24,6 +24,7 @@ #define Scheduler_included #include +#include #include "Boolean.h" @@ -94,7 +95,7 @@ struct FDInfo { struct handler { - IOHandler handler; + IOHandler xxx_handler; void *closure; } read, write; }; diff -Naur fam-oss-2.6.2/fam/Scheduler.c++ fam-oss-2.6.2-new/fam/Scheduler.c++ --- fam-oss-2.6.2/fam/Scheduler.c++ Thu Mar 2 01:51:20 2000 +++ fam-oss-2.6.2-new/fam/Scheduler.c++ Wed Apr 5 15:29:58 2000 @@ -232,7 +232,7 @@ Scheduler::trim_fdinfo() { for (FDInfo *fp = &fdinfo[nfds - 1]; nfds > 0; --nfds, --fp) - if (fp->read.handler || fp->write.handler) + if (fp->read.xxx_handler || fp->write.xxx_handler) break; if (!nfds) @@ -249,8 +249,8 @@ assert(fd >= 0); assert(handler); FDInfo *fp = fd_to_info(fd); - IOHandler old_handler = (fp->*(iotype->iotype)).handler; - (fp->*(iotype->iotype)).handler = handler; + IOHandler old_handler = (fp->*(iotype->iotype)).xxx_handler; + (fp->*(iotype->iotype)).xxx_handler = handler; (fp->*(iotype->iotype)).closure = closure; assert(!old_handler || FD_ISSET(fd, &iotype->fds)); if (!FD_ISSET(fd, &iotype->fds)) @@ -266,8 +266,8 @@ { assert(fd >= 0 && fd < nfds); FDInfo *fp = fd_to_info(fd); - IOHandler old_handler = (fp->*(iotype->iotype)).handler; - (fp->*(iotype->iotype)).handler = NULL; + IOHandler old_handler = (fp->*(iotype->iotype)).xxx_handler; + (fp->*(iotype->iotype)).xxx_handler = NULL; (fp->*(iotype->iotype)).closure = NULL; trim_fdinfo(); assert(old_handler); @@ -311,7 +311,7 @@ if (FD_ISSET(fd, fds)) { FDInfo *fp = &fdinfo[fd]; assert(iotype == &FDInfo::read || iotype == &FDInfo::write); - (fp->*iotype).handler(fd, (fp->*iotype).closure); + (fp->*iotype).xxx_handler(fd, (fp->*iotype).closure); // Remember, handler may move fdinfo array. } } -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Mon Apr 10 08:41:03 2000 Received: by oss.sgi.com id ; Mon, 10 Apr 2000 08:40:44 -0700 Received: from kochab.worldonline.fr ([212.83.128.12]:61190 "EHLO kochab.worldonline.fr") by oss.sgi.com with ESMTP id ; Mon, 10 Apr 2000 08:40:25 -0700 Received: from kea.worldonline.fr (ppp-41.dialup-179.worldonline.fr [212.83.179.41]) by kochab.worldonline.fr (Mail pour Wolf) with SMTP id RAA32452 for ; Mon, 10 Apr 2000 17:40:21 +0200 From: Raphael LANGELLA To: fam@oss.sgi.com Subject: Re: [fam] fam-2.6.2 and gcc-2.95.2 Date: Mon, 10 Apr 2000 17:27:15 +0200 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain References: <20000410130021.A29945@mikro.physik.tu-berlin.de> In-Reply-To: <20000410130021.A29945@mikro.physik.tu-berlin.de> MIME-Version: 1.0 Message-Id: <00041017312300.05927@kea.worldonline.fr> Content-Transfer-Encoding: 8bit Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing Le lun, 10 avr 2000, vous avez écrit : > Hi, > > the following two patches to Scheduler.h and Scheduler.c++ should prevent the > > Scheduler.h:97: ANSI C++ forbids data member `handler' with same name as enclosing class > > error when using gcc-2.95.2. I have changed handler to xxx_handler (I am sure > that there will be a more sensible prefix than xxx_) and now everything works > fine for me. > > I have also made a couple of changes to other files so that fam-oss-2.6.2 will > compile on IRIX5.3 with gcc-2.95.2 (most of them are missing include files and > missing functions in IRIX5.3), shall I also send them to this list? > > Sumit > Thank you, this patch seems to correct the problem, alas some others appears: I don't have bstring.h (you added it in the patch) on my system, where does it come from? and I'm now getting strange compilation errors, but it's probably due to the missing header. In case it's not: Listener.c++: In function `static void Listener::accept_client(int, void *)': Listener.c++:157: passing `int *' as argument 3 of `accept(int, sockaddr *, socklen_t *)' changes signedness Listener.c++: In function `static void Listener::create_local_client(TCP_Client &, unsigned int)': Listener.c++:238: warning: negative value `-1' passed as argument 3 of `chown(const char *, unsigned int, unsigned int)' Listener.c++: In function `static void Listener::accept_localclient(int, void *)': Listener.c++:276: passing `int *' as argument 3 of `accept(int, sockaddr *, socklen_t *)' changes signedness Raphaël0 -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Mon Apr 10 19:22:30 2000 Received: by oss.sgi.com id ; Mon, 10 Apr 2000 19:22:20 -0700 Received: from deliverator.sgi.com ([204.94.214.10]:25452 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Mon, 10 Apr 2000 19:22:08 -0700 Received: from nodin.corp.sgi.com (fddi-nodin.corp.sgi.com [198.29.75.193]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP id TAA27199 for ; Mon, 10 Apr 2000 19:17:25 -0700 (PDT) mail_from (rusty@sgi.com) Received: from rlyeh.engr.sgi.com (rlyeh.engr.sgi.com [163.154.5.94]) by nodin.corp.sgi.com (980427.SGI.8.8.8/980728.SGI.AUTOCF) via ESMTP id TAA44546 for ; Mon, 10 Apr 2000 19:21:37 -0700 (PDT) Received: (from rusty@localhost) by rlyeh.engr.sgi.com (980427.SGI.8.8.8/960327.SGI.AUTOCF) id TAA41754 for fam@oss.sgi.com; Mon, 10 Apr 2000 19:18:49 -0700 (PDT) From: "Rusty Ballinger" Message-Id: <10004101918.ZM40452@rlyeh.engr.sgi.com> Date: Mon, 10 Apr 2000 19:18:48 -0700 In-Reply-To: Raphael LANGELLA "Re: [fam] fam-2.6.2 and gcc-2.95.2" (Apr 10, 5:27pm) References: <20000410130021.A29945@mikro.physik.tu-berlin.de> <00041017312300.05927@kea.worldonline.fr> X-Face: #)4}U4e`O6YEe%oBzE}>ycmT!Xt?Myiqo~|p3Wh'UuQ[N7)&4\4?8:1n)bmPX]b@#k94%!VojpODdmk:sCr1b\-aXD&P:wjBqupMB:ag6}BwVseJZM@K{$E|0J9}&,Rpdg{&N4/Y8&PTm6>|r[,gI2T*qN!`AZhl>Bdy7JR`dDvP(/pz.}?Q@dg':mlV`RX51Z_ZG?Gta|Q!iA[MaOh Reply-To: rusty@sgi.com X-Mailer: Z-Mail (3.2.3 08feb96 MediaMail) To: fam@oss.sgi.com Subject: Re: [fam] fam-2.6.2 and gcc-2.95.2 Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="PART-BOUNDARY=.110004101918.ZM40452.engr.sgi.com" Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing --PART-BOUNDARY=.110004101918.ZM40452.engr.sgi.com Content-Description: Text Content-Type: text/plain ; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Zm-Decoding-Hint: mimencode -q -u > and I'm now getting strange compilation errors, but it's probably due t= o the > missing header. In case it's not: Here's a patch from Porter Schermerhorn for building fam with gcc 2.95.2 on Linux. (It's not for IRIX; I'll add a test to the configure script to= check the arguments for accept(). Did the arguments to accept() change at some point on Linux? On RH6.1, its third argument is an int * in the man page but a socklen_t * in sys/socket.h, which is an unsigned int, not= a size_t, in bits/socket.h.) (Rapha=EBl, note that Porter's patch doesn't #include bstring.h.) Sumit, if you want to send your changes for IRIX 5.3 to the list, that would be great; or, if they're big, you can send them just to me. Either= way, I'll include them in fam-oss-2.6.3, which I should put out sometime this week. --Rusty diff -rbc ./fam/IMonLinux.c++ ../fam-oss-2.6.2-new/fam/IMonLinux.c++ *** ./fam/IMonLinux.c++ Fri Mar 24 01:34:21 2000 --- ../fam-oss-2.6.2-new/fam/IMonLinux.c++ Fri Apr 7 13:52:41 2000 *************** *** 28,33 **** --- 28,36 ---- #include #include + #include + #include + #include #include #include diff -rbc ./fam/Listener.c++ ../fam-oss-2.6.2-new/fam/Listener.c++ *** ./fam/Listener.c++ Thu Mar 2 00:51:19 2000 --- ../fam-oss-2.6.2-new/fam/Listener.c++ Fri Apr 7 12:46:42 2000 *************** *** 153,159 **** // Get the new socket. struct sockaddr_in addr; ! int addrlen =3D sizeof addr; int client_fd =3D accept(rendezvous_fd, (struct sockaddr *) &addr, &addrlen); if (client_fd < 0) { --- 153,159 ---- // Get the new socket. struct sockaddr_in addr; ! socklen_t addrlen =3D sizeof addr; int client_fd =3D accept(rendezvous_fd, (struct sockaddr *) &addr, &addrlen); if (client_fd < 0) { *************** *** 272,278 **** // Get the new socket. struct sockaddr_un sun =3D { AF_UNIX, "" }; ! int sunlen =3D sizeof(sun); int client_fd =3D accept(ofd, (struct sockaddr *) &sun, &sunlen); if (client_fd < 0) { --- 272,278 ---- // Get the new socket. struct sockaddr_un sun =3D { AF_UNIX, "" }; ! socklen_t sunlen =3D sizeof(sun); int client_fd =3D accept(ofd, (struct sockaddr *) &sun, &sunlen); if (client_fd < 0) { *************** *** 400,406 **** // Accept a new ugly connection. struct sockaddr_un sun; ! int sunlen =3D sizeof sun; int sock =3D accept(ugly, (struct sockaddr *)(&sun), &sunlen); if (sock < 0) { Log::perror("accept"); --- 400,406 ---- // Accept a new ugly connection. struct sockaddr_un sun; ! socklen_t sunlen =3D sizeof sun; int sock =3D accept(ugly, (struct sockaddr *)(&sun), &sunlen); if (sock < 0) { Log::perror("accept"); diff -rbc ./fam/NFSFileSystem.c++ ../fam-oss-2.6.2-new/fam/NFSFileSystem.= c++ *** ./fam/NFSFileSystem.c++ Thu Mar 2 00:51:19 2000 --- ../fam-oss-2.6.2-new/fam/NFSFileSystem.c++ Fri Apr 7 12:48:32 2000 *************** *** 26,31 **** --- 26,32 ---- #include #include #include + #include #include #include "Log.h" diff -rbc ./fam/Scheduler.c++ ../fam-oss-2.6.2-new/fam/Scheduler.c++ *** ./fam/Scheduler.c++ Thu Mar 2 00:51:20 2000 --- ../fam-oss-2.6.2-new/fam/Scheduler.c++ Fri Apr 7 13:51:42 2000 *************** *** 232,238 **** Scheduler::trim_fdinfo() { for (FDInfo *fp =3D &fdinfo[nfds - 1]; nfds > 0; --nfds, --fp) ! if (fp->read.handler || fp->write.handler) break; if (!nfds) --- 232,238 ---- Scheduler::trim_fdinfo() { for (FDInfo *fp =3D &fdinfo[nfds - 1]; nfds > 0; --nfds, --fp) ! if (fp->read.iohandler || fp->write.iohandler) break; if (!nfds) *************** *** 249,256 **** assert(fd >=3D 0); assert(handler); FDInfo *fp =3D fd_to_info(fd); ! IOHandler old_handler =3D (fp->*(iotype->iotype)).handler; ! (fp->*(iotype->iotype)).handler =3D handler; (fp->*(iotype->iotype)).closure =3D closure; assert(!old_handler || FD_ISSET(fd, &iotype->fds)); if (!FD_ISSET(fd, &iotype->fds)) --- 249,256 ---- assert(fd >=3D 0); assert(handler); FDInfo *fp =3D fd_to_info(fd); ! IOHandler old_handler =3D (fp->*(iotype->iotype)).iohandler; ! (fp->*(iotype->iotype)).iohandler =3D handler; (fp->*(iotype->iotype)).closure =3D closure; assert(!old_handler || FD_ISSET(fd, &iotype->fds)); if (!FD_ISSET(fd, &iotype->fds)) *************** *** 266,273 **** { assert(fd >=3D 0 && fd < nfds); FDInfo *fp =3D fd_to_info(fd); ! IOHandler old_handler =3D (fp->*(iotype->iotype)).handler; ! (fp->*(iotype->iotype)).handler =3D NULL; (fp->*(iotype->iotype)).closure =3D NULL; trim_fdinfo(); assert(old_handler); --- 266,273 ---- { assert(fd >=3D 0 && fd < nfds); FDInfo *fp =3D fd_to_info(fd); ! IOHandler old_handler =3D (fp->*(iotype->iotype)).iohandler; ! (fp->*(iotype->iotype)).iohandler =3D NULL; (fp->*(iotype->iotype)).closure =3D NULL; trim_fdinfo(); assert(old_handler); *************** *** 311,317 **** if (FD_ISSET(fd, fds)) { FDInfo *fp =3D &fdinfo[fd]; assert(iotype =3D=3D &FDInfo::read || iotype =3D=3D &FDInfo::write); ! (fp->*iotype).handler(fd, (fp->*iotype).closure); // Remember, handler may move fdinfo array. } } --- 311,317 ---- if (FD_ISSET(fd, fds)) { FDInfo *fp =3D &fdinfo[fd]; assert(iotype =3D=3D &FDInfo::read || iotype =3D=3D &FDInfo::write); ! (fp->*iotype).iohandler(fd, (fp->*iotype).closure); // Remember, handler may move fdinfo array. } } diff -rbc ./fam/Scheduler.h ../fam-oss-2.6.2-new/fam/Scheduler.h *** ./fam/Scheduler.h Thu Mar 2 00:51:24 2000 --- ../fam-oss-2.6.2-new/fam/Scheduler.h Fri Apr 7 13:48:59 2000 *************** *** 91,100 **** // Per-filedescriptor info is the set of three handlers and their // closures. - struct FDInfo { struct handler { ! IOHandler handler; void *closure; } read, write; }; --- 91,99 ---- // Per-filedescriptor info is the set of three handlers and their // closures. struct FDInfo { struct handler { ! IOHandler iohandler; void *closure; } read, write; }; --PART-BOUNDARY=.110004101918.ZM40452.engr.sgi.com-- -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Tue Apr 11 10:56:36 2000 Received: by oss.sgi.com id ; Tue, 11 Apr 2000 10:56:25 -0700 Received: from crcst155.netaddress.usa.net ([204.68.24.155]:23734 "HELO crcst347.netaddress.usa.net") by oss.sgi.com with SMTP id ; Tue, 11 Apr 2000 10:56:24 -0700 Received: (qmail 12945 invoked from network); 11 Apr 2000 16:28:09 -0000 Received: from www0h.netaddress.usa.net (204.68.24.37) by outbound.netaddress.usa.net with SMTP; 11 Apr 2000 16:28:09 -0000 Received: (qmail 1494 invoked by uid 60001); 11 Apr 2000 05:44:12 -0000 Message-ID: <20000411054412.1493.qmail@www0h.netaddress.usa.net> Received: from 204.68.24.37 by www0h for [24.12.20.2] via web-mailer(M3.4.0.33) on Tue Apr 11 05:44:12 GMT 2000 Date: 10 Apr 00 23:44:12 MDT From: David Kelly To: fam@oss.sgi.com Subject: [fam] Fam-oss-2.6.2 patch X-Mailer: USANET web-mailer (M3.4.0.33) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----NetAddressPart-00--=_kFSm7536S0h7a7e5569" Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing This is a multi-part message in MIME format. ------NetAddressPart-00--=_kFSm7536S0h7a7e5569 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hello, Browsing through the FAM mailing list archive, I noticed that several other people are having the same problem I am - FAM does not properly compile. I get the same errors others have reported on this list, even after installing the posted patch, I could not get FAM to install. I am running Debian/unstable, using GCC 2.95.2. Tonight I modified the code to get it to run properly on my machine. Atta= ched to this E-mail is a patch to the code which allows it to compile for me. = It should work on other systems as well, but I have not tested it on any system other than my own. To install the patch, download/unpack the source code and run configure. Change directories to fam-oss-2.6.2/fam and type: patch -p 2 < fam.patch Below is a list of changes in this patch: 1) Included sys/types.h and sys/wait.h in IMonLinux.c++. It was not able to find waitpid() without these include files. 2) NFSFileSystem.c++ did not compile because it did not include = , and was choking on sscanf() 3) Listener.c++ did not use a socklen_t as the third argument to accept(), which Linux appears to require. I got around this by typecasting it.. 4) Changed setreuid(-1, value) commands to be seteuid(value) to avoid compiler warnings. It should work with setreuid as well, the two functions are identical when using a -1 as it's first value 5) Modified Scheduler.h FD_Info iohandler name to "FDInfo_handler" so it = has a unique name and avoid the known ANSI compiler errors 6) Modified the CXXFLAGS variable in the Makefile - as I learned on this mailing list, when setting your CXXFLAGS to -O2 it breaks. Regards, David ____________________________________________________________________ Get free email and a permanent address at http://www.netaddress.com/?N=3D= 1 ------NetAddressPart-00--=_kFSm7536S0h7a7e5569 Content-Type: application/octet-stream; name="fam.patch" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="fam.patch" LS0tIElNb25MaW51eC5jKysJRnJpIE1hciAyNCAwMTozNDoyMSAyMDAwCisrKyBJTW9uTGlu dXguYysrLndvcmtpbmcJVHVlIEFwciAxMSAwNDoyMjoyOCAyMDAwCkBAIC0yOCw2ICsyOCw5 IEBACiAjaW5jbHVkZSA8ZmNudGwuaD4KICNpbmNsdWRlIDxzdGRsaWIuaD4KIAorI2luY2x1 ZGUgPHN5cy90eXBlcy5oPgorI2luY2x1ZGUgPHN5cy93YWl0Lmg+CisKICNpbmNsdWRlIDxz eXMvaW9jdGwuaD4KICNpbmNsdWRlIDxzeXMvc3lzbWFjcm9zLmg+CiAjaW5jbHVkZSA8bGlu dXgvaW1vbi5oPgotLS0gTkZTRmlsZVN5c3RlbS5jKysJVGh1IE1hciAgMiAwMDo1MToxOSAy MDAwCisrKyBORlNGaWxlU3lzdGVtLmMrKy53b3JraW5nCVR1ZSBBcHIgMTEgMDQ6MjI6Mjgg MjAwMApAQCAtMjMsNiArMjMsNyBAQAogI2luY2x1ZGUgImNvbmZpZy5oIgogI2luY2x1ZGUg Ik5GU0ZpbGVTeXN0ZW0uaCIKIAorI2luY2x1ZGUgPHN0ZGlvLmg+CiAjaW5jbHVkZSA8YXNz ZXJ0Lmg+CiAjaW5jbHVkZSA8bW50ZW50Lmg+CiAjaW5jbHVkZSA8c3RkbGliLmg+Ci0tLSBM aXN0ZW5lci5jKysJVGh1IE1hciAgMiAwMDo1MToxOSAyMDAwCisrKyBMaXN0ZW5lci5jKysu d29ya2luZwlUdWUgQXByIDExIDA0OjMyOjU0IDIwMDAKQEAgLTE1NCw3ICsxNTQsNyBAQAog CiAgICAgc3RydWN0IHNvY2thZGRyX2luIGFkZHI7CiAgICAgaW50IGFkZHJsZW4gPSBzaXpl b2YgYWRkcjsKLSAgICBpbnQgY2xpZW50X2ZkID0gYWNjZXB0KHJlbmRlenZvdXNfZmQsIChz dHJ1Y3Qgc29ja2FkZHIgKikgJmFkZHIsICZhZGRybGVuKTsKKyAgICBpbnQgY2xpZW50X2Zk ID0gYWNjZXB0KHJlbmRlenZvdXNfZmQsIChzdHJ1Y3Qgc29ja2FkZHIgKikgJmFkZHIsIChz b2NrbGVuX3QgKikgJmFkZHJsZW4pOwogICAgIGlmIChjbGllbnRfZmQgPCAwKQogICAgIHsK IAlMb2c6OnBlcnJvcigiZmFpbGVkIHRvIGFjY2VwdCBuZXcgY2xpZW50Iik7CkBAIC0yNzMs NyArMjczLDcgQEAKIAogICAgIHN0cnVjdCBzb2NrYWRkcl91biBzdW4gPSB7IEFGX1VOSVgs ICIiIH07CiAgICAgaW50IHN1bmxlbiA9IHNpemVvZihzdW4pOwotICAgIGludCBjbGllbnRf ZmQgPSBhY2NlcHQob2ZkLCAoc3RydWN0IHNvY2thZGRyICopICZzdW4sICZzdW5sZW4pOwor ICAgIGludCBjbGllbnRfZmQgPSBhY2NlcHQob2ZkLCAoc3RydWN0IHNvY2thZGRyICopICZz dW4sIChzb2NrbGVuX3QgKikgJnN1bmxlbik7CiAgICAgaWYgKGNsaWVudF9mZCA8IDApCiAg ICAgewogCUxvZzo6cGVycm9yKCJmYWlsZWQgdG8gYWNjZXB0IG5ldyBjbGllbnQiKTsKQEAg LTQwMSw3ICs0MDEsNyBAQAogCiAgICAgc3RydWN0IHNvY2thZGRyX3VuIHN1bjsKICAgICBp bnQgc3VubGVuID0gc2l6ZW9mIHN1bjsKLSAgICBpbnQgc29jayA9IGFjY2VwdCh1Z2x5LCAo c3RydWN0IHNvY2thZGRyICopKCZzdW4pLCAmc3VubGVuKTsKKyAgICBpbnQgc29jayA9IGFj Y2VwdCh1Z2x5LCAoc3RydWN0IHNvY2thZGRyICopKCZzdW4pLCAoc29ja2xlbl90ICopICZz dW5sZW4pOwogICAgIGlmIChzb2NrIDwgMCkKICAgICB7ICAgTG9nOjpwZXJyb3IoImFjY2Vw dCIpOwogCXJldHVybjsKQEAgLTQ2NiwxMSArNDY2LDExIEBACiAKICAgICAvLyAgUmVtb3Zl IHRoZSB0ZW1wIGZpbGUKICAgICB1aWRfdCBwcmV2ZXVpZCA9IGdldGV1aWQoKTsKLSAgICBp ZiAocHJldmV1aWQpIHNldHJldWlkKC0xLCAwKTsKLSAgICBzZXRyZXVpZCgtMSwgbmMtPnVp ZCk7CisgICAgaWYgKHByZXZldWlkKSBzZXRldWlkKDApOworICAgIHNldGV1aWQobmMtPnVp ZCk7CiAgICAgdW5saW5rKG5jLT5zdW4uc3VuX3BhdGgpOwotICAgIGlmIChuYy0+dWlkKSBz ZXRyZXVpZCgtMSwgMCk7Ci0gICAgc2V0cmV1aWQoLTEsIHByZXZldWlkKTsKKyAgICBpZiAo bmMtPnVpZCkgc2V0ZXVpZCgwKTsKKyAgICBzZXRldWlkKHByZXZldWlkKTsKIAogICAgIGRl bGV0ZSBuYzsKIH0KLS0tIFNjaGVkdWxlci5oCVRodSBNYXIgIDIgMDA6NTE6MjQgMjAwMAor KysgU2NoZWR1bGVyLmgud29ya2luZwlUdWUgQXByIDExIDA0OjM5OjAxIDIwMDAKQEAgLTk0 LDcgKzk0LDcgQEAKIAogICAgIHN0cnVjdCBGREluZm8gewogCXN0cnVjdCBoYW5kbGVyIHsK LQkgICAgSU9IYW5kbGVyIGhhbmRsZXI7CisJICAgIElPSGFuZGxlciBGREluZm9faGFuZGxl cjsKIAkgICAgdm9pZCAqY2xvc3VyZTsKIAl9IHJlYWQsIHdyaXRlOwogICAgIH07Ci0tLSBT Y2hlZHVsZXIuYysrCVRodSBNYXIgIDIgMDA6NTE6MjAgMjAwMAorKysgU2NoZWR1bGVyLmMr Ky53b3JraW5nCVR1ZSBBcHIgMTEgMDQ6NTA6MzEgMjAwMApAQCAtMjMyLDcgKzIzMiw4IEBA CiBTY2hlZHVsZXI6OnRyaW1fZmRpbmZvKCkKIHsKICAgICBmb3IgKEZESW5mbyAqZnAgPSAm ZmRpbmZvW25mZHMgLSAxXTsgbmZkcyA+IDA7IC0tbmZkcywgLS1mcCkKLQlpZiAoZnAtPnJl YWQuaGFuZGxlciB8fCBmcC0+d3JpdGUuaGFuZGxlcikKKwkvLyBpZiAoZnAtPnJlYWQuaGFu ZGxlciB8fCBmcC0+d3JpdGUuaGFuZGxlcikKKwlpZiAoZnAtPnJlYWQuRkRJbmZvX2hhbmRs ZXIgfHwgZnAtPndyaXRlLkZESW5mb19oYW5kbGVyKQogCSAgICBicmVhazsKIAogICAgIGlm ICghbmZkcykKQEAgLTI0MywxNCArMjQ0LDE0IEBACiB9CiAKIFNjaGVkdWxlcjo6SU9IYW5k bGVyCi1TY2hlZHVsZXI6Omluc3RhbGxfaW9faGFuZGxlcihpbnQgZmQsIElPSGFuZGxlciBo YW5kbGVyLCB2b2lkICpjbG9zdXJlLAorU2NoZWR1bGVyOjppbnN0YWxsX2lvX2hhbmRsZXIo aW50IGZkLCBJT0hhbmRsZXIgRkRJbmZvX2hhbmRsZXIsIHZvaWQgKmNsb3N1cmUsCiAJCQkg ICAgICBJT1R5cGVJbmZvICppb3R5cGUpCiB7CiAgICAgYXNzZXJ0KGZkID49IDApOwotICAg IGFzc2VydChoYW5kbGVyKTsKKyAgICBhc3NlcnQoRkRJbmZvX2hhbmRsZXIpOwogICAgIEZE SW5mbyAqZnAgPSBmZF90b19pbmZvKGZkKTsKLSAgICBJT0hhbmRsZXIgb2xkX2hhbmRsZXIg PSAoZnAtPiooaW90eXBlLT5pb3R5cGUpKS5oYW5kbGVyOwotICAgIChmcC0+Kihpb3R5cGUt PmlvdHlwZSkpLmhhbmRsZXIgPSBoYW5kbGVyOworICAgIElPSGFuZGxlciBvbGRfaGFuZGxl ciA9IChmcC0+Kihpb3R5cGUtPmlvdHlwZSkpLkZESW5mb19oYW5kbGVyOworICAgIChmcC0+ Kihpb3R5cGUtPmlvdHlwZSkpLkZESW5mb19oYW5kbGVyID0gRkRJbmZvX2hhbmRsZXI7CiAg ICAgKGZwLT4qKGlvdHlwZS0+aW90eXBlKSkuY2xvc3VyZSA9IGNsb3N1cmU7CiAgICAgYXNz ZXJ0KCFvbGRfaGFuZGxlciB8fCBGRF9JU1NFVChmZCwgJmlvdHlwZS0+ZmRzKSk7CiAgICAg aWYgKCFGRF9JU1NFVChmZCwgJmlvdHlwZS0+ZmRzKSkKQEAgLTI2Niw4ICsyNjcsOCBAQAog ewogICAgIGFzc2VydChmZCA+PSAwICYmIGZkIDwgbmZkcyk7CiAgICAgRkRJbmZvICpmcCA9 IGZkX3RvX2luZm8oZmQpOwotICAgIElPSGFuZGxlciBvbGRfaGFuZGxlciA9IChmcC0+Kihp b3R5cGUtPmlvdHlwZSkpLmhhbmRsZXI7Ci0gICAgKGZwLT4qKGlvdHlwZS0+aW90eXBlKSku aGFuZGxlciA9IE5VTEw7CisgICAgSU9IYW5kbGVyIG9sZF9oYW5kbGVyID0gKGZwLT4qKGlv dHlwZS0+aW90eXBlKSkuRkRJbmZvX2hhbmRsZXI7CisgICAgKGZwLT4qKGlvdHlwZS0+aW90 eXBlKSkuRkRJbmZvX2hhbmRsZXIgPSBOVUxMOwogICAgIChmcC0+Kihpb3R5cGUtPmlvdHlw ZSkpLmNsb3N1cmUgPSBOVUxMOwogICAgIHRyaW1fZmRpbmZvKCk7CiAgICAgYXNzZXJ0KG9s ZF9oYW5kbGVyKTsKQEAgLTMxMSw3ICszMTIsNyBAQAogCSAgICBpZiAoRkRfSVNTRVQoZmQs IGZkcykpCiAJICAgIHsgICBGREluZm8gKmZwID0gJmZkaW5mb1tmZF07CiAJCWFzc2VydChp b3R5cGUgPT0gJkZESW5mbzo6cmVhZCB8fCBpb3R5cGUgPT0gJkZESW5mbzo6d3JpdGUpOwot CQkoZnAtPippb3R5cGUpLmhhbmRsZXIoZmQsIChmcC0+KmlvdHlwZSkuY2xvc3VyZSk7CisJ CShmcC0+KmlvdHlwZSkuRkRJbmZvX2hhbmRsZXIoZmQsIChmcC0+KmlvdHlwZSkuY2xvc3Vy ZSk7CiAJCS8vIFJlbWVtYmVyLCBoYW5kbGVyIG1heSBtb3ZlIGZkaW5mbyBhcnJheS4KIAkg ICAgfQogfQotLS0gTWFrZWZpbGUJVHVlIEFwciAxMSAwNDo1MTozNiAyMDAwCisrKyBNYWtl ZmlsZS53b3JraW5nCVR1ZSBBcHIgMTEgMDQ6NTU6MjUgMjAwMApAQCAtMTE5LDcgKzExOSw3 IEBACiBUQ1BfQ2xpZW50Lm8gbWFpbi5vIHRpbWV2YWwubyBJTW9uTGludXgubwogZmFtX0RF UEVOREVOQ0lFUyA9ICAkKHRvcF9zcmNkaXIpL3N1cHBvcnQvbGlic3VwcG9ydC5hCiBmYW1f TERGTEFHUyA9IAotQ1hYRkxBR1MgPSAtZyAtTzIKK0NYWEZMQUdTID0gCiBDWFhDT01QSUxF ID0gJChDWFgpICQoREVGUykgJChJTkNMVURFUykgJChBTV9DUFBGTEFHUykgJChDUFBGTEFH UykgJChBTV9DWFhGTEFHUykgJChDWFhGTEFHUykKIExUQ1hYQ09NUElMRSA9ICQoTElCVE9P TCkgLS1tb2RlPWNvbXBpbGUgJChDWFgpICQoREVGUykgJChJTkNMVURFUykgJChBTV9DUFBG TEFHUykgJChDUFBGTEFHUykgJChBTV9DWFhGTEFHUykgJChDWFhGTEFHUykKIENYWExEID0g JChDWFgpCg== ------NetAddressPart-00--=_kFSm7536S0h7a7e5569-- -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Tue Apr 11 13:08:55 2000 Received: by oss.sgi.com id ; Tue, 11 Apr 2000 13:08:45 -0700 Received: from sadir.worldonline.fr ([212.83.128.14]:53774 "EHLO sadir.worldonline.fr") by oss.sgi.com with ESMTP id ; Tue, 11 Apr 2000 13:08:34 -0700 Received: from kea.worldonline.fr (ppp-17.dialup-168.worldonline.fr [212.83.168.17]) by sadir.worldonline.fr (Mail pour Wolf) with SMTP id WAA04963 for ; Tue, 11 Apr 2000 22:08:31 +0200 From: Raphael LANGELLA To: fam@oss.sgi.com Subject: [fam] device numbers Date: Tue, 11 Apr 2000 22:09:37 +0200 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <00041122101502.09746@kea.worldonline.fr> Content-Transfer-Encoding: 8bit Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing what are the major and minor number for /dev/imon? -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Tue Apr 11 13:32:25 2000 Received: by oss.sgi.com id ; Tue, 11 Apr 2000 13:32:15 -0700 Received: from deliverator.sgi.com ([204.94.214.10]:60719 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Tue, 11 Apr 2000 13:32:02 -0700 Received: from rlyeh.engr.sgi.com (rlyeh.engr.sgi.com [163.154.5.94]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP id NAA28421 for ; Tue, 11 Apr 2000 13:27:19 -0700 (PDT) mail_from (rusty@rlyeh.engr.sgi.com) Received: (from rusty@localhost) by rlyeh.engr.sgi.com (980427.SGI.8.8.8/960327.SGI.AUTOCF) id NAA39347 for fam@oss.sgi.com; Tue, 11 Apr 2000 13:30:28 -0700 (PDT) From: "Rusty Ballinger" Message-Id: <10004111330.ZM43132@rlyeh.engr.sgi.com> Date: Tue, 11 Apr 2000 13:30:24 -0700 In-Reply-To: Raphael LANGELLA "[fam] device numbers" (Apr 11, 10:09pm) References: <00041122101502.09746@kea.worldonline.fr> X-Face: #)4}U4e`O6YEe%oBzE}>ycmT!Xt?Myiqo~|p3Wh'UuQ[N7)&4\4?8:1n)bmPX]b@#k94%!VojpODdmk:sCr1b\-aXD&P:wjBqupMB:ag6}BwVseJZM@K{$E|0J9}&,Rpdg{&N4/Y8&PTm6>|r[,gI2T*qN!`AZhl>Bdy7JR`dDvP(/pz.}?Q@dg':mlV`RX51Z_ZG?Gta|Q!iA[MaOh Reply-To: rusty@sgi.com X-Mailer: Z-Mail (3.2.3 08feb96 MediaMail) To: fam@oss.sgi.com Subject: Re: [fam] device numbers Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing > what are the major and minor number for /dev/imon? On Linux, compiled as a module, it requests a major number when the module is loaded (or you can specify one when you load the module). I think fam/IMonLinux.c++ loads the module without specifying a device number, and then looks in /proc/devices for the major number, and then does the mknod, and then opens the device. --Rusty -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Tue Apr 11 22:10:50 2000 Received: by oss.sgi.com id ; Tue, 11 Apr 2000 22:10:40 -0700 Received: from scherpo.student.earlham.edu ([159.28.163.144]:23302 "EHLO scherpo.student.earlham.edu") by oss.sgi.com with ESMTP id ; Tue, 11 Apr 2000 22:10:22 -0700 Received: (from elmoe@localhost) by scherpo.student.earlham.edu (8.10.0/8.10.0/Debian 8.10.0-1) id e3C0DEv28007 for fam@oss.sgi.com; Wed, 12 Apr 2000 00:13:14 GMT Date: Wed, 12 Apr 2000 00:13:14 +0000 From: Elmoe Gingrin To: fam@oss.sgi.com Subject: [fam] Patch stuff Message-ID: <20000412001314.A27962@scherpo.student.earlham.edu> Reply-To: Porter Schermerhorn Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="pWyiEgJYm5f9v55/" Content-Disposition: inline User-Agent: Mutt/1.1.9i Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing --pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I updated my earlier patch to fix a few more warnings, and incorporate some things that I had missed which David pointed out. I choose to do some naming a little different from David, keeping the IOHandler member of struct handler to the name iohandler, and using fdinfo_handler as the variable name used in the code when appropriate. I thought the naming made more sense this way, but do whatever you want with it. This cleans up most of the warnings when compiled with -Wall, the warnings left are either in the BTree class code (shady business) or some nessecary things, such as the arguments to chown() etc. Anyway, I ramble, here is the new patch. -- Porter --pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="porters_fam-2.6.2.diff" diff -rcb ./fam/Cred.c++ ../porters_fam-oss-2.6.2/fam/Cred.c++ *** ./fam/Cred.c++ Thu Mar 2 00:51:17 2000 --- ../porters_fam-oss-2.6.2/fam/Cred.c++ Tue Apr 11 13:26:39 2000 *************** *** 193,199 **** if (nimpl >= nimpl_alloc) { nimpl_alloc = nimpl_alloc * 3 / 2 + 3; Implementation **nl = new Implementation *[nimpl_alloc]; ! for (int i = 0; i < nimpl; i++) nl[i] = impllist[i]; delete [] impllist; impllist = nl; --- 193,199 ---- if (nimpl >= nimpl_alloc) { nimpl_alloc = nimpl_alloc * 3 / 2 + 3; Implementation **nl = new Implementation *[nimpl_alloc]; ! for (unsigned int i = 0; i < nimpl; i++) nl[i] = impllist[i]; delete [] impllist; impllist = nl; *************** *** 318,324 **** #endif groups = new gid_t[ng]; ! for (int i = 0; i < ng; i++) groups[i] = gs[i]; } --- 318,324 ---- #endif groups = new gid_t[ng]; ! for (unsigned int i = 0; i < ng; i++) groups[i] = gs[i]; } *************** *** 342,348 **** #ifdef HAVE_MAC if ((use_mac) && (mac_equal(this->mac, mac) == 0)) return -1; #endif ! for (int i = 0; i < ng; i++) if (gs[i] != groups[i]) return gs[i] - groups[i]; return 0; --- 342,348 ---- #ifdef HAVE_MAC if ((use_mac) && (mac_equal(this->mac, mac) == 0)) return -1; #endif ! for (unsigned int i = 0; i < ng; i++) if (gs[i] != groups[i]) return gs[i] - groups[i]; return 0; *************** *** 351,357 **** bool Cred::Implementation::groups_change() const { ! for (int i = 0; i < ngroups; i++) if (groups[i] != last->groups[i]) return true; return false; --- 351,357 ---- bool Cred::Implementation::groups_change() const { ! for (unsigned int i = 0; i < ngroups; i++) if (groups[i] != last->groups[i]) return true; return false; *************** *** 377,383 **** ret = new char[11*(ngroups-1)]; char * p = ret; p += snprintf(p, 10, "%d", ngroups-1); ! for (int i = 1; i < ngroups; i++) { p += snprintf(p, 11, " %d", groups[i]); } --- 377,383 ---- ret = new char[11*(ngroups-1)]; char * p = ret; p += snprintf(p, 10, "%d", ngroups-1); ! for (unsigned int i = 1; i < ngroups; i++) { p += snprintf(p, 11, " %d", groups[i]); } *************** *** 398,404 **** { /* Temporarily become root */ ! if (setreuid((uid_t)-1, 0) != 0) { Log::perror("failed to set 0 uid"); exit(1); } --- 398,404 ---- { /* Temporarily become root */ ! if (seteuid(0) != 0) { Log::perror("failed to set 0 uid"); exit(1); } *************** *** 413,423 **** if (current_uid != myuid) { if (current_uid) { ! (void) setreuid((uid_t)-1, 0); Log::debug("Setting euid to 0"); } if (myuid) { ! if (setreuid((uid_t)-1, myuid)) { Log::perror("failed to set uid %d", myuid); exit(1); } else { --- 413,423 ---- if (current_uid != myuid) { if (current_uid) { ! (void) seteuid(0); Log::debug("Setting euid to 0"); } if (myuid) { ! if (seteuid(myuid)) { Log::perror("failed to set uid %d", myuid); exit(1); } else { diff -rcb ./fam/Event.h ../porters_fam-oss-2.6.2/fam/Event.h *** ./fam/Event.h Thu Mar 2 00:51:22 2000 --- ../porters_fam-oss-2.6.2/fam/Event.h Sat Apr 8 18:40:50 2000 *************** *** 67,73 **** }; Event(Type n) : which(n){}; ! const char which; // We don't want anyone using any Events that aren't the static // constant ones, so make it so Events can't be created or copied --- 67,73 ---- }; Event(Type n) : which(n){}; ! const unsigned char which; // We don't want anyone using any Events that aren't the static // constant ones, so make it so Events can't be created or copied diff -rcb ./fam/IMonLinux.c++ ../porters_fam-oss-2.6.2/fam/IMonLinux.c++ *** ./fam/IMonLinux.c++ Fri Mar 24 01:34:21 2000 --- ../porters_fam-oss-2.6.2/fam/IMonLinux.c++ Sat Apr 8 18:28:45 2000 *************** *** 28,33 **** --- 28,36 ---- #include #include + #include + #include + #include #include #include diff -rcb ./fam/Listener.c++ ../porters_fam-oss-2.6.2/fam/Listener.c++ *** ./fam/Listener.c++ Thu Mar 2 00:51:19 2000 --- ../porters_fam-oss-2.6.2/fam/Listener.c++ Tue Apr 11 13:27:17 2000 *************** *** 153,159 **** // Get the new socket. struct sockaddr_in addr; ! int addrlen = sizeof addr; int client_fd = accept(rendezvous_fd, (struct sockaddr *) &addr, &addrlen); if (client_fd < 0) { --- 153,159 ---- // Get the new socket. struct sockaddr_in addr; ! socklen_t addrlen = sizeof addr; int client_fd = accept(rendezvous_fd, (struct sockaddr *) &addr, &addrlen); if (client_fd < 0) { *************** *** 272,278 **** // Get the new socket. struct sockaddr_un sun = { AF_UNIX, "" }; ! int sunlen = sizeof(sun); int client_fd = accept(ofd, (struct sockaddr *) &sun, &sunlen); if (client_fd < 0) { --- 272,278 ---- // Get the new socket. struct sockaddr_un sun = { AF_UNIX, "" }; ! socklen_t sunlen = sizeof(sun); int client_fd = accept(ofd, (struct sockaddr *) &sun, &sunlen); if (client_fd < 0) { *************** *** 400,406 **** // Accept a new ugly connection. struct sockaddr_un sun; ! int sunlen = sizeof sun; int sock = accept(ugly, (struct sockaddr *)(&sun), &sunlen); if (sock < 0) { Log::perror("accept"); --- 400,406 ---- // Accept a new ugly connection. struct sockaddr_un sun; ! socklen_t sunlen = sizeof sun; int sock = accept(ugly, (struct sockaddr *)(&sun), &sunlen); if (sock < 0) { Log::perror("accept"); *************** *** 466,476 **** // Remove the temp file uid_t preveuid = geteuid(); ! if (preveuid) setreuid(-1, 0); ! setreuid(-1, nc->uid); unlink(nc->sun.sun_path); ! if (nc->uid) setreuid(-1, 0); ! setreuid(-1, preveuid); delete nc; } --- 466,476 ---- // Remove the temp file uid_t preveuid = geteuid(); ! if (preveuid) seteuid(0); ! seteuid(nc->uid); unlink(nc->sun.sun_path); ! if (nc->uid) seteuid(0); ! seteuid(preveuid); delete nc; } diff -rcb ./fam/NFSFileSystem.c++ ../porters_fam-oss-2.6.2/fam/NFSFileSystem.c++ *** ./fam/NFSFileSystem.c++ Thu Mar 2 00:51:19 2000 --- ../porters_fam-oss-2.6.2/fam/NFSFileSystem.c++ Sat Apr 8 18:28:45 2000 *************** *** 26,31 **** --- 26,32 ---- #include #include #include + #include #include #include "Log.h" diff -rcb ./fam/Scheduler.c++ ../porters_fam-oss-2.6.2/fam/Scheduler.c++ *** ./fam/Scheduler.c++ Thu Mar 2 00:51:20 2000 --- ../porters_fam-oss-2.6.2/fam/Scheduler.c++ Tue Apr 11 20:56:56 2000 *************** *** 232,238 **** Scheduler::trim_fdinfo() { for (FDInfo *fp = &fdinfo[nfds - 1]; nfds > 0; --nfds, --fp) ! if (fp->read.handler || fp->write.handler) break; if (!nfds) --- 232,238 ---- Scheduler::trim_fdinfo() { for (FDInfo *fp = &fdinfo[nfds - 1]; nfds > 0; --nfds, --fp) ! if (fp->read.iohandler || fp->write.iohandler) break; if (!nfds) *************** *** 243,256 **** } Scheduler::IOHandler ! Scheduler::install_io_handler(int fd, IOHandler handler, void *closure, IOTypeInfo *iotype) { assert(fd >= 0); ! assert(handler); FDInfo *fp = fd_to_info(fd); ! IOHandler old_handler = (fp->*(iotype->iotype)).handler; ! (fp->*(iotype->iotype)).handler = handler; (fp->*(iotype->iotype)).closure = closure; assert(!old_handler || FD_ISSET(fd, &iotype->fds)); if (!FD_ISSET(fd, &iotype->fds)) --- 243,256 ---- } Scheduler::IOHandler ! Scheduler::install_io_handler(int fd, IOHandler fdinfo_handler, void *closure, IOTypeInfo *iotype) { assert(fd >= 0); ! assert(fdinfo_handler); FDInfo *fp = fd_to_info(fd); ! IOHandler old_handler = (fp->*(iotype->iotype)).iohandler; ! (fp->*(iotype->iotype)).iohandler = fdinfo_handler; (fp->*(iotype->iotype)).closure = closure; assert(!old_handler || FD_ISSET(fd, &iotype->fds)); if (!FD_ISSET(fd, &iotype->fds)) *************** *** 266,273 **** { assert(fd >= 0 && fd < nfds); FDInfo *fp = fd_to_info(fd); ! IOHandler old_handler = (fp->*(iotype->iotype)).handler; ! (fp->*(iotype->iotype)).handler = NULL; (fp->*(iotype->iotype)).closure = NULL; trim_fdinfo(); assert(old_handler); --- 266,273 ---- { assert(fd >= 0 && fd < nfds); FDInfo *fp = fd_to_info(fd); ! IOHandler old_handler = (fp->*(iotype->iotype)).iohandler; ! (fp->*(iotype->iotype)).iohandler = NULL; (fp->*(iotype->iotype)).closure = NULL; trim_fdinfo(); assert(old_handler); *************** *** 280,288 **** } Scheduler::IOHandler ! Scheduler::install_read_handler(int fd, IOHandler handler, void *closure) { ! return install_io_handler(fd, handler, closure, &read); } Scheduler::IOHandler --- 280,288 ---- } Scheduler::IOHandler ! Scheduler::install_read_handler(int fd, IOHandler fdinfo_handler, void *closure) { ! return install_io_handler(fd, fdinfo_handler, closure, &read); } Scheduler::IOHandler *************** *** 292,300 **** } Scheduler::IOHandler ! Scheduler::install_write_handler(int fd, IOHandler handler, void *closure) { ! return install_io_handler(fd, handler, closure, &write); } Scheduler::IOHandler --- 292,300 ---- } Scheduler::IOHandler ! Scheduler::install_write_handler(int fd, IOHandler fdinfo_handler, void *closure) { ! return install_io_handler(fd, fdinfo_handler, closure, &write); } Scheduler::IOHandler *************** *** 307,317 **** Scheduler::handle_io(const fd_set *fds, FDInfo::handler FDInfo::* iotype) { if (fds) ! for (int fd = 0; fd < nfds; fd++) if (FD_ISSET(fd, fds)) { FDInfo *fp = &fdinfo[fd]; assert(iotype == &FDInfo::read || iotype == &FDInfo::write); ! (fp->*iotype).handler(fd, (fp->*iotype).closure); // Remember, handler may move fdinfo array. } } --- 307,317 ---- Scheduler::handle_io(const fd_set *fds, FDInfo::handler FDInfo::* iotype) { if (fds) ! for (unsigned int fd = 0; fd < nfds; fd++) if (FD_ISSET(fd, fds)) { FDInfo *fp = &fdinfo[fd]; assert(iotype == &FDInfo::read || iotype == &FDInfo::write); ! (fp->*iotype).iohandler(fd, (fp->*iotype).closure); // Remember, handler may move fdinfo array. } } diff -rcb ./fam/Scheduler.h ../porters_fam-oss-2.6.2/fam/Scheduler.h *** ./fam/Scheduler.h Thu Mar 2 00:51:24 2000 --- ../porters_fam-oss-2.6.2/fam/Scheduler.h Tue Apr 11 21:01:09 2000 *************** *** 91,100 **** // Per-filedescriptor info is the set of three handlers and their // closures. - struct FDInfo { struct handler { ! IOHandler handler; void *closure; } read, write; }; --- 91,99 ---- // Per-filedescriptor info is the set of three handlers and their // closures. struct FDInfo { struct handler { ! IOHandler iohandler; void *closure; } read, write; }; *************** *** 140,146 **** static FDInfo *fd_to_info(int fd); static void trim_fdinfo(); static IOHandler install_io_handler(int fd, ! IOHandler handler, void *closure, IOTypeInfo *iotype); static IOHandler remove_io_handler(int fd, IOTypeInfo *iotype); static void handle_io(const fd_set *fds, FDInfo::handler FDInfo::* iotype); --- 139,145 ---- static FDInfo *fd_to_info(int fd); static void trim_fdinfo(); static IOHandler install_io_handler(int fd, ! IOHandler fdinfo_handler, void *closure, IOTypeInfo *iotype); static IOHandler remove_io_handler(int fd, IOTypeInfo *iotype); static void handle_io(const fd_set *fds, FDInfo::handler FDInfo::* iotype); diff -rcb ./libfam/Client.c++ ../porters_fam-oss-2.6.2/libfam/Client.c++ *** ./libfam/Client.c++ Wed Mar 15 04:54:48 2000 --- ../porters_fam-oss-2.6.2/libfam/Client.c++ Sat Apr 8 18:35:01 2000 *************** *** 40,46 **** static void getword(const char *p, u_int32_t *l); ! Client::Client(long host, int prog, int vers) : sock(0), haveCompleteEvent(false), userData(NULL), endExist(NULL), inend(inbuf) { --- 40,46 ---- static void getword(const char *p, u_int32_t *l); ! Client::Client(long host, unsigned int prog, unsigned int vers) : sock(0), haveCompleteEvent(false), userData(NULL), endExist(NULL), inend(inbuf) { *************** *** 133,139 **** sun.sun_family = AF_UNIX; // We will block here, waiting for response from fam. ! int nread = 0; char inbuf[sizeof(sun.sun_path)]; while(nread < sizeof(u_int32_t)) { --- 133,139 ---- sun.sun_family = AF_UNIX; // We will block here, waiting for response from fam. ! unsigned int nread = 0; char inbuf[sizeof(sun.sun_path)]; while(nread < sizeof(u_int32_t)) { diff -rcb ./libfam/Client.h ../porters_fam-oss-2.6.2/libfam/Client.h *** ./libfam/Client.h Wed Mar 15 04:55:00 2000 --- ../porters_fam-oss-2.6.2/libfam/Client.h Sat Apr 8 18:34:28 2000 *************** *** 33,39 **** class Client { public: ! Client(long hostaddr, int prog, int vers); ~Client(); int writeToServer(char *msg, int nbytes); int getSock() { return sock; } --- 33,39 ---- class Client { public: ! Client(long hostaddr, unsigned int prog, unsigned int vers); ~Client(); int writeToServer(char *msg, int nbytes); int getSock() { return sock; } --pWyiEgJYm5f9v55/-- -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Thu Apr 13 02:12:46 2000 Received: by oss.sgi.com id ; Thu, 13 Apr 2000 02:12:35 -0700 Received: from mail.zrz.TU-Berlin.DE ([130.149.4.15]:12525 "EHLO mail.zrz.tu-berlin.de") by oss.sgi.com with ESMTP id ; Thu, 13 Apr 2000 02:12:09 -0700 Received: from mikro.physik.tu-berlin.de ([130.149.161.103]) by mail.zrz.tu-berlin.de with esmtp (exim-3.14) for id 12fffP-00035e-00; Thu, 13 Apr 2000 11:12:03 +0200 Received: (from bose@localhost) by mikro.physik.TU-Berlin.DE (8.9.3/8.9.3) id LAA17627 for fam@oss.sgi.com; Thu, 13 Apr 2000 11:12:01 +0200 Date: Thu, 13 Apr 2000 11:12:00 +0200 From: Sumit Bose To: fam@oss.sgi.com Subject: [fam] patches to compile on IRIX 5.3 with gcc-2.95.2 Message-ID: <20000413111200.A17544@mikro.physik.tu-berlin.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="3V7upXqbjpZ4EhLz" X-Mailer: Mutt 1.0i Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Hi, here are the changes I have applied to the fam-oss-2.6.2 code to make it compile and run under IRIX 5.3 with gcc-2.95.2. In the attachement are only the changes to the c++ and header files. I am not too good with autoconf, so I have made all changes to the makefiles ( stetting the compiler to g++ and adding -DIRIX_5_3 and -DNDEBUG to the CFLAGS) after running configure. - IRIX 5.3 does not have snprintf in the libc, so I have taken it from qpopper. I have included it in the patch file, but I am not sure if it has the right license to be include it into the fam-oss distribution. Perhaps it would be better to take it from the glibc source, but I found it easier to take it from qpopper. - Cred.c++: my system has getpwuid_r, but with different arguments, and no getgrent_r, so I have included code to use getpwuid and getgrent. Is it important to have the reentrant versions? If yes, perhaps they can be taken from glibc. - IMonIrix.c++ I have not found the definition of struct revokdi on my system, so I put it in the file. I also couldn't find struct interest, but interest_t. - Scheduler.c++ and Scheduler.h: gcc-2.95.2 complains about class and member having the same name, so I changed the member name to xxx_handler. - other files: some declarations were missing, I have added the include files were the declarations can be found. Sumit --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Description: patch Content-Disposition: attachment; filename=my_fam_patch diff -Naur fam-oss-2.6.2/fam/Cred.c++ fam-oss-2.6.2-new/fam/Cred.c++ --- fam-oss-2.6.2/fam/Cred.c++ Thu Mar 2 01:51:17 2000 +++ fam-oss-2.6.2-new/fam/Cred.c++ Wed Apr 5 15:07:47 2000 @@ -21,6 +21,7 @@ // Temple Place - Suite 330, Boston MA 02111-1307, USA. #include "Cred.h" +#include "snprintf.h" #include #include @@ -60,7 +61,11 @@ struct passwd *pwd; char buf[BUFSIZ]; gid_t *gs = new gid_t[ng]; +#ifdef IRIX_5_3 + if ((pwd=getpwuid(u)) && (pwd != NULL)) +#else if ((getpwuid_r(u, &pwbuf, buf, BUFSIZ, &pwd) == 0) && (pwd != NULL)) +#endif { #if HAVE_GETGRMEMBER ng = getgrmember(pwd->pw_name, gs, ng, 0); @@ -71,7 +76,11 @@ } #else char buf[BUFSIZ]; +#ifdef IRIX_5_3 + group *gb; +#else group gb; +#endif group *gbp; unsigned int ngi = 0; setgrent(); @@ -78,6 +87,21 @@ // getgrent_r differs between linux & irix. Assume we're on linux // if not HAVE_GETGRMEMBER, and use the linux getgent_r... This // should be handled better in configure.in. +#ifdef IRIX_5_3 + while ((ngi < ng) && (gb=getgrent())) + { + // See if our user's name is in the list of group members. + for (int i = 0; gb->gr_mem[i] != NULL; ++i) + { + if (!strcmp(pwd->pw_name, gb->gr_mem[i])) + { + gs[ngi++] = gb->gr_gid; + break; + } + } + } + +#else while ((ngi < ng) && (getgrent_r(&gb, buf, BUFSIZ, &gbp) == 0)) { // See if our user's name is in the list of group members. @@ -90,6 +114,7 @@ } } } +#endif endgrent(); ng = ngi; #endif // HAVE_GETGRMEMBER diff -Naur fam-oss-2.6.2/fam/IMonIrix.c++ fam-oss-2.6.2-new/fam/IMonIrix.c++ --- fam-oss-2.6.2/fam/IMonIrix.c++ Thu Mar 2 01:51:18 2000 +++ fam-oss-2.6.2-new/fam/IMonIrix.c++ Wed Apr 5 15:37:07 2000 @@ -34,6 +34,15 @@ #include "Log.h" #include "IMon.h" +#ifdef IRIX_5_3 +typedef struct revokdi { + dev_t rv_dev; + ino_t rv_ino; + intmask_t rv_what; +} revokdi_t; +#define IMONIOC_REVOKDI (('i' << 8) | 6) +#endif + const intmask_t INTEREST_MASK = (IMON_CONTENT | IMON_ATTRIBUTE | IMON_DELETE | IMON_EXEC | IMON_EXIT | IMON_RENAME); @@ -48,7 +57,11 @@ IMon::Status IMon::imon_express(const char *name, struct stat *status) { +#ifdef IRIX_5_3 + interest_t interest = { (char *) name, status, INTEREST_MASK }; +#else struct interest interest = { (char *) name, status, INTEREST_MASK }; +#endif int rc = ioctl(imonfd, IMONIOC_EXPRESS, &interest); if (rc < 0) { @@ -84,7 +97,11 @@ if (can_revokdi) { +#ifdef IRIX_5_3 + revokdi_t revokdi = { dev, ino, INTEREST_MASK }; +#else struct revokdi revokdi = { dev, ino, INTEREST_MASK }; +#endif int rc = ioctl(imonfd, IMONIOC_REVOKDI, &revokdi); if (rc < 0) { Log::perror("IMONIOC_REVOKDI on \"%s\" failed", name); @@ -99,7 +116,11 @@ { // Try the old revoke ioctl. +#ifdef IRIX_5_3 + interest_t interest = { (char *) name, NULL, INTEREST_MASK }; +#else struct interest interest = { (char *) name, NULL, INTEREST_MASK }; +#endif int rc = ioctl(imonfd, IMONIOC_REVOKE, &interest); if (rc < 0) { // Log error at LOG_DEBUG. IMONIOC_REVOKE fails all the time. diff -Naur fam-oss-2.6.2/fam/Listener.c++ fam-oss-2.6.2-new/fam/Listener.c++ --- fam-oss-2.6.2/fam/Listener.c++ Thu Mar 2 01:51:19 2000 +++ fam-oss-2.6.2-new/fam/Listener.c++ Wed Apr 5 15:11:46 2000 @@ -23,6 +23,7 @@ #include "Listener.h" #include +#include #include #include #include diff -Naur fam-oss-2.6.2/fam/LocalClient.c++ fam-oss-2.6.2-new/fam/LocalClient.c++ --- fam-oss-2.6.2/fam/LocalClient.c++ Thu Mar 2 01:51:19 2000 +++ fam-oss-2.6.2-new/fam/LocalClient.c++ Wed Apr 5 15:13:23 2000 @@ -21,6 +21,7 @@ // Temple Place - Suite 330, Boston MA 02111-1307, USA. #include +#include #include #include diff -Naur fam-oss-2.6.2/fam/MxClient.c++ fam-oss-2.6.2-new/fam/MxClient.c++ --- fam-oss-2.6.2/fam/MxClient.c++ Thu Mar 2 01:51:19 2000 +++ fam-oss-2.6.2-new/fam/MxClient.c++ Wed Apr 5 15:16:13 2000 @@ -20,6 +20,7 @@ // with this program; if not, write the Free Software Foundation, Inc., 59 // Temple Place - Suite 330, Boston MA 02111-1307, USA. +#include #include "MxClient.h" #include diff -Naur fam-oss-2.6.2/fam/NetConnection.c++ fam-oss-2.6.2-new/fam/NetConnection.c++ --- fam-oss-2.6.2/fam/NetConnection.c++ Thu Mar 2 01:51:19 2000 +++ fam-oss-2.6.2-new/fam/NetConnection.c++ Wed Apr 5 15:17:07 2000 @@ -20,6 +20,7 @@ // with this program; if not, write the Free Software Foundation, Inc., 59 // Temple Place - Suite 330, Boston MA 02111-1307, USA. +#include "snprintf.h" #include "NetConnection.h" #include diff -Naur fam-oss-2.6.2/fam/RPC_TCP_Connector.c++ fam-oss-2.6.2-new/fam/RPC_TCP_Connector.c++ --- fam-oss-2.6.2/fam/RPC_TCP_Connector.c++ Thu Mar 2 01:51:20 2000 +++ fam-oss-2.6.2-new/fam/RPC_TCP_Connector.c++ Wed Apr 5 16:09:05 2000 @@ -20,6 +20,7 @@ // with this program; if not, write the Free Software Foundation, Inc., 59 // Temple Place - Suite 330, Boston MA 02111-1307, USA. + #include "RPC_TCP_Connector.h" #include @@ -29,7 +30,11 @@ #include #include #include +#ifdef IRIX_5_3 +extern "C" int rresvport(int *port); +#else #include // for rresvport +#endif #include "Log.h" #include "Scheduler.h" diff -Naur fam-oss-2.6.2/fam/Scheduler.c++ fam-oss-2.6.2-new/fam/Scheduler.c++ --- fam-oss-2.6.2/fam/Scheduler.c++ Thu Mar 2 01:51:20 2000 +++ fam-oss-2.6.2-new/fam/Scheduler.c++ Wed Apr 5 15:29:58 2000 @@ -232,7 +232,7 @@ Scheduler::trim_fdinfo() { for (FDInfo *fp = &fdinfo[nfds - 1]; nfds > 0; --nfds, --fp) - if (fp->read.handler || fp->write.handler) + if (fp->read.xxx_handler || fp->write.xxx_handler) break; if (!nfds) @@ -249,8 +249,8 @@ assert(fd >= 0); assert(handler); FDInfo *fp = fd_to_info(fd); - IOHandler old_handler = (fp->*(iotype->iotype)).handler; - (fp->*(iotype->iotype)).handler = handler; + IOHandler old_handler = (fp->*(iotype->iotype)).xxx_handler; + (fp->*(iotype->iotype)).xxx_handler = handler; (fp->*(iotype->iotype)).closure = closure; assert(!old_handler || FD_ISSET(fd, &iotype->fds)); if (!FD_ISSET(fd, &iotype->fds)) @@ -266,8 +266,8 @@ { assert(fd >= 0 && fd < nfds); FDInfo *fp = fd_to_info(fd); - IOHandler old_handler = (fp->*(iotype->iotype)).handler; - (fp->*(iotype->iotype)).handler = NULL; + IOHandler old_handler = (fp->*(iotype->iotype)).xxx_handler; + (fp->*(iotype->iotype)).xxx_handler = NULL; (fp->*(iotype->iotype)).closure = NULL; trim_fdinfo(); assert(old_handler); @@ -311,7 +311,7 @@ if (FD_ISSET(fd, fds)) { FDInfo *fp = &fdinfo[fd]; assert(iotype == &FDInfo::read || iotype == &FDInfo::write); - (fp->*iotype).handler(fd, (fp->*iotype).closure); + (fp->*iotype).xxx_handler(fd, (fp->*iotype).closure); // Remember, handler may move fdinfo array. } } diff -Naur fam-oss-2.6.2/fam/Scheduler.h fam-oss-2.6.2-new/fam/Scheduler.h --- fam-oss-2.6.2/fam/Scheduler.h Thu Mar 2 01:51:24 2000 +++ fam-oss-2.6.2-new/fam/Scheduler.h Wed Apr 5 14:57:37 2000 @@ -24,6 +24,7 @@ #define Scheduler_included #include +#include #include "Boolean.h" @@ -94,7 +95,7 @@ struct FDInfo { struct handler { - IOHandler handler; + IOHandler xxx_handler; void *closure; } read, write; }; diff -Naur fam-oss-2.6.2/include/fam.h fam-oss-2.6.2-new/include/fam.h --- fam-oss-2.6.2/include/fam.h Thu Mar 2 01:56:12 2000 +++ fam-oss-2.6.2-new/include/fam.h Wed Apr 5 16:27:05 2000 @@ -43,7 +43,8 @@ /* For NAME_MAX - maximum # of chars in a filename */ #include "limits.h" - +#include +#include "snprintf.h" diff -Naur fam-oss-2.6.2/include/snprintf.h fam-oss-2.6.2-new/include/snprintf.h --- fam-oss-2.6.2/include/snprintf.h +++ fam-oss-2.6.2-new/include/snprintf.h Wed Apr 5 16:28:34 2000 @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2000 QUALCOMM Incorporated. All rights reserved. + * See License.txt file for terms and conditions for modification and + * redistribution. + * + * Revisions: + * + * 01/27/00 [rcg] + * - Changed snprintf to vsnprintf, added snprint as jacket. + * + * 01/20/00 [rg] + * - File added. + * + */ + + +#ifndef _SNPRINTF_H +# define _SNPRINTF_H + + +#ifdef __cplusplus +extern "C" { +#endif + +# include +# include + +#ifndef HAVE_SNPRINTF +int snprintf ( char *s, size_t n, const char *format, ... ); +#endif /* not HAVE_SNPRINTF */ + +#ifndef HAVE_VSNPRINTF +int vsnprintf ( char *s, size_t n, const char *format, va_list ap ); +#endif /* not HAVE_VSNPRINTF */ + +#ifdef __cplusplus +} +#endif + +#endif /* _SNPRINTF_H */ + + diff -Naur fam-oss-2.6.2/test/snprintf.c fam-oss-2.6.2-new/test/snprintf.c --- fam-oss-2.6.2/test/snprintf.c +++ fam-oss-2.6.2-new/test/snprintf.c Wed Apr 5 16:43:20 2000 @@ -0,0 +1,322 @@ +/* + * Copyright (c) 2000 QUALCOMM Incorporated. All rights reserved. + * See License.txt file for terms and conditions for modification and + * redistribution. + * + * snprintf.c: + * + * Revisions: + * + * 01/27/00 [rcg] + * - Changed snprintf to vsnprintf, added snprint as jacket. + * + * 01/20/00 [rcg] + * - Guarded with #ifndef HAVE_SNPRINTF + * + */ + +#include +#include +#include +#include + +/*#include "config.h"*/ +#include "snprintf.h" + + + +/* + * A (hopefully full enough) snprintf implementation built over sprintf. + * Based on modified version of snprint from one extracted from K&R 'C'. + * Reference : Unix specification version 2. Copyright 1997 Open Group. + * null terminated string. + * + * Caveats : + * - Limited support for format modifiers. + * - No nth argument specification %n$. + * - The known formats "sdcfxXgGeEou%". + * - Assuming int as 4 bytes, double as 8 bytes. No support for + * long double. + * + * Parameters: + * s: buffer to print to. + * n: max number of bytes to print. + * format: the format string. + * + * Returned : On success the number of bytes printed to buffer. + * On failure -1. + */ + +#ifndef HAVE_VSNPRINTF + + +# define BUFSIZE 1024 +# define MIN(A,B) ( ( (A) < (B) ) ? (A) : (B) ) +# define MAX(A,B) ( ( (A) > (B) ) ? (A) : (B) ) + + +/* + * Copy chars and update pointer and remaining space count. + * + * Parameters: + * s: pointer to char * for destination. + * m: pointer to source string. + * l: maximum chars to copy. + * n: pointer to remaining space count. + * + * Results: + * String 'm' is appended to 's'; 's' is updated to + * point at terminating null; 'n' is decremented by + * length of 'm'. + */ +static void +copy_buf ( char **s, char *m, size_t l, size_t *n ) +{ + l = MIN ( *m, l ); + strncpy ( *s, m, l ); + + l = MIN ( l, strlen(m) ); + *n -= l; + *s += l; +} + + +enum STATES_TAG +{ + IN_FORM, /* Copying format string chars */ + IN_CONV, /* In a conversion specification */ + IN_LEN /* In a maximum length field */ +}; + +typedef enum STATES_TAG STATES; + + +int +vsnprintf ( char *s, size_t n, const char *format, va_list ap ) +{ + char *sval; + int ival; + double dval; + char cval; + float fval; + char *p = (char *)format, /* Pointer into format string */ + msgBuf [ BUFSIZE ], /* Temporary store for printing + * ints, floats etc using sprintf */ + frmToken [ 64 ], /* Temporary store for conversion + * tokens. */ + *f; /* Pointer into frmToken */ + STATES nState = IN_FORM; + size_t nSize = n-1; + long width; /* If we have a width minimum */ + long limit; /* If we have a length limiter */ + + + if ( s == NULL || n == 0 || format == NULL ) + return -1; + + s [ n-1 ] = '\0'; + + for ( ; nSize > 0 && *p != '\0'; p++ ) { + if ( nState == IN_FORM ) { + if ( *p != '%' ) { + /* + * Still not in a conversion spec; just copy the char + */ + *s++ = *p; + nSize--; + } + else { + /* + * Start of a conversion spec + */ + nState = IN_CONV; + width = -1; + limit = -1; + f = frmToken; + *f++ = *p; + } + } /* nState == IN_FORM */ + else { /* We're still inside a conversion spec */ + switch ( *p ) { + + case 'c': /* C converts char args to int */ + case 'd': + case 'i': + case 'o': + case 'u': + case 'x': + case 'X': + /* + * Ensure width or max length, if specified, does not exceed + * available space. + */ + if ( width != -1 || limit != -1 ) + if ( MAX ( width, limit ) > + MIN ( BUFSIZE, nSize ) + ) + return -1; + + *f++ = *p; + *f = '\0'; + ival = va_arg ( ap, int ); + sprintf ( msgBuf, frmToken, ival ); + copy_buf ( &s, msgBuf, nSize, &nSize ); + nState = IN_FORM; + break; + + case 'f': /* C converts float args to double */ + case 'e': + case 'E': + case 'g': + case 'G': + /* + * Ensure width or max length, if specified, does not exceed + * available space. + */ + if ( width != -1 || limit != -1 ) + if ( MAX ( width, limit ) > + MIN ( BUFSIZE, nSize ) + ) + return -1; + + *f++ = *p; + *f = '\0'; + dval = va_arg ( ap, double ); + sprintf ( msgBuf, frmToken, dval ); + copy_buf ( &s, msgBuf, nSize, &nSize ); + nState = IN_FORM; + break; + + case 's': + /* + * Ensure width or max length, if specified, does not exceed + * available space. + */ + if ( width != -1 || limit != -1 ) + if ( MAX ( width, limit ) > + MIN ( BUFSIZE, nSize ) + ) + return -1; + + /* + * Get the string pointer. If NULL, or if the maximum length + * is zero, we're done with this conversion. + */ + sval = va_arg ( ap, char * ); + if ( sval == NULL || limit == 0 ) { + nState = IN_FORM; + break; + } + + /* + * Make sure we have room if limit is unspecified. + */ + if ( limit == -1 && strlen(sval) > nSize ) + return -1; + + /* + * Handle minimum width + */ + if ( width != -1 && width > strlen(sval) ) { + for ( ; width > 0; width-- ) + copy_buf ( &s, " ", nSize, &nSize ); + } + + /* + * Handle maximum length + */ + if ( limit != -1 && limit < strlen(sval) ) + copy_buf ( &s, sval, limit, &nSize ); + else + copy_buf ( &s, sval, nSize, &nSize ); + + nState = IN_FORM; + break; + + case '%': + *s++ = *p; + nSize--; + nState = IN_FORM; + break; + + case '*': + /* + * Variable min width or max length specification. + */ + if ( nState == IN_LEN && limit == -1 ) { + limit = va_arg ( ap, int ); + f += sprintf ( f, "%i", limit ); + } + else + if ( nState == IN_FORM && width == -1 ) { + width = va_arg ( ap, int ); + f += sprintf ( f, "%i", width ); + } + else + return -1; + break; + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + *f++ = *p; + *f = '\0'; + + /* + * Width or max length specification. If the + * appropriate variable is -1, this is the start; + * otherwise it is a subsequent digit and we just + * skip over it. + */ + if ( nState == IN_LEN && limit == -1 ) + limit = atoi ( p ); + else + if ( nState == IN_FORM && width == -1 ) + width = atoi ( p ); + break; + + case '.': + /* + * Max length follows + */ + *f++ = *p; + *f = '\0'; + nState = IN_LEN; + break; + + default: + *f++ = *p; + *f = '\0'; + break; + } /* switch */ + } /* We're still inside a format */ + } /* for loop */ + + if ( nSize ) + *s++ = *p; + return ( (n-1) - nSize ); +} + +#endif /* not HAVE_VSNPRINTF */ + +#ifndef HAVE_SNPRINTF +int +snprintf ( char *s, size_t n, const char *format, ... ) +{ + int rslt; + va_list ap; /* Pointer into stack to extract + * parameters */ + va_start ( ap, format ); + rslt = vsnprintf ( s, n, format, ap ); + va_end ( ap ); + return rslt; +} +#endif /* not HAVE_SNPRINTF */ + diff -Naur fam-oss-2.6.2/test/test.c++ fam-oss-2.6.2-new/test/test.c++ --- fam-oss-2.6.2/test/test.c++ Mon Feb 7 23:32:41 2000 +++ fam-oss-2.6.2-new/test/test.c++ Wed Apr 5 16:26:17 2000 @@ -2,7 +2,18 @@ #include #include #include -#include +#include +#ifdef IRIX_5_3 + extern "C" void (*signal (int sig, void (*func)(int)))(int); + extern "C" int kill(int, int); + #define SIGINT 2 /* interrupt (rubout) */ + #define SIGUSR1 16 /* user defined signal 1 */ + #define SIGUSR2 17 /* user defined signal 2 */ + #define SIGTSTP 24 /* stop signal from tty */ + #define SIGCONT 25 /* continue a stopped process */ +#else + #include +#endif #include #include //#include --3V7upXqbjpZ4EhLz-- -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Thu Apr 13 15:41:04 2000 Received: by oss.sgi.com id ; Thu, 13 Apr 2000 15:40:44 -0700 Received: from deliverator.sgi.com ([204.94.214.10]:12639 "EHLO deliverator.sgi.com") by oss.sgi.com with ESMTP id ; Thu, 13 Apr 2000 15:40:18 -0700 Received: from rlyeh.engr.sgi.com (rlyeh.engr.sgi.com [163.154.5.94]) by deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP id PAA27388 for ; Thu, 13 Apr 2000 15:35:34 -0700 (PDT) mail_from (rusty@rlyeh.engr.sgi.com) Received: (from rusty@localhost) by rlyeh.engr.sgi.com (980427.SGI.8.8.8/960327.SGI.AUTOCF) id PAA47854 for fam@oss.sgi.com; Thu, 13 Apr 2000 15:38:44 -0700 (PDT) From: "Rusty Ballinger" Message-Id: <10004131538.ZM47985@rlyeh.engr.sgi.com> Date: Thu, 13 Apr 2000 15:38:44 -0700 In-Reply-To: Sumit Bose "[fam] patches to compile on IRIX 5.3 with gcc-2.95.2" (Apr 13, 11:12am) References: <20000413111200.A17544@mikro.physik.tu-berlin.de> X-Face: #)4}U4e`O6YEe%oBzE}>ycmT!Xt?Myiqo~|p3Wh'UuQ[N7)&4\4?8:1n)bmPX]b@#k94%!VojpODdmk:sCr1b\-aXD&P:wjBqupMB:ag6}BwVseJZM@K{$E|0J9}&,Rpdg{&N4/Y8&PTm6>|r[,gI2T*qN!`AZhl>Bdy7JR`dDvP(/pz.}?Q@dg':mlV`RX51Z_ZG?Gta|Q!iA[MaOh Reply-To: rusty@sgi.com X-Mailer: Z-Mail (3.2.3 08feb96 MediaMail) To: fam@oss.sgi.com Subject: Re: [fam] patches to compile on IRIX 5.3 with gcc-2.95.2 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing > I am not too good with autoconf, so I have made all changes to the > makefiles ( stetting the compiler to g++ and adding -DIRIX_5_3 and > -DNDEBUG to the CFLAGS) after running configure. Technically I'm not too good with autoconf either; see the configure.in if you don't believe me. I will try to fix it so that you don't have to edit the makefiles after running the configure script. ("They have computers for things like that!") For adding -DNDEBUG to CFLAGS, you should be able to set that as an environment variable before running the script, but I'll also see if I can get it to work as a command-line option, like ./configure --with-CFLAGS="-DNDEBUG -g" etc. (I like that better than some mysterious environment variable because ./configure --help will tell you about it, but I don't know yet whether that will work.) I will also try to do something similar with the compiler test so that you can say at configure time which compilers you want to use. (In your case, do you have both SGI & GNU compilers, and the script is finding the wrong one, or do you only have one, and the script isn't finding it?) > - IRIX 5.3 does not have snprintf in the libc, so I have taken it from > qpopper. I have included it in the patch file, but I am not sure if it > has the right license to be include it into the fam-oss distribution. > Perhaps it would be better to take it from the glibc source, but I found > it easier to take it from qpopper. OK, good. Actually, a quick look at their license prompted me to look for glibc source, which (I think) shouldn't be any problem to use. > - Cred.c++: > my system has getpwuid_r, but with different arguments, and no > getgrent_r, so I have included code to use getpwuid and getgrent. Is it > important to have the reentrant versions? I don't think so. (fam itself is single-threaded.) Thanks a lot for your patch; I will include it in 2.6.3, which I will try to put out sometime tonight, if everything goes OK. --Rusty -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Sat Apr 15 07:39:24 2000 Received: by oss.sgi.com id ; Sat, 15 Apr 2000 07:39:03 -0700 Received: from c18746117.telekabel.chello.nl ([212.187.46.117]:39809 "HELO spinor.outthere.net") by oss.sgi.com with SMTP id ; Sat, 15 Apr 2000 07:38:39 -0700 Received: from chello.nl (localhost.localdomain [127.0.0.1]) by spinor.outthere.net (Postfix) with ESMTP id E905ABC4B for ; Sat, 15 Apr 2000 16:38:27 +0200 (CEST) Message-ID: <38F87EE3.E2C8B3F3@chello.nl> Date: Sat, 15 Apr 2000 16:38:27 +0200 From: nightOwl X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.3.99-pre6 i586) X-Accept-Language: en MIME-Version: 1.0 To: fam@oss.sgi.com Subject: [fam] [patch] changes to compile fam-oss-2.6.2 with gcc 2.95.2 Content-Type: multipart/mixed; boundary="------------96AB12194521981EFDD787E6" Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing This is a multi-part message in MIME format. --------------96AB12194521981EFDD787E6 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi,. I grabbed fam to build EFM (Enlightenment File Manager) and found I needed to following changes to make it compile on my system. I'm running linux-2.3.99-pre6-3 on a somewhat modified Mandrake 7.0b which comes with gcc 2.95.2. have phun with it :-) regards, Peter Zijlstra BTW, I'm not on this list, so if u feel the need to contact me use mail. --------------96AB12194521981EFDD787E6 Content-Type: text/plain; charset=us-ascii; name="fam-patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fam-patch" diff -rc fam-oss-2.6.2/fam/IMonNone.c++ fam-mod/fam/IMonNone.c++ *** fam-oss-2.6.2/fam/IMonNone.c++ Fri Mar 24 01:30:16 2000 --- fam-mod/fam/IMonNone.c++ Sat Apr 15 16:29:27 2000 *************** *** 21,26 **** --- 21,27 ---- // Temple Place - Suite 330, Boston MA 02111-1307, USA. #include "IMon.h" + #include "Log.h" int IMon::imon_open() { diff -rc fam-oss-2.6.2/fam/Listener.c++ fam-mod/fam/Listener.c++ *** fam-oss-2.6.2/fam/Listener.c++ Thu Mar 2 01:51:19 2000 --- fam-mod/fam/Listener.c++ Sat Apr 15 16:26:48 2000 *************** *** 153,159 **** // Get the new socket. struct sockaddr_in addr; ! int addrlen = sizeof addr; int client_fd = accept(rendezvous_fd, (struct sockaddr *) &addr, &addrlen); if (client_fd < 0) { --- 153,159 ---- // Get the new socket. struct sockaddr_in addr; ! unsigned int addrlen = sizeof addr; int client_fd = accept(rendezvous_fd, (struct sockaddr *) &addr, &addrlen); if (client_fd < 0) { *************** *** 272,278 **** // Get the new socket. struct sockaddr_un sun = { AF_UNIX, "" }; ! int sunlen = sizeof(sun); int client_fd = accept(ofd, (struct sockaddr *) &sun, &sunlen); if (client_fd < 0) { --- 272,278 ---- // Get the new socket. struct sockaddr_un sun = { AF_UNIX, "" }; ! unsigned int sunlen = sizeof(sun); int client_fd = accept(ofd, (struct sockaddr *) &sun, &sunlen); if (client_fd < 0) { *************** *** 400,406 **** // Accept a new ugly connection. struct sockaddr_un sun; ! int sunlen = sizeof sun; int sock = accept(ugly, (struct sockaddr *)(&sun), &sunlen); if (sock < 0) { Log::perror("accept"); --- 400,406 ---- // Accept a new ugly connection. struct sockaddr_un sun; ! unsigned int sunlen = sizeof sun; int sock = accept(ugly, (struct sockaddr *)(&sun), &sunlen); if (sock < 0) { Log::perror("accept"); diff -rc fam-oss-2.6.2/fam/NFSFileSystem.c++ fam-mod/fam/NFSFileSystem.c++ *** fam-oss-2.6.2/fam/NFSFileSystem.c++ Thu Mar 2 01:51:19 2000 --- fam-mod/fam/NFSFileSystem.c++ Sat Apr 15 16:27:53 2000 *************** *** 26,31 **** --- 26,32 ---- #include #include #include + #include #include #include "Log.h" diff -rc fam-oss-2.6.2/fam/Scheduler.c++ fam-mod/fam/Scheduler.c++ *** fam-oss-2.6.2/fam/Scheduler.c++ Thu Mar 2 01:51:20 2000 --- fam-mod/fam/Scheduler.c++ Sat Apr 15 16:08:26 2000 *************** *** 304,310 **** } void ! Scheduler::handle_io(const fd_set *fds, FDInfo::handler FDInfo::* iotype) { if (fds) for (int fd = 0; fd < nfds; fd++) --- 304,310 ---- } void ! Scheduler::handle_io(const fd_set *fds, FDInfo::_handler FDInfo::* iotype) { if (fds) for (int fd = 0; fd < nfds; fd++) diff -rc fam-oss-2.6.2/fam/Scheduler.h fam-mod/fam/Scheduler.h *** fam-oss-2.6.2/fam/Scheduler.h Thu Mar 2 01:51:24 2000 --- fam-mod/fam/Scheduler.h Sat Apr 15 16:08:43 2000 *************** *** 93,99 **** // closures. struct FDInfo { ! struct handler { IOHandler handler; void *closure; } read, write; --- 93,99 ---- // closures. struct FDInfo { ! struct _handler { IOHandler handler; void *closure; } read, write; *************** *** 104,113 **** // for the corresponding I/O type. struct IOTypeInfo { ! FDInfo::handler FDInfo::*const iotype; unsigned int nbitsset; // number of bits set in fds fd_set fds; ! IOTypeInfo(FDInfo::handler FDInfo::* a_iotype) : iotype(a_iotype), nbitsset(0) { FD_ZERO(&fds); } }; --- 104,113 ---- // for the corresponding I/O type. struct IOTypeInfo { ! FDInfo::_handler FDInfo::*const iotype; unsigned int nbitsset; // number of bits set in fds fd_set fds; ! IOTypeInfo(FDInfo::_handler FDInfo::* a_iotype) : iotype(a_iotype), nbitsset(0) { FD_ZERO(&fds); } }; *************** *** 143,149 **** IOHandler handler, void *closure, IOTypeInfo *iotype); static IOHandler remove_io_handler(int fd, IOTypeInfo *iotype); ! static void handle_io(const fd_set *fds, FDInfo::handler FDInfo::* iotype); // Timed task related functions --- 143,149 ---- IOHandler handler, void *closure, IOTypeInfo *iotype); static IOHandler remove_io_handler(int fd, IOTypeInfo *iotype); ! static void handle_io(const fd_set *fds, FDInfo::_handler FDInfo::* iotype); // Timed task related functions --------------96AB12194521981EFDD787E6-- -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Fri Apr 21 19:06:24 2000 Received: by oss.sgi.com id ; Fri, 21 Apr 2000 19:06:04 -0700 Received: from nat-su-33.valinux.com ([198.186.202.33]:2315 "EHLO mandrake.net") by oss.sgi.com with ESMTP id ; Fri, 21 Apr 2000 19:05:44 -0700 Received: (from mandrake@localhost) by mandrake.net (8.9.3/8.9.3) id TAA17106 for fam@oss.sgi.com; Fri, 21 Apr 2000 19:03:59 -0700 Date: Fri, 21 Apr 2000 19:03:59 -0700 From: Mandrake To: fam@oss.sgi.com Subject: [fam] fam under linux Message-ID: <20000421190359.D16749@mandrake.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre3us Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing Hey, just a quick heads-up, I've been playing around with fam under linux for a couple of weeks now (cool stuff) but it doesn't compile very well under linux, so I hacked out a version that does OOB. :) ftp.mandrake.net/pub/mandrake/fam*.tar.gz there's a diff of that vs. the last release somewhere, but I don't remember where I put it. *grin* -- (\) Mandrake (Geoff Harrison) (/) http://mandrake.net (\) (|) Senior Software Engineer VA Linux Labs (|) http://valinux.com (|) (/) Co-Author Enlightenment Window Manager (\) http://enlightenment.org (/) (|) Linux.com Advisory Board Member (|) http://linux.com (|) -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Sun Apr 23 11:17:01 2000 Received: by oss.sgi.com id ; Sun, 23 Apr 2000 11:16:51 -0700 Received: from coyote.rain.org ([198.68.144.2]:33748 "HELO coyote.rain.org") by oss.sgi.com with SMTP id ; Sun, 23 Apr 2000 11:16:33 -0700 Received: from rain.org (maxmp-150.rain.org [198.68.144.150]) by coyote.rain.org (Postfix) with ESMTP id E48261DD1A for ; Sun, 23 Apr 2000 11:16:31 -0700 (PDT) Message-ID: <39033E53.801F4FFA@rain.org> Date: Sun, 23 Apr 2000 11:17:55 -0700 From: Steve Arnold X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20 i586) X-Accept-Language: en MIME-Version: 1.0 To: fam@oss.sgi.com Subject: [fam] imon patch for linux Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing Hey, I was wondering: Does the imon kernel patch for 2.2.13 work for other kernels? ie, 2.2.12-20, 2.2.14, etc. How well is it working for people running efm? Has anyone tried both the polling mode and the imon/kernel patch mode? Any comments? Thanks in advance, Steve -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com From owner-fam@oss.sgi.com Sun Apr 23 11:20:11 2000 Received: by oss.sgi.com id ; Sun, 23 Apr 2000 11:20:01 -0700 Received: from behemoth.vergenet.net ([198.186.202.43]:63503 "EHLO behemoth.su.varesearch.com") by oss.sgi.com with ESMTP id ; Sun, 23 Apr 2000 11:19:53 -0700 Received: (from raster@localhost) by behemoth.su.varesearch.com (8.9.3/8.9.3) id LAA32618; Sun, 23 Apr 2000 11:22:35 -0700 Message-Id: <200004231822.LAA32618@behemoth.su.varesearch.com> Date: Sun, 23 Apr 2000 11:22:35 -0700 (PDT) From: raster@rasterman.com Reply-To: raster@rasterman.com Subject: Re: [fam] imon patch for linux To: sarnold@earthling.net cc: fam@oss.sgi.com In-Reply-To: <39033E53.801F4FFA@rain.org> MIME-Version: 1.0 Content-Type: TEXT/plain; CHARSET=US-ASCII Sender: owner-fam@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;fam-outgoing On 23 Apr, Steve Arnold scribbled: -> Hey, I was wondering: -> -> Does the imon kernel patch for 2.2.13 work for other kernels? ie, 2.2.12-20, 2.2.14, etc. works for 2.2.14 for sure :) -> How well is it working for people running efm? Has anyone tried both the polling mode and the -> imon/kernel patch mode? Any comments? both - polling mode works and kenrel mode owrks.. kernel mode is MUHC better - delete files and their icons dissapear immediately (or at least as they get deleted) :) -> Thanks in advance, Steve -> -> -- -> Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ -> To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com -- --------------- Codito, ergo sum - "I code, therefore I am" -------------------- The Rasterman (Carsten Haitzler) raster@rasterman.com raster@valinux.com raster@enlightenment.org raster@linux.com raster@zip.com.au -- Source code, list archive, and docs: http://oss.sgi.com/projects/fam/ To unsubscribe: echo unsubscribe fam | mail majordomo@oss.sgi.com