Re: easy way to determine if a stream or fd is seekable

2011-11-20 Thread Alexander Best
On Sat Nov 19 11, Tim Kientzle wrote: > > On Nov 18, 2011, at 12:31 PM, Alexander Best wrote: > > > On Fri Nov 18 11, Tim Kientzle wrote: > >> > >> Take a look at > >> > >> http://libarchive.googlecode.com/svn/trunk/libarchive/archive_read_open_filename.c > >> > >> Especially the comments abo

Re: xlocale patch

2011-11-20 Thread Jilles Tjoelker
On Wed, Sep 21, 2011 at 08:28:54PM +0100, David Chisnall wrote: > And here's an updated version of the patch. I've fixed some other > bugs, including where wcstod() and wcstodl() in trunk return the wrong > value for any input string starting with spaces, wchar.h's violation > of POSIX by not decl

Re: easy way to determine if a stream or fd is seekable

2011-11-20 Thread Alexander Best
On Sun Nov 20 11, Alexander Best wrote: > On Sat Nov 19 11, Tim Kientzle wrote: > > > > On Nov 18, 2011, at 12:31 PM, Alexander Best wrote: > > > > > On Fri Nov 18 11, Tim Kientzle wrote: > > >> > > >> Take a look at > > >> > > >> http://libarchive.googlecode.com/svn/trunk/libarchive/archive_r

Re: easy way to determine if a stream or fd is seekable

2011-11-20 Thread Alexander Best
On Sun Nov 20 11, Alexander Best wrote: > On Sun Nov 20 11, Alexander Best wrote: > > On Sat Nov 19 11, Tim Kientzle wrote: > > > > > > On Nov 18, 2011, at 12:31 PM, Alexander Best wrote: > > > > > > > On Fri Nov 18 11, Tim Kientzle wrote: > > > >> [snip] > > so...any thoughts regarding this

Re: easy way to determine if a stream or fd is seekable

2011-11-20 Thread Alexander Best
On Sat Nov 19 11, Tim Kientzle wrote: > > On Nov 18, 2011, at 12:31 PM, Alexander Best wrote: > > > On Fri Nov 18 11, Tim Kientzle wrote: > >> > >> Take a look at > >> > >> http://libarchive.googlecode.com/svn/trunk/libarchive/archive_read_open_filename.c > >> > >> Especially the comments abo

Re: easy way to determine if a stream or fd is seekable

