Date: Wed, 18 Sep 2002 20:39:04 -0700 (PDT) From: Garrett Wollman <wollman@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.bin/getconf Makefile confstr.gperf fake-gperf.awk getconf.1 getconf.c getconf.h limits.gperf pathconf.gperf progenv.gperf sysconf.gperf Message-ID: <200209190339.g8J3d4Zf081121@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
wollman 2002/09/18 20:39:03 PDT Modified files: usr.bin/getconf Makefile confstr.gperf fake-gperf.awk getconf.1 getconf.c getconf.h pathconf.gperf sysconf.gperf Added files: usr.bin/getconf limits.gperf progenv.gperf Log: Completely revamp the way getconf(1) works, for better adherence to the intent of the Standard. - Make getconf able to distinguish between configuration variables which are entirely unknown and those which are merely not defined in the compilation environment. The latter now get a more appropriate "undefined\n" result rather than a diagnostic. This may not be exactly right, but it's closer to the intent of the Standard than the previous behavior. - Support ``programming environments'' by validating that the environment requested with the `-v' flag is the one-and-only execution environment. (If more environments are supported for some platforms in the future, multiple getconf(1) executables will be required, but a simple edit in progenv.gperf will enable automatic support for it.) Document POSIX standard programming environments. - Add all of the 1003.1-2001 configuration variables. FreeBSD does not support all of these (including some that are mandatory); getconf will later be fixed to break the world should a required variable not be defined. As a result of all these changes, gperf is no longer adequate. Keep the overall format and names of the files for now, to preserve revision history. Use an awk script to process the .gperf files into C source, which does a few things that gperf, as a more general tool, cannot do. The keyword recognition function is no longer a perfect hash function. This may obviate the need for gperf in the source tree. - Add a small compile-time regression test to break the build if any of the .gperf files declare conflicting token sets. (gperf itself would have done this for the simple case of duplicate tokens in the same input file.) Revision Changes Path 1.3 +27 -5 src/usr.bin/getconf/Makefile 1.4 +27 -5 src/usr.bin/getconf/confstr.gperf 1.2 +23 -12 src/usr.bin/getconf/fake-gperf.awk 1.9 +86 -19 src/usr.bin/getconf/getconf.1 1.5 +53 -23 src/usr.bin/getconf/getconf.c 1.2 +6 -3 src/usr.bin/getconf/getconf.h 1.1 +118 -0 src/usr.bin/getconf/limits.gperf (new) 1.2 +14 -13 src/usr.bin/getconf/pathconf.gperf 1.1 +67 -0 src/usr.bin/getconf/progenv.gperf (new) 1.3 +38 -111 src/usr.bin/getconf/sysconf.gperf To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209190339.g8J3d4Zf081121>