]> code.citadel.org Git - citadel.git/commitdiff
irix fixen
authorNathan Bryant <loanshark@uncensored.citadel.org>
Fri, 29 Jan 1999 08:58:46 +0000 (08:58 +0000)
committerNathan Bryant <loanshark@uncensored.citadel.org>
Fri, 29 Jan 1999 08:58:46 +0000 (08:58 +0000)
24 files changed:
citadel/ChangeLog
citadel/Makefile.in
citadel/citadel.c
citadel/citadel.spec
citadel/citserver.c
citadel/client_chat.c
citadel/configure.in
citadel/ipc_c_tcp.c
citadel/mailinglist.c
citadel/messages.c
citadel/messages.h
citadel/mime_parser.c
citadel/msgbase.c
citadel/netmailer.c
citadel/netpoll.c
citadel/netproc.c
citadel/rcit.c
citadel/routines2.c
citadel/sendcommand.c
citadel/serv_chat.c
citadel/serv_info.c
citadel/serv_upgrade.c
citadel/setup.c
citadel/user_ops.c

index 183d3455bee6387ceaae8c8f3517b215b7a26f2b..379328dd484917bfc1cb611f4cf7901b3f3beeef 100644 (file)
@@ -1,3 +1,10 @@
+1999-01-29 Nathan Bryant <bryant@cs.usm.maine.edu>
+       * fixes for IRIX (thanks to wr and family for use of the Indy):
+         - use memset()/memcpy() instead of bzero()/bcopy() in all cases
+         - configure updates
+         - handle `long' pid's
+         - a few other little bits
+
 Mon Jan 25 21:23:07 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * Fixed bug in save_message() which crashed the server on mail to sysop
        * Rewrote pop_march() to be smarter about <G>oto heuristics
index 69ac0bd372e8c92d0ebd552b7cc7f6f5d7450f84..7bfc5c038c273a189885c09ca9640db60797076f 100644 (file)
@@ -219,7 +219,7 @@ cleaner: clean
                $(SERV_MODULES) $(PROXY_TARGETS) so_locations
 
 distclean: cleaner
-       rm -f Makefile sysdep.h config.cache config.log config.status *.d
+       rm -f Makefile sysdep.h config.cache config.log config.status *.d weekly
 
 .c.d:
        $(CC) -M $(CPPFLAGS) $< | sed -e 's!$*.o!$*.o $*.ro $*.mo $@!' > $@
index 36a5b172f3e5087725f884e7591507ca3451c35c..6d63f177b0b9535caf41768cda2c83fde79f548e 100644 (file)
@@ -806,7 +806,7 @@ int main(int argc, char **argv)
 int a,b,mcmd;
 char aaa[100],bbb[100],eee[100];               /* general purpose variables */
 char argbuf[32];                               /* command line buf */
-int termn8 = 0;
+volatile int termn8 = 0;
 
 
 sttybbs(SB_SAVE);              /* Store the old terminal parameters */
index f8e627e39ef85da5c041ec391da4957cddf891ed..6b89b758db227e1bd7b55607fead6a6310fa4bc9 100644 (file)
@@ -1,8 +1,8 @@
 # $Id$
-Summary: Citadel/UX 5.50
+Summary: Citadel/UX
 Name: citadel
-Version: 5.50
-Release: 0.4
+Version: 5.52
+Release: 1
 Copyright: GPL
 Group: Applications/Communications
 Source0: citadel.tar.gz
index c759839162e342aeebfa622bc7b6472c37b20008..95a3214118ca1ff3c6246cae42cbc2b11ad6bc88 100644 (file)
@@ -195,7 +195,7 @@ void cmd_hchg(char *newhostname)
 {
    if ((newhostname) && (newhostname[0]))
    {
-      bzero(CC->fake_hostname, 25);
+      memset(CC->fake_hostname, 0, 25);
       strncpy(CC->fake_hostname, newhostname, 24);
    }
    else
@@ -214,7 +214,7 @@ void cmd_uchg(char *newusername)
    if ((newusername) && (newusername[0]))
    {
       CC->cs_flags &= ~CS_STEALTH;
-      bzero(CC->fake_username, 32);
+      memset(CC->fake_username, 0, 32);
       if (strncasecmp(newusername, CC->curr_user, strlen(CC->curr_user)))
          strncpy(CC->fake_username, newusername, 31);
    }
@@ -726,7 +726,7 @@ void *context_loop(struct CitContext *con)
 
        do {
                time(&CC->lastcmd);
-               bzero(cmdbuf, sizeof cmdbuf); /* Clear it, just in case */
+               memset(cmdbuf, 0, sizeof cmdbuf); /* Clear it, just in case */
                if (client_gets(cmdbuf) < 1) cleanup(EXIT_NULL);
                lprintf(5, "citserver[%3d]: %s\n", CC->cs_pid, cmdbuf);
 
index 16ec066d0b4b180016ebe359ec0fc9231ad1f611..69996df9c18a1a37e0fdf3406a7646b2f97fb571 100644 (file)
@@ -229,7 +229,7 @@ void page_user() {
                        }
 
                printf("Type message to send.  Enter a blank line when finished.\n");
-               bzero(longmsg, sizeof longmsg);
+               memset(longmsg, 0, sizeof longmsg);
                for (i=0; i<5; ++i) {
                        printf("> ");
                        getline(&longmsg[i][0], 77);
index d7499d28f7a9cac72e71cb1c10253f701c969a3b..cfec538fe8c5c98fa8fd63c2665326b3564b9755 100644 (file)
@@ -1,5 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.12)
+dnl $Id$
+AC_PREREQ(2.13)
 AC_INIT(citserver.c)
 AC_PREFIX_DEFAULT(/usr/local/citadel)
 if test "$prefix" = NONE; then
@@ -33,7 +34,13 @@ if test "$GCC" = yes; then
        CFLAGS="$CFLAGS -Wall -Wstrict-prototypes"
        dnl pass -rdynamic to the linker to enable dlopen() modules to
        dnl refer to symbols in the main executable (applies to citserver)
-       SERVER_LDFLAGS=-rdynamic
+       case "$host" in
+               mips*-sgi-irix*)
+               ;;
+               *)
+                       SERVER_LDFLAGS=-rdynamic
+               ;;
+       esac
        PICFLAGS=-fPIC
 fi
 AC_PROG_RANLIB
@@ -48,13 +55,26 @@ dnl Makefile only passes $(LIBS) to that target. If other programs start
 dnl requiring additional libraries, we'll have to use other variables, as is
 dnl done with curses.
 
+dnl We want to test for crypt() and dlopen() in libc before checking for
+dnl -lcrypt and -ldl, because some systems (like Irix) have both.
+AC_CHECK_FUNCS(crypt dlopen)
+
 dnl We only need crypt() if we're using autologin. FIXME: implement shadow
 dnl passwords and/or PAM...
-if test "$enable_autologin" != no; then
+if test "$enable_autologin" != no -a "$ac_cv_func_crypt" = no; then
        AC_CHECK_LIB(crypt, crypt)
 fi
 
-AC_CHECK_LIB(dl, dlopen)
+dnl Enable autologin if the feature is requested (which is the default) and
+dnl a crypt() functin is available.
+if test "$enable_autologin" != no -a \( "$ac_cv_func_crypt" = yes -o "$ac_cv_lib_crypt_crypt" = yes \); then
+       AC_DEFINE(ENABLE_AUTOLOGIN)
+fi
+
+if test "$ac_cv_func_dlopen" = no; then
+       AC_CHECK_LIB(dl, dlopen)
+fi
+
 AC_CHECK_LIB(gdbm, gdbm_open)
 AC_CHECK_LIB(curses, initscr, CURSES=-lcurses)
 
@@ -88,12 +108,6 @@ AC_TYPE_SIGNAL
 AC_FUNC_VPRINTF
 AC_CHECK_FUNCS(snprintf mkdir mktime rmdir select socket strerror)
 
-dnl Enable autologin if the feature is requested (which is the default) and
-dnl a crypt() function is available.
-if test "$enable_autologin" != no; then
-       AC_CHECK_FUNC(crypt, AC_DEFINE(ENABLE_AUTOLOGIN))
-fi
-
 dnl Tell the Makefile whether we need to use our snprintf() replacement.
 if test "$ac_cv_func_snprintf" = no; then
        SNPRINTF=snprintf.o
index 4d2759e4e8334cad28a3f68adc05c420b4a3d60b..7f98a833c9afaba4bdb4fe8080de2db51145c7af 100644 (file)
@@ -60,7 +60,7 @@ int connectsock(char *host, char *service, char *protocol)
        struct sockaddr_in sin;
        int s,type;
 
-       bzero((char *)&sin,sizeof(sin));
+       memset(&sin,0,sizeof(sin));
        sin.sin_family = AF_INET;
 
        pse=getservbyname(service,protocol);
@@ -128,7 +128,7 @@ void numericize(char *buf, char *host, char *service, char *protocol)
        struct servent *pse;
        struct sockaddr_in sin;
 
-       bzero((char *)&sin,sizeof(sin));
+       memset(&sin,0,sizeof(sin));
        sin.sin_family = AF_INET;
 
        pse=getservbyname(service,protocol);
index 9c839b77105accea17bbe79c880a2d5fd96fe727..9bd5e087cbe7be5a91c5c5b90a74a78bdcc62be4 100644 (file)
@@ -83,7 +83,7 @@ int main(void) {
 
        get_config();
        LoadInternetConfig();
-       sprintf(tempfile, "/tmp/mlist.%d", getpid() );
+       sprintf(tempfile, "/tmp/mlist.%ld", (long)getpid() );
 
        while(1) {
 
index 4fcde0812b6d8d7aa3d483d6ab89dd955fb3f1db..92c5b1eb2d81031434d27fac56bf89694336bf9b 100644 (file)
@@ -82,7 +82,7 @@ void ka_sigcatch(int signum) {
 /*
  * server keep-alive version of wait() (needed for external editor)
  */
-pid_t ka_wait(pid_t *kstatus)
+pid_t ka_wait(int *kstatus)
 {
        pid_t p;
 
@@ -589,7 +589,6 @@ ME1:        switch(mode) {
                citedit(fp,beg);
                fclose(fp);
                goto MECR;
-               break;
 
           case 1:
                fp=fopen(filename,"w");
@@ -903,7 +902,7 @@ void readmsgs(int c, int rdir, int q)       /* read contents of a room */
        if (c<0) b=(MAXMSGS-1);
        else b=0;
 
-       sprintf(prtfile,"/tmp/CPrt%d",getpid());
+       sprintf(prtfile,"/tmp/CPrt%ld",(long)getpid());
 
        num_msgs = 0;
        strcpy(cmd,"MSGS ");
index 52a75849b9426b9166531344de8619913f8783ba..2d3bf21b9b734a38243fd79e0f66a020343dd1a9 100644 (file)
@@ -4,3 +4,4 @@ int entmsg(int is_reply, int c);
 void readmsgs(int c, int rdir, int q);
 void edit_system_message(char *which_message);
 extern int lines_printed;
+pid_t ka_wait(int *kstatus);
index 67137d84e6fe24af0c4d6794029f26c8586fe4ca..715a4d011bdaa8ec076ff5a287589943dada3f96 100644 (file)
@@ -55,7 +55,7 @@ char *memreadline(char *start, char *buf, int maxlen) {
        char *ptr;
 
        ptr = start;
-       bzero(buf, maxlen);
+       memset(buf, 0, maxlen);
 
        while(1) {
                ch = *ptr++;
@@ -126,9 +126,9 @@ void the_mime_parser(char *partnum,
        char nested_partnum[256];
 
        ptr = content_start;
-       bzero(boundary, sizeof boundary);
-       bzero(content_type, sizeof content_type);
-       bzero(encoding, sizeof encoding);
+       memset(boundary, 0, sizeof boundary);
+       memset(content_type, 0, sizeof content_type);
+       memset(encoding, 0, sizeof encoding);
 
        /* Learn interesting things from the headers */
        strcpy(header, "");
index fb6c82c59273830431e3b3bb66691405f7a2045e..b8829378f7b531dd1dea189fae44da0b15138a19 100644 (file)
@@ -867,8 +867,8 @@ lprintf(9, "6\n");
 
        /* Network mail - send a copy to the network program. */
        if ( (strlen(recipient)>0) && (mailtype != M_LOCAL) ) {
-               sprintf(aaa,"./network/spoolin/netmail.%04x.%04x.%04x",
-                       getpid(), CC->cs_pid, ++seqnum);
+               sprintf(aaa,"./network/spoolin/netmail.%04lx.%04x.%04x",
+                       (long)getpid(), CC->cs_pid, ++seqnum);
                copy_file(mtmp,aaa);
                system("exec nohup ./netproc -i >/dev/null 2>&1 &");
                }
@@ -1048,7 +1048,7 @@ void cmd_ent0(char *entargs)
               return;
            }
           extract(newusername,entargs,4);
-          bzero(CC->fake_postname, 32);
+          memset(CC->fake_postname, 0, 32);
            strcpy(CC->fake_postname, newusername);
            cprintf("%d Ok\n",OK);
            return;
index fc710020bb8fe2c75bb68f31a55c2adf726ad19e..2cdde2e895072c40f02c8726b7560702f56f6548 100644 (file)
@@ -173,7 +173,7 @@ int main(int argc, char **argv)
        openlog("netmailer", LOG_PID, LOG_USER);
        get_config();   
        LoadInternetConfig();
-       sprintf(temp, "/tmp/netmailer.%d", getpid()); /* temp file name */
+       sprintf(temp,"/tmp/netmailer.%ld",(long)getpid()); /* temp file name */
 
        if ( (argc < 2) || (argc > 3) ) {
                fprintf(stderr, "netmailer: usage: netmailer recipient@node.dom [mlist]\n");
index 1874ecb610ca674e4fdafb2270d15b7b0e2cb45e..ef7fca1be8bd5e38500f646b6f4c95e8a54a96fa 100644 (file)
@@ -43,7 +43,7 @@ void receive_spool(void) {
        long plen;
        FILE *fp;
 
-       sprintf(tempfilename,"/tmp/netpoll.%d",getpid());
+       sprintf(tempfilename,"/tmp/netpoll.%ld",(long)getpid());
        serv_puts("NDOP");
        serv_gets(buf);
        printf("%s\n",buf);
@@ -76,8 +76,8 @@ void receive_spool(void) {
        serv_puts("CLOS");
        serv_gets(buf);
        printf("%s\n",buf);
-       sprintf(buf,"mv %s %s/network/spoolin/netpoll.%d",
-               tempfilename,BBSDIR,getpid());
+       sprintf(buf,"mv %s %s/network/spoolin/netpoll.%ld",
+               tempfilename,BBSDIR,(long)getpid());
        system(buf);
        system("exec nohup ./netproc >/dev/null 2>&1 &");
        }
index f2f07a58ef0eb493a9e5140c6df600f3347a7cdd..5ad33c8489d49946b7da512be11ba5fa85aa1dd0 100644 (file)
@@ -298,7 +298,7 @@ int set_lockfile(void) {
                }
 
        lfp=fopen(LOCKFILE,"w");
-       fprintf(lfp,"%d\n",getpid());
+       fprintf(lfp,"%ld\n",(long)getpid());
        fclose(lfp);
        return(0);
        }
@@ -608,7 +608,8 @@ void bounce(struct minfo *bminfo)
        static int bseq = 1;
        time_t now;
 
-       sprintf(bfilename,"./network/spoolin/bounce.%d.%d",getpid(),bseq++);
+       sprintf(bfilename,"./network/spoolin/bounce.%ld.%d",(long)getpid(),
+               bseq++);
        bounce = fopen(bfilename,"wb");
        time(&now);
                
@@ -656,8 +657,8 @@ void inprocess(void) {
        int bloklen;
 
 
-       sprintf(tname,"/tmp/net.t%d",getpid()); /* temp file name */
-       sprintf(iname,"/tmp/net.i%d",getpid()); /* temp file name */
+       sprintf(tname,"/tmp/net.t%ld",(long)getpid());  /* temp file name */
+       sprintf(iname,"/tmp/net.i%ld",(long)getpid());  /* temp file name */
 
        load_filterlist();
 
@@ -953,7 +954,7 @@ int spool_out(struct msglist *cmlist, FILE *destfp, char *sysname)  /* spool list
        char curr_rm[256];
 
        strcpy(curr_rm, "");
-       sprintf(mmtemp, "/tmp/net.m%d", getpid());
+       sprintf(mmtemp, "/tmp/net.m%ld", (long)getpid());
 
        /* for each message in the list... */
        for (cmptr=cmlist; cmptr!=NULL; cmptr=cmptr->next) {
@@ -1038,7 +1039,7 @@ void outprocess(char *sysname) /* send new room messages to sysname */
        int outgoing_msgs;
        long thismsg;
 
-       sprintf(tempflnm,"/tmp/%s.%d",NODENAME,getpid());
+       sprintf(tempflnm,"/tmp/%s.%ld",NODENAME,(long)getpid());
        tempflfp=fopen(tempflnm,"w");
        if (tempflfp==NULL) return;
 
index 51917d0a4562a04df802883a265008bee488913c..34a66ce97b9fcf5a6230ca3ccd49c6eace2531c5 100644 (file)
@@ -85,8 +85,8 @@ int main(int argc, char **argv)
        char spool_only = 0;
 
        get_config();
-       sprintf(flnm,"./network/spoolin/rnews.%d",getpid());
-       sprintf(tname,"/tmp/rnews.%d",getpid());
+       sprintf(flnm,"./network/spoolin/rnews.%ld",(long)getpid());
+       sprintf(tname,"/tmp/rnews.%ld",(long)getpid());
 
        for (a=1; a<argc; ++a) {
                if (!strcmp(argv[a],"-c")) binary_input = 1;
index 9ced0e5e62893c0aa8517fce971e1467b686cc7f..8519a918ddd319787d0b05c31a619df118460644 100644 (file)
 #include "routines.h"
 #include "commands.h"
 #include "tools.h"
+#include "messages.h"
 
 void interr(int errnum);
 void strprompt(char *prompt, char *str, int len);
 void newprompt(char *prompt, char *str, int len);
 void sttybbs(int cmd);
 int inkey(void);
-int ka_wait(pid_t *kstatus);
 void serv_write(char *buf, int nbytes);
 void extract(char *dest, char *source, int parmnum);
 int haschar(char *st, int ch);
@@ -583,7 +583,7 @@ void do_system_configuration(void) {
        int a;
 
        /* Clear out the config buffers */
-       bzero(&sc[0][0], sizeof(sc));
+       memset(&sc[0][0], 0, sizeof(sc));
 
        /* Fetch the current config */
        serv_puts("CONF get");
index 0f7995e3344623c9f95db1e78f8d0c4051c6de82..87e56037f14edb8a2c0824bfa97f101f1b35ca27 100644 (file)
@@ -40,7 +40,7 @@ int set_lockfile(void) {
                }
 
        lfp=fopen(LOCKFILE,"w");
-       fprintf(lfp,"%d\n",getpid());
+       fprintf(lfp,"%ld\n",(long)getpid());
        fclose(lfp);
        return(0);
        }
@@ -141,7 +141,7 @@ int main(int argc, char **argv)
        signal(SIGHUP,cleanup);
        signal(SIGTERM,cleanup);
 
-       fprintf(stderr, "sendcommand: started.  pid=%d\n",getpid());
+       fprintf(stderr, "sendcommand: started.  pid=%ld\n",(long)getpid());
        fflush(stderr);
        np_attach_to_server();
        fflush(stderr);
index aebc91e8ae5ec8e71449e348365239c927c09c76..14ac7e6a8333259936efe53361f0f0bcb8cf6a23 100644 (file)
@@ -392,7 +392,7 @@ int send_express_message(char *lun, char *x_user, char *x_msg)
                                if (ccptr->ExpressMessages == NULL) {
                                        newlen = strlen(x_msg) + 80;
                                        msgptr = mallok(newlen);
-                                       bzero(msgptr, newlen);
+                                       memset(msgptr, 0, newlen);
                                } else {
                                        newlen = (strlen(ccptr->ExpressMessages)
                                                  + strlen(x_msg) + 80);
@@ -476,7 +476,7 @@ void cmd_sexp(char *argbuf)
                cprintf("%d Transmit message (will deliver to %d users)\n",
                        SEND_LISTING, message_sent);
                x_big_msgbuf = mallok(256);
-               bzero(x_big_msgbuf, 256);
+               memset(x_big_msgbuf, 0, 256);
                while (client_gets(x_msg), strcmp(x_msg, "000")) {
                        x_big_msgbuf = reallok(x_big_msgbuf,
                               strlen(x_big_msgbuf) + strlen(x_msg) + 4);
index ee2e97022aa3f71bddbd3a3ad1d84d10392f1918..e64f2728282e87f31bcae92e1ed385a94352f5d3 100644 (file)
@@ -23,7 +23,7 @@ void CtdlInternalGetServInfo(struct CtdlServInfo *infobuf) {
        serv_gets(buf);
        if (buf[0]!='1') return;
 
-       bzero(infobuf, sizeof(struct CtdlServInfo));
+       memset(infobuf, 0, sizeof(struct CtdlServInfo));
        a = 0;
        while(serv_gets(buf), strcmp(buf,"000")) {
            switch(a) {
index 4d5a46b308b7a438faab38971b6a38223787185c..3f7f5e957f87650752b12a15626814fa2c3d99c5 100644 (file)
@@ -95,7 +95,7 @@ void imp_floors(void) {
        while(fpgetfield(imfp, key), strcasecmp(key, "endsection")) {
 
                if (!strcasecmp(key, "floor")) {
-                       bzero(&fl, sizeof(struct floor));
+                       memset(&fl, 0, sizeof(struct floor));
 
                        while(fpgetfield(imfp, tag),
                             strcasecmp(tag, "endfloor")) {
@@ -139,7 +139,7 @@ void imp_rooms(void) {
        
        while(fpgetfield(imfp, key), strcasecmp(key, "endsection")) {
                if (!strcasecmp(key, "room")) {
-                       bzero(&qr, sizeof(struct quickroom));
+                       memset(&qr, 0, sizeof(struct quickroom));
                        msglist = NULL;
                        num_msgs = 0;
                        lprintf(9, "Room ");
@@ -225,7 +225,7 @@ void import_a_user(void) {
        char key[256], value[256];
        struct usersupp us;
 
-       bzero(&us, sizeof(struct usersupp));    
+       memset(&us, 0, sizeof(struct usersupp));        
        while(fpgetfield(imfp, key), strcasecmp(key, "enduser")) {
                if (strcasecmp(key, "mail")) {
                        fpgetfield(imfp, value);
index 3af89468cc2be0449e51c1235ad6b227ebbdb10f..38b47bbfe4d6abdc60fdfbf57f81e374869bcc3d 100644 (file)
@@ -549,7 +549,7 @@ void set_str_val(int msgpos, char str[]) {
        char tempfile[64];
        FILE *fp;
 
-       sprintf(tempfile, "/tmp/setup.%d", getpid());
+       sprintf(tempfile, "/tmp/setup.%ld", (long)getpid());
 
        switch (setup_type) {
                case UI_TEXT:
index c5cc377e25b1b12152ce5a35a4bcb8dd2954b53d..c1b58102dc23db1fd2c1f08f0294cb0f0e8b8c56 100644 (file)
@@ -1,11 +1,13 @@
 /* $Id$ */
 
+#ifndef _SGI_SOURCE
 /* needed to properly enable crypt() stuff on some systems */
 #define _XOPEN_SOURCE
 /* needed for str[n]casecmp() on some systems if the above is defined */
 #define _XOPEN_SOURCE_EXTENDED
 /* needed to enable threads on some systems if the above are defined */
 #define _POSIX_C_SOURCE 199506L
+#endif
 
 #include <stdlib.h>
 #include <unistd.h>
@@ -46,7 +48,7 @@ int getuser(struct usersupp *usbuf, char name[]) {
        int a;
        struct cdbdata *cdbus;
 
-       bzero(usbuf, sizeof(struct usersupp));
+       memset(usbuf, 0, sizeof(struct usersupp));
        for (a=0; a<=strlen(name); ++a) {
                lowercase_name[a] = tolower(name[a]);
                }
@@ -175,7 +177,7 @@ void CtdlGetRelationship(struct visit *vbuf,
                rel_user->usernum);
 
        /* Clear out the buffer */
-       bzero(vbuf, sizeof(struct visit));
+       memset(vbuf, 0, sizeof(struct visit));
 
        cdbvisit = cdb_fetch(CDB_VISIT, IndexBuf, IndexLen);
        if (cdbvisit != NULL) {
@@ -226,7 +228,7 @@ int getuserbynumber(struct usersupp *usbuf, long int number)
        cdb_rewind(CDB_USERSUPP);
 
        while(cdbus = cdb_next_item(CDB_USERSUPP), cdbus != NULL) {
-               bzero(usbuf, sizeof(struct usersupp));
+               memset(usbuf, 0, sizeof(struct usersupp));
                memcpy(usbuf, cdbus->ptr,
                        ( (cdbus->len > sizeof(struct usersupp)) ?
                        sizeof(struct usersupp) : cdbus->len) );
@@ -812,7 +814,7 @@ void cmd_gnur(void) {
         */
        cdb_rewind(CDB_USERSUPP);
        while (cdbus = cdb_next_item(CDB_USERSUPP), cdbus != NULL) {
-               bzero(&usbuf, sizeof(struct usersupp));
+               memset(&usbuf, 0, sizeof(struct usersupp));
                memcpy(&usbuf, cdbus->ptr,
                        ( (cdbus->len > sizeof(struct usersupp)) ?
                        sizeof(struct usersupp) : cdbus->len) );
@@ -956,7 +958,7 @@ void ForEachUser(void (*CallBack)(struct usersupp *EachUser)) {
        cdb_rewind(CDB_USERSUPP);
 
        while(cdbus = cdb_next_item(CDB_USERSUPP), cdbus != NULL) {
-               bzero(&usbuf, sizeof(struct usersupp));
+               memset(&usbuf, 0, sizeof(struct usersupp));
                memcpy(&usbuf, cdbus->ptr,
                        ( (cdbus->len > sizeof(struct usersupp)) ?
                        sizeof(struct usersupp) : cdbus->len) );