Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/cron in external now



details:   https://anonhg.NetBSD.org/src/rev/6acff3237bcd
branches:  trunk
changeset: 769018:6acff3237bcd
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Aug 30 10:08:11 2011 +0000

description:
in external now

diffstat:

 usr.sbin/cron/Makefile     |   14 -
 usr.sbin/cron/compat.c     |  232 --------------
 usr.sbin/cron/compat.h     |  130 --------
 usr.sbin/cron/config.h     |   95 ------
 usr.sbin/cron/cron.8       |  129 --------
 usr.sbin/cron/cron.c       |  314 --------------------
 usr.sbin/cron/cron.h       |  281 ------------------
 usr.sbin/cron/crontab.1    |  109 -------
 usr.sbin/cron/crontab.5    |  346 ----------------------
 usr.sbin/cron/crontab.c    |  697 ---------------------------------------------
 usr.sbin/cron/database.c   |  258 ----------------
 usr.sbin/cron/do_command.c |  563 ------------------------------------
 usr.sbin/cron/entry.c      |  559 ------------------------------------
 usr.sbin/cron/env.c        |  216 -------------
 usr.sbin/cron/externs.h    |  146 ---------
 usr.sbin/cron/job.c        |  125 --------
 usr.sbin/cron/misc.c       |  635 ----------------------------------------
 usr.sbin/cron/pathnames.h  |   86 -----
 usr.sbin/cron/popen.c      |  145 ---------
 usr.sbin/cron/user.c       |  106 ------
 20 files changed, 0 insertions(+), 5186 deletions(-)

diffs (truncated from 5266 to 300 lines):

