tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[PATCH] C99: implement c99 wrapper script (updated)
Implement /usr/bin/c99 script as wrapper for cc to run in C99 compatible mode.
---
distrib/sets/descrs | 6 +-
distrib/sets/lists/comp/mi | 4 +
distrib/syspkg/sets/comp/comp-c-bin/DESCR | 2 +-
distrib/syspkg/sets/comp/comp-c-catman/DESCR | 2 +-
distrib/syspkg/sets/comp/comp-c-man/DESCR | 2 +-
gnu/usr.bin/c99/Makefile | 10 +++
gnu/usr.bin/c99/c99.1 | 80 ++++++++++++++++++++++++++
gnu/usr.bin/c99/c99.sh | 26 +
8 files changed, 102 insertions(+), 6 deletions(-)
create mode 100644 gnu/usr.bin/c99/Makefile
create mode 100644 gnu/usr.bin/c99/c99.1
create mode 100644 gnu/usr.bin/c99/c99.sh
diff --git a/distrib/sets/descrs b/distrib/sets/descrs
index c264f9d..6f5b4e8 100644
--- a/distrib/sets/descrs
+++ b/distrib/sets/descrs
@@ -199,7 +199,7 @@ base-util_locale-sv Swedish language support for standard
utilities
base-vfs-lkm loadable kernel modules for filesystems
comp-c-bin
comp-c-bin This package includes compilers and tools for the C programming
language:
-comp-c-bin c89, cc, gcc - C compilers
+comp-c-bin c89, c99, cc, gcc - C compilers
comp-c-bin flex, lex - lexical analyzer generator
comp-c-bin lint - C program validator
comp-c-bin rpcgen - RPC stub generator
@@ -209,7 +209,7 @@ comp-c-catman
comp-c-catman
comp-c-catman
comp-c-catman
-comp-c-catman c89, cc, gcc - C compilers
+comp-c-catman c89, c99, cc, gcc - C compilers
comp-c-catman flex, lex - lexical analyzer generator
comp-c-catman lint - C program validator
comp-c-catman rpcgen - RPC stub generator
@@ -229,7 +229,7 @@ comp-c-man
comp-c-man
comp-c-man
comp-c-man
-comp-c-man c89, cc, gcc - C compilers
+comp-c-man c89, c99, cc, gcc - C compilers
comp-c-man flex, lex - lexical analyzer generator
comp-c-man lint - C program validator
comp-c-man rpcgen - RPC stub generator
diff --git a/distrib/sets/lists/comp/mi b/distrib/sets/lists/comp/mi
index 964f451..16c975d 100644
--- a/distrib/sets/lists/comp/mi
+++ b/distrib/sets/lists/comp/mi
@@ -11,6 +11,7 @@
./usr/bin/c++ comp-cxx-bin gcccmds
./usr/bin/c++filt comp-cxx-bin bfd
./usr/bin/c89 comp-c-bin
+./usr/bin/c99 comp-c-bin
./usr/bin/cc comp-c-bin gcccmds
./usr/bin/config comp-util-bin
./usr/bin/crunchgen comp-c-bin
@@ -3693,6 +3694,7 @@
./usr/share/man/cat1/c++.0 comp-cxx-catman
gcccmds,.cat
./usr/share/man/cat1/c++filt.0 comp-cxx-catman bfd,.cat
./usr/share/man/cat1/c89.0 comp-c-catman .cat
+./usr/share/man/cat1/c99.0 comp-c-catman .cat
./usr/share/man/cat1/cc.0 comp-c-catman
gcccmds,.cat
./usr/share/man/cat1/cccp.0 comp-util-catman
gcccmds,.cat
./usr/share/man/cat1/config.0 comp-util-catman .cat
@@ -9082,6 +9084,7 @@
./usr/share/man/html1/c++.html comp-cxx-htmlman
gcccmds,html
./usr/share/man/html1/c++filt.html comp-cxx-htmlman bfd,html
./usr/share/man/html1/c89.html comp-c-htmlman html
+./usr/share/man/html1/c99.html comp-c-htmlman html
./usr/share/man/html1/cc.html comp-c-htmlman
gcccmds,html
./usr/share/man/html1/cccp.html comp-util-htmlman
gcccmds,html
./usr/share/man/html1/config.html comp-util-htmlman html
@@ -14202,6 +14205,7 @@
./usr/share/man/man1/c++.1 comp-cxx-man
gcccmds,.man
./usr/share/man/man1/c++filt.1 comp-cxx-man bfd,.man
./usr/share/man/man1/c89.1 comp-c-man .man
+./usr/share/man/man1/c99.1 comp-c-man .man
./usr/share/man/man1/cc.1 comp-c-man
gcccmds,.man
./usr/share/man/man1/cccp.1 comp-util-man
gcccmds,.man
./usr/share/man/man1/config.1 comp-util-man .man
diff --git a/distrib/syspkg/sets/comp/comp-c-bin/DESCR
b/distrib/syspkg/sets/comp/comp-c-bin/DESCR
index 1c53a89..680bb16 100644
--- a/distrib/syspkg/sets/comp/comp-c-bin/DESCR
+++ b/distrib/syspkg/sets/comp/comp-c-bin/DESCR
@@ -1,6 +1,6 @@
This package includes compilers and tools for the C programming language:
-c89, cc, gcc - C compilers
+c89, c99, cc, gcc - C compilers
flex, lex - lexical analyzer generator
lint - C program validator
rpcgen - RPC stub generator
diff --git a/distrib/syspkg/sets/comp/comp-c-catman/DESCR
b/distrib/syspkg/sets/comp/comp-c-catman/DESCR
index be0155e..c77e0fd 100644
--- a/distrib/syspkg/sets/comp/comp-c-catman/DESCR
+++ b/distrib/syspkg/sets/comp/comp-c-catman/DESCR
@@ -1,7 +1,7 @@
This package includes formatted manual pages for compilers and tools for
the C programming language:
- c89, cc, gcc - C compilers
+ c89, c99, cc, gcc - C compilers
flex, lex - lexical analyzer generator
diff --git a/distrib/syspkg/sets/comp/comp-c-man/DESCR
b/distrib/syspkg/sets/comp/comp-c-man/DESCR
index 961818b..09dd006 100644
--- a/distrib/syspkg/sets/comp/comp-c-man/DESCR
+++ b/distrib/syspkg/sets/comp/comp-c-man/DESCR
@@ -1,7 +1,7 @@
This package includes the manual pages sources for compilers and tools
for the C programming language:
- c89, cc, gcc - C compilers
+ c89, c99, cc, gcc - C compilers
flex, lex - lexical analyzer generator
diff --git a/gnu/usr.bin/c99/Makefile b/gnu/usr.bin/c99/Makefile
new file mode 100644
index 0000000..3b742ed
--- /dev/null
+++ b/gnu/usr.bin/c99/Makefile
@@ -0,0 +1,10 @@
+# $NetBSD$
+
+FILES= c99.sh
+FILESNAME= c99
+FILESDIR= /usr/bin
+FILESMODE= ${BINMODE}
+
+MAN= c99.1
+
+.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/c99/c99.1 b/gnu/usr.bin/c99/c99.1
new file mode 100644
index 0000000..0df6463
--- /dev/null
+++ b/gnu/usr.bin/c99/c99.1
@@ -0,0 +1,80 @@
+.\" $NetBSD$
+.\"
+.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd January 5, 1999
+.Dt C99 1
+.Os
+.Sh NAME
+.Nm c99
+.Nd ANSI (1999) C compiler
+.Sh SYNOPSIS
+.Nm
+.Op Fl pedantic
+.Op Fl pedantic-errors
+.Op Fl D_ANSI_SOURCE
+.Op options ...
+.Sh DESCRIPTION
+Calls the C compiler (cc) with the given
+.Ar options ,
+using a C language environment compatible with the
+.St -ansiC
+specification.
+.Pp
+This includes proper handling of trigraphs,
+disabling non-ANSI compiler features (such as
+.Ar asm ,
+.Ar inline ,
+.Ar typeof ,
+and the $ character in identifiers),
+and definition of the preprocessor symbol
+.Ev __STRICT_ANSI__ .
+.Pp
+The following options are available:
+.Bl -tag -width -pedantic-errorsxx
+.It Fl pedantic
+Issue extra warnings defined by ANSI for use of non-ANSI features.
+.It Fl pedantic-errors
+Issue errors instead of warnings that normally would be presented by
+.Fl pedantic .
+.It Fl D_ANSI_SOURCE
+Tell the system header file set to use an ANSI-conformant "clean" namespace.
+.El
+.Sh SEE ALSO
+.Xr cc 1
+.Sh STANDARDS
+.Nm
+conforms to
+.St -p1003.2-92 .
+.Sh HISTORY
+.Nm
+appeared in
+.Nx 1.4 .
+.Sh BUGS
+Since
+.Nm
+is a shell wrapper script to
+.Ar cc ,
+compile errors are prefixed by "cc:".
diff --git a/gnu/usr.bin/c99/c99.sh b/gnu/usr.bin/c99/c99.sh
new file mode 100644
index 0000000..a301f09
--- /dev/null
+++ b/gnu/usr.bin/c99/c99.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/cc -std=c99 ${1+"$@"}
--
1.5.2.5
Home |
Main Index |
Thread Index |
Old Index