Commit Graph

18 Commits

Author SHA1 Message Date
Ed Schouten
eccad22277 More -Wmissing-variable-declarations fixes.
In addition to adding missing `static' keywords:
- bin/dd: Pull in `extern.h' to guarantee consistency with source file.
- libexec/rpc.rusersd: Move shared globals into an extern.h.
- libexec/talkd: Move `debug' and `hostname' into extern.h.
- usr.bin/cksum: Put counters in extern.h, as they are used by ckdist/mtree.
- usr.bin/m4: Move `end_result' into extern.h.
- usr.sbin/services_mkdb: Move shared globals into an extern.h.
2012-10-20 10:33:15 +00:00
Baptiste Daroussin
a841e1ebe6 Synchronize with laster version of m4 from OpenBSD and NetBSD
This bring better compatibility with gnum4

Reviewed by:	cognet
Approved by:	cognet
Obtained from:	OpenBSD, NetBSD
2011-11-28 13:32:39 +00:00
Ed Schouten
1e2070ab5b Fix build of m4 with WARNS=6.
Change the parser; rename `exp' to `exponent' not to collide with exp(3).
2011-10-16 08:09:17 +00:00
Joel Dahl
da52b4caaf Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with:	imp, rwatson
2010-12-11 08:32:16 +00:00
Sean Kelly
42249c7f31 Fix m4 to properly handle bitwise operators &, ^, and |. Fix operator
precedence. Add short-circuit evaluation.

PR:		bin/60914
Reviewed by:	petef
Discussed with:	jeff, petef
2004-05-01 03:59:43 +00:00
Juli Mallett
58896115b4 When we appear to want a signed value from sizeof(), use ssize_t in the cast,
rather than int.
2002-10-30 15:50:00 +00:00
Juli Mallett
2c4acd2f49 Kill extraneous whitespace. 2002-07-15 02:15:12 +00:00
Juli Mallett
d1fea89cae Functions declared as <type> <identifier>(<nil>) should be declared as
<type> <identifier>(<void-type>) in ANSI C.
2002-07-14 02:03:23 +00:00
Juli Mallett
a1269e01b8 Rename eqrelval' which was renamed from eqrel' to quiet a shadow warning
to `op' as suggested by Bruce, as this is used to store the operator between
vl and vr.

Submitted by:	bde
2002-05-03 20:46:10 +00:00
Juli Mallett
90432ef88d Revert vendor identifiers, and #if 0 what is #if 0/#else for OpenBSD.
Add __FBSDID() properly.

Requested by:	bde, mike
2002-05-03 14:48:21 +00:00
Juli Mallett
26849aba03 Add some spurious veritcal whitespace to reduce diffs to OpenBSD. 2002-05-01 21:45:22 +00:00
Juli Mallett
bd2bfb5846 Merge local changes again, against ANSIfied m4(1). 2002-05-01 21:37:29 +00:00
Juli Mallett
ccc5b4e6f4 Crank WARNS.
Cast sizeof() to (int), as it's being compared against an int, not a size_t.
If i is changed to a size_t, it means the logic must be slightly changed later
in the flow, where --i is checked to be >= 0.  I am not sure I want to make a
logic change to account for clearing up a warning, when an aesthetic one will
keep from modifying the logic.

Other harmless casts, that I think I've made in the right directions.

Make gpbc() an inline function, rather than an obfuscated macro, make its
scratch space local, rather than global.  The previous macro used a dirty
hack (logical AND in place of a conditional) which would lead GCC to throw
a fit (rightly so) as the logical check, as well as the incrementation of
a variable, were not used for anything.

const'ify a few places where gcc3 yells. xstrdup() some global consts in
places where we xstrdup() when not using consts, but tried to assign them
to non-consts before.

Don't use execv(2) if we don't have the kind of arguments it wants.

Reviewed by:    asmodai obrien tjr
Submitted by:   tjr (a gcc3 build log)
2002-04-20 01:49:10 +00:00
Juli Mallett
acc9d40838 Bring OpenBSD m4(1) off of the OPENBSD vendor branch, and add the -s option,
$FreeBSD$ identifiers, and fix initialisation to stderr to happen in a function
as stderr is not the same in CURRENT as in OpenBSD.

Reviewed by:	obrien
2002-04-19 17:26:21 +00:00
Warner Losh
d3cb5ded92 remove __P 2002-03-22 01:33:25 +00:00
Rodney W. Grimes
7799f52a32 Remove trailing whitespace. 1995-05-30 06:41:30 +00:00
Andrey A. Chernov
cac6992aca 1) kill temp diver upon exit
2) add logical ops, fix ! precedence, implement unary +, fix exp
Obtained from: NetBSD
1995-04-16 23:31:35 +00:00
Rodney W. Grimes
9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00