Index: src/libs/libgroff/relocate.cpp
===================================================================
RCS file: /cvsroot/groff/groff/src/libs/libgroff/relocate.cpp,v
retrieving revision 1.1
diff -u -r1.1 relocate.cpp
--- src/libs/libgroff/relocate.cpp	2 Apr 2005 12:49:11 -0000	1.1
+++ src/libs/libgroff/relocate.cpp	28 Apr 2005 18:58:53 -0000
@@ -32,10 +32,15 @@
 #if defined _WIN32
 # define WIN32_LEAN_AND_MEAN
 # include <windows.h>
-#endif
+# if defined(_MAX_PATH) && !defined(MAX_PATH)
+#  define MAX_PATH _MAX_PATH
+# endif /* !defined MAX_PATH */
+#endif /* _WIN32 */
 
 #define INSTALLPATHLEN (sizeof(INSTALLPATH) - 1)
-#define DEBUG 0
+#ifndef DEBUG
+# define DEBUG 0
+#endif
 
 extern "C" const char *program_name;
 
@@ -81,8 +86,13 @@
   // Try first NAME as such; success if NAME is an absolute filename,
   // or if NAME is found in the current directory.
   if (!access (name, F_OK)) {
+#ifdef _WIN32
+    path = new char[MAX_PATH];
+    path = _fullpath(path, name, MAX_PATH);
+#else /* !_WIN32 */
     path = new char[path_name_max()];
     path = realpath(name, path);
+#endif /* _WIN32 */
 #if DEBUG
     fprintf(stderr, "searchpath: found `%s'\n", path);
 #endif
