[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.0.4-114-g7dc192b

mysql vizuser noreply at mpich.org
Thu May 2 22:02:49 CDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  7dc192b8fbd33cffef12432d0137833ccd597771 (commit)
       via  f65916e1200372811aebbf534c239a589153e4c9 (commit)
       via  99e8252a5ab5f4f3cae2738f2f4d5ebedfe17920 (commit)
      from  109dc655f6cbbe8a75f78a7b72f7d743e6e26c80 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/7dc192b8fbd33cffef12432d0137833ccd597771

commit 7dc192b8fbd33cffef12432d0137833ccd597771
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Wed May 1 20:10:11 2013 -0500

    (incomplete) Added new string stash/spit macros.
    
    We have been allocating a "large enough" pool of temporary strings and
    hoping that we don't overflow it for our temporary allocations.  This
    commit provides macros that better check for overflow problems without
    making the code too clumsy.
    
    No reviewer.

diff --git a/src/pm/hydra/include/hydra.h b/src/pm/hydra/include/hydra.h
index 6cdbfa9..7837ca3 100644
--- a/src/pm/hydra/include/hydra.h
+++ b/src/pm/hydra/include/hydra.h
@@ -163,6 +163,44 @@ extern char **environ;
 
 #define HYDRA_NAMESERVER_DEFAULT_PORT 6392
 
+struct HYD_string_stash {
+    char **strlist;
+    int max_count;
+    int cur_count;
+};
+
+#define HYD_STRING_STASH_INIT(stash)            \
+    do {                                        \
+        (stash).strlist = NULL;                 \
+        (stash).max_count = 0;                  \
+        (stash).cur_count = 0;                  \
+    } while (0)
+
+#define HYD_STRING_STASH(stash, str, status)                            \
+    do {                                                                \
+        if ((stash).cur_count >= (stash).max_count - 1) {               \
+            HYDU_REALLOC((stash).strlist, char **, (stash).max_count + HYD_NUM_TMP_STRINGS, \
+                         (status));                                     \
+            (stash).max_count += HYD_NUM_TMP_STRINGS;                   \
+        }                                                               \
+        (stash).strlist[(stash).cur_count++] = (str);                   \
+        (stash).strlist[(stash).cur_count] = NULL;                      \
+    } while (0)
+
+#define HYD_STRING_SPIT(stash, str, status)                             \
+    do {                                                                \
+        if ((stash).cur_count == 0) {                                   \
+            (str) = HYDU_strdup("");                                    \
+        }                                                               \
+        else {                                                          \
+            (status) = HYDU_str_alloc_and_join((stash).strlist, &(str)); \
+            HYDU_ERR_POP((status), "unable to join strings\n");         \
+            HYDU_free_strlist((stash).strlist);                         \
+            HYDU_FREE((stash).strlist);                                 \
+            HYD_STRING_STASH_INIT((stash));                             \
+        }                                                               \
+    } while (0)
+
 enum HYD_bool {
     HYD_FALSE = 0,
     HYD_TRUE = 1
@@ -608,19 +646,6 @@ HYD_status HYDU_sock_cloexec(int fd);
         HYDU_free((void *) p);                  \
     }
 
-#define HYDU_STRLIST_CONSOLIDATE(strlist, i, status)                    \
-    {                                                                   \
-        char *out;                                                      \
-        if ((i) >= (HYD_NUM_TMP_STRINGS / 2)) {                         \
-            (strlist)[(i)] = NULL;                                      \
-            (status) = HYDU_str_alloc_and_join((strlist), &out);        \
-            HYDU_ERR_POP((status), "unable to join strings\n");         \
-            HYDU_free_strlist((strlist));                               \
-            strlist[0] = out;                                           \
-            (i) = 1;                                                    \
-        }                                                               \
-    }
-
 HYD_status HYDU_list_append_strlist(char **exec, char **client_arg);
 HYD_status HYDU_print_strlist(char **args);
 void HYDU_free_strlist(char **args);
diff --git a/src/pm/hydra/pm/pmiserv/pmip_pmi_v1.c b/src/pm/hydra/pm/pmiserv/pmip_pmi_v1.c
index 3fb1992..9ec7b30 100644
--- a/src/pm/hydra/pm/pmiserv/pmip_pmi_v1.c
+++ b/src/pm/hydra/pm/pmiserv/pmip_pmi_v1.c
@@ -183,10 +183,10 @@ static HYD_status fn_init(int fd, char *args[])
 static HYD_status fn_initack(int fd, char *args[])
 {
     int id, i;
-    char *val;
+    char *val, *cmd;
     struct HYD_pmcd_token *tokens;
     int token_count;
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd;
+    struct HYD_string_stash stash;
     HYD_status status = HYD_SUCCESS;
 
     HYDU_FUNC_ENTER();
@@ -209,22 +209,19 @@ static HYD_status fn_initack(int fd, char *args[])
     }
     HYDU_ASSERT(i < HYD_pmcd_pmip.local.proxy_process_count, status);
 
-    i = 0;
-    tmp[i++] = HYDU_strdup("cmd=initack\ncmd=set size=");
-    tmp[i++] = HYDU_int_to_str(HYD_pmcd_pmip.system_global.global_process_count);
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash, HYDU_strdup("cmd=initack\ncmd=set size="), status);
+    HYD_STRING_STASH(stash, HYDU_int_to_str(HYD_pmcd_pmip.system_global.global_process_count),
+                     status);
 
-    /* FIXME: allow for multiple ranks per PMI ID */
-    tmp[i++] = HYDU_strdup("\ncmd=set rank=");
-    tmp[i++] = HYDU_int_to_str(id);
+    HYD_STRING_STASH(stash, HYDU_strdup("\ncmd=set rank="), status);
+    HYD_STRING_STASH(stash, HYDU_int_to_str(id), status);
 
-    tmp[i++] = HYDU_strdup("\ncmd=set debug=");
-    tmp[i++] = HYDU_int_to_str(HYD_pmcd_pmip.user_global.debug);
-    tmp[i++] = HYDU_strdup("\n");
-    tmp[i++] = NULL;
+    HYD_STRING_STASH(stash, HYDU_strdup("\ncmd=set debug="), status);
+    HYD_STRING_STASH(stash, HYDU_int_to_str(HYD_pmcd_pmip.user_global.debug), status);
+    HYD_STRING_STASH(stash, HYDU_strdup("\n"), status);
 
-    status = HYDU_str_alloc_and_join(tmp, &cmd);
-    HYDU_ERR_POP(status, "error while joining strings\n");
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, cmd, status);
 
     status = send_cmd_downstream(fd, cmd);
     HYDU_ERR_POP(status, "error sending PMI response\n");
@@ -241,25 +238,22 @@ static HYD_status fn_initack(int fd, char *args[])
 
 static HYD_status fn_get_maxes(int fd, char *args[])
 {
-    int i;
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd;
+    struct HYD_string_stash stash;
+    char *cmd;
     HYD_status status = HYD_SUCCESS;
 
     HYDU_FUNC_ENTER();
 
-    i = 0;
-    tmp[i++] = HYDU_strdup("cmd=maxes kvsname_max=");
-    tmp[i++] = HYDU_int_to_str(PMI_MAXKVSLEN);
-    tmp[i++] = HYDU_strdup(" keylen_max=");
-    tmp[i++] = HYDU_int_to_str(PMI_MAXKEYLEN);
-    tmp[i++] = HYDU_strdup(" vallen_max=");
-    tmp[i++] = HYDU_int_to_str(PMI_MAXVALLEN);
-    tmp[i++] = HYDU_strdup("\n");
-    tmp[i++] = NULL;
-
-    status = HYDU_str_alloc_and_join(tmp, &cmd);
-    HYDU_ERR_POP(status, "unable to join strings\n");
-    HYDU_free_strlist(tmp);
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash, HYDU_strdup("cmd=maxes kvsname_max="), status);
+    HYD_STRING_STASH(stash, HYDU_int_to_str(PMI_MAXKVSLEN), status);
+    HYD_STRING_STASH(stash, HYDU_strdup(" keylen_max="), status);
+    HYD_STRING_STASH(stash, HYDU_int_to_str(PMI_MAXKEYLEN), status);
+    HYD_STRING_STASH(stash, HYDU_strdup(" vallen_max="), status);
+    HYD_STRING_STASH(stash, HYDU_int_to_str(PMI_MAXVALLEN), status);
+    HYD_STRING_STASH(stash, HYDU_strdup("\n"), status);
+
+    HYD_STRING_SPIT(stash, cmd, status);
 
     status = send_cmd_downstream(fd, cmd);
     HYDU_ERR_POP(status, "error sending PMI response\n");
@@ -277,7 +271,8 @@ static HYD_status fn_get_appnum(int fd, char *args[])
 {
     int i, idx;
     struct HYD_exec *exec;
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd;
+    struct HYD_string_stash stash;
+    char *cmd;
     HYD_status status = HYD_SUCCESS;
 
     HYDU_FUNC_ENTER();
@@ -296,15 +291,12 @@ static HYD_status fn_get_appnum(int fd, char *args[])
             break;
     }
 
-    i = 0;
-    tmp[i++] = HYDU_strdup("cmd=appnum appnum=");
-    tmp[i++] = HYDU_int_to_str(exec->appnum);
-    tmp[i++] = HYDU_strdup("\n");
-    tmp[i++] = NULL;
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash, HYDU_strdup("cmd=appnum appnum="), status);
+    HYD_STRING_STASH(stash, HYDU_int_to_str(exec->appnum), status);
+    HYD_STRING_STASH(stash, HYDU_strdup("\n"), status);
 
-    status = HYDU_str_alloc_and_join(tmp, &cmd);
-    HYDU_ERR_POP(status, "unable to join strings\n");
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, cmd, status);
 
     status = send_cmd_downstream(fd, cmd);
     HYDU_ERR_POP(status, "error sending PMI response\n");
@@ -320,21 +312,18 @@ static HYD_status fn_get_appnum(int fd, char *args[])
 
 static HYD_status fn_get_my_kvsname(int fd, char *args[])
 {
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd;
-    int i;
+    struct HYD_string_stash stash;
+    char *cmd;
     HYD_status status = HYD_SUCCESS;
 
     HYDU_FUNC_ENTER();
 
-    i = 0;
-    tmp[i++] = HYDU_strdup("cmd=my_kvsname kvsname=");
-    tmp[i++] = HYDU_strdup(HYD_pmcd_pmip.local.kvs->kvsname);
-    tmp[i++] = HYDU_strdup("\n");
-    tmp[i++] = NULL;
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash, HYDU_strdup("cmd=my_kvsname kvsname="), status);
+    HYD_STRING_STASH(stash, HYDU_strdup(HYD_pmcd_pmip.local.kvs->kvsname), status);
+    HYD_STRING_STASH(stash, HYDU_strdup("\n"), status);
 
-    status = HYDU_str_alloc_and_join(tmp, &cmd);
-    HYDU_ERR_POP(status, "unable to join strings\n");
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, cmd, status);
 
     status = send_cmd_downstream(fd, cmd);
     HYDU_ERR_POP(status, "error sending PMI response\n");
@@ -350,26 +339,25 @@ static HYD_status fn_get_my_kvsname(int fd, char *args[])
 
 static HYD_status fn_get_usize(int fd, char *args[])
 {
-    int i;
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd;
+    struct HYD_string_stash stash;
+    char *cmd;
     HYD_status status = HYD_SUCCESS;
 
     HYDU_FUNC_ENTER();
 
-    i = 0;
-    tmp[i++] = HYDU_strdup("cmd=universe_size size=");
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash, HYDU_strdup("cmd=universe_size size="), status);
     if (HYD_pmcd_pmip.user_global.usize == HYD_USIZE_SYSTEM)
-        tmp[i++] = HYDU_int_to_str(HYD_pmcd_pmip.system_global.global_core_map.global_count);
+        HYD_STRING_STASH(stash,
+                         HYDU_int_to_str(HYD_pmcd_pmip.system_global.global_core_map.global_count),
+                         status);
     else if (HYD_pmcd_pmip.user_global.usize == HYD_USIZE_INFINITE)
-        tmp[i++] = HYDU_int_to_str(-1);
+        HYD_STRING_STASH(stash, HYDU_int_to_str(-1), status);
     else
-        tmp[i++] = HYDU_int_to_str(HYD_pmcd_pmip.user_global.usize);
-    tmp[i++] = HYDU_strdup("\n");
-    tmp[i++] = NULL;
+        HYD_STRING_STASH(stash, HYDU_int_to_str(HYD_pmcd_pmip.user_global.usize), status);
+    HYD_STRING_STASH(stash, HYDU_strdup("\n"), status);
 
-    status = HYDU_str_alloc_and_join(tmp, &cmd);
-    HYDU_ERR_POP(status, "unable to join strings\n");
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, cmd, status);
 
     status = send_cmd_downstream(fd, cmd);
     HYDU_ERR_POP(status, "error sending PMI response\n");
@@ -385,7 +373,8 @@ static HYD_status fn_get_usize(int fd, char *args[])
 
 static HYD_status fn_get(int fd, char *args[])
 {
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd, *key, *val;
+    struct HYD_string_stash stash;
+    char *cmd, *key, *val;
     struct HYD_pmcd_token *tokens;
     int token_count, i;
     HYD_status status = HYD_SUCCESS;
@@ -400,15 +389,13 @@ static HYD_status fn_get(int fd, char *args[])
                         "unable to find token: key\n");
 
     if (!strcmp(key, "PMI_process_mapping")) {
-        i = 0;
-        tmp[i++] = HYDU_strdup("cmd=get_result rc=0 msg=success value=");
-        tmp[i++] = HYDU_strdup(HYD_pmcd_pmip.system_global.pmi_process_mapping);
-        tmp[i++] = HYDU_strdup("\n");
-        tmp[i++] = NULL;
+        HYD_STRING_STASH_INIT(stash);
+        HYD_STRING_STASH(stash, HYDU_strdup("cmd=get_result rc=0 msg=success value="), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(HYD_pmcd_pmip.system_global.pmi_process_mapping),
+                         status);
+        HYD_STRING_STASH(stash, HYDU_strdup("\n"), status);
 
-        status = HYDU_str_alloc_and_join(tmp, &cmd);
-        HYDU_ERR_POP(status, "unable to join strings\n");
-        HYDU_free_strlist(tmp);
+        HYD_STRING_SPIT(stash, cmd, status);
 
         status = send_cmd_downstream(fd, cmd);
         HYDU_ERR_POP(status, "error sending PMI response\n");
@@ -423,23 +410,20 @@ static HYD_status fn_get(int fd, char *args[])
             }
         }
 
-        i = 0;
-        tmp[i++] = HYDU_strdup("cmd=get_result rc=");
+        HYD_STRING_STASH_INIT(stash);
+        HYD_STRING_STASH(stash, HYDU_strdup("cmd=get_result rc="), status);
         if (val) {
-            tmp[i++] = HYDU_strdup("0 msg=success value=");
-            tmp[i++] = HYDU_strdup(val);
+            HYD_STRING_STASH(stash, HYDU_strdup("0 msg=success value="), status);
+            HYD_STRING_STASH(stash, HYDU_strdup(val), status);
         }
         else {
-            tmp[i++] = HYDU_strdup("-1 msg=key_");
-            tmp[i++] = HYDU_strdup(key);
-            tmp[i++] = HYDU_strdup("_not_found value=unknown");
+            HYD_STRING_STASH(stash, HYDU_strdup("-1 msg=key_"), status);
+            HYD_STRING_STASH(stash, HYDU_strdup(key), status);
+            HYD_STRING_STASH(stash, HYDU_strdup("_not_found value=unknown"), status);
         }
-        tmp[i++] = HYDU_strdup("\n");
-        tmp[i++] = NULL;
+        HYD_STRING_STASH(stash, HYDU_strdup("\n"), status);
 
-        status = HYDU_str_alloc_and_join(tmp, &cmd);
-        HYDU_ERR_POP(status, "unable to join strings\n");
-        HYDU_free_strlist(tmp);
+        HYD_STRING_SPIT(stash, cmd, status);
 
         status = send_cmd_downstream(fd, cmd);
         HYDU_ERR_POP(status, "error sending command downstream\n");
