*/
if (msg->cm_fields['T'] == NULL) {
lprintf(9, "Generating timestamp\n");
- sprintf(aaa, "%ld", time(NULL));
+ sprintf(aaa, "%ld", (long)time(NULL));
msg->cm_fields['T'] = strdoop(aaa);
}
"Content-type: %s\n\nmsgid|%ld\nsubmitted|%ld\n"
"bounceto|%s@%s\n"
"remote|%s|0||\n",
- SPOOLMIME, newmsgid, time(NULL),
+ SPOOLMIME, newmsgid, (long)time(NULL),
msg->cm_fields['A'], msg->cm_fields['N'],
recipient );
* Build a binary message to be saved on disk.
*/
-struct CtdlMessage *make_message(
+static struct CtdlMessage *make_message(
struct usersupp *author, /* author's usersupp structure */
char *recipient, /* NULL if it's not mail */
char *room, /* room where it's going */
sprintf(buf, "cit%ld", author->usernum); /* Path */
msg->cm_fields['P'] = strdoop(buf);
- sprintf(buf, "%ld", time(NULL)); /* timestamp */
+ sprintf(buf, "%ld", (long)time(NULL)); /* timestamp */
msg->cm_fields['T'] = strdoop(buf);
if (fake_name[0]) /* author */
cprintf("%d %ld\n", SEND_BINARY, msglen);
- client_read(&ch, 1); /* 0xFF magic number */
+ client_read((char*)&ch, 1); /* 0xFF magic number */
msg->cm_magic = CTDLMESSAGE_MAGIC;
- client_read(&ch, 1); /* anon type */
+ client_read((char*)&ch, 1); /* anon type */
msg->cm_anon_type = ch;
- client_read(&ch, 1); /* format type */
+ client_read((char*)&ch, 1); /* format type */
msg->cm_format_type = ch;
msglen = msglen - 3;
while (msglen > 0) {
- client_read(&which_field, 1);
+ client_read((char*)&which_field, 1);
if (!isalpha(which_field)) valid_msg = 0;
--msglen;
tempbuf[0] = 0;
do {
- client_read(&ch, 1);
+ client_read((char*)&ch, 1);
--msglen;
a = strlen(tempbuf);
tempbuf[a+1] = 0;