Re: [PATCH] replace hardcoded /usr/local with a variable in devd.conf to make it easier to override

2011-08-09 Thread Robert Millan
Submitted as PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=159625 2011/8/9 Robert Millan : > Hi, > > Please could you replace the hardcoded /usr/local with a variable in > devd.conf? > > This will make it easier to override this value (specially useful for > downstream di

[PATCH] replace hardcoded /usr/local with a variable in devd.conf to make it easier to override

2011-08-09 Thread Robert Millan
Hi, Please could you replace the hardcoded /usr/local with a variable in devd.conf? This will make it easier to override this value (specially useful for downstream distributors of FreeBSD code). Patch attached. -- Robert Millan Index: devd.conf

files that need as a prerequisite

2011-08-04 Thread Robert Millan
eds sys/cdefs.h as a prerequisite sys/sparc64/include/profile.h:#error this file needs sys/cdefs.h as a prerequisite sys/sparc64/include/_types.h:#error this file needs sys/cdefs.h as a prerequisite -- Robert Millan ___ freebsd-hackers@freebsd.org ma

Re: kern/159281: [PATCH] Linux-like /proc/swaps for linprocfs

2011-08-02 Thread Robert Millan
2011/7/31 Kostik Belousov : > Below is the hopefully final patch after Bruce Evans' comments incorporated. > If nobody speaks, I will send this to re tomorrow. I notice it's been committed already, and tested latest HEAD. It's working fine, thank yo

Re: kern/159281: [PATCH] Linux-like /proc/swaps for linprocfs

2011-07-31 Thread Robert Millan
pdated your patch, hopefully fixing the issues. Do you have comments > or objections ? No. Thanks for fixing those problems. -- Robert Millan ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hack

Re: kern/159281: [PATCH] Linux-like /proc/swaps for linprocfs

2011-07-29 Thread Robert Millan
ction that returns swap information by index. Here's a patch with the changes you requested. -- Robert Millan --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -502,6 +502,32 @@ return (0); } +static int +linprocfs_doswaps(PFS_FILL_ARGS) +{ + struct xswdev xsw

Re: [PATCH] Improve utf-8 -> cp437 console map

2011-07-28 Thread Robert Millan
Submitted as PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=159280 2011/7/10 Robert Millan : > This patch adds a few improvements to utf-8 -> cp436 console map > (mostly with Catalan characters in mind, but it probably benefits > other languages). > > The new mappi

Re: [PATCH] __FreeBSD_cc_version in

2011-07-28 Thread Robert Millan
Submitted as PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=159279 -- Robert Millan ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-uns

Re: [PATCH] FreeBSD compiler extensions

2011-07-28 Thread Robert Millan
Submitted as PR so that it's not forgotten: http://www.freebsd.org/cgi/query-pr.cgi?pr=159278 -- Robert Millan ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any ma

[PATCH] Linux-like /proc/swaps for linprocfs

2011-07-28 Thread Robert Millan
Please consider this patch, it implements Linux-like /proc/swaps for linprocfs. E.g. $ cat /proc/swaps FilenameTypeSizeUsedPriority /dev/zvol/dimoni/swap unknown 2097152 0 -1 -- Robert Millan --- a/sys/compat

Re: [PATCH] __FreeBSD_kernel__

2011-07-19 Thread Robert Millan
o start the clock count (as you've put it: "Once old releases of tools that can be broken by the new macro use are long and forgotten we can start on relying on said macro"). -- Robert Millan ___ freebsd-hackers@freebsd.org mailing list

Re: [PATCH] fake pre-processor macros when building on non-FreeBSD system

2011-07-13 Thread Robert Millan
n the kernel tree #endif I understand the purpose of this, but please don't tell me it has anything to do with C ABI. -- Robert Millan ___ 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: [PATCH] fake pre-processor macros when building on non-FreeBSD system

2011-07-12 Thread Robert Millan
2011/7/12 Nathan Whitehorn : > On 07/12/11 16:06, Robert Millan wrote: >> Why would one need to build a cross-compiler in order to compile >> userland-agnostic code for the same CPU architecture?  This would be >> like requiring a cross-compiler in order to build things li

Re: [PATCH] fake pre-processor macros when building on non-FreeBSD system

2011-07-12 Thread Robert Millan
ting practice. If the assumption is not correct, then I would propose a different kind of solution to the problem. So before we proceed, could you clarify whether the assumption is correct or not? -- Robert Millan ___ freebsd-hackers@freebsd.org mailing list h

Re: [PATCH] Improve LinuxThreads compatibility in rfork()

2011-07-12 Thread Robert Millan
now we will need to keep our backward-compatibility patch anyway, and when the bump happens on stable/8 our sysctl comparison will identify 900039 as new ABI. Petr is that correct? -- Robert Millan ___ freebsd-hackers@freebsd.org maili

Re: [PATCH] fake pre-processor macros when building on non-FreeBSD system

2011-07-12 Thread Robert Millan
sumption is correct most of the time, but not always so. My patch addresses some of the situations in which the assumption fails. -- Robert Millan ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hack

Re: [PATCH] fake pre-processor macros when building on non-FreeBSD system

2011-07-12 Thread Robert Millan
minimal effort. Here's a new version of the patch, which also adds -U__NetBSD__ and -U__OpenBSD__ to CFLAGS. -- Robert Millan --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -90,6 +90,14 @@ .endif WERROR?= -Werror +.if !defined(OPSYS) +OPSYS!= uname -s +.endif + +.if ${OPS

[PATCH] fake pre-processor macros when building on non-FreeBSD system

2011-07-12 Thread Robert Millan
s of FreeBSD so that non-FreeBSD systems such as GNU/Linux can build the kernel of FreeBSD too. -- Robert Millan --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -90,6 +90,14 @@ .endif WERROR?= -Werror +.if !defined(OPSYS) +OPSYS!= uname -s +.endif + +.if ${OPSYS} != "FreeBS

Re: [PATCH] Improve LinuxThreads compatibility in rfork()

2011-07-11 Thread Robert Millan
ility in userland, but if I understand correctly we do this already and our only supported upgrade path is "first upgrade kernel, then userland" anyway. -- Robert Millan ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/li

[PATCH] Improve LinuxThreads compatibility in rfork()

2011-07-11 Thread Robert Millan
had to diverge from upstream kFreeBSD ABI and implement this extension. I hope it is acceptable for you to use the same encoding, this way we would archieve ABI compatibility to run Debian GNU/kFreeBSD inside a chroot/jail on top of a FreeBSD system. Thanks for considering -- Robert Millan --- a

[PATCH] Improve utf-8 -> cp437 console map

2011-07-10 Thread Robert Millan
This patch adds a few improvements to utf-8 -> cp436 console map (mostly with Catalan characters in mind, but it probably benefits other languages). The new mappings are as follows: ▮ -> █ ÀÈÍÏÓÒÚ -> AEIIOOU ŀ / Ŀ -> l / L -- Robert Millan --- a/sys/dev/syscons/scterm-teken.c +

Re: [PATCH] avoid assuming MAXPATHLEN in config(8)

2011-07-08 Thread Robert Millan
memory corruption heisenbug. I haven't been able to determine whether my patch introduces this bug or it just uncovers it. As for now please disregard my request untill I have time to debug this properly. Thanks -- Robert Millan === modified file 'config.h' --- config.h2011

Re: [PATCH] avoid assuming MAXPATHLEN in config(8)

2011-07-07 Thread Robert Millan
2011/7/7 Ed Schouten : > * Robert Millan , 20110707 11:33: >> config(8) assumes MAXPATHLEN is defined in a few places, but presence >> of this macro isn't garanteed (POSIX says that it is only present when >> a file length limit exists, which may not be the case). >

[PATCH] avoid assuming MAXPATHLEN in config(8)

2011-07-07 Thread Robert Millan
ation. Doing so also reduces its memory footprint and safeguards against possible error conditions when zero-length pathnames are used. -- Robert Millan Index: usr.sbin/config/mkoptions.c === --- usr.sbin/config/mkoptions.c (revision 2

Re: [PATCH] __FreeBSD_kernel__

2011-07-05 Thread Robert Millan
assume is present, but I think it covers the vast majority of cases. -- Robert Millan ___ 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: [PATCH] __FreeBSD_kernel__

2011-07-05 Thread Robert Millan
s a race to update every other compiler out there to follow > the suit. There's no race, and nobody forcing it. -- Robert Millan ___ 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: [PATCH] FreeBSD compiler extensions

2011-07-05 Thread Robert Millan
format-extensions only). Thanks! -- Robert Millan ___ 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: [PATCH] __FreeBSD_cc_version in

2011-07-05 Thread Robert Millan
ver, IMHO it's better to fix the cause of the warning instead. -- Robert Millan Index: sys/conf/kern.mk === --- sys/conf/kern.mk(revision 223736) +++ sys/conf/kern.mk(working copy) @@ -5,7 +5,7 @@ # CWARNFLAGS?= -Wa

[PATCH] FreeBSD compiler extensions

2011-07-05 Thread Robert Millan
This patch conditionalizes a pair of FreeBSD compiler extensions so that its CFLAGS are only used on FreeBSD. -- Robert Millan Index: sys/conf/kern.mk === --- sys/conf/kern.mk(revision 223736) +++ sys/conf/kern.mk(working

[PATCH] __FreeBSD_cc_version in

2011-07-04 Thread Robert Millan
This patch fixes a (harmless) warning when is parsed by upstream version of GCC. -- Robert Millan Index: sys/sys/cdefs.h === --- sys/sys/cdefs.h (revision 223736) +++ sys/sys/cdefs.h (working copy) @@ -349,7 +349,7

Re: [PATCH] __FreeBSD_kernel__

2011-07-03 Thread Robert Millan
2011/7/3 Mark Linimon : > On Sun, Jul 03, 2011 at 05:47:02PM +0200, Robert Millan wrote: >> isn't it enough if support is present in the FreeBSD >> version of these compilers (for production and development releases of >> FreeBSD), plus the latest release of the u

Re: [PATCH] build config(8) on GNU systems

2011-07-03 Thread Robert Millan
t mind either way. I hope you two can agree on what's best ;-) -- Robert Millan ___ 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: [PATCH] __FreeBSD_kernel__

2011-07-03 Thread Robert Millan
2011/7/3 Robert Millan : > 2011/7/3 Alexander Kabaev : >> Not really, unless you have way of sticking this definition into past >> compiler releases. > > There is one way, but it's slow.  It basically involves waiting for > long enough that any past release o

Re: [PATCH] __FreeBSD_kernel__

2011-07-03 Thread Robert Millan
eed, before starting to use them. :-) -- Robert Millan ___ 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: [PATCH] __FreeBSD_kernel__

2011-07-03 Thread Robert Millan
_ to identify libc is a bad idea. However, it can be useful to identify a set of different C libraries (Glibc, Bionic, uclibc, etc) if they share the property you're interested in. -- Robert Millan ___ freebsd-hackers@freebsd.org mailing list http:/

Re: [PATCH] PAGE_SIZE in libsbuf

2011-07-03 Thread Robert Millan
2011/7/3 Kostik Belousov : > Which runtime errors ? The constant is used to size the malloc > allocations. Use of the PAGE_SIZE is an attempt to do some optimization. > > I think it would work if you use e.g. 42 instead of PAGE_SIZE. Never mind then. Thanks for the info. -- R

Re: [PATCH] Remove -nostdinc in aicasm

2011-07-03 Thread Robert Millan
2011/7/2 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 -nost

Re: [PATCH] PAGE_SIZE in libsbuf

2011-07-03 Thread Robert Millan
n't tested in FreeBSD (except for pc98). I'm afraid this situation could lead to runtime errors somehow. I'd still propose replacing this guess with a sysconf() check. -- Robert Millan ___ freebsd-hackers@freebsd.org mailing list http

[PATCH] PAGE_SIZE in libsbuf

2011-07-03 Thread Robert Millan
s using libsbuf not just for its GNU/kFreeBSD port, but also provides it to developers in Debian GNU/Linux: http://packages.debian.org/search?keywords=libsbuf-dev https://buildd.debian.org/status/package.php?p=freebsd-libs&suite=sid -- Robert Millan Index: s

Re: [PATCH] __FreeBSD_kernel__

2011-07-03 Thread Robert Millan
roposal be more welcome if it included a patch for Clang, Path64 and PCC as well? -- Robert Millan ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "free

Re: [PATCH] __FreeBSD_kernel__

2011-07-03 Thread Robert Millan
t ( is not in POSIX, for example) Nevermind that, it's much better than not having the macro at all. -- Robert Millan ___ 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: [PATCH] __FreeBSD_kernel__

2011-07-03 Thread Robert Millan
ies to: a) produce simpler checks like "#ifdef __GLIBC__" which are easier to read and maintain. b) collaborate with other projects by producing patches which have the collateral effect of improving portability with other operating systems. -- Robert Millan __

