#include "clientsocket.h"
#include "file_ops.h"
+#ifndef HAVE_SNPRINTF
+#include "snprintf.h"
+#endif
+
/*
* When we do network processing, it's accomplished in two passes; one to
sprintf(&serialized_table[strlen(
serialized_table)], "%s|%ld\n",
ut->message_id,
- ut->timestamp);
+ (long)ut->timestamp);
}
/* Now free the memory */
sprintf(&serialized_map[strlen(serialized_map)],
"%s|%ld|%s\n",
nmptr->nodename,
- nmptr->lastcontact,
+ (long)nmptr->lastcontact,
nmptr->nexthop);
}
}
lprintf(9, "Generating delivery instructions\n");
instr = mallok(instr_len);
if (instr == NULL) {
- lprintf(1, "Cannot allocate %d bytes for instr...\n",
+ lprintf(1, "Cannot allocate %ld bytes for instr...\n",
instr_len);
abort();
}
sprintf(instr,
"Content-type: %s\n\nmsgid|%ld\nsubmitted|%ld\n"
"bounceto|postmaster@%s\n" ,
- SPOOLMIME, msgnum, time(NULL), config.c_fqdn );
+ SPOOLMIME, msgnum, (long)time(NULL), config.c_fqdn );
/* Generate delivery instructions for each recipient */
for (nptr = sc->listrecps; nptr != NULL; nptr = nptr->next) {
phree(msg->cm_fields['I']);
}
sprintf(buf, "%ld.%04x.%04x@%s",
- time(NULL), getpid(), ++serialnum, config.c_fqdn);
+ (long)time(NULL), getpid(), ++serialnum, config.c_fqdn);
msg->cm_fields['I'] = strdoop(buf);
/*
}
if (network_talking_to(node, NTT_CHECK)) {
- cprintf("%d Already talking to %s right now\n", ERROR);
+ cprintf("%d Already talking to %s right now\n", ERROR, node);
return;
}