Index: ossp-pkg/rc/rc_config.c RCS File: /v/ossp/cvs/ossp-pkg/rc/rc_config.c,v rcsdiff -q -kk '-r1.27' '-r1.28' -u '/v/ossp/cvs/ossp-pkg/rc/rc_config.c,v' 2>/dev/null --- rc_config.c 2002/08/01 15:54:45 1.27 +++ rc_config.c 2003/05/26 08:36:40 1.28 @@ -29,12 +29,13 @@ #include #include +#include /* For opendir(3) */ #include "rc.h" #include "rc_config.h" -#include "rc_const.h" /* String constants */ +#include "rc_const.h" /* String constants */ -static int m_nLocks = 0; /* Server locks, not thread-safe FIXME */ +static int m_nLocks = 0; /* Server locks, not thread-safe FIXME */ /*************************************** @@ -294,6 +295,7 @@ rc_return_t configDefaults(void) { ex_t Except; + DIR *pTmpdir = NULL; /* For detecting our temp dir with opendir(3) */ try { /* Test members for empty attributes */ if (!configGetval(RC_EVL_VAL) && !configGetval(RC_EXC_VAL) \ @@ -332,14 +334,12 @@ /* if (!configGetval(RC_QRY_VAL))*/ -/* if (!configGetval(RC_TMP_VAL)) { - If exists '/tmp' - clioptSetval(RC_TMP_VAL, "/tmp"); - Else - RC_NOP; + pTmpdir = opendir(RC_DEF_TMP); + if (pTmpdir) + clioptSetval(RC_TMP_VAL, RC_DEF_TMP); + closedir(pTmpdir); } -*/ /* if (!configGetval(RC_OWN_VAL)) if (!configGetval(RC_GRP_VAL)) Index: ossp-pkg/rc/rc_const.h RCS File: /v/ossp/cvs/ossp-pkg/rc/rc_const.h,v rcsdiff -q -kk '-r1.16' '-r1.17' -u '/v/ossp/cvs/ossp-pkg/rc/rc_const.h,v' 2>/dev/null --- rc_const.h 2003/05/23 14:14:09 1.16 +++ rc_const.h 2003/05/26 08:36:40 1.17 @@ -124,6 +124,7 @@ /* Default values, do not include newlines and special chars must be escaped */ #define RC_DEF_ON "1" /* Digital switch */ #define RC_DEF_OFF "0" /* Digital switch */ +#define RC_DEF_TMP "/tmp" /* Temporary directory name */ #define RC_DEF_DEF "^%(\\w+)[ \t]*(.*?)\\n(.*?)^$" /* Section definition */ #define RC_DEF_NCF "config" /* Config section name */ #define RC_DEF_UIG "-u" /* Section user string */