@@ -457,10 +441,11 @@ static HYD_status fn_get(int fd, char *args[])
 
 static HYD_status fn_put(int fd, char *args[])
 {
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd;
+    struct HYD_string_stash stash;
+    char *cmd;
     char *key, *val;
     struct HYD_pmcd_token *tokens;
-    int token_count, i;
+    int token_count;
     HYD_status status = HYD_SUCCESS;
 
     HYDU_FUNC_ENTER();
@@ -477,15 +462,12 @@ static HYD_status fn_put(int fd, char *args[])
         val = HYDU_strdup("");
 
     /* add to the cache */
-    i = 0;
-    tmp[i++] = HYDU_strdup(key);
-    tmp[i++] = HYDU_strdup("=");
-    tmp[i++] = HYDU_strdup(val);
-    tmp[i++] = NULL;
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash, HYDU_strdup(key), status);
+    HYD_STRING_STASH(stash, HYDU_strdup("="), status);
+    HYD_STRING_STASH(stash, HYDU_strdup(val), status);
 
-    status = HYDU_str_alloc_and_join(tmp, &cmd);
-    HYDU_ERR_POP(status, "unable to join strings\n");
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, cmd, status);
 
     cache_put.keyval[cache_put.keyval_len++] = cmd;
     debug("cached command: %s\n", cmd);
diff --git a/src/pm/hydra/pm/pmiserv/pmip_pmi_v2.c b/src/pm/hydra/pm/pmiserv/pmip_pmi_v2.c
index 4246057..8d2c66d 100644
--- a/src/pm/hydra/pm/pmiserv/pmip_pmi_v2.c
+++ b/src/pm/hydra/pm/pmiserv/pmip_pmi_v2.c
@@ -17,25 +17,23 @@ static struct HYD_pmcd_pmi_v2_reqs *pending_reqs = NULL;
 
 static HYD_status send_cmd_upstream(const char *start, int fd, char *args[])
 {
-    int i, j, sent, closed;
-    char *tmp[HYD_NUM_TMP_STRINGS], *buf;
+    int i, sent, closed;
+    struct HYD_string_stash stash;
+    char *buf;
     struct HYD_pmcd_hdr hdr;
     HYD_status status = HYD_SUCCESS;
 
     HYDU_FUNC_ENTER();
 
-    j = 0;
-    tmp[j++] = HYDU_strdup(start);
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash, HYDU_strdup(start), status);
     for (i = 0; args[i]; i++) {
-        tmp[j++] = HYDU_strdup(args[i]);
+        HYD_STRING_STASH(stash, HYDU_strdup(args[i]), status);
         if (args[i + 1])
-            tmp[j++] = HYDU_strdup(";");
+            HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
     }
-    tmp[j] = NULL;
 
-    status = HYDU_str_alloc_and_join(tmp, &buf);
-    HYDU_ERR_POP(status, "unable to join strings\n");
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, buf, status);
 
     HYD_pmcd_init_header(&hdr);
     hdr.cmd = PMI_CMD;
@@ -152,7 +150,8 @@ static HYD_status fn_fullinit(int fd, char *args[])
 {
     int id, i;
     char *rank_str;
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd;
+    struct HYD_string_stash stash;
+    char *cmd;
     struct HYD_pmcd_token *tokens;
     int token_count;
     HYD_status status = HYD_SUCCESS;
@@ -177,30 +176,29 @@ static HYD_status fn_fullinit(int fd, char *args[])
     }
     HYDU_ASSERT(i < HYD_pmcd_pmip.local.proxy_process_count, status);
 
-    i = 0;
-    /* FIXME: allow for multiple ranks per PMI ID */
-    tmp[i++] = HYDU_strdup("cmd=fullinit-response;pmi-version=2;pmi-subversion=0;rank=");
-    tmp[i++] = HYDU_int_to_str(id);
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash,
+                     HYDU_strdup("cmd=fullinit-response;pmi-version=2;pmi-subversion=0;rank="),
+                     status);
+    HYD_STRING_STASH(stash, HYDU_int_to_str(id), status);
 
-    tmp[i++] = HYDU_strdup(";size=");
-    tmp[i++] = HYDU_int_to_str(HYD_pmcd_pmip.system_global.global_process_count);
-    tmp[i++] = HYDU_strdup(";appnum=0");
+    HYD_STRING_STASH(stash, HYDU_strdup(";size="), status);
+    HYD_STRING_STASH(stash, HYDU_int_to_str(HYD_pmcd_pmip.system_global.global_process_count),
+                     status);
+    HYD_STRING_STASH(stash, HYDU_strdup(";appnum=0"), status);
     if (HYD_pmcd_pmip.local.spawner_kvsname) {
-        tmp[i++] = HYDU_strdup(";spawner-jobid=");
-        tmp[i++] = HYDU_strdup(HYD_pmcd_pmip.local.spawner_kvsname);
+        HYD_STRING_STASH(stash, HYDU_strdup(";spawner-jobid="), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(HYD_pmcd_pmip.local.spawner_kvsname), status);
     }
     if (HYD_pmcd_pmip.user_global.debug) {
-        tmp[i++] = HYDU_strdup(";debugged=TRUE;pmiverbose=TRUE");
+        HYD_STRING_STASH(stash, HYDU_strdup(";debugged=TRUE;pmiverbose=TRUE"), status);
     }
     else {
-        tmp[i++] = HYDU_strdup(";debugged=FALSE;pmiverbose=FALSE");
+        HYD_STRING_STASH(stash, HYDU_strdup(";debugged=FALSE;pmiverbose=FALSE"), status);
     }
-    tmp[i++] = HYDU_strdup(";rc=0;");
-    tmp[i++] = NULL;
+    HYD_STRING_STASH(stash, HYDU_strdup(";rc=0;"), status);
 
-    status = HYDU_str_alloc_and_join(tmp, &cmd);
-    HYDU_ERR_POP(status, "error while joining strings\n");
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, cmd, status);
 
     send_cmd_downstream(fd, cmd);
     HYDU_FREE(cmd);
@@ -216,8 +214,8 @@ static HYD_status fn_fullinit(int fd, char *args[])
 
 static HYD_status fn_job_getid(int fd, char *args[])
 {
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd, *thrid;
-    int i;
+    struct HYD_string_stash stash;
+    char *cmd, *thrid;
     struct HYD_pmcd_token *tokens;
     int token_count;
     HYD_status status = HYD_SUCCESS;
@@ -229,22 +227,18 @@ static HYD_status fn_job_getid(int fd, char *args[])
 
     thrid = HYD_pmcd_pmi_find_token_keyval(tokens, token_count, "thrid");
 
-    i = 0;
-    tmp[i++] = HYDU_strdup("cmd=job-getid-response;");
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash, HYDU_strdup("cmd=job-getid-response;"), status);
     if (thrid) {
-        tmp[i++] = HYDU_strdup("thrid=");
-        tmp[i++] = HYDU_strdup(thrid);
-        tmp[i++] = HYDU_strdup(";");
+        HYD_STRING_STASH(stash, HYDU_strdup("thrid="), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(thrid), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
     }
-    tmp[i++] = HYDU_strdup("jobid=");
-    tmp[i++] = HYDU_strdup(HYD_pmcd_pmip.local.kvs->kvsname);
-    tmp[i++] = HYDU_strdup(";rc=0;");
-    tmp[i++] = NULL;
+    HYD_STRING_STASH(stash, HYDU_strdup("jobid="), status);
+    HYD_STRING_STASH(stash, HYDU_strdup(HYD_pmcd_pmip.local.kvs->kvsname), status);
+    HYD_STRING_STASH(stash, HYDU_strdup(";rc=0;"), status);
 
-    status = HYDU_str_alloc_and_join(tmp, &cmd);
-    HYDU_ERR_POP(status, "unable to join strings\n");
-
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, cmd, status);
 
     send_cmd_downstream(fd, cmd);
     HYDU_FREE(cmd);
@@ -259,11 +253,10 @@ static HYD_status fn_job_getid(int fd, char *args[])
 
 static HYD_status fn_info_putnodeattr(int fd, char *args[])
 {
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd;
-    char *key, *val, *thrid;
-    int i, ret;
+    struct HYD_string_stash stash;
+    char *key, *val, *thrid, *cmd;
     struct HYD_pmcd_token *tokens;
-    int token_count;
+    int token_count, ret;
     struct HYD_pmcd_pmi_v2_reqs *req;
     HYD_status status = HYD_SUCCESS;
 
@@ -284,21 +277,18 @@ static HYD_status fn_info_putnodeattr(int fd, char *args[])
     status = HYD_pmcd_pmi_add_kvs(key, val, HYD_pmcd_pmip.local.kvs, &ret);
     HYDU_ERR_POP(status, "unable to put data into kvs\n");
 
-    i = 0;
-    tmp[i++] = HYDU_strdup("cmd=info-putnodeattr-response;");
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash, HYDU_strdup("cmd=info-putnodeattr-response;"), status);
     if (thrid) {
-        tmp[i++] = HYDU_strdup("thrid=");
-        tmp[i++] = HYDU_strdup(thrid);
-        tmp[i++] = HYDU_strdup(";");
+        HYD_STRING_STASH(stash, HYDU_strdup("thrid="), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(thrid), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
     }
-    tmp[i++] = HYDU_strdup("rc=");
-    tmp[i++] = HYDU_int_to_str(ret);
-    tmp[i++] = HYDU_strdup(";");
-    tmp[i++] = NULL;
+    HYD_STRING_STASH(stash, HYDU_strdup("rc="), status);
+    HYD_STRING_STASH(stash, HYDU_int_to_str(ret), status);
+    HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
 
-    status = HYDU_str_alloc_and_join(tmp, &cmd);
-    HYDU_ERR_POP(status, "unable to join strings\n");
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, cmd, status);
 
     send_cmd_downstream(fd, cmd);
     HYDU_FREE(cmd);