diff -r 5c8eb71cf78d -r 6acff3237bcd usr.sbin/cron/Makefile
--- a/usr.sbin/cron/Makefile    Tue Aug 30 10:04:50 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-#      $NetBSD: Makefile,v 1.15 2011/06/20 07:44:01 mrg Exp $
-
-PROG=  cron
-SRCS=  cron.c database.c do_command.c entry.c env.c job.c \
-       misc.c popen.c user.c
-CPPFLAGS+=-I${.CURDIR} -DLOGIN_CAP
-LDADD+=-lutil
-MAN=   cron.8
-
-.include <bsd.prog.mk>
-
-.if defined(HAVE_GCC) || defined(HAVE_PCC)
-COPTS.misc.c+= -Wno-pointer-sign
-.endif
diff -r 5c8eb71cf78d -r 6acff3237bcd usr.sbin/cron/compat.c
--- a/usr.sbin/cron/compat.c    Tue Aug 30 10:04:50 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,232 +0,0 @@
-/*     $NetBSD: compat.c,v 1.5 2006/06/17 00:16:13 elad Exp $  */
-
-/* Copyright 1988,1990,1993,1994 by Paul Vixie
- * All rights reserved
- *
- * Distribute freely, except: don't remove my name from the source or
- * documentation (don't take credit for my work), mark your changes (don't
- * get me blamed for your possible bugs), don't alter or remove this
- * notice.  May be sold if buildable source is provided to buyer.  No
- * warrantee of any kind, express or implied, is included with this
- * software; use at your own risk, responsibility for damages (if any) to
- * anyone resulting from the use of this software rests entirely with the
- * user.
- *
- * Send bug reports, bug fixes, enhancements, requests, flames, etc., and
- * I'll try to keep a version up to date.  I can be reached as follows:
- * Paul Vixie          <paul%vix.com@localhost>          uunet!decwrl!vixie!paul
- */
-
-#include <sys/cdefs.h>
-#if !defined(lint) && !defined(LINT)
-#if 0
-static char rcsid[] = "Id: compat.c,v 1.6 1994/01/15 20:43:43 vixie Exp";
-#else
-__RCSID("$NetBSD: compat.c,v 1.5 2006/06/17 00:16:13 elad Exp $");
-#endif
-#endif
-
-/* vix 30dec93 [broke this out of misc.c - see RCS log for history]
- * vix 15jan87 [added TIOCNOTTY, thanks csg@pyramid]
- */
-
-
-#include "cron.h"
-#ifdef NEED_GETDTABLESIZE
-# include <limits.h>
-#endif
-#if defined(NEED_SETSID) && defined(BSD)
-# include <sys/ioctl.h>
-#endif
-#include <errno.h>
-
-
-/* the code does not depend on any of vfork's
- * side-effects; it just uses it as a quick
- * fork-and-exec.
- */
-#ifdef NEED_VFORK
-PID_T
-vfork(void) {
-       return (fork());
-}
-#endif
-
-
-#ifdef NEED_STRDUP
-char *
-strdup(char *str)
-{
-       char    *temp;
-
-       temp = malloc(strlen(str) + 1);
-       (void) strcpy(temp, str); /* safe */
-       return temp;
-}
-#endif
-
-
-#ifdef NEED_STRERROR
-char *
-strerror(int error)
-{
-       extern char *sys_errlist[];
-       extern int sys_nerr;
-       static char buf[32];
-
-       if ((error <= sys_nerr) && (error > 0)) {
-               return sys_errlist[error];
-       }
-
-       sprintf(buf, "Unknown error: %d", error);
-       return buf;
-}
-#endif
-
-
-#ifdef NEED_STRCASECMP
-int
-strcasecmp(char *left, char *right)
-{
-       while (*left && (MkLower(*left) == MkLower(*right))) {
-               left++;
-               right++;
-       }
-       return MkLower(*left) - MkLower(*right);
-}
-#endif
-
-
-#ifdef NEED_SETSID
-int
-setsid(void)
-{
-       int     newpgrp;
-# if defined(BSD)
-       int     fd;
-#  if defined(POSIX)
-       newpgrp = setpgid((pid_t)0, getpid());
-#  else
-       newpgrp = setpgrp(0, getpid());
-#  endif
-       if ((fd = open("/dev/tty", 2)) >= 0)
-       {
-               (void) ioctl(fd, TIOCNOTTY, (char*)0);
-               (void) close(fd);
-       }
-# else /*BSD*/
-       newpgrp = setpgrp();
-
-       (void) close(STDIN);    (void) open("/dev/null", 0);
-       (void) close(STDOUT);   (void) open("/dev/null", 1);
-       (void) close(STDERR);   (void) open("/dev/null", 2);
-# endif /*BSD*/
-       return newpgrp;
-}
-#endif /*NEED_SETSID*/
-
-
-#ifdef NEED_GETDTABLESIZE
-int
-getdtablesize(void) {
-#ifdef _SC_OPEN_MAX
-       return sysconf(_SC_OPEN_MAX);
-#else
-       return _POSIX_OPEN_MAX;
-#endif
-}
-#endif
-
-
-#ifdef NEED_FLOCK
-/* The following flock() emulation snarfed intact *) from the HP-UX
- * "BSD to HP-UX porting tricks" maintained by
- * system%alchemy.chem.utoronto.ca@localhost (System Admin (Mike Peterson))
- * from the version "last updated: 11-Jan-1993"
- * Snarfage done by Jarkko Hietaniemi <Jarkko.Hietaniemi%hut.fi@localhost>
- * *) well, almost, had to K&R the function entry, HPUX "cc"
- * does not grok ANSI function prototypes */
- 
-/*
- * flock (fd, operation)
- *
- * This routine performs some file locking like the BSD 'flock'
- * on the object described by the int file descriptor 'fd',
- * which must already be open.
- *
- * The operations that are available are:
- *
- * LOCK_SH  -  get a shared lock.
- * LOCK_EX  -  get an exclusive lock.
- * LOCK_NB  -  don't block (must be ORed with LOCK_SH or LOCK_EX).
- * LOCK_UN  -  release a lock.
- *
- * Return value: 0 if lock successful, -1 if failed.
- *
- * Note that whether the locks are enforced or advisory is
- * controlled by the presence or absence of the SETGID bit on
- * the executable.
- *
- * Note that there is no difference between shared and exclusive
- * locks, since the 'lockf' system call in SYSV doesn't make any
- * distinction.
- *
- * The file "<sys/file.h>" should be modified to contain the definitions
- * of the available operations, which must be added manually (see below
- * for the values).
- */
-
-/* this code has been reformatted by vixie */
-
-int
-flock(int fd, int operation)
-{
-       int i;
-
-       switch (operation) {
-       case LOCK_SH:           /* get a shared lock */
-       case LOCK_EX:           /* get an exclusive lock */
-               i = lockf (fd, F_LOCK, 0);
-               break;
-
-       case LOCK_SH|LOCK_NB:   /* get a non-blocking shared lock */
-       case LOCK_EX|LOCK_NB:   /* get a non-blocking exclusive lock */
-               i = lockf (fd, F_TLOCK, 0);
-               if (i == -1)
-                       if ((errno == EAGAIN) || (errno == EACCES))
-                               errno = EWOULDBLOCK;
-               break;
-
-       case LOCK_UN:           /* unlock */
-               i = lockf (fd, F_ULOCK, 0);
-               break;
- 
-       default:                /* can't decipher operation */
-               i = -1;
-               errno = EINVAL;
-               break;
-       }
- 
-       return (i);
-}
-#endif /*NEED_FLOCK*/
-
-
-#ifdef NEED_SETENV
-int
-setenv(char *name, char *value, int overwrite)
-{
-       char *tmp;
-
-       if (overwrite && getenv(name))
-               return -1;
-
-       if (!(tmp = malloc(strlen(name) + strlen(value) + 2))) {
-               errno = ENOMEM;
-               return -1;
-       }
-
-       sprintf("%s=%s", name, value);
-       return putenv(tmp);     /* intentionally orphan 'tmp' storage */
-}
-#endif
diff -r 5c8eb71cf78d -r 6acff3237bcd usr.sbin/cron/compat.h
--- a/usr.sbin/cron/compat.h    Tue Aug 30 10:04:50 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*     $NetBSD: compat.h,v 1.4 2005/03/16 02:53:55 xtraeme Exp $       */
-
-/* Copyright 1993,1994 by Paul Vixie
- * All rights reserved
- *
- * Distribute freely, except: don't remove my name from the source or
- * documentation (don't take credit for my work), mark your changes (don't
- * get me blamed for your possible bugs), don't alter or remove this
- * notice.  May be sold if buildable source is provided to buyer.  No
- * warrantee of any kind, express or implied, is included with this
- * software; use at your own risk, responsibility for damages (if any) to
- * anyone resulting from the use of this software rests entirely with the
- * user.
- *
- * Send bug reports, bug fixes, enhancements, requests, flames, etc., and
- * I'll try to keep a version up to date.  I can be reached as follows:
- * Paul Vixie          <paul%vix.com@localhost>          uunet!decwrl!vixie!paul
- */
-
-/*
- * Id: compat.h,v 1.8 1994/01/15 20:43:43 vixie Exp
- */
-
-#if defined(UNIXPC) || defined(unixpc)
-# define UNIXPC 1
-# define ATT 1
-#endif
-
-#if defined(hpux) || defined(_hpux) || defined(__hpux)
-# define HPUX 1
-# define seteuid(e) setresuid(-1,e,-1)
-# define setreuid(r,e) setresuid(r,e,-1)
-#endif
-
-#if defined(_IBMR2)
-# define AIX 1
-#endif
-
-#if defined(__convex__)
-# define CONVEX 1
-#endif
-



Home | Main Index | Thread Index | Old Index