diff --git a/src/zmapUtils/zmapUrl.c b/src/zmapUtils/zmapUrl.c
index deff117743508a323fbaaa6497a5ce0cb1475f9f..af8cd40a83cbad3091e8cdd694421f1ccf647391 100755
--- a/src/zmapUtils/zmapUrl.c
+++ b/src/zmapUtils/zmapUrl.c
@@ -140,6 +140,8 @@ static const unsigned char urlchr_table[256] =
 
 static char* protocol_from_scheme(ZMapURLScheme scheme);
 
+static options opt_G = {0};
+
 /* URL-unescape the string S.
 
    This is done by transforming the sequences "%HH" to the character
@@ -1409,12 +1411,12 @@ UWC,  C,  C,  C,   C,  C,  C,  C,   /* NUL SOH STX ETX  EOT ENQ ACK BEL */
    for non-standard port numbers.  On Unix this is normally ':', as in
    "www.xemacs.org:4001/index.html".  Under Windows, we set it to +
    because Windows can't handle ':' in file names.  */
-#define FN_PORT_SEP  (opt.restrict_files_os != restrict_windows ? ':' : '+')
+#define FN_PORT_SEP  (opt_G.restrict_files_os != restrict_windows ? ':' : '+')
 
 /* FN_QUERY_SEP is the separator between the file name and the URL
    query, normally '?'.  Since Windows cannot handle '?' as part of
    file name, we use '@' instead there.  */
-#define FN_QUERY_SEP (opt.restrict_files_os != restrict_windows ? '?' : '@')
+#define FN_QUERY_SEP (opt_G.restrict_files_os != restrict_windows ? '?' : '@')
 
 /* Quote path element, characters in [b, e), as file name, and append
    the quoted string to DEST.  Each character is quoted as per
@@ -1431,11 +1433,11 @@ append_uri_pathel (const char *b, const char *e, int escaped_p,
   int quoted, outlen;
 
   int mask;
-  if (opt.restrict_files_os == restrict_unix)
+  if (opt_G.restrict_files_os == restrict_unix)
     mask = filechr_not_unix;
   else
     mask = filechr_not_windows;
-  if (opt.restrict_files_ctrl)
+  if (opt_G.restrict_files_ctrl)
     mask |= filechr_control;
 
   /* Copy [b, e) to PATHEL and URL-unescape it. */
@@ -1494,7 +1496,7 @@ append_uri_pathel (const char *b, const char *e, int escaped_p,
    examined, url-unescaped, and re-escaped as file name element.
 
    Additionally, it cuts as many directories from the path as
-   specified by opt.cut_dirs.  For example, if opt.cut_dirs is 1, it
+   specified by opt_G.cut_dirs.  For example, if opt_G.cut_dirs is 1, it
    will produce "bar" for the above example.  For 2 or more, it will
    produce "".
 
@@ -1504,7 +1506,7 @@ static void
 append_dir_structure (const ZMapURL u, struct growable *dest)
 {
   char *pathel, *next;
-  int cut = opt.cut_dirs;
+  int cut = opt_G.cut_dirs;
 
   /* Go through the path components, de-URL-quote them, and quote them
      (if necessary) as file names.  */
@@ -1540,15 +1542,15 @@ url_file_name (const ZMapURL u)
   fnres.tail = 0;
 
   /* Start with the directory prefix, if specified. */
-  if (opt.dir_prefix)
-    append_string (opt.dir_prefix, &fnres);
+  if (opt_G.dir_prefix)
+    append_string (opt_G.dir_prefix, &fnres);
 
   /* If "dirstruct" is turned on (typically the case with -r), add
      the host and port (unless those have been turned off) and
      directory structure.  */
-  if (opt.dirstruct)
+  if (opt_G.dirstruct)
     {
-      if (opt.add_hostdir)
+      if (opt_G.add_hostdir)
 	{
 	  if (fnres.tail)
 	    append_char ('/', &fnres);
diff --git a/src/zmapUtils/zmapUrlOptions.h b/src/zmapUtils/zmapUrlOptions.h
index 0d72fa9d197cf1053fbe11a9e08d81541d186052..fe51ec8197c01b09de58ce88ae86ceba6c3b92f4 100755
--- a/src/zmapUtils/zmapUrlOptions.h
+++ b/src/zmapUtils/zmapUrlOptions.h
@@ -28,12 +28,15 @@ modify this file, you may extend this exception to your version of the
 file, but you are not obligated to do so.  If you do not wish to do
 so, delete this exception statement from your version.  */
 
+
+#ifndef ZMAP_URL_OPTIONS_H
+#define ZMAP_URL_OPTIONS_H
+
 /* Needed for FDP.  */
 #include <stdio.h>
 
-struct options opt;
 
-struct options
+typedef struct 
 {
   int verbose;			/* Are we verbose? */
   int quiet;			/* Are we quiet? */
@@ -199,5 +202,6 @@ struct options
 
   int strict_comments;		/* whether strict SGML comments are
 				   enforced.  */
-};
+} options;
 
+#endif  /* ZMAP_URL_OPTIONS_H */