@@ -322,10 +312,11 @@ static HYD_status fn_info_putnodeattr(int fd, char *args[])
 
 static HYD_status fn_info_getnodeattr(int fd, char *args[])
 {
-    int i, found;
+    int found;
     struct HYD_pmcd_pmi_kvs_pair *run;
     char *key, *waitval, *thrid;
-    char *tmp[HYD_NUM_TMP_STRINGS] = { 0 }, *cmd;
+    struct HYD_string_stash stash;
+    char *cmd;
     struct HYD_pmcd_token *tokens;
     int token_count;
     HYD_status status = HYD_SUCCESS;
@@ -353,21 +344,18 @@ static HYD_status fn_info_getnodeattr(int fd, char *args[])
     }
 
     if (found) {        /* We found the attribute */
-        i = 0;
-        tmp[i++] = HYDU_strdup("cmd=info-getnodeattr-response;");
+        HYD_STRING_STASH_INIT(stash);
+        HYD_STRING_STASH(stash, HYDU_strdup("cmd=info-getnodeattr-response;"), status);
         if (thrid) {
-            tmp[i++] = HYDU_strdup("thrid=");
-            tmp[i++] = HYDU_strdup(thrid);
-            tmp[i++] = HYDU_strdup(";");
+            HYD_STRING_STASH(stash, HYDU_strdup("thrid="), status);
+            HYD_STRING_STASH(stash, HYDU_strdup(thrid), status);
+            HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
         }
-        tmp[i++] = HYDU_strdup("found=TRUE;value=");
-        tmp[i++] = HYDU_strdup(run->val);
-        tmp[i++] = HYDU_strdup(";rc=0;");
-        tmp[i++] = NULL;
+        HYD_STRING_STASH(stash, HYDU_strdup("found=TRUE;value="), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(run->val), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(";rc=0;"), status);
 
-        status = HYDU_str_alloc_and_join(tmp, &cmd);
-        HYDU_ERR_POP(status, "unable to join strings\n");
-        HYDU_free_strlist(tmp);
+        HYD_STRING_SPIT(stash, cmd, status);
 
         send_cmd_downstream(fd, cmd);
         HYDU_FREE(cmd);
@@ -381,19 +369,16 @@ static HYD_status fn_info_getnodeattr(int fd, char *args[])
     }
     else {
         /* Tell the client that we can't find the attribute */
-        i = 0;
-        tmp[i++] = HYDU_strdup("cmd=info-getnodeattr-response;");
+        HYD_STRING_STASH_INIT(stash);
+        HYD_STRING_STASH(stash, HYDU_strdup("cmd=info-getnodeattr-response;"), status);
         if (thrid) {
-            tmp[i++] = HYDU_strdup("thrid=");
-            tmp[i++] = HYDU_strdup(thrid);
-            tmp[i++] = HYDU_strdup(";");
+            HYD_STRING_STASH(stash, HYDU_strdup("thrid="), status);
+            HYD_STRING_STASH(stash, HYDU_strdup(thrid), status);
+            HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
         }
-        tmp[i++] = HYDU_strdup("found=FALSE;rc=0;");
-        tmp[i++] = NULL;
+        HYD_STRING_STASH(stash, HYDU_strdup("found=FALSE;rc=0;"), status);
 
-        status = HYDU_str_alloc_and_join(tmp, &cmd);
-        HYDU_ERR_POP(status, "unable to join strings\n");
-        HYDU_free_strlist(tmp);
+        HYD_STRING_SPIT(stash, cmd, status);
 
         send_cmd_downstream(fd, cmd);
         HYDU_FREE(cmd);
@@ -409,9 +394,10 @@ static HYD_status fn_info_getnodeattr(int fd, char *args[])
 
 static HYD_status fn_info_getjobattr(int fd, char *args[])
 {
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd, *key, *thrid;
+    struct HYD_string_stash stash;
+    char *cmd, *key, *thrid;
     struct HYD_pmcd_token *tokens;
-    int token_count, i;
+    int token_count;
     HYD_status status = HYD_SUCCESS;
 
     HYDU_FUNC_ENTER();
@@ -426,21 +412,19 @@ static HYD_status fn_info_getjobattr(int fd, char *args[])
     thrid = HYD_pmcd_pmi_find_token_keyval(tokens, token_count, "thrid");
 
     if (!strcmp(key, "PMI_process_mapping")) {
-        i = 0;
-        tmp[i++] = HYDU_strdup("cmd=info-getjobattr-response;");
+        HYD_STRING_STASH_INIT(stash);
+        HYD_STRING_STASH(stash, HYDU_strdup("cmd=info-getjobattr-response;"), status);
         if (thrid) {
-            tmp[i++] = HYDU_strdup("thrid=");
-            tmp[i++] = HYDU_strdup(thrid);
-            tmp[i++] = HYDU_strdup(";");
+            HYD_STRING_STASH(stash, HYDU_strdup("thrid="), status);
+            HYD_STRING_STASH(stash, HYDU_strdup(thrid), status);
+            HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
         }
-        tmp[i++] = HYDU_strdup("found=TRUE;value=");
-        tmp[i++] = HYDU_strdup(HYD_pmcd_pmip.system_global.pmi_process_mapping);
-        tmp[i++] = HYDU_strdup(";rc=0;");
-        tmp[i++] = NULL;
+        HYD_STRING_STASH(stash, HYDU_strdup("found=TRUE;value="), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(HYD_pmcd_pmip.system_global.pmi_process_mapping),
+                         status);
+        HYD_STRING_STASH(stash, HYDU_strdup(";rc=0;"), status);
 
-        status = HYDU_str_alloc_and_join(tmp, &cmd);
-        HYDU_ERR_POP(status, "unable to join strings\n");
-        HYDU_free_strlist(tmp);
+        HYD_STRING_SPIT(stash, cmd, status);
 
         send_cmd_downstream(fd, cmd);
         HYDU_FREE(cmd);
@@ -462,9 +446,10 @@ static HYD_status fn_info_getjobattr(int fd, char *args[])
 static HYD_status fn_finalize(int fd, char *args[])
 {
     char *thrid;
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd;
+    struct HYD_string_stash stash;
+    char *cmd;
     struct HYD_pmcd_token *tokens;
-    int token_count, i;
+    int token_count;
     HYD_status status = HYD_SUCCESS;
 
     HYDU_FUNC_ENTER();
@@ -474,19 +459,16 @@ static HYD_status fn_finalize(int fd, char *args[])
 
     thrid = HYD_pmcd_pmi_find_token_keyval(tokens, token_count, "thrid");
 
-    i = 0;
-    tmp[i++] = HYDU_strdup("cmd=finalize-response;");
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash, HYDU_strdup("cmd=finalize-response;"), status);
     if (thrid) {
-        tmp[i++] = HYDU_strdup("thrid=");
-        tmp[i++] = HYDU_strdup(thrid);
-        tmp[i++] = HYDU_strdup(";");
+        HYD_STRING_STASH(stash, HYDU_strdup("thrid="), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(thrid), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
     }
-    tmp[i++] = HYDU_strdup("rc=0;");
-    tmp[i++] = NULL;
+    HYD_STRING_STASH(stash, HYDU_strdup("rc=0;"), status);
 
-    status = HYDU_str_alloc_and_join(tmp, &cmd);
-    HYDU_ERR_POP(status, "unable to join strings\n");
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, cmd, status);
 
     send_cmd_downstream(fd, cmd);
     HYDU_FREE(cmd);
diff --git a/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v1.c b/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v1.c
index cbc4c08..a18d807 100644
--- a/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v1.c
+++ b/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v1.c
@@ -243,7 +243,7 @@ static HYD_status fn_spawn(int fd, int pid, int pgid, char *args[])
     int token_count, i, j, k, new_pgid, total_spawns;
     int argcnt, num_segments;
     char *control_port, *proxy_args[HYD_NUM_TMP_STRINGS] = { NULL };
-    char *tmp[HYD_NUM_TMP_STRINGS];
+    struct HYD_string_stash stash;
     HYD_status status = HYD_SUCCESS;
 
     HYDU_FUNC_ENTER();
@@ -398,15 +398,12 @@ static HYD_status fn_spawn(int fd, int pid, int pgid, char *args[])
         if (path == NULL)
             execname = HYDU_strdup(val);
         else {
-            i = 0;
-            tmp[i++] = HYDU_strdup(path);
-            tmp[i++] = HYDU_strdup("/");
-            tmp[i++] = HYDU_strdup(val);
-            tmp[i++] = NULL;
-
-            status = HYDU_str_alloc_and_join(tmp, &execname);
-            HYDU_ERR_POP(status, "error while joining strings\n");
-            HYDU_free_strlist(tmp);
+            HYD_STRING_STASH_INIT(stash);
+            HYD_STRING_STASH(stash, HYDU_strdup(path), status);
+            HYD_STRING_STASH(stash, HYDU_strdup("/"), status);
+            HYD_STRING_STASH(stash, HYDU_strdup(val), status);
+
+            HYD_STRING_SPIT(stash, execname, status);
         }
 
         i = 0;
@@ -513,16 +510,13 @@ static HYD_status fn_spawn(int fd, int pid, int pgid, char *args[])
     HYDU_ERR_POP(status, "launcher cannot launch processes\n");
 
     {
-        char *cmd_str[HYD_NUM_TMP_STRINGS], *cmd;
+        char *cmd;
 
-        i = 0;
-        cmd_str[i++] = HYDU_strdup("cmd=spawn_result rc=0");
-        cmd_str[i++] = HYDU_strdup("\n");
-        cmd_str[i++] = NULL;
+        HYD_STRING_STASH_INIT(stash);
+        HYD_STRING_STASH(stash, HYDU_strdup("cmd=spawn_result rc=0"), status);
+        HYD_STRING_STASH(stash, HYDU_strdup("\n"), status);
 
-        status = HYDU_str_alloc_and_join(cmd_str, &cmd);
-        HYDU_ERR_POP(status, "unable to join strings\n");
-        HYDU_free_strlist(cmd_str);
+        HYD_STRING_SPIT(stash, cmd, status);
 
         status = cmd_response(fd, pid, cmd);
         HYDU_ERR_POP(status, "error writing PMI line\n");
@@ -547,8 +541,9 @@ static HYD_status fn_spawn(int fd, int pid, int pgid, char *args[])
 
 static HYD_status fn_publish_name(int fd, int pid, int pgid, char *args[])
 {
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd, *val;
-    int i, token_count;
+    struct HYD_string_stash stash;
+    char *cmd, *val;
+    int token_count;
     struct HYD_pmcd_token *tokens;
     char *name, *port;
     int success = 0;
@@ -570,16 +565,16 @@ static HYD_status fn_publish_name(int fd, int pid, int pgid, char *args[])
     status = HYD_pmcd_pmi_publish(name, port, &success);
     HYDU_ERR_POP(status, "error publishing service\n");
 
-    i = 0;
+    HYD_STRING_STASH_INIT(stash);
     if (success)
-        tmp[i++] = HYDU_strdup("cmd=publish_result info=ok rc=0 msg=success\n");
+        HYD_STRING_STASH(stash, HYDU_strdup("cmd=publish_result info=ok rc=0 msg=success\n"),
+                         status);
     else
-        tmp[i++] = HYDU_strdup("cmd=publish_result info=ok rc=1 msg=key_already_present\n");
-    tmp[i++] = NULL;
+        HYD_STRING_STASH(stash,
+                         HYDU_strdup("cmd=publish_result info=ok rc=1 msg=key_already_present\n"),
+                         status);
 
-    status = HYDU_str_alloc_and_join(tmp, &cmd);
-    HYDU_ERR_POP(status, "unable to join strings\n");
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, cmd, status);
 
     status = cmd_response(fd, pid, cmd);
     HYDU_ERR_POP(status, "send command failed\n");
@@ -595,8 +590,9 @@ static HYD_status fn_publish_name(int fd, int pid, int pgid, char *args[])
 
 static HYD_status fn_unpublish_name(int fd, int pid, int pgid, char *args[])
 {
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd, *name;
-    int i, token_count;
+    struct HYD_string_stash stash;
+    char *cmd, *name;
+    int token_count;
     struct HYD_pmcd_token *tokens;
     int success = 0;
     HYD_status status = HYD_SUCCESS;
@@ -612,16 +608,16 @@ static HYD_status fn_unpublish_name(int fd, int pid, int pgid, char *args[])
     status = HYD_pmcd_pmi_unpublish(name, &success);
     HYDU_ERR_POP(status, "error unpublishing service\n");
 
-    i = 0;
+    HYD_STRING_STASH_INIT(stash);
     if (success)
-        tmp[i++] = HYDU_strdup("cmd=unpublish_result info=ok rc=0 msg=success\n");
+        HYD_STRING_STASH(stash, HYDU_strdup("cmd=unpublish_result info=ok rc=0 msg=success\n"),
+                         status);
     else
-        tmp[i++] = HYDU_strdup("cmd=unpublish_result info=ok rc=1 msg=service_not_found\n");
-    tmp[i++] = NULL;
+        HYD_STRING_STASH(stash,
+                         HYDU_strdup("cmd=unpublish_result info=ok rc=1 msg=service_not_found\n"),
+                         status);
 
-    status = HYDU_str_alloc_and_join(tmp, &cmd);
-    HYDU_ERR_POP(status, "unable to join strings\n");
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, cmd, status);
 
     status = cmd_response(fd, pid, cmd);
     HYDU_ERR_POP(status, "send command failed\n");
@@ -637,8 +633,9 @@ static HYD_status fn_unpublish_name(int fd, int pid, int pgid, char *args[])
 
 static HYD_status fn_lookup_name(int fd, int pid, int pgid, char *args[])
 {
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd, *name, *value;
-    int i, token_count;
+    struct HYD_string_stash stash;
+    char *cmd, *name, *value;
+    int token_count;
     struct HYD_pmcd_token *tokens;
     HYD_status status = HYD_SUCCESS;
 
@@ -653,21 +650,18 @@ static HYD_status fn_lookup_name(int fd, int pid, int pgid, char *args[])
     status = HYD_pmcd_pmi_lookup(name, &value);
     HYDU_ERR_POP(status, "error while looking up service\n");
 
-    i = 0;
-    tmp[i++] = HYDU_strdup("cmd=lookup_result");
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash, HYDU_strdup("cmd=lookup_result"), status);
     if (value) {
-        tmp[i++] = HYDU_strdup(" port=");
-        tmp[i++] = HYDU_strdup(value);
-        tmp[i++] = HYDU_strdup(" info=ok rc=0 msg=success\n");
+        HYD_STRING_STASH(stash, HYDU_strdup(" port="), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(value), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(" info=ok rc=0 msg=success\n"), status);
     }
     else {
-        tmp[i++] = HYDU_strdup(" rc=1 msg=service_not_found\n");
+        HYD_STRING_STASH(stash, HYDU_strdup(" rc=1 msg=service_not_found\n"), status);
     }
-    tmp[i++] = NULL;
 
-    status = HYDU_str_alloc_and_join(tmp, &cmd);
-    HYDU_ERR_POP(status, "unable to join strings\n");
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, cmd, status);
 
     status = cmd_response(fd, pid, cmd);
     HYDU_ERR_POP(status, "send command failed\n");
diff --git a/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v2.c b/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v2.c
index 87ff14f..bdfc7f7 100644
--- a/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v2.c
+++ b/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v2.c
@@ -111,13 +111,12 @@ static HYD_status poke_progress(char *key)
 
 static HYD_status fn_info_getjobattr(int fd, int pid, int pgid, char *args[])
 {
-    int i;
     struct HYD_proxy *proxy;
     struct HYD_pmcd_pmi_pg_scratch *pg_scratch;
     struct HYD_pmcd_pmi_kvs_pair *run;
     const char *key;
-    char *thrid, *val;
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd;
+    char *thrid, *val, *cmd;
+    struct HYD_string_stash stash;
     struct HYD_pmcd_token *tokens;
     int token_count;
     HYD_status status = HYD_SUCCESS;
@@ -149,28 +148,24 @@ static HYD_status fn_info_getjobattr(int fd, int pid, int pgid, char *args[])
         }
     }
 
-    i = 0;
-    tmp[i++] = HYDU_strdup("cmd=info-getjobattr-response;");
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash, HYDU_strdup("cmd=info-getjobattr-response;"), status);
     if (thrid) {
-        tmp[i++] = HYDU_strdup("thrid=");
-        tmp[i++] = HYDU_strdup(thrid);
-        tmp[i++] = HYDU_strdup(";");
+        HYD_STRING_STASH(stash, HYDU_strdup("thrid="), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(thrid), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
     }
-    tmp[i++] = HYDU_strdup("found=");
+    HYD_STRING_STASH(stash, HYDU_strdup("found="), status);
     if (val) {
-        tmp[i++] = HYDU_strdup("TRUE;value=");
-        tmp[i++] = HYDU_strdup(val);
-        tmp[i++] = HYDU_strdup(";rc=0;");
+        HYD_STRING_STASH(stash, HYDU_strdup("TRUE;value="), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(val), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(";rc=0;"), status);
     }
     else {
-        tmp[i++] = HYDU_strdup("FALSE;rc=0;");
+        HYD_STRING_STASH(stash, HYDU_strdup("FALSE;rc=0;"), status);
     }
-    tmp[i++] = NULL;
 
-    status = HYDU_str_alloc_and_join(tmp, &cmd);
-    HYDU_ERR_POP(status, "unable to join strings\n");
-
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, cmd, status);
 
     status = cmd_response(fd, pid, cmd);
     HYDU_ERR_POP(status, "send command failed\n");
@@ -188,9 +183,9 @@ static HYD_status fn_info_getjobattr(int fd, int pid, int pgid, char *args[])
 
 static HYD_status fn_kvs_put(int fd, int pid, int pgid, char *args[])
 {
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd;
-    char *key, *val, *thrid;
-    int i, ret;
+    struct HYD_string_stash stash;
+    char *key, *val, *thrid, *cmd;
+    int ret;
     struct HYD_proxy *proxy;
     struct HYD_pmcd_pmi_pg_scratch *pg_scratch;
     struct HYD_pmcd_token *tokens;
@@ -222,22 +217,18 @@ static HYD_status fn_kvs_put(int fd, int pid, int pgid, char *args[])
     status = HYD_pmcd_pmi_add_kvs(key, val, pg_scratch->kvs, &ret);
     HYDU_ERR_POP(status, "unable to put data into kvs\n");
 
-    i = 0;
-    tmp[i++] = HYDU_strdup("cmd=kvs-put-response;");
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash, HYDU_strdup("cmd=kvs-put-response;"), status);
     if (thrid) {
-        tmp[i++] = HYDU_strdup("thrid=");
-        tmp[i++] = HYDU_strdup(thrid);
-        tmp[i++] = HYDU_strdup(";");
+        HYD_STRING_STASH(stash, HYDU_strdup("thrid="), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(thrid), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
     }
-    tmp[i++] = HYDU_strdup("rc=");
-    tmp[i++] = HYDU_int_to_str(ret);
-    tmp[i++] = HYDU_strdup(";");
-    tmp[i++] = NULL;
-
-    status = HYDU_str_alloc_and_join(tmp, &cmd);
-    HYDU_ERR_POP(status, "unable to join strings\n");
+    HYD_STRING_STASH(stash, HYDU_strdup("rc="), status);
+    HYD_STRING_STASH(stash, HYDU_int_to_str(ret), status);
+    HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
 
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, cmd, status);
 
     status = cmd_response(fd, pid, cmd);
     HYDU_ERR_POP(status, "send command failed\n");
@@ -268,8 +259,8 @@ static HYD_status fn_kvs_get(int fd, int pid, int pgid, char *args[])
     struct HYD_pg *pg;
     struct HYD_proxy *proxy;
     struct HYD_pmcd_pmi_kvs_pair *run;
-    char *key, *thrid;
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd;
+    char *key, *thrid, *cmd;
+    struct HYD_string_stash stash;
     struct HYD_pmcd_token *tokens;
     int token_count;
     HYD_status status = HYD_SUCCESS;
@@ -322,27 +313,24 @@ static HYD_status fn_kvs_get(int fd, int pid, int pgid, char *args[])
         }
     }
 
-    i = 0;
-    tmp[i++] = HYDU_strdup("cmd=kvs-get-response;");
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash, HYDU_strdup("cmd=kvs-get-response;"), status);
     if (thrid) {
-        tmp[i++] = HYDU_strdup("thrid=");
-        tmp[i++] = HYDU_strdup(thrid);
-        tmp[i++] = HYDU_strdup(";");
+        HYD_STRING_STASH(stash, HYDU_strdup("thrid="), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(thrid), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
     }
     if (found) {
-        tmp[i++] = HYDU_strdup("found=TRUE;value=");
-        tmp[i++] = HYDU_strdup(run->val);
-        tmp[i++] = HYDU_strdup(";");
+        HYD_STRING_STASH(stash, HYDU_strdup("found=TRUE;value="), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(run->val), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
     }
     else {
-        tmp[i++] = HYDU_strdup("found=FALSE;");
+        HYD_STRING_STASH(stash, HYDU_strdup("found=FALSE;"), status);
     }
-    tmp[i++] = HYDU_strdup("rc=0;");
-    tmp[i++] = NULL;
+    HYD_STRING_STASH(stash, HYDU_strdup("rc=0;"), status);
 
-    status = HYDU_str_alloc_and_join(tmp, &cmd);
-    HYDU_ERR_POP(status, "unable to join strings\n");
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, cmd, status);
 
     status = cmd_response(fd, pid, cmd);
     HYDU_ERR_POP(status, "send command failed\n");
@@ -361,7 +349,8 @@ static HYD_status fn_kvs_fence(int fd, int pid, int pgid, char *args[])
 {
     struct HYD_proxy *proxy;
     struct HYD_pmcd_pmi_pg_scratch *pg_scratch;
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd, *thrid;
+    struct HYD_string_stash stash;
+    char *cmd, *thrid;
     struct HYD_pmcd_token *tokens;
     int token_count, i;
     static int fence_count = 0;
@@ -396,19 +385,16 @@ static HYD_status fn_kvs_fence(int fd, int pid, int pgid, char *args[])
         pg_scratch->ecount[i].epoch = 1;
     }
 
-    i = 0;
-    tmp[i++] = HYDU_strdup("cmd=kvs-fence-response;");
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash, HYDU_strdup("cmd=kvs-fence-response;"), status);
     if (thrid) {
-        tmp[i++] = HYDU_strdup("thrid=");
-        tmp[i++] = HYDU_strdup(thrid);
-        tmp[i++] = HYDU_strdup(";");
+        HYD_STRING_STASH(stash, HYDU_strdup("thrid="), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(thrid), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
     }
-    tmp[i++] = HYDU_strdup("rc=0;");
-    tmp[i++] = NULL;
+    HYD_STRING_STASH(stash, HYDU_strdup("rc=0;"), status);
 
-    status = HYDU_str_alloc_and_join(tmp, &cmd);
-    HYDU_ERR_POP(status, "unable to join strings\n");
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, cmd, status);
 
     status = cmd_response(fd, pid, cmd);
     HYDU_ERR_POP(status, "send command failed\n");
