-2005-02-14 <t-ishii@sra.co.jp>
+2005-02-XX <t-ishii@sra.co.jp>
* version 2.5.1
* fix bug in heal checking
- sometimes health checking period drifts
* accept fast/immediate shutdown request while blocking in smart
shutdown
* use asprintf to avoid log output confusion (thanks to Jacques Caron)
+ * use sttok rather than strsep
2005-02-02 <t-ishii@sra.co.jp>
* version 2.5
-2.5.1(kaku) 2005/2/14(Mon)
+2.5.1(kaku) 2005/2/XX(XXX)
o 2.5¤ÇÄɲ䵤줿health checkµ¡Ç½¤Î¥Ð¥°½¤Àµ
o °Û¤Ê¤ë¥×¥í¥»¥¹¤Î¥í¥°½ÐÎϤ¬º®¤¸¤Ã¤Æ¤·¤Þ¤¦¤Î¤òasprintf¤ò»È¤Ã¤Æ²ó
Èò¤¹¤ë¤è¤¦¤Ë¤·¤¿(Thanks to Jacques Caron)
+ o strsep()¤ò¤è¤ê¥Ý¡¼¥¿¥Ö¥ë¤Êstrtok()¤ËÃÖ¤´¹¤¨¤¿
+
2.5(kaku) 2005/2/2(Tue)
°Ê²¼¤Îµ¡Ç½¤òÄɲá¥
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
+/* Define to 1 if you have the `strtok' function. */
+#undef HAVE_STRTOK
+
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
# Define the identity of the package.
PACKAGE=pgpool
- VERSION=2.5.1b1
+ VERSION=2.5.1
cat >>confdefs.h <<_ACEOF
-for ac_func in setsid select socket sigprocmask strdup strerror strftime asprintf
+
+for ac_func in setsid select socket sigprocmask strdup strerror strftime strtok asprintf
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
dnl Checks for programs.
AC_PROG_CC
-AM_INIT_AUTOMAKE(pgpool, 2.5.1b1)
+AM_INIT_AUTOMAKE(pgpool, 2.5.1)
AM_PROG_LEX
AC_TYPE_SIGNAL
AC_FUNC_VPRINTF
AC_FUNC_WAIT3
-AC_CHECK_FUNCS(setsid select socket sigprocmask strdup strerror strftime asprintf)
+AC_CHECK_FUNCS(setsid select socket sigprocmask strdup strerror strftime strtok asprintf)
PGSQL_INCLUDE_DIR=/usr/local/pgsql/include
AC_ARG_WITH(pgsql,
}
/*
- * extract tokens separated by ',' from str. number of tokens are set
- * to n; note that str will be destroyed. Also return value points to
- * static data, that means subsequent call will change the return
- * value.
+ * extract tokens separated by delimi from str. return value is an
+ * array of pointers to malloced strings. number of tokens is set to
+ * n; note that str will be destroyed by strtok(). Also return value
+ * points to static data, that means subsequent call will change the
+ * return value.
*/
#define MAXTOKENS 1024
static char **extract_string_tokens(char *str, char *delimi, int *n)
*n = 0;
- while ((token = strsep(&str, delimi)) && *n < MAXTOKENS)
+ for (token = strtok(str, delimi); token != NULL && *n < MAXTOKENS; token = strtok(NULL, delimi))
{
tokens[*n] = strdup(token);
if (tokens[*n] == NULL)
}
/*
- * extract tokens separated by ',' from str. number of tokens are set
- * to n; note that str will be destroyed. Also return value points to
- * static data, that means subsequent call will change the return
- * value.
+ * extract tokens separated by delimi from str. return value is an
+ * array of pointers to malloced strings. number of tokens is set to
+ * n; note that str will be destroyed by strtok(). Also return value
+ * points to static data, that means subsequent call will change the
+ * return value.
*/
#define MAXTOKENS 1024
static char **extract_string_tokens(char *str, char *delimi, int *n)
*n = 0;
- while ((token = strsep(&str, delimi)) && *n < MAXTOKENS)
+ for (token = strtok(str, delimi); token != NULL && *n < MAXTOKENS; token = strtok(NULL, delimi))
{
tokens[*n] = strdup(token);
if (tokens[*n] == NULL)