Re: int64_t and printf

2011-06-05 Thread Sean C. Farley

On Sun, 5 Jun 2011, Ben Laurie wrote:

So, for example int64_t has no printf modifier I am aware of. Likewise 
its many friends.


In the past I've handled this by having a define somewhere along the 
lines of...


#if 
# define INT_64_T_FMT "%ld"
#else
# define INT_64_T_FMT "%lld"
#endif

but I have no idea where to put such a thing in FreeBSD. Opinions? 
Also, I guess I'd really need to do a modifier rather than a format, 
for full generality.


You need to include inttypes.h, which includes machine/_inttypes.h. 
This will provide the appropriate macro which in this case is PRId64.


Sean
--
s...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: who is in swap?

2011-05-20 Thread Sean C. Farley

On Fri, 20 May 2011, Julian Elischer wrote:


On 5/20/11 5:32 AM, Bill Moran wrote:

In response to Daniel Braniss:


no, Who's on 3rd


No.  I Don't Know is on 3rd.  Who's on 1st.

Sean
--
s...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: getting a list of open files versus PID nos.?

2010-12-09 Thread Sean C. Farley

On Thu, 9 Dec 2010, Chuck Robey wrote:

Ahh, the procstat -a -f output was more clearly readable than even the 
suggested lsof.  I found that enlightenment was opening 2,672 
different /dev/apm devices.  Man apm tells me it's to do with 
Advanced Power Mgm't, nearly all of these huge lumps of open files. 
How might I deal with getting these /dev/apm files to close 
themselves?  Because I have little doubt that I am (at last!!) looking 
at the reason for my machine lockups.


I think I ran into this long ago.  If I recall correctly, you just need 
to disable the Enlightenment battery/power monitor if running on a 
system without a battery.


Sean
--
s...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: bad RAM? prove it with a crash dump?

2010-05-06 Thread Sean C. Farley

On Thu, 6 May 2010, Atom Smasher wrote:

i suspect i've got bad RAM but memtest has run through several dozen 
iterations without a problem. my (3 year old) laptop will run for a 
few days or weeks and then crash/freeze/hang. i've enabled crash dumps 
and i'm wondering if/how the dump might be able to (dis)prove that the 
RAM is bad.  any ideas?


thanks...


Do not discount other hardware problems:  video cards, bad capacitors 
and power supplies.  Sadly, I mention these as a subset of my 
experience.  :(  I have even had a faulty left mouse button that would 
lock my X server (many years ago).  While holding the button down 
(scrolling through a menu), the mouse would release and acquire too 
quickly for the server.


Unfortunately, it is harder to find the problem in a laptop where you 
cannot easily (if at all) switch out pieces of hardware to find the 
problem.


Have you investigated whether or not the laptop is overheating?

Sean
--
s...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Strange problem with 8-stable, VMWare vSphere 4 & AMD CPUs (unexpected shutdowns)

2010-02-10 Thread Sean C. Farley

On Wed, 10 Feb 2010, Ivan Voras wrote:

It looks like I've stumbled upon a bug in vSphere 4 (recent update) 
with FreeBSD/amd64 8.0/8-stable (but not 7.x) guests on Opteron(s). In 
this combination, everything works fine until a moderate load is 
started - a buildworld is enough. About five minutes after the load 
starts, the vSphere client starts getting timeouts while talking with 
the host and soon after the guest VM is forcibly shut down without any 
trace of a reason in various logs.  The same VM runs fine on hosts 
with Xeon CPUs. The shutdown happens regardless if there is a vSphere 
client connected.


This is very repeatable, on Sun Fire X4140 hosts.

With 7.x/7.stable guests everything works fine.

I'm posting this for future reference and to see if anyone has 
encountered something like that, or has an idea why this happens.


Is it related to this thread:
http://lists.freebsd.org/pipermail/freebsd-stable/2010-February/054755.html

I have been fighting other issues (mainly countless "Command WRITE(10) 
took X.XYZ seconds" in the VM's vmware.log file under moderate I/O) with 
VMware Workstation 7 on a Linux host with an AMD Phenom(tm) II X4 945 
Processor, but I still have more testing to see if I can work through 
it.  I also do not want to take over this thread.


Sean
--
s...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: How to troubleshoot why ath0 can't connect to a passwordless wireless network?

2009-02-10 Thread Sean C. Farley

On Mon, 9 Feb 2009, Yuri wrote:

I have a several wireless networks without password that my linux box 
easily connects to.


What version of wpa_supplicant does the Linux box run?

On FreeBSD 'ifconfig ath0 up scan' command shows it. 'ifconfig ath0 
ssid  up' brings interface to 'associated' state. But 
dhclient fails to set it up.


I have another device on the same system: ral0. It sometimes connects 
to these networks ok, sometimes has the same problem.


What can I do to understand what may be a problem with ath0 in my 
case?


I tried to use tcpdump. It shows outbound DHCP packets and nothing is 
inbound.


I asked similar question here before, somebody asked me to downgrade 
atheros driver to one particular lower version. But this didn't help.


Relevant dmesg lines are:
ath_hal: 0.9.30.13 (AR5210, AR5211, AR5212, AR5216, RF5111, RF5112, RF2413, 
RF5413, RF2133)

ath0:  mem 0xcffe-0xcffe irq 16 at device 5.0 on pci0
ath0: mac 7.8 phy 4.5 radio 5.6


I had a lot of trouble with ath(4) and my work's wireless network (Aruba 
Networks based).  After patching wpa_supplicant from 0.5.10 to 0.5.11, 
everything has worked well.  Before, it would associate, yet DHCP would 
not work.


Sam Leffler (sam@) has since committed it to CURRENT.  I still have the 
original patch to RELENG_7[1] that the CURRENT patch was based upon.  It 
is a bit old, yet I think it may still apply at least for the most part.


Sean
  1. http://people.freebsd.org/~scf/wpa_supplicant-0.5.11-RELENG_7.patch
--
s...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: Small change to 'ps'

2009-01-07 Thread Sean C. Farley

On Wed, 7 Jan 2009, Ulrich Spoerlein wrote:


On Tue, 06.01.2009 at 11:52:39 -0800, Sheldon Givens wrote:

Hello everyone,

It occurs to me that FreeBSD ps lacks the ability to disable header. 
This seems like a really obvious feature, and I may have simply 
missed it's existence (despite my relentlessly searching the man 
page) but here is a small patch that sets the flag 'n' to disable 
header output.