@@ -472,7 +458,7 @@ static HYD_status fn_spawn(int fd, int pid, int pgid, char *args[])
     int token_count, i, j, k, new_pgid;
     int argcnt, num_segments;
     char *control_port, *proxy_args[HYD_NUM_TMP_STRINGS] = { NULL };
-    char *tmp[HYD_NUM_TMP_STRINGS];
+    struct HYD_string_stash stash;
     HYD_status status = HYD_SUCCESS;
 
     HYDU_FUNC_ENTER();
@@ -613,15 +599,12 @@ static HYD_status fn_spawn(int fd, int pid, int pgid, char *args[])
         if (path == NULL)
             execname = HYDU_strdup(val);
         else {
-            i = 0;
-            tmp[i++] = HYDU_strdup(path);
-            tmp[i++] = HYDU_strdup("/");
-            tmp[i++] = HYDU_strdup(val);
-            tmp[i++] = NULL;
-
-            status = HYDU_str_alloc_and_join(tmp, &execname);
-            HYDU_ERR_POP(status, "error while joining strings\n");
-            HYDU_free_strlist(tmp);
+            HYD_STRING_STASH_INIT(stash);
+            HYD_STRING_STASH(stash, HYDU_strdup(path), status);
+            HYD_STRING_STASH(stash, HYDU_strdup("/"), status);
+            HYD_STRING_STASH(stash, HYDU_strdup(val), status);
+
+            HYD_STRING_SPIT(stash, execname, status);
         }
 
         i = 0;
