This commit is contained in:
christos 1998-02-04 14:32:51 +00:00
parent a2b24d5571
commit a5fd55b1b0
30 changed files with 78 additions and 32 deletions

View File

@ -7,6 +7,8 @@ LIBUUCONF!=cd $(.CURDIR)/../libuuconf; \
LIBUUCP!=cd $(.CURDIR)/../libuucp; \
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/libuucp.a\n" | ${MAKE} -s -f-
CPPFLAGS+=-DPOSIX_HEADERS
WARNS= 1
VERSION= 1.06.1
owner= uucp
bindir= /usr/bin

View File

@ -26,7 +26,7 @@
#include "uucp.h"
#if USE_RCS_ID
const char conn_rcsid[] = "$Id: conn.c,v 1.3 1995/08/24 05:18:49 jtc Exp $";
const char conn_rcsid[] = "$Id: conn.c,v 1.4 1998/02/04 14:32:53 christos Exp $";
#endif
#include <ctype.h>
@ -205,7 +205,7 @@ fconn_close (qconn, puuconf, qdialer, fsuccess)
/* Ignore any SIGHUP we may have gotten, and make sure any signal
reporting has been done before we reset fLog_sighup. */
afSignal[INDEXSIG_SIGHUP] = FALSE;
ulog (LOG_ERROR, (const char *) NULL);
ulog (LOG_ERROR, ulognone);
fLog_sighup = TRUE;
ulog_device ((const char *) NULL);

View File