You've missed it, probably because it is non-obvious:

% ps -p 1 -o pid,cpu
 PID CPU
   1   0
% ps -p 1 -o pid= -o cpu=
   1   0
%


Another way:
ps | tail +2

Sean
--
s...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: lzma compression/decompression in bsdtar/libarchive?

2008-11-25 Thread Sean C. Farley

On Tue, 25 Nov 2008, Tim Kientzle wrote:


Where is the announcement of this change?

I haven't downloaded the code yet, but the
sourceforge project pages all still say GPL.


It is on the SDK page:  http://www.7-zip.org/sdk.html


bf wrote:

Tim:

There is good news: Igor Pavlov, the primary author of the original
LZMA SDK, has placed the latest version, available at:

http://downloads.sourceforge.net/sevenzip/lzma461.tar.bz2

into the public domain.  It's a mix of ANSI-C and C++ code, and so it
would seem suitable for adoption into the FreeBSD source tree in some
form that could be integrated with bsdtar/libarchive.  What do you
think?  It would be *really* nice to have this, since in many ways it
is better than bzip2, and many projects have started to distribute
code in lzma-compressed tarballs.  It could help us save disk space
and network throughput, and help us with the current problems in
shoehorning releases onto as few cds as possible, etc.

*snip*

Sean
--
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: strftime's %c warning?

2008-10-08 Thread Sean C. Farley

On Wed, 8 Oct 2008, Ivan Voras wrote:


I'm trying to use the %c formatter in strftime(3), documented as:

"
%cis replaced by national representation of time and date.
"

... which looks useful, except that in code in which WFORMAT is defined
as "1" I get this error:

str.c: In function 'ltime':
str.c:141: warning: '%c' yields only last 2 digits of year in some
locales on non-BSD systems
*** Error code 1

Since the code I'm developing is definitely BSD-only (patch to pkg_*
infrastructure), should I:

a) stop using locale-based %c and choose my own date/time format
b) remove WFORMAT from the Makefile?

The same warning/error is generated by %x and %X, and %+ described in
the strftime man page isn't recognized.


You are hitting a gcc builtin.  Have you tried adding
-fno-builtin-strftime?

Sean
--
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: strange issue reading /dev/null

2008-08-07 Thread Sean C. Farley

On Thu, 7 Aug 2008, Jeremy Chadwick wrote:


On Thu, Aug 07, 2008 at 11:54:10AM -0500, Sean C. Farley wrote:

On Thu, 7 Aug 2008, Gabor Kovesdan wrote:

Sean C. Farley ha scritto:

You are testing c which has not been set.  It works OK if you set c
then do the test:

