summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/ZAsyncLocate.c4
-rw-r--r--lib/ZCkAuth.c2
-rw-r--r--lib/ZCkIfNot.c2
-rw-r--r--lib/ZCmpUID.c2
-rw-r--r--lib/ZFmtAuth.c2
-rw-r--r--lib/ZFmtList.c4
-rw-r--r--lib/ZFmtNotice.c4
-rw-r--r--lib/ZFmtRaw.c4
-rw-r--r--lib/ZFmtRawLst.c4
-rw-r--r--lib/ZFmtSmRLst.c2
-rw-r--r--lib/ZFmtSmRaw.c2
-rw-r--r--lib/ZIfNotice.c2
-rw-r--r--lib/ZInit.c4
-rw-r--r--lib/ZParseNot.c2
-rw-r--r--lib/ZPeekIfNot.c2
-rw-r--r--lib/ZPeekPkt.c2
-rw-r--r--lib/ZRecvNot.c2
-rw-r--r--lib/ZRecvPkt.c2
-rw-r--r--lib/ZRetSubs.c4
-rw-r--r--lib/ZSubs.c2
-rw-r--r--lib/Zinternal.c34
21 files changed, 46 insertions, 42 deletions
diff --git a/lib/ZAsyncLocate.c b/lib/ZAsyncLocate.c
index deeac10..fe6b444 100644
--- a/lib/ZAsyncLocate.c
+++ b/lib/ZAsyncLocate.c
@@ -31,7 +31,7 @@ Code_t ZRequestLocations(user, zald, kind, auth)
if ((retval = ZOpenPort((u_short *)0)) != ZERR_NONE)
return (retval);
- (void) bzero((char *)&notice, sizeof(notice));
+ (void) _BZERO((char *)&notice, sizeof(notice));
notice.z_kind = kind;
notice.z_port = __Zephyr_port;
notice.z_class = LOCATE_CLASS;
@@ -166,5 +166,5 @@ void ZFreeALD(zald)
if (zald->user) free(zald->user);
if (zald->version) free(zald->version);
- bzero(zald, sizeof(*zald));
+ _BZERO(zald, sizeof(*zald));
}
diff --git a/lib/ZCkAuth.c b/lib/ZCkAuth.c
index 1be961b..9fc6b5b 100644
--- a/lib/ZCkAuth.c
+++ b/lib/ZCkAuth.c
@@ -64,7 +64,7 @@ int ZCheckAuthentication(notice, from)
SERVER_INSTANCE, from->sin_addr.s_addr,
&dat, srvtab);
if (result == RD_AP_OK) {
- bcopy((char *)dat.session, (char *)__Zephyr_session,
+ _BCOPY((char *)dat.session, (char *)__Zephyr_session,
sizeof(C_Block));
(void) sprintf(srcprincipal, "%s%s%s@%s", dat.pname,
dat.pinst[0]?".":"", dat.pinst, dat.prealm);
diff --git a/lib/ZCkIfNot.c b/lib/ZCkIfNot.c
index 103f7e2..6355680 100644
--- a/lib/ZCkIfNot.c
+++ b/lib/ZCkIfNot.c
@@ -41,7 +41,7 @@ Code_t ZCheckIfNotice(notice, from, predicate, args)
if ((*predicate)(&tmpnotice, args)) {
if (!(buffer = (char *) malloc((unsigned) qptr->packet_len)))
return (ENOMEM);
- bcopy(qptr->packet, buffer, qptr->packet_len);
+ _BCOPY(qptr->packet, buffer, qptr->packet_len);
if (from)
*from = qptr->from;
if ((retval = ZParseNotice(buffer, qptr->packet_len,
diff --git a/lib/ZCmpUID.c b/lib/ZCmpUID.c
index d86a79d..935ed7e 100644
--- a/lib/ZCmpUID.c
+++ b/lib/ZCmpUID.c
@@ -23,5 +23,5 @@ static char rcsid_ZCompareUID_c[] = "$Id$";
int ZCompareUID(uid1, uid2)
ZUnique_Id_t *uid1, *uid2;
{
- return (!bcmp((char *)uid1, (char *)uid2, sizeof (*uid1)));
+ return (!_BCMP((char *)uid1, (char *)uid2, sizeof (*uid1)));
}
diff --git a/lib/ZFmtAuth.c b/lib/ZFmtAuth.c
index 7815796..89416d0 100644
--- a/lib/ZFmtAuth.c
+++ b/lib/ZFmtAuth.c
@@ -57,7 +57,7 @@ Code_t ZFormatAuthenticNotice(notice, buffer, buffer_len, len, session)
if (newnotice.z_message_len+hdrlen > buffer_len)
return (ZERR_PKTLEN);
- bcopy(newnotice.z_message, ptr, newnotice.z_message_len);
+ _BCOPY(newnotice.z_message, ptr, newnotice.z_message_len);
*len = hdrlen+newnotice.z_message_len;
diff --git a/lib/ZFmtList.c b/lib/ZFmtList.c
index 53aa356..b829150 100644
--- a/lib/ZFmtList.c
+++ b/lib/ZFmtList.c
@@ -48,13 +48,13 @@ Code_t ZFormatNoticeList(notice, list, nitems, buffer, ret_len,
if (!(*buffer = (char *) malloc((unsigned)*ret_len)))
return (ENOMEM);
- bcopy(header, *buffer, hdrlen);
+ _BCOPY(header, *buffer, hdrlen);
ptr = *buffer+hdrlen;
for (;nitems;nitems--, list++) {
i = strlen(*list)+1;
- bcopy(*list, ptr, i);
+ _BCOPY(*list, ptr, i);
ptr += i;
}
diff --git a/lib/ZFmtNotice.c b/lib/ZFmtNotice.c
index b56f6ee..7192b97 100644
--- a/lib/ZFmtNotice.c
+++ b/lib/ZFmtNotice.c
@@ -38,8 +38,8 @@ Code_t ZFormatNotice(notice, buffer, ret_len, cert_routine)
if (!(*buffer = (char *) malloc((unsigned)*ret_len)))
return (ENOMEM);
- bcopy(header, *buffer, hdrlen);
- bcopy(notice->z_message, *buffer+hdrlen, notice->z_message_len);
+ _BCOPY(header, *buffer, hdrlen);
+ _BCOPY(notice->z_message, *buffer+hdrlen, notice->z_message_len);
return (ZERR_NONE);
}
diff --git a/lib/ZFmtRaw.c b/lib/ZFmtRaw.c
index e5da26b..8d0844f 100644
--- a/lib/ZFmtRaw.c
+++ b/lib/ZFmtRaw.c
@@ -37,8 +37,8 @@ Code_t ZFormatRawNotice(notice, buffer, ret_len)
if (!(*buffer = (char *) malloc((unsigned) *ret_len)))
return (ENOMEM);
- bcopy(header, *buffer, hdrlen);
- bcopy(notice->z_message, *buffer+hdrlen, notice->z_message_len);
+ _BCOPY(header, *buffer, hdrlen);
+ _BCOPY(notice->z_message, *buffer+hdrlen, notice->z_message_len);
return (ZERR_NONE);
}
diff --git a/lib/ZFmtRawLst.c b/lib/ZFmtRawLst.c
index 7ac49e3..eef764f 100644
--- a/lib/ZFmtRawLst.c
+++ b/lib/ZFmtRawLst.c
@@ -45,13 +45,13 @@ Code_t ZFormatRawNoticeList(notice, list, nitems, buffer, ret_len)
if (!(*buffer = (char *) malloc((unsigned) *ret_len)))
return (ENOMEM);
- bcopy(header, *buffer, hdrlen);
+ _BCOPY(header, *buffer, hdrlen);
ptr = *buffer+hdrlen;
for (;nitems;nitems--, list++) {
i = strlen(*list)+1;
- bcopy(*list, ptr, i);
+ _BCOPY(*list, ptr, i);
ptr += i;
}
diff --git a/lib/ZFmtSmRLst.c b/lib/ZFmtSmRLst.c
index 8032909..60c4ecc 100644
--- a/lib/ZFmtSmRLst.c
+++ b/lib/ZFmtSmRLst.c
@@ -48,7 +48,7 @@ Code_t ZFormatSmallRawNoticeList(notice, list, nitems, buffer, ret_len)
for (;nitems;nitems--, list++) {
i = strlen(*list)+1;
- bcopy(*list, ptr, i);
+ _BCOPY(*list, ptr, i);
ptr += i;
}
diff --git a/lib/ZFmtSmRaw.c b/lib/ZFmtSmRaw.c
index e3eb1da..039591c 100644
--- a/lib/ZFmtSmRaw.c
+++ b/lib/ZFmtSmRaw.c
@@ -37,7 +37,7 @@ Code_t ZFormatSmallRawNotice(notice, buffer, ret_len)
if (*ret_len > Z_MAXPKTLEN)
return (ZERR_PKTLEN);
- bcopy(notice->z_message, buffer+hdrlen, notice->z_message_len);
+ _BCOPY(notice->z_message, buffer+hdrlen, notice->z_message_len);
return (ZERR_NONE);
}
diff --git a/lib/ZIfNotice.c b/lib/ZIfNotice.c
index c578de5..2729619 100644
--- a/lib/ZIfNotice.c
+++ b/lib/ZIfNotice.c
@@ -44,7 +44,7 @@ Code_t ZIfNotice(notice, from, predicate, args)
if ((*predicate)(&tmpnotice, args)) {
if (!(buffer = (char *) malloc((unsigned) qptr->packet_len)))
return (ENOMEM);
- bcopy(qptr->packet, buffer, qptr->packet_len);
+ _BCOPY(qptr->packet, buffer, qptr->packet_len);
if (from)
*from = qptr->from;
if ((retval = ZParseNotice(buffer, qptr->packet_len,
diff --git a/lib/ZInit.c b/lib/ZInit.c
index 7334594..91a5e89 100644
--- a/lib/ZInit.c
+++ b/lib/ZInit.c
@@ -40,7 +40,7 @@ Code_t ZInitialize()
initialize_krb_error_table();
#endif
- bzero((char *)&__HM_addr, sizeof(__HM_addr));
+ _BZERO((char *)&__HM_addr, sizeof(__HM_addr));
__HM_addr.sin_family = AF_INET;
@@ -56,7 +56,7 @@ Code_t ZInitialize()
__HM_addr.sin_port = hmserv->s_port;
- bcopy(addr, (char *)&__HM_addr.sin_addr, 4);
+ _BCOPY(addr, (char *)&__HM_addr.sin_addr, 4);
__HM_set = 0;
diff --git a/lib/ZParseNot.c b/lib/ZParseNot.c
index e9cede4..3bed416 100644
--- a/lib/ZParseNot.c
+++ b/lib/ZParseNot.c
@@ -99,7 +99,7 @@ Code_t ZParseNotice(buffer, len, notice)
#define BAD goto badpkt
#endif
- bzero((char *)notice, sizeof(ZNotice_t));
+ _BZERO((char *)notice, sizeof(ZNotice_t));
ptr = buffer;
end = buffer+len;
diff --git a/lib/ZPeekIfNot.c b/lib/ZPeekIfNot.c
index 263d6a3..c6e8814 100644
--- a/lib/ZPeekIfNot.c
+++ b/lib/ZPeekIfNot.c
@@ -43,7 +43,7 @@ Code_t ZPeekIfNotice(notice, from, predicate, args)
if ((*predicate)(&tmpnotice, args)) {
if (!(buffer = (char *) malloc((unsigned) qptr->packet_len)))
return (ENOMEM);
- bcopy(qptr->packet, buffer, qptr->packet_len);
+ _BCOPY(qptr->packet, buffer, qptr->packet_len);
if (from)
*from = qptr->from;
if ((retval = ZParseNotice(buffer, qptr->packet_len,
diff --git a/lib/ZPeekPkt.c b/lib/ZPeekPkt.c
index e960409..ed47e65 100644
--- a/lib/ZPeekPkt.c
+++ b/lib/ZPeekPkt.c
@@ -38,7 +38,7 @@ Code_t ZPeekPacket(buffer, ret_len, from)
if (!(*buffer = (char *) malloc((unsigned) *ret_len)))
return (ENOMEM);
- bcopy(nextq->packet, *buffer, *ret_len);
+ _BCOPY(nextq->packet, *buffer, *ret_len);
if (from)
*from = nextq->from;
diff --git a/lib/ZRecvNot.c b/lib/ZRecvNot.c
index e84e7cd..c59a603 100644
--- a/lib/ZRecvNot.c
+++ b/lib/ZRecvNot.c
@@ -42,7 +42,7 @@ Code_t ZReceiveNotice(notice, from)
if (from)
*from = nextq->from;
- bcopy(nextq->packet, buffer, len);
+ _BCOPY(nextq->packet, buffer, len);
Z_RemQueue(nextq);
diff --git a/lib/ZRecvPkt.c b/lib/ZRecvPkt.c
index 93dea4c..70405a1 100644
--- a/lib/ZRecvPkt.c
+++ b/lib/ZRecvPkt.c
@@ -37,7 +37,7 @@ Code_t ZReceivePacket(buffer, ret_len, from)
if (*ret_len > Z_MAXPKTLEN)
return (ZERR_PKTLEN);
- bcopy(nextq->packet, buffer, *ret_len);
+ _BCOPY(nextq->packet, buffer, *ret_len);
if (from)
*from = nextq->from;
diff --git a/lib/ZRetSubs.c b/lib/ZRetSubs.c
index 05887ad..dfe9e27 100644
--- a/lib/ZRetSubs.c
+++ b/lib/ZRetSubs.c
@@ -38,7 +38,7 @@ Code_t ZRetrieveSubscriptions(port,nsubs)
sizeof(u_short))) != ZERR_NONE)
return (retval);
- (void) bzero((char *)&notice, sizeof(notice));
+ (void) _BZERO((char *)&notice, sizeof(notice));
notice.z_message = asciiport;
notice.z_message_len = strlen(asciiport)+1;
notice.z_opcode = CLIENT_GIMMESUBS;
@@ -51,7 +51,7 @@ Code_t ZRetrieveDefaultSubscriptions(nsubs)
{
ZNotice_t notice;
- (void) bzero((char *)&notice, sizeof(notice));
+ (void) _BZERO((char *)&notice, sizeof(notice));
notice.z_message = (char *) 0;
notice.z_message_len = 0;
notice.z_opcode = CLIENT_GIMMEDEFS;
diff --git a/lib/ZSubs.c b/lib/ZSubs.c
index e82910d..b9196f1 100644
--- a/lib/ZSubs.c
+++ b/lib/ZSubs.c
@@ -83,7 +83,7 @@ Z_Subscriptions(sublist, nitems, port, opcode, authit)
if (!list)
return (ENOMEM);
- (void) bzero((char *)&notice, sizeof(notice));
+ (void) _BZERO((char *)&notice, sizeof(notice));
notice.z_kind = ACKED;
notice.z_port = port;
notice.z_class = ZEPHYR_CTL_CLASS;
diff --git a/lib/Zinternal.c b/lib/Zinternal.c
index a15decd..ac42c68 100644
--- a/lib/Zinternal.c
+++ b/lib/Zinternal.c
@@ -27,6 +27,10 @@ static char copyright[] =
#include <sys/ioctl.h>
#include <utmp.h>
+#ifdef SOLARIS
+#include <sys/filio.h>
+#endif
+
#ifdef __STDC__
typedef void *pointer;
#else
@@ -87,7 +91,7 @@ Code_t Z_GetMyAddr()
__My_length = myhost->h_length;
- bcopy(myhost->h_addr, __My_addr, myhost->h_length);
+ _BCOPY(myhost->h_addr, __My_addr, myhost->h_length);
return (ZERR_NONE);
}
@@ -245,7 +249,7 @@ Code_t Z_ReadWait()
__HM_addr = olddest;
}
if (filter_idx == -1) {
- bzero((char *) old_uids,
+ _BZERO((char *) old_uids,
Z_FILTERDEPTH*(sizeof(struct _filter)));
old_uids[0].uid = notice.z_uid;
old_uids[0].kind = notice.z_kind;
@@ -265,7 +269,7 @@ Code_t Z_ReadWait()
* Parse apart the z_multinotice field - if the field is blank for
* some reason, assume this packet stands by itself.
*/
- slash = index(notice.z_multinotice, '/');
+ slash = strchr(notice.z_multinotice, '/');
if (slash) {
part = atoi(notice.z_multinotice);
partof = atoi(slash+1);
@@ -320,7 +324,7 @@ Code_t Z_ReadWait()
qptr->header = (char *) malloc((unsigned) qptr->header_len);
if (!qptr->header)
return (ENOMEM);
- bcopy(packet, qptr->header, qptr->header_len);
+ _BCOPY(packet, qptr->header, qptr->header_len);
}
return (Z_AddNoticeToEntry(qptr, &notice, part));
}
@@ -340,7 +344,7 @@ Code_t Z_ReadWait()
qptr = (struct _Z_InputQ *)malloc(sizeof(struct _Z_InputQ));
if (!qptr)
return (ENOMEM);
- bzero((char *)qptr, sizeof(struct _Z_InputQ));
+ _BZERO((char *)qptr, sizeof(struct _Z_InputQ));
/* Insert the entry at the end of the queue */
qptr->next = NULL;
@@ -372,7 +376,7 @@ Code_t Z_ReadWait()
qptr->header = (char *) malloc((unsigned) qptr->header_len);
if (!qptr->header)
return ENOMEM;
- bcopy(packet, qptr->header, qptr->header_len);
+ _BCOPY(packet, qptr->header, qptr->header_len);
}
/*
@@ -390,15 +394,15 @@ Code_t Z_ReadWait()
else if (!(qptr->msg = (char *) malloc((unsigned) notice.z_message_len)))
return(ENOMEM);
else
- bcopy(notice.z_message, qptr->msg, notice.z_message_len);
+ _BCOPY(notice.z_message, qptr->msg, notice.z_message_len);
qptr->msg_len = notice.z_message_len;
__Q_Size += notice.z_message_len;
qptr->packet_len = qptr->header_len+qptr->msg_len;
if (!(qptr->packet = (char *) malloc((unsigned) qptr->packet_len)))
return (ENOMEM);
- bcopy(qptr->header, qptr->packet, qptr->header_len);
+ _BCOPY(qptr->header, qptr->packet, qptr->header_len);
if(qptr->msg)
- bcopy(qptr->msg, qptr->packet+qptr->header_len, qptr->msg_len);
+ _BCOPY(qptr->msg, qptr->packet+qptr->header_len, qptr->msg_len);
return (ZERR_NONE);
}
@@ -446,7 +450,7 @@ Code_t Z_AddNoticeToEntry(qptr, notice, part)
lasthole = (struct _Z_Hole *) 0;
/* copy in the message body */
- (void) bcopy(notice->z_message, qptr->msg+part, notice->z_message_len);
+ (void) _BCOPY(notice->z_message, qptr->msg+part, notice->z_message_len);
/* Search for a hole that overlaps with the current fragment */
while (hole) {
@@ -527,8 +531,8 @@ Code_t Z_AddNoticeToEntry(qptr, notice, part)
qptr->packet_len = qptr->header_len+qptr->msg_len;
if (!(qptr->packet = (char *) malloc((unsigned) qptr->packet_len)))
return (ENOMEM);
- bcopy(qptr->header, qptr->packet, qptr->header_len);
- bcopy(qptr->msg, qptr->packet+qptr->header_len, qptr->msg_len);
+ _BCOPY(qptr->header, qptr->packet, qptr->header_len);
+ _BCOPY(qptr->msg, qptr->packet+qptr->header_len, qptr->msg_len);
}
return (ZERR_NONE);
@@ -556,7 +560,7 @@ Code_t Z_FormatHeader(notice, buffer, buffer_len, len, cert_routine)
if ((retval = Z_GetMyAddr()) != ZERR_NONE)
return (retval);
- bcopy(__My_addr, (char *)&notice->z_uid.zuid_addr, __My_length);
+ _BCOPY(__My_addr, (char *)&notice->z_uid.zuid_addr, __My_length);
notice->z_multiuid = notice->z_uid;
@@ -659,7 +663,7 @@ Code_t Z_FormatRawHeader(notice, buffer, buffer_len, len, sumend_ptr)
return (ZERR_HEADERLEN);
if (Z_AddField(&ptr, notice->z_sender, end))
return (ZERR_HEADERLEN);
- if (index(notice->z_recipient, '@') || !*notice->z_recipient) {
+ if (strchr(notice->z_recipient, '@') || !*notice->z_recipient) {
if (Z_AddField(&ptr, notice->z_recipient, end))
return (ZERR_HEADERLEN);
}
@@ -835,7 +839,7 @@ Code_t Z_SendFragmentedNotice(notice, len, send_func)
htonl((u_long) partnotice.z_uid.tv.tv_usec);
if ((retval = Z_GetMyAddr()) != ZERR_NONE)
return (retval);
- bcopy(__My_addr, (char *)&partnotice.z_uid.zuid_addr,
+ _BCOPY(__My_addr, (char *)&partnotice.z_uid.zuid_addr,
__My_length);
}
partnotice.z_message = notice->z_message+offset;