c748d6bbf6bd2b21cff9be53db7a91bfe07e1bbd
braney
  Fri Apr 12 11:30:15 2013 -0700
remove static mustRename() that was clashing to a global one defined in osunix.c
diff --git src/hg/hgc/hgdpClick.c src/hg/hgc/hgdpClick.c
index c9a149b..cd2b125 100644
--- src/hg/hgc/hgdpClick.c
+++ src/hg/hgc/hgdpClick.c
@@ -1,25 +1,26 @@
 /* hgdpClick -- handlers for Human Genome Variation Project tracks */
 
 #include "common.h"
 #include "hgc.h"
 #include "hgdpGeo.h"
 #include "hgConfig.h"
 #include "trashDir.h"
 #include "pipeline.h"
 #include "obscure.h"
 #include "htmshell.h"
+#include "portable.h"
 
 
 struct hgdpPopInfo
     {
     char *name;
     float longitude;
     float latitude;
     };
 
 // auto-generated -- see makeDb/doc/hgdpGeo.txt
 struct hgdpPopInfo pops[] =
     {
     { "Adygei", 44, 39 },
     { "Balochi", 30, 73 },
     { "BantuKenya", -3, 37 },
@@ -184,37 +185,30 @@
      PSXY_CIRCLE, "-Gblue", NULL};
 
 static void runCommandAppend(char *cmd[], char *program, char *inFile, char *outFile)
 /* Use the pipeline module to run a single command pipelineWrite|pipelineAppend. */
 {
 char **cmds[2];
 cmds[0] = cmd;
 cmds[1] = NULL;
 cmd[0] = program;
 cmd[1] = inFile;
 struct pipeline *pl = pipelineOpen(cmds, pipelineWrite|pipelineAppend, outFile, NULL);
 pipelineWait(pl);
 pipelineFree(&pl);
 }
 
-static void mustRename(char *oldName, char *newName)
-/* Rename a file or errAbort if there's a problem. */
-{
-if (rename(oldName, newName))
-    errAbort("Cannot rename %s to %s", oldName, newName);
-}
-
 static void removeDir(char *dirName)
 /* Remove all files in a directory and the directory itself. */
 // NOTE: If this is ever to be libified, beef it up:
 // 1. Add recursion to subdirs (maybe enabled by a new boolean arg)
 // 2. Make sure dirName exists
 // 3. Make sure current dir is not dirName or a subdir of dirName
 {
 struct slName *file;
 struct dyString *dy = dyStringNew(0);
 for (file = listDir(dirName, "*");  file != NULL;  file = file->next)
     {
     dyStringClear(dy);
     dyStringPrintf(dy, "%s/%s", dirName, file->name);
     if (unlink(dy->string) != 0)
 	errAbort("unlink failed for file %s: %d", dy->string, errno);