From bugmaster at FreeBSD.org Mon May 4 11:08:07 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon May 4 11:10:00 2009 Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org Message-ID: <200905041108.n44B868k098887@freefall.freebsd.org> Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/133369 standards [patch] test(1) with 3 or 4 arguments o stand/130067 standards Wrong numeric limits in system headers? o stand/129554 standards lp(1) [patch] Implement -m and -t options o stand/129524 standards FreeBSD 7.0 isnt detecting my hardrives with raid5 o stand/128546 standards ls -p does not follow symlinks o bin/125855 standards sh(1) allows for multiline, non-escaped control struct o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/123688 standards POSIX standard changes in unistd.h and grp.h o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/121568 standards [patch] ln(1): wrong "ln -s" behaviour o stand/120947 standards xsm ignores system.xsm and .xsmstartup o stand/119804 standards [patch] [locale] Invalid (long)date format in pl_PL.IS o stand/116826 standards [patch] sh support for POSIX character classes o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude p stand/107561 standards [libc] [patch] [request] Missing SUS function tcgetsid o stand/104743 standards [headers] [patch] Wrong values for _POSIX_ minimal lim o stand/100017 standards [Patch] Add fuser(1) functionality to fstat(1) o stand/96236 standards [patch] [posix] sed(1) incorrectly describes a functio o stand/96016 standards [headers] clock_getres et al should be in o stand/94729 standards [libc] fcntl() throws undocumented ENOTTY o kern/93705 standards [headers] [patch] ENODATA and EGREGIOUS (for glibc com o stand/92362 standards [headers] [patch] Missing SIGPOLL in kernel headers a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/83845 standards [libm] [patch] add log2() and log2f() support for libm o stand/82654 standards C99 long double math functions are missing o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( s stand/62858 standards malloc(0) not C99 compliant o stand/56476 standards cd9660 unicode support simple hack p stand/55112 standards glob.h, glob_t's gl_pathc should be "size_t", not "int o stand/54839 standards [pcvt] pcvt deficits o stand/54833 standards [pcvt] more pcvt deficits o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44425 standards getcwd() succeeds even if current dir has perm 000. p stand/41576 standards POSIX compliance of ln(1) o stand/39256 standards snprintf/vsnprintf aren't POSIX-conformant for strings s stand/36076 standards Implementation of POSIX fuser command o kern/27835 standards [libc] execve() doesn't conform to execve(2) spec in s a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h o stand/25777 standards [kernel] [patch] atime not updated on exec o bin/25542 standards sh(1) null char in quoted string s stand/24590 standards timezone function not compatible witn Single Unix Spec o bin/24390 standards ln(1) Replacing old dir-symlinks when using /bin/ln o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 52 problems total. From octo at verplant.org Mon May 4 11:29:19 2009 From: octo at verplant.org (Florian Forster) Date: Mon May 4 11:29:25 2009 Subject: isnan(3) not available in C99/POSIX2001 mode Message-ID: <20090504112916.GI25815@verplant.org> Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://lists.freebsd.org/pipermail/freebsd-standards/attachments/20090504/5d879f75/attachment.pgp From olli at lurza.secnetix.de Wed May 6 08:32:06 2009 From: olli at lurza.secnetix.de (Oliver Fromme) Date: Wed May 6 08:32:16 2009 Subject: Shouldn't cat(1) use the C locale? In-Reply-To: Message-ID: <200905060831.n468VcRE018431@lurza.secnetix.de> Juli Mallett wrote: > The cat manpage suggests that the infamous, non-standard -v extension > is ASCII-oriented but cat(1) these days uses isprint and pals and > calls setlocale(LC_CTYPE, ""), which for those of us with dodgy > environments (mine includes LC_ALL=en_US.UTF-8), means that "cat -v" > behaves radically-differently to the manual page describes. > > Does anyone see any reason for our extensions, etc., to work with > LC_CTYPE != C? It doesn't make a lot of sense to me. I'd like to > change it if there's not a good reason to keep it broken this way, > like: > > - setlocale(LC_CTYPE, ""); > + setlocale(LC_CTYPE, "C"); > > Thoughts, etc.? This is a difficult matter. I guess when you ask n people, you will get n different opinions. Well, here's mine ... I think this is a bug in the manual page. When cat(1) is using the current locale, that's perfectly correct behaviour in a world that is clearly moving away from ASCII, towards unicode. "Fixing" it by always using the ASCII locale would be a step backwards. Instead it is better to work on bringing all of the tools to compliance with multibyte character encodings in general, and with UTF8 in particular, which seems to be the most important unicode encoding these days (and probably UTF16, too). So I think the manual page should be fixed so it says that the -v option handles non-printing characters in the current locale, and cat needs to be fixed to handle multibyte chars correctly if the -v option is used with a UTF locale. By the way, your patch would probably be a POLA violation. I currently have LC_CTYPE=de_DE.ISO8859-15 on most of my machines (because FreeBSD's UTF support is too incomplete at the moment), and I'm occasionally using "cat -v" to look for non-printable characters in that locale. In fact I have a zsh function: "diff -u =(cat $1) =(cat -v $1)" Your patch would break that. I'm already somewhat annoyed that locale support was broken in strings(1). Some time ago, it used the current locale so I could use it on German texts with my LC_CTYPE setting. At some point in time, they probably introduced a patch similar to yours and instead provided the -e option, which does not work as expected ("-e S" is completely useless because it prints characters that are non-printable in ISO8859 locales). Since then I was forced to use cat -v for that purpose. Now you're proposing to break that, too. I hope that explains a little bit why I'm against that change. ;-) Best regards Oliver PS: If you set LC_* to a UTF locale, but your environment (i.e. tools and adat) is not UTF-compliant, breakage is expected. If you still want to keep that LC_* setting, a workaround would be to make aliases cat='LC_CTYPE=C cat' or similar for tools that seem to be broken. I also recommend *not* to set LC_ALL, but instead set LANG. The differenc is that you can override LANG, like in the above example ("LC_CTYPE=C cat"). You cannot override LC_ALL, because LC_ALL overrides everything else. See the environ(7) manual page for details. -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Gesch?ftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht M?n- chen, HRB 125758, Gesch?ftsf?hrer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "Perl will consistently give you what you want, unless what you want is consistency." -- Larry Wall From wollman at csail.mit.edu Wed May 6 16:08:31 2009 From: wollman at csail.mit.edu (Garrett Wollman) Date: Wed May 6 16:08:37 2009 Subject: Shouldn't cat(1) use the C locale? In-Reply-To: <200905060831.n468VcRE018431@lurza.secnetix.de> References: <200905060831.n468VcRE018431@lurza.secnetix.de> Message-ID: <18945.44648.875780.605560@khavrinen.csail.mit.edu> < said: > I think this is a bug in the manual page. When cat(1) is > using the current locale, that's perfectly correct behaviour > in a world that is clearly moving away from ASCII, towards > unicode. Maybe your part of the world.... > So I think the manual page should be fixed so it says that > the -v option handles non-printing characters in the current > locale, and cat needs to be fixed to handle multibyte chars > correctly if the -v option is used with a UTF locale. This is a Bad Idea. cat -v ought to work properly when the input does not consist of "characters" at all. -GAWollman From olli at lurza.secnetix.de Wed May 6 17:08:12 2009 From: olli at lurza.secnetix.de (Oliver Fromme) Date: Wed May 6 17:08:19 2009 Subject: Shouldn't cat(1) use the C locale? In-Reply-To: <18945.44648.875780.605560@khavrinen.csail.mit.edu> Message-ID: <200905061707.n46H7jqs042942@lurza.secnetix.de> Garrett Wollman wrote: > This is a Bad Idea. cat -v ought to work properly when the input does > not consist of "characters" at all. It depends on your definition of properly. For me, it already does work properly (using an ISO8859 locale). It also works properly for people using a US-ASCII (or C) locale. It does not seem to work properly for Juli who is using a multibyte UTF locale. Normally cat is agnostic of the encoding of its input data, because it is handled like binary data. But if the -v option is used, it has to actually look at the data in order to decide what is printable and what is not. This has two consequences: First, it has to know the encoding of the input, and second, it has to know what is considered "printable". The problem is that cat has no knowledge of the encoding of its input data. Strictly speaking, the locale (LC_CTYPE) specifies only the properties of the output device. Furthermore, conversion between different encodings would be beyond the scope of cat (there are other tools for this). Therefore the only reasonable thing to do is to assume that input and output use the same encoding. So, if you're working in a UTF locale and use cat to display a file to the screen, that file should be UTF-encoded or UTF-compatible (such as US-ASCII), otherwise it will look wrong, no matter if you use the -v option or not. The same is true for binary files. For example, if you have a binary with embedded ISO8859 strings that you want to display on a UTF8 terminal, then the following works: LC_CTYPE=en_US.ISO8859-1 cat -v file | recode iso8859-1..utf8 It correctly displays German Umlauts and some other characters, but escapes 8bit characters that are non-printable in the ISO8859-1 locale. If you want to filter for US-ASCII characters only, then it's even easier because UTF8 is US-ASCII-compatible, so you don't need to use recode: LC_CTYPE=C cat -v file If you don't use a multibyte locale, and if your files aren't multibyte encoded either, then you don't have any of the above problems, of course, and cat will work either way. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Gesch?ftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht M?n- chen, HRB 125758, Gesch?ftsf?hrer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell From wollman at csail.mit.edu Wed May 6 17:43:15 2009 From: wollman at csail.mit.edu (Garrett Wollman) Date: Wed May 6 17:43:21 2009 Subject: Shouldn't cat(1) use the C locale? In-Reply-To: <200905061707.n46H7jqs042942@lurza.secnetix.de> References: <18945.44648.875780.605560@khavrinen.csail.mit.edu> <200905061707.n46H7jqs042942@lurza.secnetix.de> Message-ID: <18945.52265.44038.498643@khavrinen.csail.mit.edu> < said: > Normally cat is agnostic of the encoding of its input data, > because it is handled like binary data. But if the -v > option is used, it has to actually look at the data in > order to decide what is printable and what is not. > This has two consequences: First, it has to know the > encoding of the input, and second, it has to know what > is considered "printable". I think that should be fairly obvious: the input is a stream of bytes, which may or may not encode characters in any locale. > The same is true for binary files. For example, if you have > a binary with embedded ISO8859 strings that you want to display > on a UTF8 terminal, then the following works: > LC_CTYPE=en_US.ISO8859-1 cat -v file | recode iso8859-1..utf8 > It correctly displays German Umlauts and some other characters, > but escapes 8bit characters that are non-printable in the > ISO8859-1 locale. Now try the same thing on a binary with UTF-8 strings in it. (UTF-8 at least gives you a validity constraint on possible multibyte characters, which arbitrary multibyte encodings do not necessarily provide. This mitigates the "reading frame" problem, because the first byte of an actual UTF-8 character cannot be the n'th byte of any UTF-8 character.) -GAWollman From bugmaster at FreeBSD.org Mon May 11 11:07:05 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon May 11 11:09:27 2009 Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org Message-ID: <200905111107.n4BB74qN086114@freefall.freebsd.org> Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/133369 standards [patch] test(1) with 3 or 4 arguments o stand/130067 standards Wrong numeric limits in system headers? o stand/129554 standards lp(1) [patch] Implement -m and -t options o stand/129524 standards FreeBSD 7.0 isnt detecting my hardrives with raid5 o stand/128546 standards ls -p does not follow symlinks o bin/125855 standards sh(1) allows for multiline, non-escaped control struct o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/123688 standards POSIX standard changes in unistd.h and grp.h o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/121568 standards [patch] ln(1): wrong "ln -s" behaviour o stand/120947 standards xsm ignores system.xsm and .xsmstartup o stand/119804 standards [patch] [locale] Invalid (long)date format in pl_PL.IS o stand/116826 standards [patch] sh support for POSIX character classes o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude p stand/107561 standards [libc] [patch] [request] Missing SUS function tcgetsid o stand/104743 standards [headers] [patch] Wrong values for _POSIX_ minimal lim o stand/100017 standards [Patch] Add fuser(1) functionality to fstat(1) o stand/96236 standards [patch] [posix] sed(1) incorrectly describes a functio o stand/96016 standards [headers] clock_getres et al should be in o stand/94729 standards [libc] fcntl() throws undocumented ENOTTY o kern/93705 standards [headers] [patch] ENODATA and EGREGIOUS (for glibc com o stand/92362 standards [headers] [patch] Missing SIGPOLL in kernel headers a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/83845 standards [libm] [patch] add log2() and log2f() support for libm o stand/82654 standards C99 long double math functions are missing o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( s stand/62858 standards malloc(0) not C99 compliant o stand/56476 standards cd9660 unicode support simple hack p stand/55112 standards glob.h, glob_t's gl_pathc should be "size_t", not "int o stand/54839 standards [pcvt] pcvt deficits o stand/54833 standards [pcvt] more pcvt deficits o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44425 standards getcwd() succeeds even if current dir has perm 000. p stand/41576 standards POSIX compliance of ln(1) o stand/39256 standards snprintf/vsnprintf aren't POSIX-conformant for strings s stand/36076 standards Implementation of POSIX fuser command o kern/27835 standards [libc] execve() doesn't conform to execve(2) spec in s a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h o stand/25777 standards [kernel] [patch] atime not updated on exec o bin/25542 standards sh(1) null char in quoted string s stand/24590 standards timezone function not compatible witn Single Unix Spec o bin/24390 standards ln(1) Replacing old dir-symlinks when using /bin/ln o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 52 problems total. From bugmaster at FreeBSD.org Mon May 18 11:07:02 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon May 18 11:09:34 2009 Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org Message-ID: <200905181107.n4IB70x0075814@freefall.freebsd.org> Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/133369 standards [patch] test(1) with 3 or 4 arguments o stand/130067 standards Wrong numeric limits in system headers? o stand/129554 standards lp(1) [patch] Implement -m and -t options o stand/129524 standards FreeBSD 7.0 isnt detecting my hardrives with raid5 o stand/128546 standards ls -p does not follow symlinks o bin/125855 standards sh(1) allows for multiline, non-escaped control struct o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/123688 standards POSIX standard changes in unistd.h and grp.h o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/121568 standards [patch] ln(1): wrong "ln -s" behaviour o stand/120947 standards xsm ignores system.xsm and .xsmstartup o stand/119804 standards [patch] [locale] Invalid (long)date format in pl_PL.IS o stand/116826 standards [patch] sh support for POSIX character classes o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude p stand/107561 standards [libc] [patch] [request] Missing SUS function tcgetsid o stand/104743 standards [headers] [patch] Wrong values for _POSIX_ minimal lim o stand/100017 standards [Patch] Add fuser(1) functionality to fstat(1) o stand/96236 standards [patch] [posix] sed(1) incorrectly describes a functio o stand/96016 standards [headers] clock_getres et al should be in o stand/94729 standards [libc] fcntl() throws undocumented ENOTTY o kern/93705 standards [headers] [patch] ENODATA and EGREGIOUS (for glibc com o stand/92362 standards [headers] [patch] Missing SIGPOLL in kernel headers a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/83845 standards [libm] [patch] add log2() and log2f() support for libm o stand/82654 standards C99 long double math functions are missing o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( s stand/62858 standards malloc(0) not C99 compliant o stand/56476 standards cd9660 unicode support simple hack p stand/55112 standards glob.h, glob_t's gl_pathc should be "size_t", not "int o stand/54839 standards [pcvt] pcvt deficits o stand/54833 standards [pcvt] more pcvt deficits o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44425 standards getcwd() succeeds even if current dir has perm 000. p stand/41576 standards POSIX compliance of ln(1) o stand/39256 standards snprintf/vsnprintf aren't POSIX-conformant for strings s stand/36076 standards Implementation of POSIX fuser command o kern/27835 standards [libc] execve() doesn't conform to execve(2) spec in s a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h o stand/25777 standards [kernel] [patch] atime not updated on exec o bin/25542 standards sh(1) null char in quoted string s stand/24590 standards timezone function not compatible witn Single Unix Spec o bin/24390 standards ln(1) Replacing old dir-symlinks when using /bin/ln o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 52 problems total. From gavin at FreeBSD.org Mon May 18 15:22:57 2009 From: gavin at FreeBSD.org (gavin@FreeBSD.org) Date: Mon May 18 15:23:08 2009 Subject: conf/119804: [patch] [locale] Invalid (long)date format in pl_PL.ISO8859-2.src Message-ID: <200905181522.n4IFMubp032426@freefall.freebsd.org> Synopsis: [patch] [locale] Invalid (long)date format in pl_PL.ISO8859-2.src Responsible-Changed-From-To: freebsd-standards->freebsd-i18n Responsible-Changed-By: gavin Responsible-Changed-When: Mon May 18 15:21:43 UTC 2009 Responsible-Changed-Why: This is probably better given to -i18n than -standards. http://www.freebsd.org/cgi/query-pr.cgi?pr=119804 From bugmaster at FreeBSD.org Mon May 25 11:07:06 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon May 25 11:09:57 2009 Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org Message-ID: <200905251107.n4PB71T5092970@freefall.freebsd.org> Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/133369 standards [patch] test(1) with 3 or 4 arguments o stand/130067 standards Wrong numeric limits in system headers? o stand/129554 standards lp(1) [patch] Implement -m and -t options o stand/129524 standards FreeBSD 7.0 isnt detecting my hardrives with raid5 o stand/128546 standards ls -p does not follow symlinks o bin/125855 standards sh(1) allows for multiline, non-escaped control struct o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/123688 standards POSIX standard changes in unistd.h and grp.h o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/121568 standards [patch] ln(1): wrong "ln -s" behaviour o stand/120947 standards xsm ignores system.xsm and .xsmstartup o stand/116826 standards [patch] sh support for POSIX character classes o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude p stand/107561 standards [libc] [patch] [request] Missing SUS function tcgetsid o stand/104743 standards [headers] [patch] Wrong values for _POSIX_ minimal lim o stand/100017 standards [Patch] Add fuser(1) functionality to fstat(1) o stand/96236 standards [patch] [posix] sed(1) incorrectly describes a functio o stand/96016 standards [headers] clock_getres et al should be in o stand/94729 standards [libc] fcntl() throws undocumented ENOTTY o kern/93705 standards [headers] [patch] ENODATA and EGREGIOUS (for glibc com o stand/92362 standards [headers] [patch] Missing SIGPOLL in kernel headers a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/83845 standards [libm] [patch] add log2() and log2f() support for libm o stand/82654 standards C99 long double math functions are missing o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( s stand/62858 standards malloc(0) not C99 compliant o stand/56476 standards cd9660 unicode support simple hack p stand/55112 standards glob.h, glob_t's gl_pathc should be "size_t", not "int o stand/54839 standards [pcvt] pcvt deficits o stand/54833 standards [pcvt] more pcvt deficits o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44425 standards getcwd() succeeds even if current dir has perm 000. p stand/41576 standards POSIX compliance of ln(1) o stand/39256 standards snprintf/vsnprintf aren't POSIX-conformant for strings s stand/36076 standards Implementation of POSIX fuser command o kern/27835 standards [libc] execve() doesn't conform to execve(2) spec in s a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h o stand/25777 standards [kernel] [patch] atime not updated on exec o bin/25542 standards sh(1) null char in quoted string s stand/24590 standards timezone function not compatible witn Single Unix Spec o bin/24390 standards ln(1) Replacing old dir-symlinks when using /bin/ln o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 51 problems total. From dfilter at FreeBSD.org Wed May 27 06:20:02 2009 From: dfilter at FreeBSD.org (dfilter service) Date: Wed May 27 06:20:16 2009 Subject: standards/133369: commit references a PR Message-ID: <200905270620.n4R6K2YG056442@freefall.freebsd.org> The following reply was made to PR standards/133369; it has been noted by GNATS. From: dfilter@FreeBSD.org (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: standards/133369: commit references a PR Date: Tue, 26 May 2009 22:33:20 +0000 (UTC) Author: jilles Date: Tue May 26 22:33:10 2009 New Revision: 192862 URL: http://svn.freebsd.org/changeset/base/192862 Log: Fix various cases with 3 or 4 parameters in test(1) to be POSIX compliant. More precisely, this gives precedence to an interpretation not using the '(', ')', '-a' and '-o' in their special meaning, if possible. For example, it is now safe to write [ "$a" = "$b" ] and assume it compares the two strings. The man page already says that test(1) works this way, so does not need to be changed. Interpretation of input with more parameters tries a bit harder to find a valid parse in some cases. Add various additional test cases to TEST.sh. PR: standards/133369 Approved by: ed (mentor) Modified: head/bin/test/TEST.sh head/bin/test/test.c Modified: head/bin/test/TEST.sh ============================================================================== --- head/bin/test/TEST.sh Tue May 26 22:21:53 2009 (r192861) +++ head/bin/test/TEST.sh Tue May 26 22:33:10 2009 (r192862) @@ -133,5 +133,45 @@ t 0 '"a" -a ! ""' t 1 '""' t 0 '! ""' +t 0 '!' +t 0 '\(' +t 0 '\)' + +t 1 '\( = \)' +t 0 '\( != \)' +t 0 '\( ! \)' +t 0 '\( \( \)' +t 0 '\( \) \)' +t 0 '! = !' +t 1 '! != !' +t 1 '-n = \)' +t 0 '! != \)' +t 1 '! = a' +t 0 '! != -n' +t 0 '! -c /etc/passwd' + +t 0 '! \( = \)' +t 1 '! \( != \)' +t 1 '! = = =' +t 0 '! = = \)' +t 0 '! "" -o ""' +t 1 '! "x" -o ""' +t 1 '! "" -o "x"' +t 1 '! "x" -o "x"' +t 0 '\( -f /etc/passwd \)' +t 1 '\( ! = \)' +t 0 '\( ! "" \)' +t 1 '\( ! -e \)' + +t 0 '0 -eq 0 -a -d /' +t 0 '-s = "" -o "" = ""' +t 0 '"" = "" -o -s = ""' +t 1 '-s = "" -o -s = ""' +t 0 '-z x -o x = "#" -o x = x' +t 1 '-z y -o y = "#" -o y = x' +t 0 '0 -ne 0 -o ! -f /' +t 0 '1 -ne 0 -o ! -f /etc/passwd' +t 1 '0 -ne 0 -o ! -f /etc/passwd' + echo "" echo "Syntax errors: $ERROR Failed: $FAILED" Modified: head/bin/test/test.c ============================================================================== --- head/bin/test/test.c Tue May 26 22:21:53 2009 (r192861) +++ head/bin/test/test.c Tue May 26 22:33:10 2009 (r192862) @@ -163,6 +163,7 @@ struct t_op { struct t_op const *t_wp_op; int nargc; char **t_wp; +int parenlevel; static int aexpr(enum token); static int binop(void); @@ -171,7 +172,9 @@ static int filstat(char *, enum token); static int getn(const char *); static intmax_t getq(const char *); static int intcmp(const char *, const char *); -static int isoperand(void); +static int isunopoperand(void); +static int islparenoperand(void); +static int isrparenoperand(void); static int newerf(const char *, const char *); static int nexpr(enum token); static int oexpr(enum token); @@ -205,7 +208,14 @@ main(int argc, char **argv) #endif nargc = argc; t_wp = &argv[1]; - res = !oexpr(t_lex(*t_wp)); + parenlevel = 0; + if (nargc == 4 && strcmp(*t_wp, "!") == 0) { + /* Things like ! "" -o x do not fit in the normal grammar. */ + --nargc; + ++t_wp; + res = oexpr(t_lex(*t_wp)); + } else + res = !oexpr(t_lex(*t_wp)); if (--nargc > 0) syntax(*t_wp, "unexpected operator"); @@ -268,12 +278,16 @@ primary(enum token n) if (n == EOI) return 0; /* missing expression */ if (n == LPAREN) { + parenlevel++; if ((nn = t_lex(nargc > 0 ? (--nargc, *++t_wp) : NULL)) == - RPAREN) + RPAREN) { + parenlevel--; return 0; /* missing expression */ + } res = oexpr(nn); if (t_lex(nargc > 0 ? (--nargc, *++t_wp) : NULL) != RPAREN) syntax(NULL, "closing paren expected"); + parenlevel--; return res; } if (t_wp_op && t_wp_op->op_type == UNOP) { @@ -410,8 +424,10 @@ t_lex(char *s) } while (op->op_text) { if (strcmp(s, op->op_text) == 0) { - if ((op->op_type == UNOP && isoperand()) || - (op->op_num == LPAREN && nargc == 1)) + if (((op->op_type == UNOP || op->op_type == BUNOP) + && isunopoperand()) || + (op->op_num == LPAREN && islparenoperand()) || + (op->op_num == RPAREN && isrparenoperand())) break; t_wp_op = op; return op->op_num; @@ -423,7 +439,7 @@ t_lex(char *s) } static int -isoperand(void) +isunopoperand(void) { struct t_op const *op = ops; char *s; @@ -431,19 +447,53 @@ isoperand(void) if (nargc == 1) return 1; - if (nargc == 2) - return 0; s = *(t_wp + 1); + if (nargc == 2) + return parenlevel == 1 && strcmp(s, ")") == 0; t = *(t_wp + 2); while (op->op_text) { if (strcmp(s, op->op_text) == 0) return op->op_type == BINOP && - (t[0] != ')' || t[1] != '\0'); + (parenlevel == 0 || t[0] != ')' || t[1] != '\0'); + op++; + } + return 0; +} + +static int +islparenoperand(void) +{ + struct t_op const *op = ops; + char *s; + + if (nargc == 1) + return 1; + s = *(t_wp + 1); + if (nargc == 2) + return parenlevel == 1 && strcmp(s, ")") == 0; + if (nargc != 3) + return 0; + while (op->op_text) { + if (strcmp(s, op->op_text) == 0) + return op->op_type == BINOP; op++; } return 0; } +static int +isrparenoperand(void) +{ + char *s; + + if (nargc == 1) + return 0; + s = *(t_wp + 1); + if (nargc == 2) + return parenlevel == 1 && strcmp(s, ")") == 0; + return 0; +} + /* atoi with error detection */ static int getn(const char *s) _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From dfilter at FreeBSD.org Wed May 27 06:20:04 2009 From: dfilter at FreeBSD.org (dfilter service) Date: Wed May 27 06:20:16 2009 Subject: standards/133369: commit references a PR Message-ID: <200905270620.n4R6K4JW056473@freefall.freebsd.org> The following reply was made to PR standards/133369; it has been noted by GNATS. From: dfilter@FreeBSD.org (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: standards/133369: commit references a PR Date: Tue, 26 May 2009 22:33:20 +0000 (UTC) Author: jilles Date: Tue May 26 22:33:10 2009 New Revision: 192862 URL: http://svn.freebsd.org/changeset/base/192862 Log: Fix various cases with 3 or 4 parameters in test(1) to be POSIX compliant. More precisely, this gives precedence to an interpretation not using the '(', ')', '-a' and '-o' in their special meaning, if possible. For example, it is now safe to write [ "$a" = "$b" ] and assume it compares the two strings. The man page already says that test(1) works this way, so does not need to be changed. Interpretation of input with more parameters tries a bit harder to find a valid parse in some cases. Add various additional test cases to TEST.sh. PR: standards/133369 Approved by: ed (mentor) Modified: head/bin/test/TEST.sh head/bin/test/test.c Modified: head/bin/test/TEST.sh ============================================================================== --- head/bin/test/TEST.sh Tue May 26 22:21:53 2009 (r192861) +++ head/bin/test/TEST.sh Tue May 26 22:33:10 2009 (r192862) @@ -133,5 +133,45 @@ t 0 '"a" -a ! ""' t 1 '""' t 0 '! ""' +t 0 '!' +t 0 '\(' +t 0 '\)' + +t 1 '\( = \)' +t 0 '\( != \)' +t 0 '\( ! \)' +t 0 '\( \( \)' +t 0 '\( \) \)' +t 0 '! = !' +t 1 '! != !' +t 1 '-n = \)' +t 0 '! != \)' +t 1 '! = a' +t 0 '! != -n' +t 0 '! -c /etc/passwd' + +t 0 '! \( = \)' +t 1 '! \( != \)' +t 1 '! = = =' +t 0 '! = = \)' +t 0 '! "" -o ""' +t 1 '! "x" -o ""' +t 1 '! "" -o "x"' +t 1 '! "x" -o "x"' +t 0 '\( -f /etc/passwd \)' +t 1 '\( ! = \)' +t 0 '\( ! "" \)' +t 1 '\( ! -e \)' + +t 0 '0 -eq 0 -a -d /' +t 0 '-s = "" -o "" = ""' +t 0 '"" = "" -o -s = ""' +t 1 '-s = "" -o -s = ""' +t 0 '-z x -o x = "#" -o x = x' +t 1 '-z y -o y = "#" -o y = x' +t 0 '0 -ne 0 -o ! -f /' +t 0 '1 -ne 0 -o ! -f /etc/passwd' +t 1 '0 -ne 0 -o ! -f /etc/passwd' + echo "" echo "Syntax errors: $ERROR Failed: $FAILED" Modified: head/bin/test/test.c ============================================================================== --- head/bin/test/test.c Tue May 26 22:21:53 2009 (r192861) +++ head/bin/test/test.c Tue May 26 22:33:10 2009 (r192862) @@ -163,6 +163,7 @@ struct t_op { struct t_op const *t_wp_op; int nargc; char **t_wp; +int parenlevel; static int aexpr(enum token); static int binop(void); @@ -171,7 +172,9 @@ static int filstat(char *, enum token); static int getn(const char *); static intmax_t getq(const char *); static int intcmp(const char *, const char *); -static int isoperand(void); +static int isunopoperand(void); +static int islparenoperand(void); +static int isrparenoperand(void); static int newerf(const char *, const char *); static int nexpr(enum token); static int oexpr(enum token); @@ -205,7 +208,14 @@ main(int argc, char **argv) #endif nargc = argc; t_wp = &argv[1]; - res = !oexpr(t_lex(*t_wp)); + parenlevel = 0; + if (nargc == 4 && strcmp(*t_wp, "!") == 0) { + /* Things like ! "" -o x do not fit in the normal grammar. */ + --nargc; + ++t_wp; + res = oexpr(t_lex(*t_wp)); + } else + res = !oexpr(t_lex(*t_wp)); if (--nargc > 0) syntax(*t_wp, "unexpected operator"); @@ -268,12 +278,16 @@ primary(enum token n) if (n == EOI) return 0; /* missing expression */ if (n == LPAREN) { + parenlevel++; if ((nn = t_lex(nargc > 0 ? (--nargc, *++t_wp) : NULL)) == - RPAREN) + RPAREN) { + parenlevel--; return 0; /* missing expression */ + } res = oexpr(nn); if (t_lex(nargc > 0 ? (--nargc, *++t_wp) : NULL) != RPAREN) syntax(NULL, "closing paren expected"); + parenlevel--; return res; } if (t_wp_op && t_wp_op->op_type == UNOP) { @@ -410,8 +424,10 @@ t_lex(char *s) } while (op->op_text) { if (strcmp(s, op->op_text) == 0) { - if ((op->op_type == UNOP && isoperand()) || - (op->op_num == LPAREN && nargc == 1)) + if (((op->op_type == UNOP || op->op_type == BUNOP) + && isunopoperand()) || + (op->op_num == LPAREN && islparenoperand()) || + (op->op_num == RPAREN && isrparenoperand())) break; t_wp_op = op; return op->op_num; @@ -423,7 +439,7 @@ t_lex(char *s) } static int -isoperand(void) +isunopoperand(void) { struct t_op const *op = ops; char *s; @@ -431,19 +447,53 @@ isoperand(void) if (nargc == 1) return 1; - if (nargc == 2) - return 0; s = *(t_wp + 1); + if (nargc == 2) + return parenlevel == 1 && strcmp(s, ")") == 0; t = *(t_wp + 2); while (op->op_text) { if (strcmp(s, op->op_text) == 0) return op->op_type == BINOP && - (t[0] != ')' || t[1] != '\0'); + (parenlevel == 0 || t[0] != ')' || t[1] != '\0'); + op++; + } + return 0; +} + +static int +islparenoperand(void) +{ + struct t_op const *op = ops; + char *s; + + if (nargc == 1) + return 1; + s = *(t_wp + 1); + if (nargc == 2) + return parenlevel == 1 && strcmp(s, ")") == 0; + if (nargc != 3) + return 0; + while (op->op_text) { + if (strcmp(s, op->op_text) == 0) + return op->op_type == BINOP; op++; } return 0; } +static int +isrparenoperand(void) +{ + char *s; + + if (nargc == 1) + return 0; + s = *(t_wp + 1); + if (nargc == 2) + return parenlevel == 1 && strcmp(s, ")") == 0; + return 0; +} + /* atoi with error detection */ static int getn(const char *s) _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From jilles at FreeBSD.org Fri May 29 15:51:46 2009 From: jilles at FreeBSD.org (jilles@FreeBSD.org) Date: Fri May 29 15:51:53 2009 Subject: standards/133369: [patch] test(1) with 3 or 4 arguments Message-ID: <200905291551.n4TFpiQF024861@freefall.freebsd.org> Synopsis: [patch] test(1) with 3 or 4 arguments State-Changed-From-To: open->closed State-Changed-By: jilles State-Changed-When: Fri May 29 15:51:44 UTC 2009 State-Changed-Why: Committed, with a few additional test cases. http://www.freebsd.org/cgi/query-pr.cgi?pr=133369