@@ -727,25 +710,22 @@ static HYD_status fn_spawn(int fd, int pid, int pgid, char *args[])
     HYDU_ERR_POP(status, "launcher cannot launch processes\n");
 
     {
-        char *cmd_str[HYD_NUM_TMP_STRINGS], *cmd;
+        char *cmd;
 
-        i = 0;
-        cmd_str[i++] = HYDU_strdup("cmd=spawn-response;");
+        HYD_STRING_STASH_INIT(stash);
+        HYD_STRING_STASH(stash, HYDU_strdup("cmd=spawn-response;"), status);
         if (thrid) {
-            cmd_str[i++] = HYDU_strdup("thrid=");
-            cmd_str[i++] = HYDU_strdup(thrid);
-            cmd_str[i++] = HYDU_strdup(";");
+            HYD_STRING_STASH(stash, HYDU_strdup("thrid="), status);
+            HYD_STRING_STASH(stash, HYDU_strdup(thrid), status);
+            HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
         }
-        cmd_str[i++] = HYDU_strdup("rc=0;");
-        cmd_str[i++] = HYDU_strdup("jobid=");
-        cmd_str[i++] = HYDU_strdup(pg_scratch->kvs->kvsname);
-        cmd_str[i++] = HYDU_strdup(";");
-        cmd_str[i++] = HYDU_strdup("nerrs=0;");
-        cmd_str[i++] = NULL;
+        HYD_STRING_STASH(stash, HYDU_strdup("rc=0;"), status);
+        HYD_STRING_STASH(stash, HYDU_strdup("jobid="), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(pg_scratch->kvs->kvsname), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
+        HYD_STRING_STASH(stash, HYDU_strdup("nerrs=0;"), status);
 
-        status = HYDU_str_alloc_and_join(cmd_str, &cmd);
-        HYDU_ERR_POP(status, "unable to join strings\n");
-        HYDU_free_strlist(cmd_str);
+        HYD_STRING_SPIT(stash, cmd, status);
 
         status = cmd_response(fd, pid, cmd);
         HYDU_ERR_POP(status, "send command failed\n");
@@ -766,9 +746,9 @@ static HYD_status fn_spawn(int fd, int pid, int pgid, char *args[])
 
 static HYD_status fn_name_publish(int fd, int pid, int pgid, char *args[])
 {
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd, *thrid, *val;
-    char *name, *port;
-    int i, token_count, success;
+    struct HYD_string_stash stash;
+    char *cmd, *thrid, *val, *name, *port;
+    int token_count, success;
     struct HYD_pmcd_token *tokens;
     HYD_status status = HYD_SUCCESS;
 
@@ -790,25 +770,22 @@ static HYD_status fn_name_publish(int fd, int pid, int pgid, char *args[])
     status = HYD_pmcd_pmi_publish(name, port, &success);
     HYDU_ERR_POP(status, "error publishing service\n");
 
-    i = 0;
-    tmp[i++] = HYDU_strdup("cmd=name-publish-response;");
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash, HYDU_strdup("cmd=name-publish-response;"), status);
     if (thrid) {
-        tmp[i++] = HYDU_strdup("thrid=");
-        tmp[i++] = HYDU_strdup(thrid);
-        tmp[i++] = HYDU_strdup(";");
+        HYD_STRING_STASH(stash, HYDU_strdup("thrid="), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(thrid), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
     }
     if (!success) {
-        tmp[i++] = HYDU_strdup("rc=1;errmsg=duplicate_service_");
-        tmp[i++] = HYDU_strdup(name);
-        tmp[i++] = HYDU_strdup(";");
+        HYD_STRING_STASH(stash, HYDU_strdup("rc=1;errmsg=duplicate_service_"), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(name), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
     }
     else
-        tmp[i++] = HYDU_strdup("rc=0;");
-    tmp[i++] = NULL;
+        HYD_STRING_STASH(stash, HYDU_strdup("rc=0;"), status);
 
-    status = HYDU_str_alloc_and_join(tmp, &cmd);
-    HYDU_ERR_POP(status, "unable to join strings\n");
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, cmd, status);
 
     status = cmd_response(fd, pid, cmd);
     HYDU_ERR_POP(status, "send command failed\n");
@@ -824,8 +801,9 @@ static HYD_status fn_name_publish(int fd, int pid, int pgid, char *args[])
 
 static HYD_status fn_name_unpublish(int fd, int pid, int pgid, char *args[])
 {
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd, *thrid, *name;
-    int i, token_count, success;
+    struct HYD_string_stash stash;
+    char *cmd, *thrid, *name;
+    int token_count, success;
     struct HYD_pmcd_token *tokens;
     HYD_status status = HYD_SUCCESS;
 
@@ -842,25 +820,22 @@ static HYD_status fn_name_unpublish(int fd, int pid, int pgid, char *args[])
     status = HYD_pmcd_pmi_unpublish(name, &success);
     HYDU_ERR_POP(status, "error unpublishing service\n");
 
-    i = 0;
-    tmp[i++] = HYDU_strdup("cmd=name-unpublish-response;");
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash, HYDU_strdup("cmd=name-unpublish-response;"), status);
     if (thrid) {
-        tmp[i++] = HYDU_strdup("thrid=");
-        tmp[i++] = HYDU_strdup(thrid);
-        tmp[i++] = HYDU_strdup(";");
+        HYD_STRING_STASH(stash, HYDU_strdup("thrid="), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(thrid), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
     }
     if (success)
-        tmp[i++] = HYDU_strdup("rc=0;");
+        HYD_STRING_STASH(stash, HYDU_strdup("rc=0;"), status);
     else {
-        tmp[i++] = HYDU_strdup("rc=1;errmsg=service_");
-        tmp[i++] = HYDU_strdup(name);
-        tmp[i++] = HYDU_strdup("_not_found;");
+        HYD_STRING_STASH(stash, HYDU_strdup("rc=1;errmsg=service_"), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(name), status);
+        HYD_STRING_STASH(stash, HYDU_strdup("_not_found;"), status);
     }
-    tmp[i++] = NULL;
 
-    status = HYDU_str_alloc_and_join(tmp, &cmd);
-    HYDU_ERR_POP(status, "unable to join strings\n");
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, cmd, status);
 
     status = cmd_response(fd, pid, cmd);
     HYDU_ERR_POP(status, "send command failed\n");
@@ -876,9 +851,10 @@ static HYD_status fn_name_unpublish(int fd, int pid, int pgid, char *args[])
 
 static HYD_status fn_name_lookup(int fd, int pid, int pgid, char *args[])
 {
-    char *tmp[HYD_NUM_TMP_STRINGS], *cmd, *thrid, *name, *value;
+    struct HYD_string_stash stash;
+    char *cmd, *thrid, *name, *value;
     struct HYD_pmcd_pmi_publish *publish;
-    int i, token_count;
+    int token_count;
     struct HYD_pmcd_token *tokens;
     HYD_status status = HYD_SUCCESS;
 
@@ -898,26 +874,23 @@ static HYD_status fn_name_lookup(int fd, int pid, int pgid, char *args[])
     status = HYD_pmcd_pmi_lookup(name, &value);
     HYDU_ERR_POP(status, "error while looking up service\n");
 
-    i = 0;
-    tmp[i++] = HYDU_strdup("cmd=name-lookup-response;");
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash, HYDU_strdup("cmd=name-lookup-response;"), status);
     if (thrid) {
-        tmp[i++] = HYDU_strdup("thrid=");
-        tmp[i++] = HYDU_strdup(thrid);
-        tmp[i++] = HYDU_strdup(";");
+        HYD_STRING_STASH(stash, HYDU_strdup("thrid="), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(thrid), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(";"), status);
     }
     if (value) {
-        tmp[i++] = HYDU_strdup("port=");
-        tmp[i++] = HYDU_strdup(value);
-        tmp[i++] = HYDU_strdup(";found=TRUE;rc=0;");
+        HYD_STRING_STASH(stash, HYDU_strdup("port="), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(value), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(";found=TRUE;rc=0;"), status);
     }
     else {
-        tmp[i++] = HYDU_strdup("found=FALSE;rc=1;");
+        HYD_STRING_STASH(stash, HYDU_strdup("found=FALSE;rc=1;"), status);
     }
-    tmp[i++] = NULL;
 
-    status = HYDU_str_alloc_and_join(tmp, &cmd);
-    HYDU_ERR_POP(status, "unable to join strings\n");
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, cmd, status);
 
     status = cmd_response(fd, pid, cmd);
     HYDU_ERR_POP(status, "send command failed\n");
diff --git a/src/pm/hydra/pm/pmiserv/pmiserv_utils.c b/src/pm/hydra/pm/pmiserv/pmiserv_utils.c
index 45222aa..a64f111 100644
--- a/src/pm/hydra/pm/pmiserv/pmiserv_utils.c
+++ b/src/pm/hydra/pm/pmiserv/pmiserv_utils.c
@@ -12,8 +12,8 @@
 
 HYD_status HYD_pmcd_pmi_fill_in_proxy_args(char **proxy_args, char *control_port, int pgid)
 {
-    int i, arg, use_ddd, use_valgrind, use_strace, retries, ret;
-    char *path_str[HYD_NUM_TMP_STRINGS];
+    int arg, use_ddd, use_valgrind, use_strace, retries, ret;
+    struct HYD_string_stash stash;
     HYD_status status = HYD_SUCCESS;
 
     arg = 0;
@@ -45,13 +45,11 @@ HYD_status HYD_pmcd_pmi_fill_in_proxy_args(char **proxy_args, char *control_port
         proxy_args[arg++] = HYDU_strdup("-ff");
     }
 
-    i = 0;
-    path_str[i++] = HYDU_strdup(HYD_server_info.base_path);
-    path_str[i++] = HYDU_strdup("hydra_pmi_proxy");
-    path_str[i] = NULL;
-    status = HYDU_str_alloc_and_join(path_str, &proxy_args[arg++]);
-    HYDU_ERR_POP(status, "unable to join strings\n");
-    HYDU_free_strlist(path_str);
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash, HYDU_strdup(HYD_server_info.base_path), status);
+    HYD_STRING_STASH(stash, HYDU_strdup("hydra_pmi_proxy"), status);
+    HYD_STRING_SPIT(stash, proxy_args[arg], status);
+    arg++;
 
     proxy_args[arg++] = HYDU_strdup("--control-port");
     proxy_args[arg++] = HYDU_strdup(control_port);
@@ -113,8 +111,8 @@ HYD_status HYD_pmcd_pmi_fill_in_proxy_args(char **proxy_args, char *control_port
 
 static HYD_status pmi_process_mapping(struct HYD_pg *pg, char **process_mapping_str)
 {
-    int i, is_equal, filler_round, core_count;
-    char *tmp[HYD_NUM_TMP_STRINGS];
+    int is_equal, filler_round, core_count;
+    struct HYD_string_stash stash;
     struct block {
         int start_idx;
         int num_nodes;
@@ -204,28 +202,23 @@ static HYD_status pmi_process_mapping(struct HYD_pg *pg, char **process_mapping_
 
   create_mapping_key:
     /* Create the mapping out of the blocks */
-    i = 0;
-    tmp[i++] = HYDU_strdup("(");
-    tmp[i++] = HYDU_strdup("vector,");
+    HYD_STRING_STASH_INIT(stash);
+    HYD_STRING_STASH(stash, HYDU_strdup("("), status);
+    HYD_STRING_STASH(stash, HYDU_strdup("vector,"), status);
     for (block = blocklist_head; block; block = block->next) {
-        tmp[i++] = HYDU_strdup("(");
-        tmp[i++] = HYDU_int_to_str(block->start_idx);
-        tmp[i++] = HYDU_strdup(",");
-        tmp[i++] = HYDU_int_to_str(block->num_nodes);
-        tmp[i++] = HYDU_strdup(",");
-        tmp[i++] = HYDU_int_to_str(block->core_count);
-        tmp[i++] = HYDU_strdup(")");
+        HYD_STRING_STASH(stash, HYDU_strdup("("), status);
+        HYD_STRING_STASH(stash, HYDU_int_to_str(block->start_idx), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(","), status);
+        HYD_STRING_STASH(stash, HYDU_int_to_str(block->num_nodes), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(","), status);
+        HYD_STRING_STASH(stash, HYDU_int_to_str(block->core_count), status);
+        HYD_STRING_STASH(stash, HYDU_strdup(")"), status);
         if (block->next)
-            tmp[i++] = HYDU_strdup(",");
-        HYDU_STRLIST_CONSOLIDATE(tmp, i, status);
+            HYD_STRING_STASH(stash, HYDU_strdup(","), status);
     }
-    tmp[i++] = HYDU_strdup(")");
-    tmp[i++] = NULL;
-
-    status = HYDU_str_alloc_and_join(tmp, process_mapping_str);
-    HYDU_ERR_POP(status, "error while joining strings\n");
+    HYD_STRING_STASH(stash, HYDU_strdup(")"), status);
 
-    HYDU_free_strlist(tmp);
+    HYD_STRING_SPIT(stash, *process_mapping_str, status);
 
     for (block = blocklist_head; block; block = nblock) {
         nblock = block->next;

http://git.mpich.org/mpich.git/commitdiff/f65916e1200372811aebbf534c239a589153e4c9

commit f65916e1200372811aebbf534c239a589153e4c9
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Sun Apr 28 22:05:54 2013 -0500

    VPATH bug-fix.
    
    This bug didn't show up on Ubuntu, but did on FreeBSD.  Perhaps
    FreeBSD doesn't automatically fix this for us.
    
    No reviewer.

diff --git a/src/util/param/Makefile.mk b/src/util/param/Makefile.mk
index 88148b3..8c3fd7f 100644
--- a/src/util/param/Makefile.mk
+++ b/src/util/param/Makefile.mk
@@ -12,7 +12,6 @@ dist_noinst_DATA += src/util/param/params.yml
 
 if MAINTAINER_MODE
 # normally built by autogen.sh, but this rebuild rule is here
-src/util/param/param_vals.c: src/util/param/params.yml $(top_srcdir)/maint/genparams
+$(top_srcdir)/src/util/param/param_vals.c: $(top_srcdir)/src/util/param/params.yml $(top_srcdir)/maint/genparams
 	( cd $(top_srcdir) && ./maint/genparams )
 endif MAINTAINER_MODE
-

http://git.mpich.org/mpich.git/commitdiff/99e8252a5ab5f4f3cae2738f2f4d5ebedfe17920

commit 99e8252a5ab5f4f3cae2738f2f4d5ebedfe17920
Author: Pavan Balaji <balaji at mcs.anl.gov>
Date:   Sat Apr 27 12:16:40 2013 -0500

    Cleanup confdb macros.
    
    1. AC_RUN_LOG is no longer an autoconf internal macro (it might have been
    at some point).  We can use it directly.
    
    2. Replace PAC_RUNLOG_IFELSE to use autoconf-native macros, plus some
    minor additional work.  Get rid of PAC_COMMAND_IFELSE and
    PAC_EVAL_IFELSE, which seem to be identical to PAC_RUNLOG_IFELSE.  One
    option is to just point them to PAC_RUNLOG_IFELSE, but this commit
    does not do that, since they seem to be unused.  Other projects that
    use these macros can just point to PAC_RUNLOG_IFELSE if needed.
    
    3. We no longer need PAS_VAR_COPY since AS_VAR_COPY is present in
    newer autoconf versions.
    
    4. PAC_VAR_PUSHFLAG and PAC_VAR_POPFLAG are duplicates of
    PAC_PUSH_FLAG and PAC_POP_FLAG.  Also, unlike the PAC_VAR_ macro
    variants, the flag is not updated by the PAC_PUSH/PAC_POP macros, so
    the older value is retained.
    
    5. The AM_IGNORE macro provided in confdb only works for a patched
    automake, with no patch available to use.  We should either have both
    or neither.
    
    6. aclocal_atomic.m4 is now replaced by OPA.
    
    7. The old F77 macros were kept around as backup when we moved to the
    new macros (though this is really the job of the VCS).  It's been
    several years since that was done.  We can safely remove the f77old.m4
    file.  It is still in git if we ever need to go back.
    
    8. Other general cleanup.
    
    No reviewer.

diff --git a/confdb/aclocal.m4 b/confdb/aclocal.m4
index 488feaa..36fb15c 100644
--- a/confdb/aclocal.m4
+++ b/confdb/aclocal.m4
@@ -1,18 +1,13 @@
 dnl This version of aclocal.m4 simply includes all of the individual
 dnl components
-builtin(include,aclocal_am.m4)
 builtin(include,aclocal_bugfix.m4)
 builtin(include,aclocal_cache.m4)
 builtin(include,aclocal_cc.m4)
-builtin(include,aclocal_atomic.m4)
 dnl aclocal_cross.m4 uses autoconf features dated back to 2.13.
 dnl too old to be useful, 07/14/2010.
 dnl builtin(include,aclocal_cross.m4)
 builtin(include,aclocal_cxx.m4)
 builtin(include,aclocal_f77.m4)
-dnl aclocal_f77old.m4 contains PAC_PROG_F77_CMDARGS which is NOT used in MPICH
-dnl but it is still used by other packages, so leave it in confdb.
-dnl builtin(include,aclocal_f77old.m4)
 builtin(include,aclocal_util.m4)
 builtin(include,aclocal_subcfg.m4)
 builtin(include,aclocal_make.m4)
diff --git a/confdb/aclocal_am.m4 b/confdb/aclocal_am.m4
deleted file mode 100644
index 4d3b0de..0000000
--- a/confdb/aclocal_am.m4
+++ /dev/null
@@ -1,6 +0,0 @@
-dnl AM_IGNORE is an extension that tells (a patched) automake not to
-dnl include the specified AC_SUBST variable in the Makefile.in that
-dnl automake generates.  We don't use AC_DEFUN, since aclocal will 
-dnl then complain that AM_IGNORE is a duplicate (if you are using the
-dnl patched automake/aclocal).
-m4_ifdef([AM_IGNORE],[],[m4_define([AM_IGNORE],[])])
diff --git a/confdb/aclocal_atomic.m4 b/confdb/aclocal_atomic.m4
deleted file mode 100644
index 4e96cfb..0000000
--- a/confdb/aclocal_atomic.m4
+++ /dev/null
@@ -1,227 +0,0 @@
-dnl /*D PAC_C_MEMATOMIC - Try and determine how to implement memory-atomic
-dnl   operations with the selected C compiler
-dnl
-dnl Synopsis:
-dnl PAC_C_MEMATOMIC
-dnl
-dnl Notes:
-dnl Defines names of the following form
-dnl + HAVE_GCC_ASM_AND_X86_{MFENCE,LFENCE,SFENCE} - gcc __asm__ will issue
-dnl    mfence, lfence, or sfence
-dnl . HAVE___ASM_AND_X86_{MFENCE,LFENCE,SFENCE} - __asm _emit will issue
-dnl    mfence, lfence, or sfence
-dnl . HAVE_ASM_AND_X86_{MFENCE,LFENCE,SFENCE} - asm("...") will issue
-dnl    mfence, lfence, or sfence
-dnl . HAVE__INTERLOCKEDEXCHANGE - _InterlockedExchange intrinsic is available
-dnl    (IA64)
-dnl . HAVE_GCC_ASM_SPARC_MEMBAR - gcc __asm__ will issue SPARC architecture
-dnl    memory barrier instruction
-dnl . HAVE_SOLARIS_ASM_SPARC_MEMBAR - Solaris asm() will issue SPARC 
-dnl    architecture memory barrier instruction
-dnl . HAVE_GCC_ASM_SPARC_STBAR - gcc __asm__ will issue stbar
-dnl - HAVE_SOLARIS_ASM_SPARC_STBAR - Solaris __asm() will issue stbar
-dnl 
-dnl D*/
-AC_DEFUN([PAC_C_MEMATOMIC],[
-AC_CACHE_CHECK([for x86 mfence instruction using __asm__],
-    pac_cv_have_gcc_asm_and_x86_mfence,[
-AC_TRY_RUN([
-int main(int argc, char **argv)
-{
-    __asm__ __volatile__  ( ".byte 0x0f, 0xae, 0xf0" ::: "memory" );
-    exit(0);
-}
-],
-pac_cv_have_gcc_asm_and_x86_mfence=yes,pac_cv_have_gcc_asm_and_x86_mfence=no)])
-
-if test "$pac_cv_have_gcc_asm_and_x86_mfence" = "yes" ; then
-    AC_DEFINE(HAVE_GCC_ASM_AND_X86_MFENCE, 1, [Define if using gcc on a x86 system with the mfence instruction])
-fi
-
-AC_CACHE_CHECK([for x86 sfence instruction using __asm__],
-    pac_cv_have_gcc_asm_and_x86_sfence,[
-AC_TRY_RUN([
-int main(int argc, char **argv)
-{
-    __asm__ __volatile__  ( ".byte 0x0f, 0xae, 0xf8" ::: "memory" );
-    exit(0);
-}
-],
-pac_cv_have_gcc_asm_and_x86_sfence=yes,pac_cv_have_gcc_asm_and_x86_sfence=no)])
-
-if test "$pac_cv_have_gcc_asm_and_x86_sfence" = "yes" ; then
-    AC_DEFINE(HAVE_GCC_ASM_AND_X86_SFENCE, 1, [Define if using gcc on a x86 system with the sfence instruction])
-fi
-
-AC_CACHE_CHECK([for x86 lfence instruction using __asm__],
-    pac_cv_have_gcc_asm_and_x86_lfence,[
-AC_TRY_RUN([
-int main(int argc, char **argv)
-{
-    __asm__ __volatile__  ( ".byte 0x0f, 0xae, 0xe8" ::: "memory" );
-    exit(0);
-}
-],
-pac_cv_have_gcc_asm_and_x86_lfence=yes,pac_cv_have_gcc_asm_and_x86_lfence=no)])
-
-if test "$pac_cv_have_gcc_asm_and_x86_lfence" = "yes" ; then
-    AC_DEFINE(HAVE_GCC_ASM_AND_X86_LFENCE, 1, [Define if using gcc on a x86 system with the lfence instruction])
-fi
-
-dnl Some compilers, like icc, may want __asm _emit
-AC_CACHE_CHECK([for x86 mfence instruction using __asm],
-     pac_cv_have___asm_and_x86_mfence,[
-AC_TRY_RUN([
-int main(int argc, char **argv)
-{
-    __asm _emit 0x0f __asm _emit 0xae __asm _emit 0xf0 ;
-    exit(0);
-}
-],
-pac_cv_have___asm_and_x86_mfence=yes,pac_cv_have___asm_and_x86_mfence=no)])
-
-if test "$pac_cv_have___asm_and_x86_mfence" = "yes" ; then
-    AC_DEFINE(HAVE___ASM_AND_X86_MFENCE, 1, [Define if using __asm on a x86 system with the mfence instruction])
-fi
-
-AC_CACHE_CHECK([for x86 sfence instruction using __asm],
-    pac_cv_have___asm_and_x86_sfence,[
-AC_TRY_RUN([
-int main(int argc, char **argv)
-{
-    __asm sfence ;
-    exit(0);
-}
-],
-pac_cv_have___asm_and_x86_sfence=yes,pac_cv_have___asm_and_x86_sfence=no)])
-
-if test "$pac_cv_have___asm_and_x86_sfence" = "yes" ; then
-    AC_DEFINE(HAVE___ASM_AND_X86_SFENCE, 1, [Define if using __asm on a x86 system with the sfence instruction])
-fi
-
-AC_CACHE_CHECK([for x86 lfence instruction using __asm],
-    pac_cv_have___asm_and_x86_lfence,[
-AC_TRY_RUN([
-int main(int argc, char **argv)
-{
-    __asm _emit 0x0f __asm _emit 0xae __asm _emit 0xe8 ;
-    exit(0);
-}
-],
-pac_cv_have___asm_and_x86_lfence=yes,pac_cv_have___asm_and_x86_lfence=no)])
-
-if test "$lac_cv_have___asm_and_x86_lfence" = "yes" ; then
-    AC_DEFINE(HAVE___ASM_AND_X86_LFENCE, 1, [Define if using __asm on a x86 system with the lfence instruction])
-fi
-
-dnl 
-dnl Some compilers, such as pgcc, may require additional arguments.
-dnl pgcc may need -Masmkeyword flag.  We may want to try this with and 
-dnl without adding -Masmkeyword to CFLAGS
-
-AC_CACHE_CHECK([for x86 mfence instruction using asm()],
-    pac_cv_have_asm_and_x86_mfence,[
-AC_TRY_RUN([
-int main(int argc, char **argv)
-{
-    asm("_emit 0x0f __asm _emit 0xae __asm _emit 0xf0");
-    exit(0);
-}
-],
-pac_cv_have_asm_and_x86_mfence=yes,pac_cv_have_asm_and_x86_mfence=no)])
-
-if test "$pac_cv_have_asm_and_x86_mfence" = "yes" ; then
-    AC_DEFINE(HAVE_ASM_AND_X86_MFENCE, 1, [Define if using asm() on a x86 system with the mfence instruction])
-fi
-
-AC_CACHE_CHECK([for x86 sfence instruction using asm()],
-    pac_cv_have_asm_and_x86_sfence,[
-AC_TRY_RUN([
-int main(int argc, char **argv)
-{
-    asm("sfence");
-    exit(0);
-}
-],
-pac_cv_have_asm_and_x86_sfence=yes,pac_cv_have_asm_and_x86_sfence=no)])
-
-if test "$pac_cv_have_asm_and_x86_sfence" = "yes" ; then
-    AC_DEFINE(HAVE_ASM_AND_X86_SFENCE, 1, [Define if using asm() on a x86 system with the sfence instruction])
-fi
-
-AC_CACHE_CHECK([for x86 lfence instruction using asm()],
-    pac_cv_have_asm_and_x86_lfence,[
-AC_TRY_RUN([
-int main(int argc, char **argv)
-{
-    asm("_emit 0x0f __asm _emit 0xae __asm _emit 0xe8");
-    exit(0);
-}
-],
-pac_cv_have_asm_and_x86_lfence=yes,pac_cv_have_asm_and_x86_lfence=no)])
-
-if test "$pac_cv_have_asm_and_x86_lfence" = "yes" ; then
-    AC_DEFINE(HAVE_ASM_AND_X86_LFENCE, 1, [Define if using asm() on a x86 system with the lfence instruction])
-fi
-
-AC_CACHE_CHECK([for _InterlockedExchange intrinsic],
-    pac_cv_have__InterlockedExchange,[
-AC_TRY_RUN([
-int main(int argc, char **argv)
-{
-    unsigned long lock, *lock_ptr;
-    lock_ptr = &lock;
-    _InterlockedExchange(lock_ptr, 1);
-    exit(0);
-}
-],
-pac_cv_have__InterlockedExchange=yes,pac_cv_have__InterlockedExchange=no)])
-
-if test "$pac_cv_have__InterlockedExchange" = "yes" ; then
-    AC_DEFINE(HAVE__INTERLOCKEDEXCHANGE, 1, [Define if _InterlockedExchange intrinsic is available])
-fi
-
-AC_CACHE_CHECK([for SPARC membar instruction with gcc],
-    pac_cv_gcc_sparc_membar,[
-AC_TRY_RUN([
-int main(int argc, char **argv){
-    __asm__ __volatile__ ( "membar #StoreLoad | #StoreStore" : : : "memory" );
-    exit(0);
-}],pac_cv_gcc_sparc_membar=yes,pac_cv_gcc_sparc_membar=no)])
-if test "$pac_cv_gcc_sparc_membar" = yes ; then
-    AC_DEFINE(HAVE_GCC_ASM_SPARC_MEMBAR,1,[Define if gcc asm membar supported])
-fi
-
-AC_CACHE_CHECK([for SPARC membar instruction with Solaris C],
-    pac_cv_solaris_sparc_membar,[
-AC_TRY_RUN([
-int main(int argc, char **argv){
-    __asm ( "membar #StoreLoad | #StoreStore");
-    exit(0);
-}],pac_cv_solaris_sparc_membar=yes,pac_cv_solaris_sparc_membar=no)])
-if test "$pac_cv_solaris_sparc_membar" = yes ; then
-    AC_DEFINE(HAVE_SOLARIS_ASM_SPARC_MEMBAR,1,[Define if solaris asm membar supported])
-fi
-
-AC_CACHE_CHECK([for SPARC stbar instruction with gcc],
-    pac_cv_gcc_sparc_stbar,[
-AC_TRY_RUN([
-int main(int argc, char **argv){
-    __asm__ __volatile__ ( "stbar" : : : "memory" );
-    exit(0);
-}],pac_cv_gcc_sparc_stbar=yes,pac_cv_gcc_sparc_stbar=no)])
-if test "$pac_cv_gcc_sparc_stbar" = yes ; then
-    AC_DEFINE(HAVE_GCC_ASM_SPARC_STBAR,1,[Define if gcc asm stbar supported])
-fi
-
-AC_CACHE_CHECK([for SPARC stbar instruction with Solaris C],
-    pac_cv_solaris_sparc_stbar,[
-AC_TRY_RUN([
-int main(int argc, char **argv){
-    __asm ( "stbar" );
-    exit(0);
-}],pac_cv_solaris_sparc_stbar=yes,pac_cv_solaris_sparc_stbar=no)])
-if test "$pac_cv_solaris_sparc_stbar" = yes ; then
-    AC_DEFINE(HAVE_SOLARIS_ASM_SPARC_STBAR,1,[Define if solaris asm stbar supported])
-fi
-])
\ No newline at end of file
diff --git a/confdb/aclocal_attr_alias.m4 b/confdb/aclocal_attr_alias.m4
index 32f0165..33db329 100644
--- a/confdb/aclocal_attr_alias.m4
+++ b/confdb/aclocal_attr_alias.m4
@@ -148,7 +148,7 @@ int same_addrs2( void *ptr )
     ])
 ],[
     rm -f pac_conftest_other.$OBJEXT
-    PAC_RUNLOG([cp conftest.$OBJEXT pac_conftest_other.$OBJEXT])
+    AC_RUN_LOG([cp conftest.$OBJEXT pac_conftest_other.$OBJEXT])
     test -s pac_conftest_other.$OBJEXT && pac_c_attr_alias_other=yes
 dnl     cp conftest.$ac_ext pac_conftest_other.$ac_ext
 dnl     echo
@@ -196,7 +196,7 @@ extern int same_addrs2( void *ptr );
         ])
     ],[
         rm -f pac_conftest_main$EXEEXT
-        PAC_RUNLOG([cp conftest$EXEEXT pac_conftest_main$EXEEXT])
+        AC_RUN_LOG([cp conftest$EXEEXT pac_conftest_main$EXEEXT])
         test -x pac_conftest_main$EXEEXT && pac_c_attr_alias_main=yes
 dnl         cp conftest.$ac_ext pac_conftest_main.$ac_ext
 dnl         echo
@@ -371,7 +371,7 @@ dnl
 AC_LANG_PUSH([C])
 AC_COMPILE_IFELSE([AC_LANG_SOURCE([])],[
     cp conftest.$ac_ext pac_conftest.c
-    PAC_RUNLOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
+    AC_RUN_LOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
     PAC_PUSH_FLAG([LIBS])
     LIBS="pac_conftest.$OBJEXT $LIBS"
     AC_LANG_PUSH([Fortran]) dnl AC_LANG_PUSH([Fortran 77])
@@ -429,7 +429,7 @@ extern mpif_cmblk_t   mpifcmb_ __attribute__ ((alias("mpifcmbr")));
             ])
         ],[
             cp conftest.$ac_ext pac_conftest.c
-            PAC_RUNLOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
+            AC_RUN_LOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
 	    PAC_PUSH_FLAG([LIBS])
             LIBS="pac_conftest.$OBJEXT $LIBS"
             AC_LANG_PUSH([Fortran]) dnl AC_LANG_PUSH([Fortran 77])
diff --git a/confdb/aclocal_cc.m4 b/confdb/aclocal_cc.m4
index 98fdc34..06a5145 100644
--- a/confdb/aclocal_cc.m4
+++ b/confdb/aclocal_cc.m4
@@ -105,7 +105,7 @@ if test "$pac_result" = "yes" ; then
             int foo(void){return 0;}
         ])
     ],[
-        PAC_RUNLOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
+        AC_RUN_LOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
         saved_LIBS="$LIBS"
         LIBS="pac_conftest.$OBJEXT $LIBS"
 
diff --git a/confdb/aclocal_cxx.m4 b/confdb/aclocal_cxx.m4
index 279b668..418d8b7 100644
--- a/confdb/aclocal_cxx.m4
+++ b/confdb/aclocal_cxx.m4
@@ -153,7 +153,7 @@ if test "$pac_result" = "yes" ; then
             int foo(void){return 0;}
         ])
     ],[
-        PAC_RUNLOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
+        AC_RUN_LOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
         saved_LIBS="$LIBS"
         LIBS="pac_conftest.$OBJEXT $LIBS"
 
diff --git a/confdb/aclocal_f77.m4 b/confdb/aclocal_f77.m4
index 92d310b..38225e0 100644
--- a/confdb/aclocal_f77.m4
+++ b/confdb/aclocal_f77.m4
@@ -64,7 +64,7 @@ AC_COMPILE_IFELSE([
         end
     ])
 ],[
-    PAC_RUNLOG([mv conftest.$OBJEXT f77conftest.$OBJEXT])
+    AC_RUN_LOG([mv conftest.$OBJEXT f77conftest.$OBJEXT])
     saved_LIBS="$LIBS"
     dnl  FLIBS is set by AC_F77_LIBRARY_LDFLAGS
     LIBS="f77conftest.$OBJEXT $FLIBS $LIBS"
@@ -96,7 +96,7 @@ if test  "$pac_found" != "yes" ; then
             AC_COMPILE_IFELSE([
                 AC_LANG_SOURCE([void ${call} ${sym}(int a) {}])
             ],[
-                PAC_RUNLOG([mv conftest.$OBJEXT cconftest.$OBJEXT])
+                AC_RUN_LOG([mv conftest.$OBJEXT cconftest.$OBJEXT])
                 saved_LIBS="$LIBS"
                 LIBS="cconftest.$OBJEXT $LIBS"
                 AC_LANG_PUSH([Fortran 77])
@@ -242,7 +242,7 @@ AC_COMPILE_IFELSE([
     ])
 ],[
     # pac_f77compile_ok=yes
-    PAC_RUNLOG([mv conftest.$OBJEXT pac_f77conftest.$OBJEXT])
+    AC_RUN_LOG([mv conftest.$OBJEXT pac_f77conftest.$OBJEXT])
     # Save original LIBS, prepend previously generated object file to LIBS
     saved_LIBS="$LIBS"
     LIBS="pac_f77conftest.$OBJEXT $FLIBS $LIBS"
@@ -349,7 +349,7 @@ int cisize_(char *i1p, char *i2p) {
     dnl Endof ac_lang_source
 ],[
     # pac_compile_ok=yes
-    PAC_RUNLOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
+    AC_RUN_LOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
     # Save LIBS and prepend object file to LIBS
     saved_LIBS="$LIBS"
     LIBS="pac_conftest.$OBJEXT $LIBS"
@@ -481,7 +481,7 @@ if test "$pac_result" = "yes" ; then
             end
         ])
     ],[
-        PAC_RUNLOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
+        AC_RUN_LOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
         saved_LIBS="$LIBS"
         LIBS="pac_conftest.$OBJEXT $LIBS"
 
@@ -541,10 +541,10 @@ AC_COMPILE_IFELSE([
     ])
 ],[
     # pac_f77compile_ok=yes
-    PAC_RUNLOG([mv conftest.$OBJEXT pac_f77conftest.$OBJEXT])
-    PAC_RUNLOG([test -d conftestdir || mkdir conftestdir])
-    PAC_RUNLOG([${AR-ar} ${AR_FLAGS-cr} conftestdir/libf77conftest.a pac_f77conftest.$OBJEXT])
-    PAC_RUNLOG([${RANLIB-ranlib} conftestdir/libf77conftest.a])
+    AC_RUN_LOG([mv conftest.$OBJEXT pac_f77conftest.$OBJEXT])
+    AC_RUN_LOG([test -d conftestdir || mkdir conftestdir])
+    AC_RUN_LOG([${AR-ar} ${AR_FLAGS-cr} conftestdir/libf77conftest.a pac_f77conftest.$OBJEXT])
+    AC_RUN_LOG([${RANLIB-ranlib} conftestdir/libf77conftest.a])
     # Save original LIBS, prepend previously generated object file to LIBS
     saved_LIBS="$LIBS"
     LIBS="-lf77conftest $LIBS"
@@ -595,7 +595,7 @@ ifelse([$1],[],[checkdir=f77tmpdir],[checkdir=$1;checkdir_is_given=yes])
 AC_CACHE_CHECK([for include directory flag for Fortran],
 pac_cv_prog_f77_has_incdir,[
 test -d $checkdir || mkdir $checkdir
-dnl PAC_RUNLOG([echo '       call sub()' > $checkdir/conftestf.h])
+dnl AC_RUN_LOG([echo '       call sub()' > $checkdir/conftestf.h])
 echo '       call sub()' > $checkdir/conftestf.h
 AC_LANG_PUSH([Fortran 77])
 saved_FFLAGS="$FFLAGS"
@@ -673,7 +673,7 @@ AC_COMPILE_IFELSE([
     AC_LANG_SOURCE([$2])
 ],[
     # pac_f77compile_ok=yes
-    PAC_RUNLOG([mv conftest.$OBJEXT pac_f77conftest.$OBJEXT])
+    AC_RUN_LOG([mv conftest.$OBJEXT pac_f77conftest.$OBJEXT])
     # Save original LIBS, prepend previously generated object file to LIBS
     saved_LIBS="$LIBS"
     LIBS="pac_f77conftest.$OBJEXT $FLIBS $LIBS"
@@ -732,7 +732,7 @@ AC_COMPILE_IFELSE([
     ])
 ],[
     # pac_f77compile_ok=yes
-    PAC_RUNLOG([mv conftest.$OBJEXT pac_f77conftest.$OBJEXT])
+    AC_RUN_LOG([mv conftest.$OBJEXT pac_f77conftest.$OBJEXT])
     # Save original LIBS, prepend previously generated object file to LIBS
     saved_LIBS="$LIBS"
     LIBS="pac_f77conftest.$OBJEXT $FLIBS $saved_LIBS"
@@ -833,7 +833,7 @@ dnl Use F77 as a linker to compile a Fortran main and C subprogram.
 if test "$pac_linkwithC" != "yes" ; then
     AC_LANG_PUSH([C])
     AC_COMPILE_IFELSE([],[
-        PAC_RUNLOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
+        AC_RUN_LOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
         saved_LIBS="$LIBS"
         LIBS="pac_conftest.$OBJEXT $saved_LIBS"
         AC_LANG_PUSH([Fortran 77])
@@ -852,7 +852,7 @@ dnl Use C as a linker and FLIBS to compile a Fortran main and C subprogram.
 if test "$pac_linkwithf77" != "yes" ; then
     AC_LANG_PUSH([Fortran 77])
     AC_COMPILE_IFELSE([],[
-        PAC_RUNLOG([mv conftest.$OBJEXT pac_f77conftest.$OBJEXT])
+        AC_RUN_LOG([mv conftest.$OBJEXT pac_f77conftest.$OBJEXT])
         saved_LIBS="$LIBS"
         LIBS="pac_f77conftest.$OBJEXT $FLIBS $saved_LIBS"
         AC_LANG_PUSH([C])
@@ -961,7 +961,7 @@ int $confname(int a) {
 }
     ])
 ],[
-    PAC_RUNLOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
+    AC_RUN_LOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
     saved_LIBS="$LIBS"
     AC_LANG_PUSH([Fortran 77])
     AC_LANG_CONFTEST([
@@ -1089,7 +1089,7 @@ dnl Use F77 as a linker to compile a Fortran main and C subprogram.
 if test "$pac_linkwithC" != "yes" ; then
     AC_LANG_PUSH([C])
     AC_COMPILE_IFELSE([],[
-        PAC_RUNLOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
+        AC_RUN_LOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
         saved_LIBS="$LIBS"
         LIBS="pac_conftest.$OBJEXT $saved_LIBS"
         AC_LANG_PUSH([Fortran 77])
@@ -1110,7 +1110,7 @@ dnl Use C as a linker and FLIBS to compile a Fortran main and C subprogram.
 if test "$pac_linkwithf77" != "yes" ; then
     AC_LANG_PUSH([Fortran 77])
     AC_COMPILE_IFELSE([],[
-        PAC_RUNLOG([mv conftest.$OBJEXT pac_f77conftest.$OBJEXT])
+        AC_RUN_LOG([mv conftest.$OBJEXT pac_f77conftest.$OBJEXT])
         saved_LIBS="$LIBS"
         LIBS="pac_f77conftest.$OBJEXT $FLIBS $saved_LIBS"
         AC_LANG_PUSH([C])
@@ -1277,7 +1277,7 @@ AC_COMPILE_IFELSE([
         end
     ])
 ],[
-    PAC_RUNLOG([mv conftest.$OBJEXT pac_f77conftest.$OBJEXT])
+    AC_RUN_LOG([mv conftest.$OBJEXT pac_f77conftest.$OBJEXT])
     saved_LIBS="$LIBS"
     # This test checks if Fortran init can be done in pure C environment,
     # i.e. no FLIBS in linking, so don't put FLIBS in LIBS below
@@ -1368,7 +1368,7 @@ void ftest_( $pac_mpi_fint *itrue, $pac_mpi_fint *ifalse )
 }
     ])
 ],[
-    PAC_RUNLOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
+    AC_RUN_LOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
     saved_LIBS="$LIBS"
     LIBS="pac_conftest.$OBJEXT $saved_LIBS"
     AC_LANG_PUSH([Fortran 77])
diff --git a/confdb/aclocal_f77old.m4 b/confdb/aclocal_f77old.m4
deleted file mode 100644
index 5d6e2d9..0000000
--- a/confdb/aclocal_f77old.m4
+++ /dev/null
@@ -1,389 +0,0 @@
-dnl/*D
-dnl PAC_PROG_F77_CMDARGS - Determine how to access the command line from
-dnl Fortran 77
-dnl
-dnl Output Effects:
-dnl  The following variables are set:
-dnl.vb
-dnl    F77_GETARG         - Statement to get an argument i into string s
-dnl    F77_IARGC          - Routine to return the number of arguments
-dnl    FXX_MODULE         - Module command when using Fortran 90 compiler
-dnl    F77_GETARGDECL     - Declaration of routine used for F77_GETARG
-dnl    F77_GETARG_FFLAGS  - Flags needed when compiling/linking
-dnl    F77_GETARG_LDFLAGS - Flags needed when linking
-dnl.ve
-dnl If 'F77_GETARG' has a value, then that value and the values for these
-dnl other symbols will be used instead.  If no approach is found, all of these
-dnl variables will have empty values.
-dnl If no other approach works and a file 'f77argdef' is in the directory, 
-dnl that file will be sourced for the values of the above four variables.
-dnl
-dnl In most cases, you should add F77_GETARG_FFLAGS to the FFLAGS variable
-dnl and F77_GETARG_LDFLAGS to the LDFLAGS variable, to ensure that tests are
-dnl performed on the compiler version that will be used.
-dnl
-dnl 'AC_SUBST' is called for all six variables.
-dnl
-dnl One complication is that on systems with multiple Fortran compilers, 
-dnl some libraries used by one Fortran compiler may have been (mis)placed
-dnl in a common location.  We have had trouble with libg2c in particular.
-dnl To work around this, we test whether iargc etc. work first.  This
-dnl will catch most systems and will speed up the tests.
-dnl
-dnl Next, the libraries are only added if they are needed to complete a 
-dnl link; they aren''t added just because they exist.
-dnl
-dnl f77argdef
-dnl D*/
-dnl
-dnl Random notes
-dnl You can export the command line arguments from C to the g77 compiler
-dnl using
-dnl    extern char **__libc_argv;
-dnl    extern int  __libc_argc;
-dnl    f_setarg( __libc_argc, __libc_argv );
-dnl
-AC_DEFUN([PAC_PROG_F77_CMDARGS],[
-found_cached="yes"
-AC_MSG_CHECKING([for routines to access the command line from Fortran 77])
-AC_CACHE_VAL(pac_cv_prog_f77_cmdarg,
-[
-    AC_MSG_RESULT([searching...])
-    found_cached="no"
-    # First, we perform a quick check.  Does iargc and getarg work?
-    fxx_module="${FXX_MODULE:-}"
-    f77_getargdecl="${F77_GETARGDECL:-external getarg}"
-    f77_getarg="${F77_GETARG:-call GETARG(i,s)}"
-    f77_iargc="${F77_IARGC:-IARGC()}"
-    #    
-    # Grumble.  The Absoft Fortran compiler computes i - i as 0 and then
-    # 1.0 / 0 at compile time, even though the code may never be executed.
-    # What we need is a way to generate an error, so the second usage of i
-    # was replaced with f77_iargc.  
-    cat > conftest.f <<EOF
-        program main
-$fxx_module
-        integer i, j
-        character*20 s
-        $f77_getargdecl
-        i = 0
-        $f77_getarg
-        i=$f77_iargc
-        if (i .gt. 1) then
-            j = i - $f77_iargc
-            j = 1.0 / j
-        endif
-        end
-EOF
-    found_answer="no"
-    if test -z "$ac_fcompilelink" ; then
-        ac_fcompilelink="${F77-f77} -o conftest $FFLAGS $flags conftest.f $LDFLAGS $LIBS 1>&AC_FD_CC"
-    fi
-    AC_MSG_CHECKING([whether ${F77-f77} $flags $libs works with GETARG and IARGC])
-    if AC_TRY_EVAL(ac_fcompilelink) && test -x conftest ; then
-	# Check that cross != yes so that this works with autoconf 2.52
-	# Check that cross_compiling != yes so that this works with 
-	# autoconf 2.6x for some (but almost certainly not all)x
-	# Question: why do we test that this runs?  It looks like we
-	# needed this for some old Fortran compilers that produced
-	# executable code that then did not run.
-	if test "$ac_cv_prog_f77_cross" != "yes" -a \
-	        "$cross_compiling" != "yes" ; then
-	    if ./conftest >/dev/null 2>&1 ; then
-		found_answer="yes"
-	        FXX_MODULE="$fxx_module"
-		F77_GETARGDECL="$f77_getargdecl"
-		F77_GETARG="$f77_getarg"
-		F77_IARGC="$f77_iargc"
-		AC_MSG_RESULT(yes)
-     	    fi
-        fi
-    fi    
-    if test $found_answer = "no" ; then
-	AC_MSG_RESULT(no)
-    # Grumph.  Here are a bunch of different approaches
-    # We have several axes the check:
-    # Library to link with (none, -lU77 (HPUX), -lg2c (LINUX f77))
-    # PEPCF90 (Intel ifc)
-    # The first line is a dummy
-    # (we experimented with using a <space>, but this caused other 
-    # problems because we need <space> in the IFS)
-    trial_LIBS="0 -lU77 -lPEPCF90"
-    if test "$NOG2C" != "1" ; then
-        trial_LIBS="$trial_LIBS -lg2c"
-    fi
-    # Discard libs that are not availble:
-    save_IFS="$IFS"
-    # Make sure that IFS includes a space, or the tests that run programs
-    # may fail
-    IFS=" ""
-"
-    save_trial_LIBS="$trial_LIBS"
-    trial_LIBS=""
-    cat > conftest.f <<EOF
-        program main
-        end
-EOF
-    ac_fcompilelink_test='${F77-f77} -o conftest $FFLAGS conftest.f $LDFLAGS $libs $LIBS 1>&AC_FD_CC'
-    for libs in $save_trial_LIBS ; do
-	if test "$libs" = "0" ; then
-	    lib_ok="yes"
-        else
-	    AC_MSG_CHECKING([whether Fortran 77 links with $libs])
-	    if AC_TRY_EVAL(ac_fcompilelink_test) && test -x conftest ; then
-		AC_MSG_RESULT([yes])
-	        lib_ok="yes"
-	    else
-		AC_MSG_RESULT([no])
-	        lib_ok="no"
-	    fi
-	fi
-	if test "$lib_ok" = "yes" ; then
-	    trial_LIBS="$trial_LIBS
-$libs"
-        fi
-    done
-
-    # Options to use when compiling and linking
-    # +U77 is needed by HP Fortran to access getarg etc.
-    # The -N109 was used for getarg before we realized that GETARG
-    # was necessary with the (non standard conforming) Absoft compiler
-    # (Fortran is monocase; Absoft uses mixedcase by default)
-    # The -f is used by Absoft and is the compiler switch that folds 
-    # symbolic names to lower case.  Without this option, the compiler
-    # considers upper- and lower-case letters to be unique.
-    # The -YEXT_NAMES=LCS will cause external names to be output as lower
-    # case letter for Absoft F90 compilers (default is upper case)
-    # The first line is "<space><newline>, the space is important
-    # To make the Absoft f77 and f90 work together, we need to prefer the
-    # upper case versions of the arguments.  They also require libU77.
-    # -YCFRL=1 causes Absoft f90 to work with g77 and similar (f2c-based) 
-    # Fortran compilers
-    #
-    # Problem:  The Intel efc compiler hangs when presented with -N109 .
-    # The only real fix for this is to detect this compiler and exclude
-    # the test.  We may want to reorganize these tests so that if we
-    # can compile code without special options, we never look for them.
-    # 
-    using_intel_efc="no"
-    pac_test_msg=`$F77 -V 2>&1 | grep 'Intel(R) Fortran Itanium'`
-    if test "$pac_test_msg" != "" ; then
-	using_intel_efc="yes"
-    fi
-    if test "$using_intel_efc" = "yes" ; then
-        trial_FLAGS="000"
-    else
-        trial_FLAGS="000
--N109
--f
--YEXT_NAMES=UCS
--YEXT_NAMES=LCS
--YCFRL=1
-+U77"
-    fi
-    # Discard options that are not available:
-    # (IFS already saved above)
-    IFS=" ""
-"
-    save_trial_FLAGS="$trial_FLAGS"
-    trial_FLAGS=""
-    for flag in $save_trial_FLAGS ; do
-	if test "$flag" = " " -o "$flag" = "000" ; then
-	    opt_ok="yes"
-        else
-            PAC_F77_CHECK_COMPILER_OPTION($flag,opt_ok=yes,opt_ok=no)
-        fi
-	if test "$opt_ok" = "yes" ; then
-	    if test "$flag" = " " -o "$flag" = "000" ; then 
-		fflag="" 
-	    else 
-		fflag="$flag" 
-	    fi
-	    # discard options that don't allow mixed-case name matching
-	    cat > conftest.f <<EOF
-        program main
-        call aB()
-        end
-        subroutine Ab()
-        end
-EOF
-	    if test -n "$fflag" ; then flagval="with $fflag" ; else flagval="" ; fi
-	    AC_MSG_CHECKING([whether Fortran 77 routine names are case-insensitive $flagval])
-	    dnl we can use double quotes here because all is already
-            dnl evaluated
-            ac_fcompilelink_test="${F77-f77} -o conftest $fflag $FFLAGS conftest.f $LDFLAGS $LIBS 1>&AC_FD_CC"
-	    if AC_TRY_EVAL(ac_fcompilelink_test) && test -x conftest ; then
-	        AC_MSG_RESULT(yes)
-	    else
-	        AC_MSG_RESULT(no)
-	        opt_ok="no"
-            fi
-        fi
-        if test "$opt_ok" = "yes" ; then
-	    trial_FLAGS="$trial_FLAGS
-$flag"
-        fi
-    done
-    IFS="$save_IFS"
-    # Name of routines.  Since these are in groups, we use a case statement
-    # and loop until the end (accomplished by reaching the end of the
-    # case statement
-    # For one version of Nag F90, the names are 
-    # call f90_unix_MP_getarg(i,s) and f90_unix_MP_iargc().
-    trial=0
-    while test -z "$pac_cv_prog_f77_cmdarg" ; do
-        case $trial in 
-	0) # User-specified values, if any
-	   if test -z "$F77_GETARG" -o -z "$F77_IARGC" ; then 
-	       trial=`expr $trial + 1`
-	       continue 
-           fi
-           MSG="Using environment values of F77_GETARG etc."
-	   ;;
-	1) # Standard practice, uppercase (some compilers are case-sensitive)
-	   FXX_MODULE=""
-	   F77_GETARGDECL="external GETARG"
-	   F77_GETARG="call GETARG(i,s)"
-	   F77_IARGC="IARGC()"
-	   MSG="GETARG and IARGC"
-	   ;;
-	2) # Standard practice, lowercase
-	   FXX_MODULE=""
-           F77_GETARGDECL="external getarg"
-	   F77_GETARG="call getarg(i,s)"
-	   F77_IARGC="iargc()"
-	   MSG="getarg and iargc"
-	   ;;
-	3) # Posix alternative
-	   FXX_MODULE=""
-	   F77_GETARGDECL="external pxfgetarg"
-	   F77_GETARG="call pxfgetarg(i,s,l,ier)"
-	   F77_IARGC="ipxfargc()"
-	   MSG="pxfgetarg and ipxfargc"
-	   ;;
-	4) # Nag f90_unix_env module
-	   FXX_MODULE="        use f90_unix_env"
-	   F77_GETARGDECL=""
-	   F77_GETARG="call getarg(i,s)"
-	   F77_IARGC="iargc()"
-	   MSG="f90_unix_env module"
-	   ;;
-        5) # Nag f90_unix module
-	   FXX_MODULE="        use f90_unix"
-	   F77_GETARGDECL=""
-	   F77_GETARG="call getarg(i,s)"
-	   F77_IARGC="iargc()"
-	   MSG="f90_unix module"
-	   ;;
-	6) # user spec in a file
-	   if test -s f77argdef ; then
-		. ./f77argdef
-	       MSG="Using definitions in the file f77argdef"
-	   else
-	        trial=`expr $trial + 1`
-		continue
-	   fi
-	   ;;
-	7) # gfortran won't find getarg if it is marked as external 
-	   FXX_MODULE=""
-	   F77_GETARGDECL="intrinsic GETARG"
-	   F77_GETARG="call GETARG(i,s)"
-	   F77_IARGC="IARGC()"
-	   MSG="intrinsic GETARG and IARGC"
-	   ;;
-        *) # exit from while loop
-	   FXX_MODULE=""
-	   F77_GETARGDECL=""
-	   F77_GETARG=""
-	   F77_IARGC=""
-           break
-	   ;;
-	esac
-	# Create the program.  Make sure that we can run it.
-	# Force a divide-by-zero if there is a problem (but only at runtime!
-        # (the Absoft compiler does divide-by-zero at compile time)
-        cat > conftest.f <<EOF
-        program main
-$FXX_MODULE
-        integer i, j
-        character*20 s
-        $F77_GETARGDECL
-        i = 0
-        $F77_GETARG
-        i=$F77_IARGC
-        if (i .gt. 1) then
-            j = i - $F77_IARGC
-            j = 1.0 / j
-        endif
-        end
-EOF
-    #
-    # Now, try to find some way to compile and link that program, looping 
-    # over the possibilities of options and libraries
-        save_IFS="$IFS"
-        IFS=" ""
-"
-        for libs in $trial_LIBS ; do
-            if test -n "$pac_cv_prog_f77_cmdarg" ; then break ; fi
-	    if test "$libs" = " " -o "$libs" = "0" ; then libs="" ; fi
-            for flags in $trial_FLAGS ; do
-	        if test "$flags" = " " -o "$flags" = "000"; then flags="" ; fi
-                AC_MSG_CHECKING([whether ${F77-f77} $flags $libs works with $MSG])
-		IFS="$save_IFS"
-		dnl We need this here because we've fiddled with IFS
-	        ac_fcompilelink_test="${F77-f77} -o conftest $FFLAGS $flags conftest.f $LDFLAGS $libs $LIBS 1>&AC_FD_CC"
-		found_answer="no"
-                if AC_TRY_EVAL(ac_fcompilelink_test) && test -x conftest ; then
-		    if test "$ac_cv_prog_f77_cross" != "yes" -a \	 
-		            "$cross_compiling" != "yes" ; then
-			if ./conftest >/dev/null 2>&1 ; then
-			    found_answer="yes"
-			fi
-		    else 
-			found_answer="yes"
-		    fi
-                fi
-	        IFS=" ""
-"
-		if test "$found_answer" = "yes" ; then
-	            AC_MSG_RESULT([yes])
-		    pac_cv_prog_f77_cmdarg="$MSG"
-		    pac_cv_prog_f77_cmdarg_fflags="$flags"
-		    pac_cv_prog_f77_cmdarg_ldflags="$libs"
-		    break
-	        else
-                    AC_MSG_RESULT([no])
-		    echo "configure: failed program was:" >&AC_FD_CC
-                    cat conftest.f >&AC_FD_CC
-	        fi
-            done
-        done
-        IFS="$save_IFS"   
-	rm -f conftest.*
-        trial=`expr $trial + 1`   
-    done
-fi
-pac_cv_F77_GETARGDECL="$F77_GETARGDECL"
-pac_cv_F77_IARGC="$F77_IARGC"
-pac_cv_F77_GETARG="$F77_GETARG"
-pac_cv_FXX_MODULE="$FXX_MODULE"
-])
-if test "$found_cached" = "yes" ; then 
-    AC_MSG_RESULT([$pac_cv_prog_f77_cmdarg])
-elif test -z "$pac_cv_F77_IARGC" ; then
-    AC_MSG_WARN([Could not find a way to access the command line from Fortran 77])
-fi
-# Set the variable values based on pac_cv_prog_xxx
-F77_GETARGDECL="$pac_cv_F77_GETARGDECL"
-F77_IARGC="$pac_cv_F77_IARGC"
-F77_GETARG="$pac_cv_F77_GETARG"
-FXX_MODULE="$pac_cv_FXX_MODULE"
-F77_GETARG_FFLAGS="$pac_cv_prog_f77_cmdarg_fflags"
-F77_GETARG_LDFLAGS="$pac_cv_prog_f77_cmdarg_ldflags"
-AC_SUBST(F77_GETARGDECL)
-AC_SUBST(F77_IARGC)
-AC_SUBST(F77_GETARG)
-AC_SUBST(FXX_MODULE)
-AC_SUBST(F77_GETARG_FFLAGS)
-AC_SUBST(F77_GETARG_LDFLAGS)
-])
diff --git a/confdb/aclocal_fc.m4 b/confdb/aclocal_fc.m4
index 02a5d5d..716f085 100644
--- a/confdb/aclocal_fc.m4
+++ b/confdb/aclocal_fc.m4
@@ -468,7 +468,7 @@ AC_COMPILE_IFELSE([
     ])
 ],[
     # pac_f77compile_ok=yes
-    PAC_RUNLOG([mv conftest.$OBJEXT pac_f77conftest.$OBJEXT])
+    AC_RUN_LOG([mv conftest.$OBJEXT pac_f77conftest.$OBJEXT])
     # Save original LIBS, prepend previously generated object file to LIBS
     saved_LIBS="$LIBS"
     LIBS="pac_f77conftest.$OBJEXT $LIBS"
@@ -589,7 +589,7 @@ int $confname( int a )
     ])
 ],[
     pac_compile_ok=yes
-    PAC_RUNLOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
+    AC_RUN_LOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
     # Save LIBS and prepend object file to LIBS
     saved_LIBS="$LIBS"
     LIBS="pac_conftest.$OBJEXT $LIBS"
@@ -678,7 +678,7 @@ if test "$pac_result" = "yes" ; then
             end
         ])
     ],[
-        PAC_RUNLOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
+        AC_RUN_LOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
         saved_LIBS="$LIBS"
         LIBS="pac_conftest.$OBJEXT $LIBS"
 
@@ -778,7 +778,7 @@ AC_MSG_CHECKING([for Fortran 90 compiler vendor])
 pac_cv_fc_vendor="unknown"
 for arg in --version -V -v ; do
     rm -f conftest.txt
-    PAC_RUNLOG([$FC $arg </dev/null >conftest.txt 2>&1])
+    AC_RUN_LOG([$FC $arg </dev/null >conftest.txt 2>&1])
     # Ignore the return code, because some compilers set the
     # return code to zero on invalid arguments and some to 
     # non-zero on success (with no files to compile)
@@ -1027,7 +1027,7 @@ int cisize_(char *i1p, char *i2p)
 }
     ])
 ],[
-    PAC_RUNLOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
+    AC_RUN_LOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
     pac_ccompile_ok=yes
 ],[
     pac_ccompile_ok=no
diff --git a/confdb/aclocal_make.m4 b/confdb/aclocal_make.m4
index 147e92e..0f73e23 100644
--- a/confdb/aclocal_make.m4
+++ b/confdb/aclocal_make.m4
@@ -148,7 +148,6 @@ dnl
 dnl D*/
 AC_DEFUN([PAC_PROG_MAKE_VPATH],[
 AC_SUBST(VPATH)
-dnl AM_IGNORE(VPATH)
 AC_CACHE_CHECK([for virtual path format],
 pac_cv_prog_make_vpath,[
 AC_REQUIRE([PAC_PROG_MAKE_PROGRAM])
@@ -305,7 +304,6 @@ PAC_PROG_MAKE_INCLUDE
 PAC_PROG_MAKE_ALLOWS_COMMENTS
 PAC_PROG_MAKE_VPATH
 AC_SUBST(SET_CFLAGS)
-dnl AM_IGNORE(SET_CFLAGS)
 PAC_PROG_MAKE_SET_CFLAGS([SET_CFLAGS='CFLAGS='])
 if test "$pac_cv_prog_make_echos_dir" = "no" ; then
     AC_PROG_MAKE_SET
diff --git a/confdb/aclocal_runlog.m4 b/confdb/aclocal_runlog.m4
index 9b85db5..ebab6ba 100644
--- a/confdb/aclocal_runlog.m4
+++ b/confdb/aclocal_runlog.m4
@@ -1,252 +1,46 @@
-dnl
-dnl PAC_RUN_LOG mimics _AC_RUN_LOG which is autoconf internal routine.
-dnl We also make sure PAC_RUN_LOG can be used in AS_IF, so the last
-dnl test command should have terminating ]), i.e. without newline before ]).
-dnl
-AC_DEFUN([PAC_RUNLOG],[
-{ AS_ECHO(["$as_me:$LINENO: $1"]) >&AS_MESSAGE_LOG_FD
-  (eval $1) 2>&AS_MESSAGE_LOG_FD
-  ac_status=$?
-  AS_ECHO(["$as_me:$LINENO: \$? = $ac_status"]) >&AS_MESSAGE_LOG_FD
-  test $ac_status = 0; }])
-dnl
-dnl PAC_COMMAND_IFELSE is written to replace AC_TRY_EVAL with added logging
-dnl to config.log, i.e. AC_TRY_EVAL does not log anything to config.log.
-dnl If autoconf provides AC_COMMAND_IFELSE or AC_EVAL_IFELSE,
-dnl AC_COMMAND_IFELSE dnl should be replaced by the official autoconf macros.
-dnl
-dnl PAC_COMMAND_IFELSE(COMMMAND,[ACTION-IF-RUN-OK],[ACTION-IF-RUN-FAIL])
-dnl
-AC_DEFUN([PAC_COMMAND_IFELSE],[
-dnl Should use _AC_DO_TOKENS but use AC_RUN_LOG instead
-dnl because _AC_XX is autoconf's undocumented macro.
-AS_IF([PAC_RUNLOG([$1])],[
-    $2
-],[
-    AS_ECHO(["$as_me: program exited with status $ac_status"]) >&AS_MESSAGE_LOG_FD
-    m4_ifvaln([$3],[
-        (exit $ac_status)
-        $3
-    ])
-])
-])
-dnl
-dnl
-dnl
-AC_DEFUN([PAC_EVAL_IFELSE],[
-dnl Should use _AC_DO_TOKENS but use AC_RUN_LOG instead
-dnl because _AC_XX is autoconf's undocumented macro.
-AS_IF([PAC_RUNLOG([$$1])],[
-    $2
-],[
-    AS_ECHO(["$as_me: program exited with status $ac_status"]) >&AS_MESSAGE_LOG_FD
-    m4_ifvaln([$3],[
-        (exit $ac_status)
-        $3
-    ])
-])
-])
-dnl
-dnl
-dnl
-AC_DEFUN([PAC_RUNLOG_IFELSE],[
-dnl pac_TESTLOG is the internal temporary logfile for this macro.
-pac_TESTLOG="pac_test.log"
-rm -f $pac_TESTLOG
-PAC_COMMAND_IFELSE([$1 > $pac_TESTLOG],[
-    ifelse([$2],[],[],[$2])
-],[
-    AS_ECHO(["*** $1 :"]) >&AS_MESSAGE_LOG_FD
-    cat $pac_TESTLOG >&AS_MESSAGE_LOG_FD
-    ifelse([$3],[],[],[$3])
-])
-rm -f $pac_TESTLOG
-])
-dnl
-dnl
-dnl
-dnl PAS_VAR_COPY -  A portable layer that mimics AS_VAR_COPY when it is not
-dnl                 defined as in older autoconf, e.g. 2.63 and older.
-dnl                 This macro is absolutely necessary, because AS_VAR_GET in
-dnl                 some newer autoconf, e.g. 2.64, seems to be totally broken,
-dnl                 or behave very different from older autoconf, i.e. 2.63.
-dnl
-AC_DEFUN([PAS_VAR_COPY],[
-m4_ifdef([AS_VAR_COPY], [AS_VAR_COPY([$1],[$2])], [$1=AS_VAR_GET([$2])])
-])
-dnl
-dnl
-dnl
-dnl PAC_VAR_PUSHVAL(VARNAME, [LastSavedValue]))
-dnl
-dnl Save the content of the shell variable, VARNAME, onto a stack.
-dnl The saved value of VARNAME is restorable with respect to the nesting
-dnl of the macro.
-dnl
-dnl The Last saved value of VARNAME on the stack is stored in shell variable
-dnl pac_LastSavedValueOf_$VARNAME if the 2nd argument is NOT supplied.
-dnl If the 2nd argument is present, the last saved value will be stored
-dnl in the 2nd argument instead.
-dnl
-dnl The First saved value of VARNAME on the stack is stored in shell variable
-dnl dnl pac_FirstSavedValueOf_$VARNAME.
-dnl
-AC_DEFUN([PAC_VAR_PUSHVAL],[
-# START of PUSHVAL
-dnl define local m4-name pac_stk_level.
-AS_VAR_PUSHDEF([pac_stk_level], [pac_stk_$1_level])
-AS_VAR_SET_IF([pac_stk_level],[
-    dnl autoconf < 2.64 does not have AS_VAR_ARITH, so use expr instead.
-    AS_VAR_SET([pac_stk_level], [`expr $pac_stk_level + 1`])
-],[
-    AS_VAR_SET([pac_stk_level], [0])
-])
-dnl AS_ECHO_N(["PUSHVAL: pac_stk_level = $pac_stk_level, "])
-dnl Save the content of VARNAME, i.e. $VARNAME, onto the stack.
-AS_VAR_SET([pac_stk_$1_$pac_stk_level],[$$1])
-AS_VAR_IF([pac_stk_level], [0], [
-    dnl Save the 1st pushed value of VARNAME as pac_FirstSavedValueOf_$VARNAME
-    PAS_VAR_COPY([pac_FirstSavedValueOf_$1],[pac_stk_$1_$pac_stk_level])
-])
-ifelse([$2],[],[
-    dnl Save the last pushed value of VARNAME as pac_LastSavedValueOf_$VARNAME
-    PAS_VAR_COPY([pac_LastSavedValueOf_$1],[pac_stk_$1_$pac_stk_level])
-    dnl AS_ECHO(["pac_LastSavedValueOf_$1 = $pac_LastSavedValueOf_$1"])
-],[
-    dnl Save the last pushed value of VARNAME as $2
-    PAS_VAR_COPY([$2],[pac_stk_$1_$pac_stk_level])
-    dnl AS_ECHO(["$2 = $$2"])
-])
-AS_VAR_POPDEF([pac_stk_level])
-# END of PUSHVAL
-])
-dnl
-dnl
-dnl
-dnl PAC_VAR_POPVAL(VARNAME) 
-dnl
-dnl Restore variable, VARNAME, from the stack.
-dnl This macro is safe with respect to the nesting.
-dnl Some minimal checking of nesting balance of PAC_VAR_PUSH[POP]VAL()
-dnl is done here.
-dnl
-AC_DEFUN([PAC_VAR_POPVAL],[
-# START of POPVAL
-dnl define local m4-name pac_stk_level.
-AS_VAR_PUSHDEF([pac_stk_level], [pac_stk_$1_level])
-AS_VAR_SET_IF([pac_stk_level],[
-    AS_VAR_IF([pac_stk_level],[-1],[
-        AC_MSG_WARN(["Imbalance of PUSHVAL/POPVAL of $1"])
-    ],[
-        dnl AS_ECHO_N(["POPVAL: pac_stk_level = $pac_stk_level, "])
-        PAS_VAR_COPY([$1],[pac_stk_$1_$pac_stk_level])
-        dnl AS_ECHO(["popped_val = $$1"])
-        dnl autoconf < 2.64 does not have AS_VAR_ARITH, so use expr instead.
-        AS_VAR_SET([pac_stk_level], [`expr $pac_stk_level - 1`])
-    ])
-],[
-    AC_MSG_WARN(["Uninitialized PUSHVAL/POPVAL of $1"])
-])
-AS_VAR_POPDEF([pac_stk_level])
-# END of POPVAL
-])
-dnl
-dnl
-dnl
+dnl PAC_RUNLOG_IFELSE(COMMMAND,[ACTION-IF-RUN-OK],[ACTION-IF-RUN-FAIL])
+AC_DEFUN([PAC_RUNLOG_IFELSE],[AS_IF([AC_RUN_LOG([$1])],[$2],[$3])])
+
 dnl PAC_COMPILE_IFELSE_LOG is a wrapper around AC_COMPILE_IFELSE with the
 dnl output of ac_compile to a specified logfile instead of AS_MESSAGE_LOG_FD
 dnl
 dnl PAC_COMPILE_IFELSE_LOG(logfilename, input,
 dnl                        [action-if-true], [action-if-false])
 dnl
