summaryrefslogtreecommitdiffstats
path: root/mbbsd/chat.c
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-02 16:23:19 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-02 16:23:19 +0800
commiteb86d8ff553917f392c556ef3a4b846910b1a17a (patch)
tree31c589739ddd4ecd6f144790dafb6fea654685e6 /mbbsd/chat.c
parent09d73f6f75cb15e6882403ef143705da4fee64bf (diff)
downloadpttbbs-eb86d8ff553917f392c556ef3a4b846910b1a17a.tar
pttbbs-eb86d8ff553917f392c556ef3a4b846910b1a17a.tar.gz
pttbbs-eb86d8ff553917f392c556ef3a4b846910b1a17a.tar.bz2
pttbbs-eb86d8ff553917f392c556ef3a4b846910b1a17a.tar.lz
pttbbs-eb86d8ff553917f392c556ef3a4b846910b1a17a.tar.xz
pttbbs-eb86d8ff553917f392c556ef3a4b846910b1a17a.tar.zst
pttbbs-eb86d8ff553917f392c556ef3a4b846910b1a17a.zip
Fix warning, including:
Prototype differance of crypt() on linux. Adding _ISOC99_SOURCE to get declaration of snprintf() on linux. Including strings.h to get declaration of strcasecmp() on linux. Using mkstemp() instead of tempnam(). git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1679 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/chat.c')
-rw-r--r--mbbsd/chat.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mbbsd/chat.c b/mbbsd/chat.c
index 744efa7d..66238334 100644
--- a/mbbsd/chat.c
+++ b/mbbsd/chat.c
@@ -381,9 +381,8 @@ t_chat()
print_chatid(chatid);
memset(inbuf, 0, sizeof(inbuf));
- sethomepath(fpath, cuser->userid);
- strlcpy(fpath, tempnam(fpath, "chat_"), sizeof(fpath));
- flog = fopen(fpath, "w");
+ setuserfile(fpath, "chat_XXXXXX");
+ flog = fdopen(mkstemp(fpath), "w");
while (chatting) {
move(b_lines - 1, currchar + chatid_len);