static char * cluster_server(void) { struct cct_entry *cp; if (cnodeid() == 0) { /* * Not clustered */ return def_server; } while (cp = getccent()) if (cp->cnode_type == 'r') return cp->cnode_name; return def_server; }
static char * cluster_server(void) { # ifdef HAVE_EXTERN_GETCCENT struct cct_entry *cp; # endif /* HAVE_EXTERN_GETCCENT */ if (cnodeid() == 0) return localhost; # ifdef HAVE_EXTERN_GETCCENT while ((cp = getccent())) if (cp->cnode_type == 'r') return cp->cnode_name; # endif /* HAVE_EXTERN_GETCCENT */ return localhost; }