-dnl where input, [action-if-true] and [action-if-false] are used
-dnl in AC_COMPILE_IFELSE(input, [action-if-true], [action-if-false]).
-dnl This macro is nesting safe.
-dnl
 AC_DEFUN([PAC_COMPILE_IFELSE_LOG],[
-dnl
-dnl Instead of defining our own ac_compile and do AC_TRY_EVAL
-dnl on these variables.  We modify ac_compile used by AC_*_IFELSE
-dnl by piping the output of the command to a logfile.  The reason is that
-dnl 1) AC_TRY_EVAL is discouraged by Autoconf. 2) defining our ac_compile
-dnl could mess up the usage and order of *CFLAGS, LDFLAGS and LIBS in
-dnl these commands, i.e. deviate from how GNU standard uses these variables.
-dnl
-dnl Replace ">&AS_MESSAGE_LOG_FD" by "> FILE 2>&1" in ac_compile.
-dnl Save a copy of ac_compile on a stack
-dnl which is safe through nested invocations of this macro.
-PAC_VAR_PUSHVAL([ac_compile])
-dnl Modify ac_compile based on the unmodified ac_compile.
-ac_compile="`echo $pac_FirstSavedValueOf_ac_compile | sed -e 's|>.*$|> $1 2>\&1|g'`"
-AC_COMPILE_IFELSE([$2],[
-    ifelse([$3],[],[:],[$3])
-],[
-    ifelse([$4],[],[:],[$4])
-])
-dnl Restore the original ac_compile from the stack.
-PAC_VAR_POPVAL([ac_compile])
+PAC_PUSH_FLAG([ac_compile])
+ac_compile="`echo $ac_compile | sed -e 's|>.*$|> $1 2>\&1|g'`"
+AC_COMPILE_IFELSE([$2],[$3],[$4])
+PAC_POP_FLAG([ac_compile])
 ])
