Commit Graph

70 Commits

Author SHA1 Message Date
mrg f8570f8a97 fix simple mis-matched function prototype and definitions.
most of these are like, eg

   void foo(int[2]);

with either of these

   void foo(int*) { ... }
   void foo(int[]) { ... }

in some cases (such as stat or utimes* calls found in our header files),
we now match standard definition from opengroup.

found by GCC 12.
2023-08-01 07:04:14 +00:00
lukem c4b7a9e794 bsd.own.mk: rename GCC_NO_* to CC_WNO_*
Rename compiler-warning-disable variables from
	GCC_NO_warning
to
	CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
2023-06-03 09:09:01 +00:00
andvar 6584ea569e fix various typos in compatibility, mainly in comments. 2021-08-09 20:49:08 +00:00
andvar bfc9dbf5d0 s/pasword/password/ 2021-08-03 20:59:20 +00:00
joerg ad164cdb07 tempstr is only used in one file, make it static 2020-04-22 23:46:02 +00:00
msaitoh b40ff30391 s/orignal/original/ 2019-12-27 10:20:01 +00:00
mrg de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
sevan 4e188220ed More K&R style prototypes missed in the previous run 2018-01-23 21:27:20 +00:00
sevan 421949a31f ansify - drop the K&R style prototypes & implementations. 2018-01-23 21:06:24 +00:00
apb 34bb1ddc72 Add a statuslen argument to get_pr_status(), and use it
as the length in a call to strlcpy().  The previous code would
have used the size of a pointer as the length.
2014-03-29 18:54:36 +00:00
christos 6e404ef791 Add extra rpcgen flags. 2013-12-15 06:10:33 +00:00
christos 1f16d7465e include the headers that you need. 2012-11-04 22:26:04 +00:00
joerg 9edf9a0457 Remove many HAVE_GCC || HAVE_PCC conditionals as the options also apply
to Clang. Add a few cases of HAVE_LLVM for -fno-strict-aliasing.
2012-08-10 12:10:27 +00:00
joerg 02eb62396f Simplify 2011-10-07 10:46:29 +00:00
plunky acae68523e reinstate NULL cast by request, where the NULL was being passed as a vararg 2011-09-01 07:18:50 +00:00
plunky 9f61b80465 NULL does not need a cast 2011-08-31 16:24:54 +00:00
mbalmer 0813ba11d0 Fix some typos. 2011-08-16 14:29:16 +00:00
mrg 75e42fa7da remove most of the remaining HAVE_GCC tests that are always true in
the modern world.
2011-06-20 07:43:56 +00:00
wiz ff17b1fa3b Use pclose() after popen(). Found by cppcheck. 2011-01-04 10:05:55 +00:00
drochner 5fbc003349 ANSIfy partially 2009-11-17 18:37:45 +00:00
wiz 96f565924e Fix parenthesis problem in ifdef SVR4 code.
From Henning Petersen in PR 41839.
2009-08-07 13:55:22 +00:00
lukem 0466bbb6dd Fix -Wshadow and -Wcast-qual issues 2009-04-18 13:02:36 +00:00
dholland b0188b51ef Refine previous: can put the main -> mymain thing in the .x file, which is
both tidier and also doesn't break update builds.
2008-09-30 06:25:22 +00:00
dholland fe23e175c3 Enable the code that reads /etc/pcnfsd.conf. It was disabled because
rpcgen offers no mechanism to call it from the rpcgen-created main().
So, use the preprocessor to rename that mymain() and provide another
main() that loads the config file first.

PR bin/12758.
2008-09-30 05:20:42 +00:00
reed 12f08b06b6 Fix the Title of manual page so it our official name (rpc.pcnfsd).
Install so first file installed matches this correct manual page
name.

(Both manual pages are still installed. And only rpc.pcnfsd binary is
installed. So no change.)
2008-09-27 04:47:01 +00:00
gmcgarry 3c9a95916d Wrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags for PCC. 2008-08-29 00:02:21 +00:00
mrg aadd7d4847 sprinkle some -fno-strict-aliasing and -Wno-pointer-sign with GCC4. 2006-05-11 23:16:28 +00:00
dsl c4670c4ec7 Add (unsigned char) cast to ctype functions 2004-10-30 15:28:45 +00:00
grant cacf2d0f45 s/netbsd.org/NetBSD.org/i 2003-11-12 13:31:07 +00:00
lukem a93ea220fc Rework how dependency generation is performed:
* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
  This is a change of behaviour.  If a Makefile wants the clean semantics
  it must specifically append to CLEANFILES.
  Resolves PR toolchain/5204.

* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
  that have a suffix of: .c .m .s .S .C .cc .cpp .cxx

* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES

* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d  depend upon ${DPSRCS}

