*
* @APPLE_LICENSE_HEADER_START@
*
- * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
- *
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
+ * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
+ * Reserved. This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.1 (the "License"). You may not use this file
+ * except in compliance with the License. Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
*
* The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
*/
static struct svc_callout {
struct svc_callout *sc_next;
+#ifdef __LP64__
+ uint32_t sc_prog;
+ uint32_t sc_vers;
+#else
u_long sc_prog;
u_long sc_vers;
+#endif
void (*sc_dispatch)();
} *svc_head;
*/
bool_t
svc_register(xprt, prog, vers, dispatch, protocol)
+#ifdef __LP64__
+ SVCXPRT *xprt;
+ uint32_t prog;
+ uint32_t vers;
+ void (*dispatch)();
+ int32_t protocol;
+#else
SVCXPRT *xprt;
u_long prog;
u_long vers;
void (*dispatch)();
int protocol;
+#endif
{
struct svc_callout *prev;
register struct svc_callout *s;
*/
void
svc_unregister(prog, vers)
+#ifdef __LP64__
+ uint32_t prog;
+ uint32_t vers;
+#else
u_long prog;
u_long vers;
+#endif
{
struct svc_callout *prev;
register struct svc_callout *s;
*/
static struct svc_callout *
svc_find(prog, vers, prev)
+#ifdef __LP64__
+ uint32_t prog;
+ uint32_t vers;
+#else
u_long prog;
u_long vers;
+#endif
struct svc_callout **prev;
{
register struct svc_callout *s, *p;
*/
void
svcerr_progvers(xprt, low_vers, high_vers)
+#ifdef __LP64__
+ register SVCXPRT *xprt;
+ uint32_t low_vers;
+ uint32_t high_vers;
+#else
register SVCXPRT *xprt;
u_long low_vers;
u_long high_vers;
+#endif
{
struct rpc_msg rply;
enum xprt_stat stat;
struct rpc_msg msg;
int prog_found;
+#ifdef __LP64__
+ uint32_t low_vers;
+ uint32_t high_vers;
+#else
u_long low_vers;
u_long high_vers;
+#endif
struct svc_req r;
register SVCXPRT *xprt;
+#ifdef __LP64__
+ register uint32_t mask;
+#else
register u_long mask;
+#endif
register int bit;
+#ifdef __LP64__
+ register uint32_t *maskp;
+#else
register u_long *maskp;
+#endif
register int sock;
char cred_area[2*MAX_AUTH_BYTES + RQCRED_SIZE];
msg.rm_call.cb_cred.oa_base = cred_area;
msg.rm_call.cb_verf.oa_base = &(cred_area[MAX_AUTH_BYTES]);
r.rq_clntcred = &(cred_area[2*MAX_AUTH_BYTES]);
-
+#ifdef __LP64__
+ maskp = (uint32_t *)readfds->fds_bits;
+#else
maskp = (u_long *)readfds->fds_bits;
+#endif
for (sock = 0; sock <= svc_maxfd; sock += NFDBITS) {
for (mask = *maskp++; (bit = ffs(mask)); mask ^= (1 << (bit - 1))) {
if ((sock + bit) > (svc_maxfd + 1))