+   c = fgetc(f);
if (c != EOF)
-   printf("%c\n", fgetc(f));
+   printf("%c\n", c);

Yes, you are right, this is what I meant, I'm just a bit
disorganised
Thanks!


You are welcome.

Actually, what I found odd was that the base gcc did not warn about
using an uninitialized variable using -Wall.


Probably because you didn't use -O.  -Wall includes -Wuninitialized,
but -Wuninitialized only applies if you use optimisation.  gcc won't
bail if you use -Wall without -O, for obvious reasons.  Case in point:


You are correct; I did not use -O.


$ gcc -Wall -o x x.c
x.c: In function 'main':
x.c:14: warning: control reaches end of non-void function

$ gcc -Wuninitialized -o x x.c
cc1: warning: -Wuninitialized is not supported without -O


Heh.


$ gcc -Wall -O -o x x.c
x.c: In function 'main':
x.c:14: warning: control reaches end of non-void function
x.c:12: warning: 'c' is used uninitialized in this function

gcc -- finding new ways every day to drive programmers crazy.  :-)


Grr!  Optimization should not be a requirement for checking for
uninitialized variables.  Yes, gcc adds "fun" to development.

Sean
--
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: strange issue reading /dev/null

2008-08-07 Thread Sean C. Farley

On Thu, 7 Aug 2008, Gabor Kovesdan wrote:


Sean C. Farley ha scritto:

You are testing c which has not been set.  It works OK if you set c
then do the test:

+   c = fgetc(f);
if (c != EOF)
-   printf("%c\n", fgetc(f));
+   printf("%c\n", c);

Yes, you are right, this is what I meant, I'm just a bit
disorganised
Thanks!


You are welcome.

Actually, what I found odd was that the base gcc did not warn about
using an uninitialized variable using -Wall.

Obviously, test fopen() and fgetc() return codes correctly as others
have noted.  I just assume you were not in your test program.

Sean
--
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: strange issue reading /dev/null

2008-08-07 Thread Sean C. Farley

On Thu, 7 Aug 2008, Gabor Kovesdan wrote:


Hello,

I'm wondering why fgetc() returns 0xff if called with /dev/null:

#include 
#include 

int
main(void)
{
  int  c;
  FILE*f;

  f = fopen("/dev/null", "r");

  if (c != EOF)
  printf("%c\n", fgetc(f));
}


gcc foo.c
./a.out

ÿ

This causes a bug in BSD grep as /dev/null is not distinguished from
ordinary files in the code, thus I was expecting it just returned EOF,
but in reality this is not the case. How such cases should be handled?


You are testing c which has not been set.  It works OK if you set c then
do the test:

+   c = fgetc(f);
if (c != EOF)
-   printf("%c\n", fgetc(f));
+   printf("%c\n", c);

Sean
--
[EMAIL PROTECTED]___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Pls sanity check my semtimedop(2) implementation

2008-07-18 Thread Sean C. Farley

On Thu, 17 Jul 2008, Michael B Allen wrote:

*snip*


But I'll keep it in mind for the future. I don't recall why I chose
System V semaphores originally. I think process-shared semantics in
the POSIX implementations where not mature at the time. I would love
to move away from System V semaphores. It's all too easy to leak them
and trying to clean up on restart is dangerous.


It is my understanding that process-shared is not currently supported at
least in 7.

Does anyone know if there is any intention of this being eventually
supported?  I have needed this in the past but do not need it at the
moment.  It would be nice to have someday.

Sean
--
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: command-line bittorrent utility

2008-06-26 Thread Sean C. Farley

On Fri, 27 Jun 2008, Kris Kennaway wrote:


I am looking for a command-line utility that can fetch via bittorrent
that

a) doesn't use curses.  It must be usable in a script and without a
tty!

b) doesn't use X11.  Must be a command-line utility!

c) Must be able to inform the script when the transfer is complete.  A
callback mechanism of some kind is fine as long as it doesn't require
polling.

This is for distribution of files within a LAN and WAN: I have some
large files that I need to distribute to many machines, and pushing
them all out multiple times from the server is inefficient.


More choices:
1. /usr/ports/net-p2p/transmission
2. /usr/ports/net-p2p/transmission-daemon

Sean
--
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: CFT: BSD-licensed grep [Fwd: cvs commit: ports/textproc/bsdgrep Makefile distinfo]

2008-06-18 Thread Sean C. Farley

On Mon, 16 Jun 2008, Dag-Erling Smørgrav wrote:


Doug Barton <[EMAIL PROTECTED]> writes:

Andrey Chernov <[EMAIL PROTECTED]> writes:

