#ifdef AFS_NT40_ENV
#include <io.h>
#endif
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#include <stdlib.h>
+
#include <afs/ktime.h>
#include <afs/afsutil.h>
#include <afs/procmgmt.h> /* signal(), kill(), wait(), etc. */
register struct ezbnode *abnode; {
char tbuffer[256];
- bnode_CoreName(abnode, (char *) 0, tbuffer);
+ bnode_CoreName(abnode, NULL, tbuffer);
if (access(tbuffer, 0) == 0) return 1;
else return 0;
}
if (!abnode->running) {
/* start up */
abnode->lastStart = FT_ApproxTime();
- code = bnode_NewProc(abnode, abnode->command, (char *) 0, &tp);
+ code = bnode_NewProc(abnode, abnode->command, NULL, &tp);
if (code) {
bozo_Log("cron bnode %s failed to start (code %d)\n",
abnode->b.name, code);
/* construct local path from canonical (wire-format) path */
if (ConstructLocalBinPath(acommand, &cmdpath)) {
bozo_Log("BNODE: command path invalid '%s'\n", acommand);
- return (struct bnode *)0;
+ return NULL;
}
te = (struct cronbnode *) malloc(sizeof(struct cronbnode));
if (code < 0) {
free(te);
free(cmdpath);
- return (struct bnode *) 0;
+ return NULL;
}
bnode_InitBnode(te, &cronbnode_ops, ainstance);
te->when = ktime_next(&te->whenToRun, 0);
if (FT_ApproxTime() >= abnode->when) {
abnode->lastStart = FT_ApproxTime();
bnode_SetTimeout(abnode, 0);
- code = bnode_NewProc(abnode, abnode->command, (char *) 0, &tp);
+ code = bnode_NewProc(abnode, abnode->command, NULL, &tp);
if (code) {
bozo_Log("cron failed to start bnode %s (code %d)\n",
abnode->b.name, code);