From: Nathan Bryant Date: Thu, 13 May 1999 04:28:45 +0000 (+0000) Subject: fix namespace collision with on certain SYSV variants X-Git-Tag: v7.86~7695 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=32950cbecc3be7bbb829b2c7934ffff47c1e3fea fix namespace collision with on certain SYSV variants --- diff --git a/citadel/citadel.h b/citadel/citadel.h index 38420a8eb..573929ef7 100644 --- a/citadel/citadel.h +++ b/citadel/citadel.h @@ -173,10 +173,10 @@ struct quickroom { #define MES_ANON 66 /* "****" header */ #define MES_AN2 67 /* "Anonymous" header */ -#define M_ERROR (-1) /* Can't send message due to bad address */ -#define M_LOCAL 0 /* Local message, do no network processing */ -#define M_INTERNET 1 /* Convert msg and send as Internet mail */ -#define M_BINARY 2 /* Process recipient and send via C/UX net */ +#define MES_ERROR (-1) /* Can't send message due to bad address */ +#define MES_LOCAL 0 /* Local message, do no network processing */ +#define MES_INTERNET 1 /* Convert msg and send as Internet mail */ +#define MES_BINARY 2 /* Process recipient and send via C/UX net */ /****************************************************************************/ diff --git a/citadel/file_ops.c b/citadel/file_ops.c index 48519eef8..297164554 100644 --- a/citadel/file_ops.c +++ b/citadel/file_ops.c @@ -186,7 +186,7 @@ void cmd_netf(char *cmdbuf) } snprintf(buf,sizeof buf,"sysop@%s",destsys); e=alias(buf); - if (e!=M_BINARY) { + if (e!=MES_BINARY) { cprintf("%d No such system: '%s'\n", ERROR+NO_SUCH_SYSTEM,destsys); return; @@ -562,7 +562,7 @@ void cmd_ucls(char *cmd) fprintf(fp,"NEW UPLOAD: '%s'\n %s\n",CC->upl_file,CC->upl_comment); putc(0,fp); fclose(fp); - save_message(CC->temp, "", "", M_LOCAL, 1); + save_message(CC->temp, "", "", MES_LOCAL, 1); } else { diff --git a/citadel/msgbase.c b/citadel/msgbase.c index da663996e..4b2c9ed85 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -73,7 +73,7 @@ int alias(char *name) /* process alias and routing info for mail */ fp=fopen("network/mail.aliases","r"); if (fp==NULL) fp=fopen("/dev/null","r"); - if (fp==NULL) return(M_ERROR); + if (fp==NULL) return(MES_ERROR); strcpy(aaa,""); strcpy(bbb,""); while (fgets(aaa, sizeof aaa, fp)!=NULL) { while (isspace(name[0])) strcpy(name, &name[1]); @@ -91,22 +91,22 @@ int alias(char *name) /* process alias and routing info for mail */ lprintf(7, "Mail is being forwarded to %s\n", name); /* determine local or remote type, see citadel.h */ - for (a=0; a1) { lprintf(7, "Too many @'s in address\n"); - return(M_ERROR); + return(MES_ERROR); } if (b==1) { for (a=0; a=0)&&(strcasecmp(aaa,bbb))); @@ -125,7 +125,7 @@ GETSN: do { } while(bbb[strlen(bbb)-1]=='_') bbb[strlen(bbb)-1]=0; sprintf(name,&aaa[4],bbb); - return(M_INTERNET); + return(MES_INTERNET); } if (!strncmp(aaa,"bin",3)) { strcpy(aaa,name); strcpy(bbb,name); @@ -136,11 +136,11 @@ GETSN: do { strcpy(bbb,&bbb[1]); while (bbb[0]==' ') strcpy(bbb,&bbb[1]); sprintf(name,"%s @%s",aaa,bbb); - return(M_BINARY); + return(MES_BINARY); } - return(M_ERROR); + return(MES_ERROR); } - return(M_LOCAL); + return(MES_LOCAL); } @@ -924,7 +924,7 @@ void save_message(char *mtmp, /* file containing proper message */ lprintf(9, "mailbox aliasing loop\n"); if (strlen(recipient) > 0) { /* mailtype = alias(recipient); */ - if (mailtype == M_LOCAL) { + if (mailtype == MES_LOCAL) { if (getuser(&userbuf, recipient)!=0) { /* User not found, goto Aide */ strcpy(force_room, AIDEROOM); @@ -963,7 +963,7 @@ void save_message(char *mtmp, /* file containing proper message */ lputroom(&CC->quickroom, actual_rm); /* Network mail - send a copy to the network program. */ - if ( (strlen(recipient)>0) && (mailtype != M_LOCAL) ) { + if ( (strlen(recipient)>0) && (mailtype != MES_LOCAL) ) { sprintf(aaa,"./network/spoolin/netmail.%04lx.%04x.%04x", (long)getpid(), CC->cs_pid, ++seqnum); copy_file(mtmp,aaa); @@ -1001,7 +1001,7 @@ void aide_message(char *text) fprintf(fp,"N%s%c",NODENAME,0); fprintf(fp,"M%s\n%c",text,0); fclose(fp); - save_message(CC->temp,"",AIDEROOM,M_LOCAL,1); + save_message(CC->temp,"",AIDEROOM,MES_LOCAL,1); syslog(LOG_NOTICE,text); } @@ -1030,8 +1030,8 @@ void make_message( strcpy(dest_node, ""); - /* If net_type is M_BINARY, split out the destination node. */ - if (net_type == M_BINARY) { + /* If net_type is MES_BINARY, split out the destination node. */ + if (net_type == MES_BINARY) { strcpy(dest_node,NODENAME); for (a=0; ausersupp.axlevel<4)) { + if ((e!=MES_LOCAL)&&(CC->usersupp.axlevel<4)) { cprintf("%d Net privileges required for network mail.\n", ERROR+HIGHER_ACCESS_REQUIRED); return; } - if ((RESTRICT_INTERNET==1)&&(e==M_INTERNET) + if ((RESTRICT_INTERNET==1)&&(e==MES_INTERNET) &&((CC->usersupp.flags&US_INTERNET)==0) &&(!CC->internal_pgm) ) { cprintf("%d You don't have access to Internet mail.\n", @@ -1183,7 +1183,7 @@ void cmd_ent0(char *entargs) mtsflag=1; goto SKFALL; } - if (e!=M_LOCAL) goto SKFALL; /* don't search local file */ + if (e!=MES_LOCAL) goto SKFALL; /* don't search local file */ if (!strcasecmp(buf,CC->usersupp.fullname)) { cprintf("%d Can't send mail to yourself!\n", ERROR+NO_SUCH_USER); @@ -1262,12 +1262,12 @@ void cmd_ent3(char *entargs) /* If we're in Mail, check the recipient */ if (strlen(recp) > 0) { e=alias(recp); /* alias and mail type */ - if ((recp[0]==0) || (e==M_ERROR)) { + if ((recp[0]==0) || (e==MES_ERROR)) { cprintf("%d Unknown address - cannot send message.\n", ERROR+NO_SUCH_USER); return; } - if (e == M_LOCAL) { + if (e == MES_LOCAL) { a = getuser(&tempUS,recp); if (a!=0) { cprintf("%d No such user.\n", diff --git a/citadel/netproc.c b/citadel/netproc.c index 59c2ebcd7..7a137c222 100644 --- a/citadel/netproc.c +++ b/citadel/netproc.c @@ -408,10 +408,10 @@ GETSN: for (stemp=slist; stemp!=NULL; stemp=stemp->next) { goto GETSN; } if (!strcasecmp(stemp->s_type,"bin")) { - return(M_BINARY); + return(MES_BINARY); } if (!strcasecmp(stemp->s_type,"uum")) { - return(M_INTERNET); + return(MES_INTERNET); } } } @@ -788,7 +788,7 @@ NXMSG: /* Seek to the beginning of the next message */ a = get_sysinfo_type(minfo.D); syslog(LOG_NOTICE, "routing message to system <%s>", minfo.D); fflush(stdout); - if (a==M_INTERNET) { + if (a==MES_INTERNET) { if (fork()==0) { syslog(LOG_NOTICE, "netmailer %s", tname); fflush(stdout); @@ -800,7 +800,7 @@ NXMSG: /* Seek to the beginning of the next message */ } else while (wait(&b)!=(-1)); } - else if (a==M_BINARY) { + else if (a==MES_BINARY) { ship_to(tname,minfo.D); } else { diff --git a/citadel/serv_chat.c b/citadel/serv_chat.c index 6122062d9..27c644938 100644 --- a/citadel/serv_chat.c +++ b/citadel/serv_chat.c @@ -522,7 +522,7 @@ int send_express_message(char *lun, char *x_user, char *x_msg) fprintf(fp, "N%s%c", NODENAME, 0); fprintf(fp, "M%s\n%c", x_msg, 0); fclose(fp); - save_message(CC->temp, "", config.c_logpages, M_LOCAL, 1); + save_message(CC->temp, "", config.c_logpages, MES_LOCAL, 1); unlink(CC->temp); } return (message_sent);