'diff != 0' GNU Mach assertion failure

2012-11-19 Thread Thomas Schwinge
Hi! As discussed on IRC already, the 'diff != 0' GNU Mach assertion failure (vm/vm_map.c:1002), that came in with the recent allocator improvement patch, is as easy as follows to reproduce: vm_map(mach_task_self(), 0, 0, 0, 1, 0, 0, 0, 0, 0, 0); Before that patch, GNU Mach accepted such a

[PATCH] Fix compilation error with older versions of gcc

2012-11-19 Thread Matthew Leach
Some versions of gcc will error if you define a type twice (even if the definition is the same). The ncr53c8xx scsi driver defines 'vm_offset_t', this is also defined in mach_types.h and will therefore cause a compilation error depending on the gcc version. * linux/src/drivers/scsi/ncr53c8xx.c:

Re: [PATCH] Fix compilation error with older versions of gcc

2012-11-19 Thread Thomas Schwinge
Hi! Welcome Matthew to GNU Hurd development! :-) On Mon, 19 Nov 2012 15:02:52 +, Matthew Leach matt...@mattleach.net wrote: Some versions of gcc will error if you define a type twice (even if the definition is the same). The ncr53c8xx scsi driver defines 'vm_offset_t', this is also

Re: [PATCH,HURD] implement syncfs

2012-11-19 Thread Roland McGrath
The top line of every new file is a descriptive comment. You don't need #include errno.h in that file.

[PATCH,HURD] implement syncfs

2012-11-19 Thread Pino Toscano
Hi, simple implementation of the Linux-ish syncfs on Hurd. Thanks, -- Pino Toscano Hurd: implement syncfs 2012-11-19 Pino Toscano toscano.p...@tiscali.it * sysdeps/mach/hurd/syncfs.c: New file. --- /dev/null +++ b/sysdeps/mach/hurd/syncfs.c @@ -0,0 +1,33 @@ +/* Copyright (C) 2012 Free

Re: [PATCH,HURD] implement syncfs

2012-11-19 Thread Roland McGrath
+/* Make all changes done to all files on the file system associated + with FD actually appear on disk. */ +int +syncfs (int fd) +{ + /* This is not actually synchronous; we don't wait. */ + error_t err = HURD_DPORT_USE (fd, __file_syncfs (port, 0, 0)); Note that syncfs in

Re: [PATCH] simplify ulimit implementation

2012-11-19 Thread Roland McGrath
sysdeps/posix is appropriate because it's implemented in terms of POSIX interfaces. It's bad to lose any functionality, though __UL_GETMAXBRK actually being used seems a bit unlikely. But it's easy enough to add it. So I'd do: First commit: move file verbatim to sysdeps/posix/. Second commit:

Re: [PATCH,HURD] fix muntrace with mmap-less libio

2012-11-19 Thread Roland McGrath
That change is good but it needs a comment. You don't need to go into great detail, just say that we call fprintf+fclose after clearing the hooks to match how mtrace called fopen+fprintf before setting them. Thanks, Roland

Re: [PATCH,HURD] implement syncfs

2012-11-19 Thread Christoph Hellwig
+/* Make all changes done to all files on the file system associated + with FD actually appear on disk. */ +int +syncfs (int fd) +{ + /* This is not actually synchronous; we don't wait. */ + error_t err = HURD_DPORT_USE (fd, __file_syncfs (port, 0, 0)); Note that syncfs in Linux

Re: [PATCH] simplify ulimit implementation

2012-11-19 Thread Pino Toscano
Alle lunedì 19 novembre 2012, Roland McGrath ha scritto: sysdeps/posix is appropriate because it's implemented in terms of POSIX interfaces. OK. It's bad to lose any functionality, though __UL_GETMAXBRK actually being used seems a bit unlikely. But it's easy enough to add it. Please note

Re: [PATCH,HURD] implement syncfs

2012-11-19 Thread Pino Toscano
Hi, Alle lunedì 19 novembre 2012, Pino Toscano ha scritto: simple implementation of the Linux-ish syncfs on Hurd. Updated patch according to Roland's and Christoph's comments (thanks!) -- Pino Toscano Hurd: implement syncfs 2012-11-19 Pino Toscano toscano.p...@tiscali.it *

Re: [PATCH,HURD] implement syncfs

2012-11-19 Thread Roland McGrath
That's fine.

Re: [PATCH] simplify ulimit implementation

2012-11-19 Thread Roland McGrath
I don't think losing __UL_GETMAXBRK is really a problem. The reason for removing it was not specific to Linux, just to the implementation being in a shared library. It could be implemented in a shared library, at the cost of a GOT reloc for _etext to get the main executable's value (or

Re: [PATCH,HURD] fix muntrace with mmap-less libio

2012-11-19 Thread Pino Toscano
Alle lunedì 19 novembre 2012, Roland McGrath ha scritto: That change is good but it needs a comment. You don't need to go into great detail, just say that we call fprintf+fclose after clearing the hooks to match how mtrace called fopen+fprintf before setting them. A bit of comment added. --

Re: [PATCH,HURD] fix muntrace with mmap-less libio

2012-11-19 Thread Roland McGrath
That is fine as is, though it's preferable to use C99-style inline declarations.

Re: [PATCH,HURD] hurd: compliance fixes for ptsname_r

2012-11-19 Thread Pino Toscano
Hi, Alle venerdì 20 luglio 2012, Roland McGrath ha scritto: Ok, I see that its `buf' argument is marked nonnull. I added that check because I saw the gnulib test for it explicitly checking that ptsname_r(fd, NULL, 0) would be properly failing with EINVAL (and the man page even explicitly

Re: [PATCH,HURD] hurd: compliance fixes for ptsname_r

2012-11-19 Thread Roland McGrath
That looks fine to me.