Commit Graph

30 Commits

Author SHA1 Message Date
joerg 6ab2cfd0b3 Use __isthreaded from reentrant.h and don't redeclare it. 2010-12-08 02:06:38 +00:00
christos 67657e2f66 fix typo. 2006-11-03 23:16:12 +00:00
christos 95c7627c87 use FD_CLOEXEC instead of 1. 2006-11-03 20:18:49 +00:00
yamt 347f995cea - constify and remove __UNCONST from caller of clnt_call().
- use __UNCONST where approproate.
2005-12-03 15:16:19 +00:00
christos 03256c6e55 WARNS=4 2005-11-29 03:11:58 +00:00
fvdl 39d7a2e359 Don't use NULL to compare against a character. 2003-10-21 00:00:34 +00:00
itojun 5c945215d0 __RCSID police 2003-09-09 03:56:39 +00:00
thorpej 3fdac2b8c5 Merge the nathanw_sa branch. 2003-01-18 10:52:16 +00:00
lukem 0e8cfd8ffb sprinkle _DIAGASSERT() appropriately. minor other cleanups 2001-01-04 14:42:18 +00:00
christos deb154d2bc add __RPC_GETXID macro
don't const castway __rpc_getconf and __rpc_getconfig. It might try to
write const strings
fix non-portable casts
remove duplicated prototypes
cast things to proper types
remove extraneous casts to NULL
fix variable cast mismatches
remove register var declarations
2000-07-06 03:10:34 +00:00
fvdl 7df0ccbadc Add new RPC code, based on Sun's TI-RPC code. Adapted to not use XTI,
but sockets instead, internally. Old, backward compatible interfaces
maintained.
2000-06-02 23:11:05 +00:00
mycroft 605490369c Delint.
Remove trailing ; from uses of __weak_alias().  The macro inserts this if
needed.
2000-01-22 22:19:07 +00:00
lukem d896261208 back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
1999-09-20 04:38:56 +00:00
lukem b48252f365 * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
  and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

		_DIAGASSERT(path != NULL)
	#ifdef _DIAGNOSTIC
		if (path == NULL) {
			errno = EFAULT;
			return (-1);
		}
	#endif
1999-09-16 11:44:54 +00:00
lukem 15896e79fe * don't close the socket unless it was opened by the function
* note (in the comments) that the client is responsible for closing
  the socket if they opened it, or they didn't use CLNT_DESTROY()

fixes a couple of unnecessary closing of already-closed sockets.
noted by: Matthias Drochner <M.Drochner@fz-juelich.de>
1999-03-25 01:16:10 +00:00
lukem 6c13a3b826 * ensure memory is released if operations fail (in authunix_create(),
xdr_callmsg(), xprt_register(), svc_tcp(), svc_udp(), etc)
* don't attempt to close a socket filedescriptor if it's -1 (some from
  freebsd, some i found)
* make the initial xid a little more random (from freebsd)
* fix some spelos and tyops in comments (some from freebsd)
* use warn() instead of warnx() for many errors; the user probably
  wants to know what the error code was.
* knf & whitespace nitpicks
1999-01-20 11:37:34 +00:00
christos ee3762617d delint:
- memmove -> memcpy
	- check that we don't get a bogus h->h_length
1998-11-15 17:25:39 +00:00
msaitoh 1e6012f954 KNF. 1998-07-09 18:15:18 +00:00
lukem 46e6c5e813 * in get_myaddress(); always return sockaddr_in containing localhost:PMAP_PORT.
(as recommended in Weiste Venema's portmap5_beta distribution)
* deprecate register
* use memmove instead of bcopy
* KNF includes
* use err/warn() instead of perror/fprintf(stderr,)
* fix some typos
1998-02-13 05:52:11 +00:00
lukem ce147c1c1c revert; we can't break the existing ABI and API 1998-02-12 01:57:27 +00:00
lukem a31739bc01 major cleanup (to sync with changes made in include/rpc/*.h):
* use int32_t, size_t, in_port_t instead of long, u_int, u_short as appropriate
* use uid_t and gid_t instead of int
* KNF, fix typos and spellos
* use const as appropriate
* deprecate register
* use memmove instead of bcopy
* use err/warn()
1998-02-10 04:54:22 +00:00
jtc 43fa6fe319 If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore.  The library will use those
names internally.  Weak aliases are used to provide the original names
to the API.

This is only the first part of this change.  It is most of the functions
which are implemented in C for all NetBSD ports.  Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
1997-07-21 14:06:24 +00:00
christos c63c52b238 Fix RCSID's
Fix gcc warnings.
Add missing prototypes
1997-07-13 20:13:02 +00:00
mrg 9cd5492c02 - convert unsafe strcpy(), strcat() and sprintf() to the `n' versions.
- some KNF.
1997-01-23 14:01:45 +00:00
jtc 18ec2ba033 Add explict function return types 1996-03-29 23:00:47 +00:00
mycroft 5860921eda Fill in sin_len. 1995-06-03 22:37:19 +00:00
jtc 3c565bbea8 Changed bzero to memset.
Changed bcmp to memcmp.
Added #include <string.h> to bring prototypes into scope.
1995-04-14 19:48:20 +00:00
cgd 9e15c98955 save my sanity; stop using Id. 1995-02-25 03:01:33 +00:00
deraadt f92ccee2e2 should bzero automatic sockaddr's before use 1993-12-05 14:36:48 +00:00
cgd 63d7b6778b move the rpc code into libc 1993-10-07 07:29:33 +00:00