Re: [PATCH] __FreeBSD_kernel__

2011-07-03 Thread Robert Millan
d to compile for one kernel or another, so we wouldn't be able to "commit" it to a specific kernel version) -- Robert Millan ___ 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: [PATCH] Remove -nostdinc in aicasm

2011-07-03 Thread Robert Millan
ing to solve ( not found). -- Robert Millan ___ 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: [PATCH] Remove -nostdinc in aicasm

2011-07-02 Thread Robert Millan
> replacing '.'.) In this case I'd rather be safe than sorry and use -iwithprefix or -isystem `gcc --print-file-name=` on GCC only. What is the recommended way to check the compiler flavour and version from FreeBSD Makefiles? -- Robert Millan __

[PATCH] __FreeBSD_kernel__

2011-07-02 Thread Robert Millan
to support FreeBSD and systems with kernel of FreeBSD myself (as I did with e.g. GRUB), I generally took care to ensure both macros are checked for, but this isn't always the case. Having a unified macro would make it easier for developers of both systems to cooperate. -- Robert Millan Index

[PATCH] bogus use of __linux__ in aicasm

2011-07-02 Thread Robert Millan
tem with Glibc would provide this file. Proposing fix to use __GLIBC__ instead. Thanks [1] http://libbsd.freedesktop.org/wiki/ -- Robert Millan Index: sys/dev/aic7xxx/aicasm/aicasm.h === --- sys/dev/aic7xxx/aicasm/aicasm.h (revision

[PATCH] Remove -nostdinc in aicasm

2011-07-02 Thread Robert Millan
d by "-I/usr/include". This was introduced by obrien (CCed) in 2002, apparently to remove a warning. I've verified that removing it doesn't produce any warnings on FreeBSD 9-CURRENT environment. Please consider this patch to remove -nostdinc in that file. -- Robert Milla

[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

Re: misc/157903: automated kldload for USB class devices

2011-06-24 Thread Robert Millan
l resolved. What would be the point of keeping them in memory after devd has finished parsing the config files? -- Robert Millan ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, se

Re: misc/157903: automated kldload for USB class devices

2011-06-24 Thread Robert Millan
2011/6/24 Hans Petter Selasky : > Updated bus_auto.conf: > > http://hselasky.homeunix.org:8192/bus_auto.conf Very nice. But why not use variable names instead of hardcoding numbers? It makes the output much easier to understand. -- Robe

Re: misc/157903: automated kldload for USB class devices

2011-06-24 Thread Robert Millan
t; I don't see where you defined USB_* as variables in them either.  Maybe you > could point me at it? Autogenerated from usbdevs, see: # USB vendor ids and product ids. usb_ids.conf: genusbdevs.sh ../../sys/dev/usb/usbdevs sh genusbdev