Please note that BSD grep is not localized (and can't be per design)
and works only with standard C locale. It may not affect ports
system processing but shurely affects real texts handling.

That is very troubling. In this day and age localization is a
requirement. I cannot imagine being supportive of adding something to
the base that does not have this capability.


We don't have a locale-aware regex implementation.  Henry Spencer wrote
one for Tcl 8, and it seems to be under an MIT-equivalent license, but
I'm not sure how hard it would be to extirpate.  It might be easier to
lift it from PostgreSQL, which also uses it.


Other BSD-license-friendly regex libraries:
1. PCRE (http://www.pcre.org/) (has a POSIX compliant interface too)
2. Oniguruma (http://www.geocities.jp/kosako3/oniguruma/) (from Ruby)
3. Lrexlib (http://lrexlib.luaforge.net/) (no apparent POSIX interface)

Sean
--
[EMAIL PROTECTED]___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Transferring ports

2008-03-13 Thread Sean C. Farley

On Thu, 13 Mar 2008, Ivan Voras wrote:

*snip*


The details: imagine there are two or more full FreeBSD installation
trees in the file system (e.g. complete jails). The utility would
transfer (installed) packages from one tree to the other. The easy,
brute-force way would be to generate package files (tbz) from the
installed tree and then install them to the other tree, but I can't do
that because of performance and disk space reasons.


I do not know of any such scripts but a possible solution is to use
nullfs.  I personally install all needed ports into the base system and
use nullfs read-only to pull everything into the jails.  Almost
everything, files from /usr/local/etc are manually copied as needed into
each jail.  It lowers the disk usage and reduces risk due to most files
(even system) being read-only.

You just need individual /etc/fstab. files like this:

/bin/usr/local/jails//binnullfs  ro  0   0

And similar lines for these (at least all that you require):
/boot /lib /libexec /sbin /usr/bin /usr/games /usr/include /usr/lib
/usr/libdata /usr/libexec /usr/local/bin /usr/local/cyrus
/usr/local/etc/periodic /usr/local/etc/php /usr/local/etc/rc.d
/usr/local/info /usr/local/lib /usr/local/libdata /usr/local/libexec
/usr/local/man /usr/local/sbin /usr/local/share /usr/sbin /usr/share
/var/db/pkg

A basic jail runs about 9MB (mainly /etc and /usr/local/etc).  Does this
help?

Sean
--
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: BSD license compatible hash algorithm?

2007-12-28 Thread Sean C. Farley

On Fri, 28 Dec 2007, Ivan Voras wrote:


On 28/12/2007, Aryeh M. Friedman <[EMAIL PROTECTED]> wrote:


All hashs have issues with pooling see
http://www.burtleburtle.net/bob/hash/index.html...


Here's a more direct link:
http://www.burtleburtle.net/bob/hash/doobs.html

This one is much better according to
http://en.wikipedia.org/wiki/Hash_table#Choosing_a_good_hash_function


That is the "one" :) I used for a string-based key.  I used Knuth's
Multiplicative Method[1] for hashing an address along with detection of
the compilation platform (32 or 64 bits) to determine the shift.

Sean
  1. http://www.concentric.net/~Ttwang/tech/addrhash.htm
--
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Linux executable picks up FreeBSD library over linux one and breaks

2007-12-03 Thread Sean C. Farley

On Sat, 1 Dec 2007, Greg Troxel wrote:


I had a Linux shared library problem on NetBSD that I think it might
be helpful to mention.

thunderbird (and firefox) set LD_LIBRARY_PATH to pick up their own
modules.  When acroread is invoked to display a pdf attachment,
LD_LIBRARY_PATH is still set, and this causes acroread to read a BSD
library.  My workaround is to use a script for acroread that cleans
the environment.

I think this is a thunderbird bug; the environment of invoked programs
should match the environment as of thunderbird's invocation.


I had to make a change[1] to the Linux UT99 binary during install to
stop it from attempting to use FreeBSD's libGL.so due to its hard-coding
of LD_LIBRARY_PATH.  It may be evil, but it worked.  :)

Once my system's SATA DVD drive works with RELENG_7, I will try to see
if I can fix linux-nwnclient.  Skype may have the same "solution".

Mike, I Cc'd you to see if you can try using sed like I did in the
linux-ut port to "fix" nwmain.  Using strings, you can see if
/usr/local/lib is hard-coded into the binary and replace it with an
equal length string that does not point to anything.

Sean
  1. 
http://www.freebsd.org/cgi/cvsweb.cgi/ports/games/linux-ut/Makefile.diff?r1=1.5;r2=1.6
--
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Australian cvs repository

2007-08-17 Thread Sean C. Farley

On Fri, 17 Aug 2007, Dag-Erling Smørgrav wrote:


"Sean C. Farley" <[EMAIL PROTECTED]> writes:

On Fri, 17 Aug 2007, Dave Horsfall wrote:

Has anyone noted that the Australian cvs repository seems to be so
hopelessly out of sink that you cannot do a clean build using a
clean cvsup.

Because we are so far away it is hard to keep things sinkronized.

We really need to plug those holes.

sinkholes?

Well, everyone knows that the water rotates the opposite way
down-under, so this could explain the blockage.

They could use more fiber for that blockage.

Bran muffin anyone?


I was thinking the optical kind of fiber.  :)

Sean
--
[EMAIL PROTECTED]___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Australian cvs repository

2007-08-17 Thread Sean C. Farley

On Fri, 17 Aug 2007, Dave Horsfall wrote:


Has anyone noted that the Australian cvs repository seems to be so
hopelessly out of sink that you cannot do a clean build using a
clean cvsup.

Because we are so far away it is hard to keep things sinkronized.

We really need to plug those holes.

sinkholes?


Well, everyone knows that the water rotates the opposite way
down-under, so this could explain the blockage.


They could use more fiber for that blockage.

Sean
--
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Setting up development environment

2007-07-16 Thread Sean C. Farley

On Mon, 16 Jul 2007, Tom Evans wrote:


On Wed, 2007-05-30 at 08:21 +0200, Dag-Erling Smørgrav wrote:
...

Emacs setup (for both C and C++):

(defun des-knf ()
  (interactive)

  ;; Basic indent is 8 spaces
  (make-local-variable 'c-basic-offset)
  (setq c-basic-offset 8)

  ;; Continuation lines are indented 4 spaces
  (make-local-variable 'c-offsets-alist)
  (c-set-offset 'arglist-cont 4)
  (c-set-offset 'arglist-cont-nonempty 4)
  (c-set-offset 'statement-cont 4)

  ;; Labels are flush to the left
  (c-set-offset 'label [0])

  ;; Fill column
  (make-local-variable 'fill-column)
  (setq fill-column 74))

(add-hook 'c-mode-common-hook 'des-knf)

As for how to cross-build, read build(7).

DES


Before I start translating this/style(9), does anyone already have an
equivalent for vim?


I have not made a proper indent file out of this, but this is what I
use.  Before I work on BSD code I just run :call FreeBSD_Style().  The
IgnoreParenIndent() function is needed to avoid vim's built-in cindent
code when it comes to line-continuation after a parentheses.  Better
solutions are welcome.

-

set nocompatible
set autoindent

" Let vim determine the file type to be edited.
"filetype plugin indent on

" Ignore indents caused by parentheses in FreeBSD style.
fun! IgnoreParenIndent()
let indent = cindent(v:lnum)

if indent > 4000
if cindent(v:lnum - 1) > 4000
return indent(v:lnum - 1)
else
return indent(v:lnum - 1) + 4
endif
else
return (indent)
endif
endfun

" Conform to style(9).
fun! FreeBSD_Style()
setlocal cindent
setlocal formatoptions=clnoqrt
setlocal textwidth=80

setlocal indentexpr=IgnoreParenIndent()
setlocal indentkeys=0{,0},0),:,0#,!^F,o,O,e

setlocal cinoptions=(4200,u4200,+0.5s,*500,t0,U4200
setlocal shiftwidth=8
setlocal tabstop=8
setlocal noexpandtab
endfun

-

Sean
--
[EMAIL PROTECTED]___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: FBSD 5.5 and software timers

2006-07-28 Thread Sean C. Farley

On Fri, 28 Jul 2006, M. Warner Losh wrote:


In message: <[EMAIL PROTECTED]>
   "Michael Scheidell" <[EMAIL PROTECTED]> writes:
: > -Original Message-
: > From: M. Warner Losh [mailto:[EMAIL PROTECTED]
: > Sent: Thursday, July 27, 2006 9:39 PM
: > To: Michael Scheidell
: > Cc: freebsd-hackers@freebsd.org
: > Subject: Re: FBSD 5.5 and software timers
:





: I am going to try to nail down just what and why this happens and
: post that.
: (reminder: even if this change happened in 3.4, it didn't affect me
: till 5.5)

It might be useful to find the change.


There was a fix for an issue I had with nanosleep() in the past
(gnu/77818[1]) that might be related.  It went into 5.4-STABLE.

Sean
  1. http://www.freebsd.org/cgi/query-pr.cgi?pr=gnu/77818
--
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"