From: Art Cancro Date: Thu, 1 Sep 2005 22:07:08 +0000 (+0000) Subject: * citserver.c: change to usage of strdup() to work on RH9 where it's X-Git-Tag: v7.86~4685 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=d2a4502b325342d5ed1b718321b7034e39b620b2;p=citadel.git * citserver.c: change to usage of strdup() to work on RH9 where it's a macro --- diff --git a/citadel/ChangeLog b/citadel/ChangeLog index f979f8917..1c4547644 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,8 @@ $Log$ +Revision 654.21 2005/09/01 22:07:08 ajc +* citserver.c: change to usage of strdup() to work on RH9 where it's + a macro + Revision 654.20 2005/08/29 20:49:50 ajc * imap_fetch.c: fixed a bug in the IMAP FETCH BODY code that was causing the "most recently fetched message" cache to be burned even when it shouldn't @@ -7071,4 +7075,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import - diff --git a/citadel/citserver.c b/citadel/citserver.c index bc7e493e0..76e2f258c 100644 --- a/citadel/citserver.c +++ b/citadel/citserver.c @@ -458,16 +458,18 @@ void cmd_mesg(char *mname) extract_token(buf, mname, 0, '|', sizeof buf); - dirs[0] = strdup( #ifdef HAVE_DATA_DIR - DATA_DIR"/" + dirs[0] = strdup(DATA_DIR "/messages"); +#else + dirs[0] = strdup("messages"); #endif - "messages"); - dirs[1] = strdup( + #ifdef HAVE_DATA_DIR - DATA_DIR"/" + dirs[1] = strdup(DATA_DIR "/help"); +#else + dirs[1] = strdup("help"); #endif - "help"); + snprintf(buf2, sizeof buf2, "%s.%d.%d", buf, CC->cs_clientdev, CC->cs_clienttyp); @@ -548,16 +550,18 @@ void cmd_emsg(char *mname) if (buf[a] == '/') buf[a] = '.'; } - dirs[0] = strdup( #ifdef HAVE_DATA_DIR - DATA_DIR"/" + dirs[0] = strdup(DATA_DIR "/messages"); +#else + dirs[0] = strdup("messages"); #endif - "messages"); - dirs[1] = strdup( + #ifdef HAVE_DATA_DIR - DATA_DIR"/" + dirs[1] = strdup(DATA_DIR "/help"); +#else + dirs[1] = strdup("help"); #endif - "help"); + mesg_locate(targ, sizeof targ, buf, 2, (const char**)dirs); free(dirs[0]); free(dirs[1]);