2011-11-20 Thread Dieter BSD
> something like the following inside lseek() would take care of tape drives: > >        if (S_ISCHR(sb.st_mode) || S_ISBLK(sb.st_mode)) { >                if (ioctl(io->fd, FIODTYPE, &type) == -1) >                        err(1, "%s", io->name); > >                if (type & D_TAPE) >            

Re: easy way to determine if a stream or fd is seekable

2011-11-20 Thread Alexander Best
On Sun Nov 20 11, Dieter BSD wrote: > > something like the following inside lseek() would take care of tape drives: > > > >        if (S_ISCHR(sb.st_mode) || S_ISBLK(sb.st_mode)) { > >                if (ioctl(io->fd, FIODTYPE, &type) == -1) > >                        err(1, "%s", io->name); > > >

Re: gcc 4.2 miscompilation with -O2 -fno-omit-frame-pointer on amd64

2011-11-20 Thread Gleb Kurtsou
On (19/11/2011 09:11), m...@freebsd.org wrote: > On Sat, Nov 19, 2011 at 8:19 AM, Gleb Kurtsou wrote: > > On (19/11/2011 07:26), m...@freebsd.org wrote: > >> On Sat, Nov 19, 2011 at 2:01 AM, Gleb Kurtsou > >> wrote: > >> > Hi, > >> > > >> > I was lucky to write a bit of code which gcc 4.2 fails

Re: gcc 4.2 miscompilation with -O2 -fno-omit-frame-pointer on amd64

2011-11-20 Thread Gleb Kurtsou
On (20/11/2011 01:57), Alexander Best wrote: > On Sat Nov 19 11, Gleb Kurtsou wrote: > > On (19/11/2011 12:25), Alexander Best wrote: > > > On Sat Nov 19 11, Gleb Kurtsou wrote: > > > > Hi, > > > > > > > > I was lucky to write a bit of code which gcc 4.2 fails to compile > > > > correctly with -O2

Re: gcc 4.2 miscompilation with -O2 -fno-omit-frame-pointer on amd64

2011-11-20 Thread Alexander Best
On Sun Nov 20 11, Gleb Kurtsou wrote: > On (20/11/2011 01:57), Alexander Best wrote: > > On Sat Nov 19 11, Gleb Kurtsou wrote: > > > On (19/11/2011 12:25), Alexander Best wrote: > > > > On Sat Nov 19 11, Gleb Kurtsou wrote: > > > > > Hi, > > > > > > > > > > I was lucky to write a bit of code which

Re: gcc 4.2 miscompilation with -O2 -fno-omit-frame-pointer on amd64

2011-11-20 Thread mdf
On Sun, Nov 20, 2011 at 10:24 AM, Gleb Kurtsou wrote: > On (19/11/2011 09:11), m...@freebsd.org wrote: >> On Sat, Nov 19, 2011 at 8:19 AM, Gleb Kurtsou wrote: >> > On (19/11/2011 07:26), m...@freebsd.org wrote: >> >> On Sat, Nov 19, 2011 at 2:01 AM, Gleb Kurtsou >> >> wrote: >> >> > Hi, >> >> >

The FreeBSD Project in the Google Code-In 2011 contest

2011-11-20 Thread Wojciech A. Koszek
Hello, (cross-posted message; please keep eventual comments on freebsd-hackers@) The FreeBSD project has been accepted to the Google Code-In 2011 contest. http://google-opensource.blogspot.com/2011/11/google-code-in-2011-participating.html We have proposed 50 tasks so far, and more ar

Re: easy way to determine if a stream or fd is seekable

2011-11-20 Thread perryh
Alexander Best wrote: > here's a revised patch. > ... > +.Sh CAVEATS > +If the > +.Fn lseek > +system call is operating on a device, which is incapable of seeking, > +it will request the seek operation and complete successfully. I think it would be better without the first comma (after "device")

Re: easy way to determine if a stream or fd is seekable

2011-11-20 Thread Ramanjaneyulu Talla
On 21/11/11 5:45 PM, "per...@pluto.rain.com" wrote: >Alexander Best wrote: > >> here's a revised patch. >> ... >> +.Sh CAVEATS >> +If the >> +.Fn lseek >> +system call is operating on a device, which is incapable of seeking, >> +it will request the seek operation and complete successfully. > >

Re: easy way to determine if a stream or fd is seekable

2011-11-20 Thread Benjamin Kaduk
On Mon, 21 Nov 2011, per...@pluto.rain.com wrote: Alexander Best wrote: here's a revised patch. ... +.Sh CAVEATS +If the +.Fn lseek +system call is operating on a device, which is incapable of seeking, +it will request the seek operation and complete successfully. I think it would be better

Re: dummynet(4) kernel process CPU usage monitoring

2011-11-20 Thread Eugene Grosbein
Hi! I need to draw graph of dummynet's CPU usage. "procstat -t 0" shows me TID (thread id) of dummynet kernel thread. "ps -Hxo time,lwp" shows me total CPU time consumed by this thread. Now I see this time has 9 seconds increase during 60 seconds of real time. This should be 9/60=15% CPU usage, b

How to compile opencrypto separately

2011-11-20 Thread aram baghomian
Hi I'm sorry, i forgot to register my email address to your mailing list. now i registered in it and resend my question. I have some problems with opencrypto project and i hope you want to help me for solve them. - I want to compile opencrypto code without to force compile it as a subsystem