Change names of functions and variables with global scope that are

in conflict with library values of the same name. This allows static
linking.
This commit is contained in:
Mark Murray 2001-04-28 07:55:19 +00:00
parent f9ebf4c2b5
commit 618b0bba1f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=76096
3 changed files with 19 additions and 19 deletions

View File

@ -39,7 +39,7 @@ char **copyblk __P((char **));
void cwd __P((char *));
void delete __P((char *));
void dologout __P((int));
void fatal __P((char *));
void fatalerror __P((char *));
void ftpd_logwtmp __P((char *, char *, char *));
int ftpd_pclose __P((FILE *));
FILE *ftpd_popen __P((char *, char *));

View File

@ -81,7 +81,7 @@ extern int paranoid;
extern int logging;
extern int type;
extern int form;
extern int debug;
extern int ftpdebug;
extern int timeout;
extern int maxtimeout;
extern int pdata;
@ -232,10 +232,10 @@ cmd
memset(&data_dest, 0, sizeof(data_dest));
tmp = strdup($4);
if (debug)
if (ftpdebug)
syslog(LOG_DEBUG, "%s", tmp);
if (!tmp) {
fatal("not enough core");
fatalerror("not enough core");
/*NOTREACHED*/
}
p = tmp;
@ -255,7 +255,7 @@ cmd
}
*q++ = '\0';
result[i] = p;
if (debug)
if (ftpdebug)
syslog(LOG_DEBUG, "%d: %s", i, p);
p = q;
}
@ -1159,7 +1159,7 @@ getline(s, n, iop)
*cs++ = tmpline[c];
if (tmpline[c] == '\n') {
*cs++ = '\0';
if (debug)
if (ftpdebug)
syslog(LOG_DEBUG, "command: %s", s);
tmpline[0] = '\0';
return(s);
@ -1199,7 +1199,7 @@ getline(s, n, iop)
if (c == EOF && cs == s)
return (NULL);
*cs++ = '\0';
if (debug) {
if (ftpdebug) {
if (!guest && strncasecmp("pass ", s, 5) == 0) {
/* Don't syslog passwords */
syslog(LOG_DEBUG, "command: %.5s ???", s);
@ -1448,7 +1448,7 @@ yylex()
break;
default:
fatal("Unknown state in scanner.");
fatalerror("Unknown state in scanner.");
}
yyerror((char *) 0);
state = CMD;
@ -1475,7 +1475,7 @@ copy(s)
p = malloc((unsigned) strlen(s) + 1);
if (p == NULL)
fatal("Ran out of memory.");
fatalerror("Ran out of memory.");
(void) strcpy(p, s);
return (p);
}

View File

@ -131,7 +131,7 @@ int data;
jmp_buf errcatch, urgcatch;
int logged_in;
struct passwd *pw;
int debug;
int ftpdebug;
int timeout = 900; /* timeout after 15 minutes of inactivity */
int maxtimeout = 7200;/* don't allow idle time to be set beyond 2 hours */
int logging;
@ -307,7 +307,7 @@ main(argc, argv, envp)
break;
case 'd':
debug++;
ftpdebug++;
break;
case 'E':
@ -370,7 +370,7 @@ main(argc, argv, envp)
break;
case 'v':
debug = 1;
ftpdebug = 1;
break;
case '4':
@ -597,7 +597,7 @@ main(argc, argv, envp)
}
#ifndef VIRTUAL_HOSTING
if ((hostname = malloc(MAXHOSTNAMELEN)) == NULL)
fatal("Ran out of memory.");
fatalerror("Ran out of memory.");
(void) gethostname(hostname, MAXHOSTNAMELEN - 1);
hostname[MAXHOSTNAMELEN - 1] = '\0';
#endif
@ -613,7 +613,7 @@ lostconn(signo)
int signo;
{
if (debug)
if (ftpdebug)
syslog(LOG_DEBUG, "lost connection");
dologout(1);
}
@ -639,7 +639,7 @@ inithosts()
line[0] = '\0';
if ((hrp = malloc(sizeof(struct ftphost))) == NULL ||
(hrp->hostname = strdup(line)) == NULL)
fatal("Ran out of memory.");
fatalerror("Ran out of memory.");
hrp->hostinfo = NULL;
memset(&hints, 0, sizeof(hints));
@ -1391,7 +1391,7 @@ pass(passwd)
free(ident);
ident = strdup(passwd);
if (ident == NULL)
fatal("Ran out of memory.");
fatalerror("Ran out of memory.");
reply(230, "Guest login ok, access restrictions apply.");
#ifdef SETPROCTITLE
@ -2095,7 +2095,7 @@ epsvonly:;
}
void
fatal(s)
fatalerror(s)
char *s;
{
@ -2125,7 +2125,7 @@ reply(n, fmt, va_alist)
(void)vprintf(fmt, ap);
(void)printf("\r\n");
(void)fflush(stdout);
if (debug) {
if (ftpdebug) {
syslog(LOG_DEBUG, "<--- %d ", n);
vsyslog(LOG_DEBUG, fmt, ap);
}
@ -2151,7 +2151,7 @@ lreply(n, fmt, va_alist)
(void)vprintf(fmt, ap);
(void)printf("\r\n");
(void)fflush(stdout);
if (debug) {
if (ftpdebug) {
syslog(LOG_DEBUG, "<--- %d- ", n);
vsyslog(LOG_DEBUG, fmt, ap);
}