* Deprecate the (short lived) DEPENDSRCS


Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.

Tested with "make -j 8 distribution" and "make distribution".
2003-08-01 17:03:41 +00:00
lukem 87b1d00a0c remove unnecessary dependency now that bsd.rpc.mk adds to DPSRCS 2003-07-29 02:48:47 +00:00
lukem eb51573bd7 Use ${DEPENDSRCS} as a target instead of .depend, now that
<bsd.dep.mk> builds .depend from .dep files.
2003-07-28 15:25:02 +00:00
itojun 5d573dd9ce use bounded string op 2003-07-16 08:22:01 +00:00
lukem 001c68bd94 Rename a large chunk of the make(1) variables which refer to a
program/tool from "FOO" to "TOOL_FOO".  The new variables are:
	TOOL_ASN1_COMPILE  TOOL_CAP_MKDB  TOOL_CAT  TOOL_CKSUM  TOOL_COMPILE_ET
	TOOL_CONFIG  TOOL_CRUNCHGEN  TOOL_CTAGS  TOOL_DB  TOOL_EQN  TOOL_FGEN
	TOOL_GENCAT  TOOL_GROFF  TOOL_HEXDUMP  TOOL_INDXBIB  TOOL_INSTALLBOOT
	TOOL_INSTALL_INFO  TOOL_M4  TOOL_MAKEFS  TOOL_MAKEINFO  TOOL_MAKEWHATIS
	TOOL_MDSETIMAGE  TOOL_MENUC  TOOL_MKCSMAPPER  TOOL_MKESDB
	TOOL_MKLOCALE  TOOL_MKMAGIC  TOOL_MKTEMP  TOOL_MSGC  TOOL_MTREE
	TOOL_PAX  TOOL_PIC  TOOL_PREPMKBOOTIMAGE  TOOL_PWD_MKDB  TOOL_REFER
	TOOL_ROFF_ASCII  TOOL_ROFF_DVI  TOOL_ROFF_HTML  TOOL_ROFF_PS
	TOOL_ROFF_RAW  TOOL_RPCGEN  TOOL_SOELIM  TOOL_SUNLABEL  TOOL_TBL
	TOOL_UUDECODE  TOOL_VGRIND  TOOL_ZIC

For each, provide default in <bsd.sys.mk> of the form:
	TOOL_FOO?=	foo
and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override:
	TOOL_FOO=	${TOOLDIR}/bin/${_TOOL_PREFIX}foo

Document all of these in bsd.README.

This cleans up a chunk of potential (and actual) namespace collision
within our build infrastructure, as well as improves consistency in
the share/mk documentation and provision of appropriate defaults for
each of these variables.
2003-07-10 10:33:58 +00:00
simonb 276fd1665c The Double-Semi-Colon Police. 2003-01-20 05:29:53 +00:00
sommerfeld 8f6f405641 Use <bsd.rpc.mk> 2003-01-05 19:24:06 +00:00
petrov 664489a4cb follow-up rpcgen changes. 2002-10-31 08:39:13 +00:00
wiz b1c7ac0e6d "definitions" has lots of 'i's, but that's not reason to leave one out. 2002-09-29 23:23:56 +00:00
lukem c52b93f508 minor makefile delint 2002-09-18 13:31:52 +00:00
thorpej 3b1c84c6b5 Resolve rpcgen's path in a way that works with other shells. 2002-09-14 05:35:13 +00:00
christos c9bffd0130 fix argument order. 2002-08-02 14:06:07 +00:00
christos bdb7464e61 oops reversed argument order. 2002-08-02 02:49:27 +00:00
christos 1bf7077704 welcome to the 20th century; use logwtmp{,x}; don't write to /var/adm/wtmp! 2002-08-02 02:47:58 +00:00
thorpej 9c33b55e7c Split the notion of building Hesiod, Kerberos, S/key, and YP
infrastructure and using that infrastructure in programs.

	* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
	  of the infratsructure (libraries, support programs, etc.)

	* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
	  building of support for using the corresponding API
	  in various libraries/programs that can use it.

As discussed on tech-toolchain.
2002-03-22 18:10:19 +00:00
wiz a2d753e3ef Whitespace nits. 2002-01-19 11:44:57 +00:00
tv 8e6f7afb5b MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
enami 62589880a5 No need to invoke extra shell. 2001-02-16 01:05:32 +00:00
enami 5d315aaaf9 Run make in compat mode while evaluating rhs of != op. 2001-02-16 01:01:39 +00:00
cgd c338834cd9 use expr to do subtraction. shell math isn't as portable. 2001-01-16 02:42:39 +00:00
erh 5303e70da5 Make targets which are generated with rpcgen depend on the rpcgen binary. 2000-09-10 23:21:49 +00:00