@ -26,7 +26,7 @@
#include "uucp.h"
#if USE_RCS_ID
const char copy_rcsid[] = "$Id: copy.c,v 1.3 1995/08/24 05:18:52 jtc Exp $";
const char copy_rcsid[] = "$Id: copy.c,v 1.4 1998/02/04 14:32:54 christos Exp $";
#endif
#include "uudefs.h"
@ -91,7 +91,7 @@ fcopy_open_file (efrom, zto, fpublic, fmkdirs, fsignals)
if (fsignals && FGOT_SIGNAL ())
{
/* Log the signal. */
ulog (LOG_ERROR, (const char *) NULL);
ulog (LOG_ERROR, ulognone);
(void) fclose (eto);
(void) remove (zto);
return FALSE;

View File

@ -26,7 +26,7 @@
#include "uucp.h"
#if USE_RCS_ID
const char log_rcsid[] = "$Id: log.c,v 1.3 1995/08/24 05:18:56 jtc Exp $";
const char log_rcsid[] = "$Id: log.c,v 1.4 1998/02/04 14:32:55 christos Exp $";
#endif
#include <ctype.h>
@ -126,6 +126,9 @@ static const char * const azSignal_names[INDEXSIG_COUNT] = INDEXSIG_NAMES;
This is used to support cu. */
void (*pfLstart) P((void));
/* Indicate no log processing should take place. */
const char ulognone[] = "";
/* If not NULL, ulog calls this function after outputting everything.
This is used to support cu. */
void (*pfLend) P((void));
@ -260,7 +263,7 @@ ulog (ttype, zmsg, a, b, c, d, f, g, h, i, j)
/* Log any received signal. We do it this way to avoid calling ulog
from the signal handler. A few routines call ulog to get this
message out with zmsg == NULL. */
message out with zmsg == ulognone */
{
static boolean fdoing_sigs;
@ -386,7 +389,7 @@ ulog (ttype, zmsg, a, b, c, d, f, g, h, i, j)
return;
}
if (zmsg == NULL)
if (zmsg == ulognone)
return;
if (pfLstart != NULL)
@ -592,7 +595,7 @@ void
ulog_close ()
{
/* Make sure we logged any signal we received. */
ulog (LOG_ERROR, (const char *) NULL);
ulog (LOG_ERROR, ulognone);
if (eLlog != NULL)
{

View File

@ -293,6 +293,7 @@ extern void ulog P((enum tlog ttype, const char *zfmt, ...))
#else
extern void ulog ();
#endif
extern const char ulognone[];
#undef GNUC_VERSION

View File

@ -26,7 +26,7 @@
#include "uucp.h"
#if USE_RCS_ID
const char cu_rcsid[] = "$Id: cu.c,v 1.3 1995/08/24 05:19:30 jtc Exp $";
const char cu_rcsid[] = "$Id: cu.c,v 1.4 1998/02/04 14:32:58 christos Exp $";
#endif
#include "cu.h"
@ -1897,7 +1897,7 @@ icutake (puuconf, argc, argv, pvar, pinfo)
if (FGOT_SIGNAL ())
{
/* Make sure the signal is logged. */
ulog (LOG_ERROR, (const char *) NULL);
ulog (LOG_ERROR, ulognone);
ucuputs ("[file receive aborted]");
/* Reset the SIGINT flag so that it does not confuse us in
the future. */
@ -2028,7 +2028,7 @@ fcusend_buf (qconn, zbufarg, cbufarg)
{
/* Make sure the signal is logged. */
ubuffree (zsendbuf);
ulog (LOG_ERROR, (const char *) NULL);
ulog (LOG_ERROR, ulognone);
ucuputs ("[file send aborted]");
/* Reset the SIGINT flag so that it does not confuse us in
the future. */
@ -2130,7 +2130,7 @@ fcusend_buf (qconn, zbufarg, cbufarg)
{
/* Make sure the signal is logged. */
ubuffree (zsendbuf);
ulog (LOG_ERROR, (const char *) NULL);
ulog (LOG_ERROR, ulognone);
ucuputs ("[file send aborted]");
/* Reset the SIGINT flag so that it does not
confuse us in the future. */

View File

@ -26,7 +26,7 @@
#include "uucp.h"
#if USE_RCS_ID
const char cusub_rcsid[] = "$Id: cusub.c,v 1.3 1995/08/24 05:19:37 jtc Exp $";
const char cusub_rcsid[] = "$Id: cusub.c,v 1.4 1998/02/04 14:33:00 christos Exp $";
#endif
#include "uudefs.h"
@ -319,7 +319,7 @@ fsysdep_cu (qconn, pbcmd, zlocalname)
usysdep_start_catch ();
else
{
ulog (LOG_ERROR, (const char *) NULL);
ulog (LOG_ERROR, ulognone);
return FALSE;
}
@ -359,7 +359,7 @@ fsysdep_cu (qconn, pbcmd, zlocalname)
if (errno != EINTR)
ulog (LOG_ERROR, "read: %s", strerror (errno));
else
ulog (LOG_ERROR, (const char *) NULL);
ulog (LOG_ERROR, ulognone);
return FALSE;
}
@ -925,7 +925,7 @@ zsysdep_terminal_line (zprompt)
{
usysdep_end_catch ();
/* Make sure the signal is logged. */
ulog (LOG_ERROR, (const char *) NULL);
ulog (LOG_ERROR, ulognone);
/* Return an empty string. */
cgot = 0;
break;

View File

@ -74,7 +74,7 @@ usysdep_detach ()
/* Make sure that we can open the log file. We do this now so that,
if we can't, a message will be written to stderr. After we leave
this routine, stderr will be closed. */
ulog (LOG_NORMAL, (const char *) NULL);
ulog (LOG_NORMAL, ulognone);
/* Make sure we are not a process group leader. */
#if HAVE_BSD_PGRP

View File

@ -74,9 +74,11 @@
#endif
/* External functions. */
#ifndef POSIX_HEADERS
#ifndef lseek
extern off_t lseek ();
#endif
#endif
#define ZCHARS \
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"

View File

@ -23,7 +23,6 @@
#include "sysdep.h"
#include "fsusg.h"
int statfs ();
#if HAVE_SYS_PARAM_H
#include <sys/param.h>
@ -90,6 +89,10 @@ int statvfs ();
#if ! STAT_NONE
#ifndef POSIX_HEADERS
extern int statfs ();
#endif
static long adjust_blocks P((long blocks, int fromsize, int tosize));
/* Return the number of TOSIZE-byte blocks used by

View File

@ -55,6 +55,8 @@ Modified by Ian Lance Taylor for Taylor UUCP, June 1992, and October 1993. */
#endif
/* Traverse one level of a directory tree. */
static int ftw_dir P((DIR **, int, int, char *, size_t,
int (*)(const char *, struct stat *, int)));
static int
ftw_dir (dirs, level, descriptors, dir, len, func)

View File

@ -82,6 +82,7 @@
#endif /* ! defined (MAXPATHLEN) */
#endif /* HAVE_GETWD */
#ifndef POSIX_HEADERS
/* External functions. */
#ifndef getlogin
extern char *getlogin ();
@ -111,6 +112,7 @@ extern char *getwd ();
extern long sysconf ();
#endif
#endif
#endif
/* Initialize the system dependent routines. We will probably be running
suid to uucp, so we make sure that nothing is obviously wrong. We

View File

@ -99,7 +99,7 @@ ixswait (ipid, zreport)
ulog (LOG_ERROR, "waitpid: %s", strerror (errno));
return -1;
}
ulog (LOG_ERROR, (const char *) NULL);
ulog (LOG_ERROR, ulognone);
}
#else /* ! HAVE_WAITPID */
#if HAVE_WAIT4

View File

@ -31,11 +31,13 @@
#include <pwd.h>
#ifndef POSIX_HEADERS
#if GETPWNAM_DECLARATION_OK
#ifndef getpwnam
extern struct passwd *getpwnam ();
#endif
#endif
#endif
/* Turn a file name into an absolute path, by doing tilde expansion
and moving any other type of file into the public directory. */

View File

@ -26,7 +26,7 @@
#include "uucp.h"
#if USE_RCS_ID
const char lock_rcsid[] = "$Id: lock.c,v 1.3 1995/08/24 05:19:56 jtc Exp $";
const char lock_rcsid[] = "$Id: lock.c,v 1.4 1998/02/04 14:33:07 christos Exp $";
#endif
#include "uudefs.h"
@ -71,9 +71,11 @@ const char lock_rcsid[] = "$Id: lock.c,v 1.3 1995/08/24 05:19:56 jtc Exp $";
#define SEEK_SET 0
#endif
#ifndef POSIX_HEADERS
#ifndef localtime
extern struct tm *localtime ();
#endif
#endif
#if HAVE_QNX_LOCKFILES
static boolean fsqnx_stale P((unsigned long ipid, unsigned long inme,

View File

@ -11,9 +11,11 @@
#include "system.h"
#ifndef POSIX_HEADERS
#ifndef localtime
extern struct tm *localtime ();
#endif
#endif
void
usysdep_localtime (itime, q)

View File

@ -35,9 +35,11 @@
#include <time.h>
#endif
#ifndef POSIX_HEADERS
#ifndef ctime
extern char *ctime ();
#endif
#endif
/* Mail a message to a user. */

View File

@ -58,9 +58,11 @@
#define FD_CLOEXEC 1
#endif
#ifndef POSIX_HEADERS
#ifndef time
extern time_t time ();
#endif
#endif
/* Open a file to send to another system, and return the mode and
the size. */

View File

@ -26,7 +26,7 @@
#include "uucp.h"
#if USE_RCS_ID
const char picksb_rcsid[] = "$Id: picksb.c,v 1.3 1995/08/24 05:20:04 jtc Exp $";
const char picksb_rcsid[] = "$Id: picksb.c,v 1.4 1998/02/04 14:33:12 christos Exp $";
#endif
#include "uudefs.h"
@ -45,11 +45,13 @@ const char picksb_rcsid[] = "$Id: picksb.c,v 1.3 1995/08/24 05:20:04 jtc Exp $";
#endif /* ! HAVE_DIRENT_H */
#endif /* HAVE_OPENDIR */
#ifndef POSIX_HEADERS
#if GETPWUID_DECLARATION_OK
#ifndef getpwuid
extern struct passwd *getpwuid ();
#endif
#endif
#endif
/* Local variables. */

View File

@ -13,9 +13,11 @@
#include <sys/socket.h>
#endif
#ifndef POSIX_HEADERS
#ifndef ttyname
extern char *ttyname ();
#endif
#endif
/* Get the port name of standard input. I assume that Unix systems
generally support ttyname. If they don't, this function can just

View File

@ -99,6 +99,7 @@ extern long times ();
#endif /* HAVE_TIMES */
#ifndef POSIX_HEADERS
#ifndef time
extern time_t time ();
#endif
@ -107,6 +108,7 @@ extern time_t time ();
extern long sysconf ();
#endif
#endif
#endif
/* Get the time in seconds and microseconds; this need only work
within the process when called from the system independent code.

View File

@ -26,7 +26,7 @@
#include "uucp.h"
#if USE_RCS_ID
const char serial_rcsid[] = "$Id: serial.c,v 1.3 1995/08/24 05:20:12 jtc Exp $";
const char serial_rcsid[] = "$Id: serial.c,v 1.4 1998/02/04 14:33:15 christos Exp $";
#endif
#include "uudefs.h"
@ -2255,7 +2255,7 @@ fsysdep_conn_read (qconn, zbuf, pclen, cmin, ctimeout, freport)
if (errno == EINTR)
{
/* Log the signal. */
ulog (LOG_ERROR, (const char *) NULL);
ulog (LOG_ERROR, ulognone);
}
if (fSalarm)
{
@ -2479,7 +2479,7 @@ fsysdep_conn_write (qconn, zwrite, cwrite)
break;
/* We were interrupted by a signal. Log it. */
ulog (LOG_ERROR, (const char *) NULL);
ulog (LOG_ERROR, ulognone);
}
if (cdid < 0)
@ -2665,7 +2665,7 @@ fsysdep_conn_io (qconn, zwrite, pcwrite, zread, pcread)
break;
/* We got interrupted by a signal. Log it. */
ulog (LOG_ERROR, (const char *) NULL);
ulog (LOG_ERROR, ulognone);
}
if (cgot < 0)
@ -2733,7 +2733,7 @@ fsysdep_conn_io (qconn, zwrite, pcwrite, zread, pcread)
break;
/* We got interrupted by a signal. Log it. */
ulog (LOG_ERROR, (const char *) NULL);
ulog (LOG_ERROR, ulognone);
}
if (cdid < 0)
@ -2794,7 +2794,7 @@ fsysdep_conn_io (qconn, zwrite, pcwrite, zread, pcread)
if (c < 0 && errno == EINTR)
{
/* We got interrupted by a signal. Log it. */
ulog (LOG_ERROR, (const char *) NULL);
ulog (LOG_ERROR, ulognone);
}
else if (c >= 0)
{
@ -2887,7 +2887,7 @@ fsysdep_conn_io (qconn, zwrite, pcwrite, zread, pcread)
if (ierr == EINTR)
{
/* We got interrupted by a signal. Log it. */
ulog (LOG_ERROR, (const char *) NULL);
ulog (LOG_ERROR, ulognone);
}
else
{

View File

@ -9,9 +9,11 @@
#include "system.h"
#ifndef POSIX_HEADERS
#ifndef time
extern time_t time ();
#endif
#endif
/* Get the time in seconds since the epoch, with optional
microseconds. We use ixsysdep_process_time to get the microseconds

View File

@ -25,10 +25,12 @@
#define SEEK_SET 0
#endif
#ifndef POSIX_HEADERS
/* External functions. */
#ifndef lseek
extern off_t lseek ();
#endif
#endif
/* Truncate a file to zero length. If this fails, it closes and
removes the file. We support a number of different means of

View File

@ -33,18 +33,22 @@
#if HAVE_GETGRENT
#include <grp.h>
#ifndef POSIX_HEADERS
#if GETGRENT_DECLARATION_OK
#ifndef getgrent
extern struct group *getgrent ();
#endif
#endif
#endif
#endif /* HAVE_GETGRENT */
#ifndef POSIX_HEADERS
#if GETPWNAM_DECLARATION_OK
#ifndef getpwnam
extern struct passwd *getpwnam ();
#endif
#endif
#endif
/* Do access(2) on a stat structure, except that the user name is
provided. If the user name in zuser is NULL, require the file to

View File

@ -65,7 +65,7 @@ fsysdep_wildcard_start (zfile)
ulog (LOG_FATAL, "fsysdep_wildcard: %s: Can't happen", zfile);
#endif
if (glob (zfile, 0, (int (*) ()) NULL, &sSglob) != 0)
if (glob (zfile, 0, (int (*) P((const char *, int))) NULL, &sSglob) != 0)
sSglob.gl_pathc = 0;
iSglob = 0;
return TRUE;

View File

@ -26,7 +26,7 @@
#include "uucnfi.h"
#if USE_RCS_ID
const char _uuconf_cmdarg_rcsid[] = "$Id: cmdarg.c,v 1.3 1995/08/24 05:20:55 jtc Exp $";
const char _uuconf_cmdarg_rcsid[] = "$Id: cmdarg.c,v 1.4 1998/02/04 14:33:20 christos Exp $";
#endif
#include <ctype.h>
@ -35,7 +35,9 @@ const char _uuconf_cmdarg_rcsid[] = "$Id: cmdarg.c,v 1.3 1995/08/24 05:20:55 jtc
#if HAVE_STRCASECMP
#undef strcasecmp
#endif
#ifndef POSIX_HEADERS
extern int strcmp (), strcasecmp ();
#endif
/* Look up a command with arguments in a table and execute it. */

View File

@ -137,6 +137,8 @@ static int last_nonopt;
`first_nonopt' and `last_nonopt' are relocated so that they describe
the new indices of the non-options in ARGV after they are moved. */
static void exchange P((char **));
static void
exchange (argv)
char **argv;

View File

@ -23,7 +23,7 @@
#include "uucp.h"
#if USE_RCS_ID
const char proty_id[] = "$Id: proty.c,v 1.1 1995/08/24 05:23:00 jtc Exp $";
const char proty_id[] = "$Id: proty.c,v 1.2 1998/02/04 14:33:23 christos Exp $";
#endif
#include "uudefs.h"
@ -128,6 +128,7 @@ struct uuconf_cmdtab asYproto_params[] =
/* Local functions. */
static boolean fyxchg_syncs P((struct sdaemon *qdaemon));
static boolean fywait_for_packet P((struct sdaemon *qdaemon,
boolean *pfexit));
static unsigned short iychecksum P((const char *z, size_t c));

View File

@ -26,7 +26,7 @@
#include "uucp.h"
#if USE_RCS_ID
const char time_rcsid[] = "$Id: time.c,v 1.3 1995/08/24 05:23:07 jtc Exp $";
const char time_rcsid[] = "$Id: time.c,v 1.4 1998/02/04 14:33:24 christos Exp $";
#endif
#include <ctype.h>
@ -41,12 +41,14 @@ const char time_rcsid[] = "$Id: time.c,v 1.3 1995/08/24 05:23:07 jtc Exp $";
#include "uuconf.h"
/* External functions. */
#ifndef POSIX_HEADERS
#ifndef time
extern time_t time ();
#endif
#ifndef localtime
extern struct tm *localtime ();
#endif
#endif
/* See if the current time matches a time span. If it does, return
TRUE, set *pival to the value for the matching span, and set