diff -ur globus_gass_copy-5.3.orig/globus_gass_copy_glob.c globus_gass_copy-5.3/globus_gass_copy_glob.c
--- globus_gass_copy-5.3.orig/globus_gass_copy_glob.c	2009-07-16 21:28:09.000000000 +0200
+++ globus_gass_copy-5.3/globus_gass_copy_glob.c	2010-01-23 10:12:08.902533517 +0100
@@ -20,6 +20,9 @@
 #include <fnmatch.h>
 #endif
 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
 
 /************************************************************
  * glob support
diff -ur globus_gass_copy-5.3.orig/globus_url_copy.c globus_gass_copy-5.3/globus_url_copy.c
--- globus_gass_copy-5.3.orig/globus_url_copy.c	2009-12-18 06:51:45.000000000 +0100
+++ globus_gass_copy-5.3/globus_url_copy.c	2010-01-23 10:20:00.162279634 +0100
@@ -42,6 +42,7 @@
 #include "globus_ftp_client_debug_plugin.h"
 #include "globus_ftp_client_restart_plugin.h"
 #include "globus_error_gssapi.h"
+#include "globus_gsi_system_config.h"
 
 /*
  *  use globus_io for netlogger stuff
@@ -2894,7 +2895,8 @@
 {
     char *                              tmp_ptr;
     char *                              tmp_path;
-    char                                start_dir[PATH_MAX];
+    char *                              start_dir = NULL;
+    globus_result_t                     result;
     char *                              dir_ptr = "";
 
 
@@ -2907,8 +2909,8 @@
 
     if(in_url[0] != '/')
     {
-        tmp_ptr = getcwd(start_dir, PATH_MAX);
-        if(tmp_ptr == NULL)
+        result = GLOBUS_GSI_SYSCONFIG_GET_CURRENT_WORKING_DIR(&start_dir);
+        if(result != GLOBUS_SUCCESS)
         {
             /* just punt if the system call fails */
             return globus_libc_strdup(in_url);
@@ -2927,6 +2929,9 @@
     globus_free(dir_ptr);
     globus_free(tmp_path);
     
+    if (start_dir)
+        globus_free(start_dir);
+
     return tmp_ptr;
 }
 
