Rev | Line | |
---|
[9] | 1 | /* misc.h - miscellaneous stuff Author: Kees J. Bot
|
---|
| 2 | * 7 Dec 1996
|
---|
| 3 | */
|
---|
| 4 | #ifndef MISC__H
|
---|
| 5 | #define MISC__H
|
---|
| 6 |
|
---|
| 7 | #include <time.h>
|
---|
| 8 |
|
---|
| 9 | /* The name of the program. */
|
---|
| 10 | extern char *prog_name;
|
---|
| 11 |
|
---|
| 12 | /* Where cron stores it pid. */
|
---|
| 13 | #define PIDFILE "/usr/run/cron.pid"
|
---|
| 14 |
|
---|
| 15 | /* Cron's idea of the current time, and the time next to run something. */
|
---|
| 16 | extern time_t now;
|
---|
| 17 | extern time_t next;
|
---|
| 18 |
|
---|
| 19 | /* Memory allocation. */
|
---|
| 20 | void *allocate(size_t len);
|
---|
| 21 | void deallocate(void *mem);
|
---|
| 22 | extern size_t alloc_count;
|
---|
| 23 |
|
---|
| 24 | /* Logging, by syslog or to stderr. */
|
---|
| 25 | #if __minix_vmd || !__minix
|
---|
| 26 | #include <sys/syslog.h>
|
---|
| 27 | #else
|
---|
| 28 | enum log_dummy { LOG_ERR, LOG_CRIT, LOG_ALERT };
|
---|
| 29 | #define openlog(ident, opt, facility) ((void) 0)
|
---|
| 30 | #define closelog() ((void) 0)
|
---|
| 31 | #define setlogmask(mask) (0)
|
---|
| 32 | #endif
|
---|
| 33 |
|
---|
| 34 | enum logto { SYSLOG, STDERR };
|
---|
| 35 | void selectlog(enum logto where);
|
---|
| 36 | void log(int level, const char *fmt, ...);
|
---|
| 37 |
|
---|
| 38 | #endif /* MISC__H */
|
---|
| 39 |
|
---|
| 40 | /*
|
---|
| 41 | * $PchId: misc.h,v 1.3 2000/07/17 18:56:02 philip Exp $
|
---|
| 42 | */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.