Question about lseek/fseek

2011-07-02 Thread Martin Möller
Hi Hackers, why does these function allow seeking beyond the EOF of a file in O_RDONLY/²rb² mode ? How does these function then signal the EOF correctly ? Seeking beyond the EOF makes sense for me in write-mode but not in read-only mode ! With Regards, Martin

[PATCH] build config(8) on GNU systems

2011-07-02 Thread Robert Millan
Hi! Please consider this small patch to make config(8) buildable on GNU systems. Thanks -- Robert Millan Index: usr.sbin/config/main.c === --- usr.sbin/config/main.c (revision 223721) +++ usr.sbin/config/main.c (working c

[PATCH] Remove -nostdinc in aicasm

2011-07-02 Thread Robert Millan
The userland aicasm utility in sys/dev/aic7xxx/aicasm/Makefile is being built with "-nostdinc -I/usr/include" options. Unfortunately this breaks building aicasm on systems using the upstream version of GCC, where "-nostdinc" disables more search directories than are enabled by "-I/usr/include". T

[PATCH] bogus use of __linux__ in aicasm

2011-07-02 Thread Robert Millan
Code in sys/dev/aic7xxx/aicasm/ contains a few checks on the __linux__ macro that actually break build on GNU systems (including Linux-based ones but also GNU/kFreeBSD). Some of them use __linux__ to include an alternate version of that would be placed in "../queue.h". However that file isn't pr

Re: [PATCH] Remove -nostdinc in aicasm

2011-07-02 Thread Benjamin Kaduk
On Sat, 2 Jul 2011, Robert Millan wrote: The userland aicasm utility in sys/dev/aic7xxx/aicasm/Makefile is being built with "-nostdinc -I/usr/include" options. Unfortunately this breaks building aicasm on systems using the upstream version of GCC, where "-nostdinc" disables more search director

[PATCH] __FreeBSD_kernel__

2011-07-02 Thread Robert Millan
Since their inception, GNU/kFreeBSD systems had defined "__FreeBSD_kernel__" as builtin macro to indicate this is a system that uses the kernel of FreeBSD. We couldn't define "__FreeBSD__" because this implies a full FreeBSD system, and a lot of software checks for this macro when it is concerned

Re: [PATCH] Remove -nostdinc in aicasm

2011-07-02 Thread Robert Millan
2011/7/2 Benjamin Kaduk : > There is a functional difference between '-nostdinc -I/usr/include -I.' even > when the standard include search path is just /usr/include -- the standard > include paths are always searched last (unless -nostdinc is given), even if > they are explicitly listed on the com

Re: Question about lseek/fseek

2011-07-02 Thread Artem Belevich
On Sat, Jul 2, 2011 at 6:57 AM, Martin Möller wrote: > Hi Hackers, > > why does these function allow seeking beyond the EOF of a file in > O_RDONLY/²rb² mode ? Perhaps because the standard explicitly says that it's allowed: http://pubs.opengroup.org/onlinepubs/009695399/functions/lseek.html > Ho

Re: [PATCH] __FreeBSD_kernel__

2011-07-02 Thread Benjamin Kaduk
On Sat, 2 Jul 2011, Robert Millan wrote: My request is that FreeBSD also defines __FreeBSD_kernel__. If this happens, life would be made a bit easier on both sides, as it'd be % Index: contrib/gcc/config/freebsd-spec.h % === % --

Re: [PATCH] Remove -nostdinc in aicasm

2011-07-02 Thread Matthias Andree
Am 02.07.2011 17:25, schrieb Benjamin Kaduk: > On Sat, 2 Jul 2011, Robert Millan wrote: > >> The userland aicasm utility in sys/dev/aic7xxx/aicasm/Makefile is being >> built with "-nostdinc -I/usr/include" options. Unfortunately this breaks >> building aicasm on systems using the upstream version

Re: [PATCH] __FreeBSD_kernel__

2011-07-02 Thread Alexander Kabaev
On Sat, 2 Jul 2011 17:41:03 +0200 Robert Millan wrote: > Since their inception, GNU/kFreeBSD systems had defined > "__FreeBSD_kernel__" as builtin macro to indicate this is a system > that uses the kernel of FreeBSD. We couldn't define "__FreeBSD__" > because this implies a full FreeBSD system,

Re: [PATCH] bogus use of __linux__ in aicasm

2011-07-02 Thread Peter Jeremy
On 2011-Jul-02 17:22:15 +0200, Robert Millan wrote: >Code in sys/dev/aic7xxx/aicasm/ contains a few checks on the __linux__ >macro that actually break build on GNU systems (including Linux-based >ones but also GNU/kFreeBSD). Thanks for all the patches. I wonder if you could use send-pr to formal

Re: [PATCH] __FreeBSD_kernel__

2011-07-02 Thread Ed Maste
On Sat, Jul 02, 2011 at 07:37:24PM -0400, Alexander Kabaev wrote: > On Sat, 2 Jul 2011 17:41:03 +0200 > Robert Millan wrote: > > > My request is that FreeBSD also defines __FreeBSD_kernel__. If this > > happens, life would be made a bit easier on both sides, as it'd be > > more natural for port

Re: [PATCH] __FreeBSD_kernel__

2011-07-02 Thread Garrett Cooper
On Sat, Jul 2, 2011 at 7:08 PM, Ed Maste wrote: > On Sat, Jul 02, 2011 at 07:37:24PM -0400, Alexander Kabaev wrote: > >> On Sat, 2 Jul 2011 17:41:03 +0200 >> Robert Millan wrote: >> >> > My request is that FreeBSD also defines __FreeBSD_kernel__.  If this >> > happens, life would be made a bit ea