$OpenBSD: patch-src_plcore_c,v 1.2 2006/06/06 13:36:28 steven Exp $
--- src/plcore.c.orig	Sat May 27 20:16:01 2006
+++ src/plcore.c	Wed May 31 18:32:17 2006
@@ -34,6 +34,8 @@
 
 #define DEBUG
 
+#include <sys/param.h>
+
 #define NEED_PLDEBUG
 #include "plcore.h"
 
@@ -2089,7 +2091,7 @@ int plInBuildTree()
   static int inBuildTree = 0;
 
   if (inited == 0) {
-    char currdir[256];
+    char currdir[MAXPATHLEN];
 
 /* AM: getcwd has a somewhat strange status on Windows, its proper
    name is _getcwd, this is a problem in the case of DLLs, like with
@@ -2099,7 +2101,7 @@ int plInBuildTree()
 #define getcwd _getcwd
 #endif
 
-    if (getcwd(currdir, 256) == NULL) {
+    if (getcwd(currdir, sizeof(currdir)) == NULL) {
       pldebug("plInBuildTree():", "Not enough buffer space");
     } else if (strncmp(BUILD_DIR, currdir, strlen(BUILD_DIR)) == 0)
       inBuildTree = 1;
