Enable system crontab by default and use AC_ARG_ENABLE instead of AC_ARG_WITH.
Do not log that syslog will be used instead of sendmail if explicitly requested.
build-sys: add autotools helper script

The script will help building when source code is checked out from git.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
build-sys: make clean needs to remove cron-paths.h

The file is generated at build time.  This change is needed to make
distcheck work without an error.

[...]
ERROR: files left in build directory after distclean:
./src/cron-paths.h

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
compliancy: use memset() rather than bzero()

Reference: http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xsh_chap03.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
assingments: remove initialization if value is never used

The next operation with these variables will overwrite the values set at
init.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
clean up: reduce variable passing when they are not used

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
compliancy: do not mix declarations and code

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
build-sys: reduce selinux and pam compiling scope when possible

This will fix following warnings, and makes compiled program to contain
less unnecessary references.

crontab.c:60:14: warning: 'selinux_context' defined but not used [-Wunused-variable]
security.c:188:12: warning: 'cron_open_pam_session' defined but not used [-Wunused-function]
security.c:250:12: warning: 'cron_authorize_context' defined but not used [-Wunused-function]
security.c:283:12: warning: 'cron_authorize_range' defined but not used [-Wunused-function]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
variables: use const where ever possible

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Fix up also the const in comment.
includes: make inclusions clean

This change makes files to include what they need, instead of having
generic inclusion headers which will include everything to everywhere.
Also the local headers havee ifndef & define protection, which makes them
to be save to include in any file, without one having to think in which
order the inclusions happen at compile time.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
declarations: fix shadow declarations

user.c:68:7: warning: declaration of 'save_errno' shadows a previous local [-Wshadow]
user.c:64:14: warning: shadowed declaration is here [-Wshadow]

do_command.c:559:9: warning: declaration of 'pid' shadows a previous local [-Wshadow]
do_command.c:91:8: warning: shadowed declaration is here [-Wshadow]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
debuging: make Debug macro look like function

This will make indent(1) program not to think it is a clause.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
build-sys: make ./configure to seach vi path

Using "/usr/ucb/vi" as defaut fallback EDITOR is not going to work on
most of distributions where this package is installed.  That said it
might work somewhere, so searching the vi editor at configure time is the
sensible thing to do, if user does not want to define the default.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: fix various groff issues

* Add spaces after dots (English spacing).
* Remove use of inline emphasis where possible.
* Use mail and url macros.
* Wrap long and join short lines.
* Remove end of line white spaces.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: fix reference to other manual

There is no crontabs(4).  For user it makes most sense to look
crontab(1).

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: anacron fix out dated information about open file limits

For quite a while open files limit has defaulted to 1024, but rather than
informing what might be the number user should inspect value from own
time.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Fix const usage in crontab.