With occasional exceptions, utility programs and libraries for GNU should be upward compatible with those in Berkeley Unix, and upward compatible with ANSI C if ANSI C specifies their behavior, and upward compatible with POSIX if POSIX specifies their behavior.
When these standards conflict, it is useful to offer compatibility modes for each of them.
ANSI C and POSIX prohibit many kinds of extensions. Feel free to make the extensions anyway, and include a `--ansi', `--posix', or `--compatible' option to turn them off. However, if the extension has a significant chance of breaking any real programs or scripts, then it is not really upward compatible. Try to redesign its interface.
Many GNU programs suppress extensions that conflict with POSIX if the
POSIXLY_CORRECT is defined (even if it is
defined with a null value). Please make your program recognize this
variable if appropriate.
When a feature is used only by users (not by programs or command
files), and it is done poorly in Unix, feel free to replace it
completely with something totally different and better. (For example,
vi is replaced with Emacs.) But it is nice to offer a compatible
feature as well. (There is a free
vi clone, so we offer it.)
Additional useful features not in Berkeley Unix are welcome.
Go to the first, previous, next, last section, table of contents.