-dnl
-dnl
-dnl
+
 dnl PAC_LINK_IFELSE_LOG is a wrapper around AC_LINK_IFELSE with the
 dnl output of ac_link to a specified logfile instead of AS_MESSAGE_LOG_FD
 dnl
 dnl PAC_LINK_IFELSE_LOG(logfilename, input,
 dnl                     [action-if-true], [action-if-false])
 dnl
-dnl where input, [action-if-true] and [action-if-false] are used
-dnl in AC_LINK_IFELSE(input, [action-if-true], [action-if-false]).
-dnl This macro is nesting safe.
-dnl
 AC_DEFUN([PAC_LINK_IFELSE_LOG],[
-dnl
-dnl Instead of defining our own ac_link and do AC_TRY_EVAL
-dnl on these variables.  We modify ac_link used by AC_*_IFELSE
-dnl by piping the output of the command to a logfile.  The reason is that
-dnl 1) AC_TRY_EVAL is discouraged by Autoconf. 2) defining our ac_link
-dnl could mess up the usage and order of *CFLAGS, LDFLAGS and LIBS in
-dnl these commands, i.e. deviate from how GNU standard uses these variables.
-dnl
-dnl Replace ">&AS_MESSAGE_LOG_FD" by "> FILE 2>&1" in ac_link.
-dnl Save a copy of ac_link on a stack
-dnl which is safe through nested invocations of this macro.
-PAC_VAR_PUSHVAL([ac_link])
-dnl Modify ac_link based on the unmodified ac_link.
-ac_link="`echo $pac_FirstSavedValueOf_ac_link | sed -e 's|>.*$|> $1 2>\&1|g'`"
-dnl
-AC_LINK_IFELSE([$2],[
-    ifelse([$3],[],[:],[$3])
-],[
-    ifelse([$4],[],[:],[$4])
+PAC_PUSH_FLAG([ac_link])
+ac_link="`echo $ac_link | sed -e 's|>.*$|> $1 2>\&1|g'`"
+AC_LINK_IFELSE([$2],[$3],[$4])
+PAC_POP_FLAG([ac_link])
 ])
-dnl Restore the original ac_link from the stack.
-PAC_VAR_POPVAL([ac_link])
-])
-dnl
-dnl
-dnl
+
 dnl PAC_COMPLINK_IFELSE (input1, input2, [action-if-true], [action-if-false])
 dnl
 dnl where input1 and input2 are either AC_LANG_SOURCE or AC_LANG_PROGRAM
 dnl enclosed input programs.
 dnl
 dnl The macro first compiles input1 and uses the object file created
-dnl as part of LIBS during linking.  This macro is nesting safe.
+dnl as part of LIBS during linking.
 dnl
 AC_DEFUN([PAC_COMPLINK_IFELSE],[
 AC_COMPILE_IFELSE([$1],[
-    PAC_RUNLOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
-    PAC_VAR_PUSHVAL([LIBS])
-    LIBS="pac_conftest.$OBJEXT $pac_FirstSavedValueOf_LIBS"
-    AC_LINK_IFELSE([$2],[
-        ifelse([$3],[],[:],[$3])
-    ],[
-        ifelse([$4],[],[:],[$4])
-    ])
-    PAC_VAR_POPVAL([LIBS])
-    rm -f pac_conftest.$OBJEXT
-],[
-    ifelse([$4],[],[:],[$4])
-])
+    AC_RUN_LOG([mv conftest.$OBJEXT pac_conftest.$OBJEXT])
+    PAC_PUSH_FLAG([LIBS])
+    LIBS="pac_conftest.$OBJEXT $LIBS"
+    AC_LINK_IFELSE([$2],[$3],[$4])
+    PAC_POP_FLAG([LIBS])
+    rm -f pac_conftest.$OBJEXT]),[$4]
 ])

-----------------------------------------------------------------------

Summary of changes:
 confdb/aclocal.m4                        |    5 -
 confdb/aclocal_am.m4                     |    6 -
 confdb/aclocal_atomic.m4                 |  227 -----------------
 confdb/aclocal_attr_alias.m4             |    8 +-
 confdb/aclocal_cc.m4                     |    2 +-
 confdb/aclocal_cxx.m4                    |    2 +-
 confdb/aclocal_f77.m4                    |   38 ++--
 confdb/aclocal_f77old.m4                 |  389 ------------------------------
 confdb/aclocal_fc.m4                     |   10 +-
 confdb/aclocal_make.m4                   |    2 -
 confdb/aclocal_runlog.m4                 |  246 ++-----------------
 src/pm/hydra/include/hydra.h             |   51 +++-
 src/pm/hydra/pm/pmiserv/pmip_pmi_v1.c    |  166 ++++++-------
 src/pm/hydra/pm/pmiserv/pmip_pmi_v2.c    |  198 +++++++--------
 src/pm/hydra/pm/pmiserv/pmiserv_pmi_v1.c |   90 ++++----
 src/pm/hydra/pm/pmiserv/pmiserv_pmi_v2.c |  237 ++++++++----------
 src/pm/hydra/pm/pmiserv/pmiserv_utils.c  |   51 ++---
 src/util/param/Makefile.mk               |    3 +-
 18 files changed, 422 insertions(+), 1309 deletions(-)
 delete mode 100644 confdb/aclocal_am.m4
 delete mode 100644 confdb/aclocal_atomic.m4
 delete mode 100644 confdb/aclocal_f77old.m4


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list