From: dtrg Date: Fri, 3 Feb 2006 22:23:11 +0000 (+0000) Subject: Modernised usage of system header files. Changed the patch buffer (which allowed... X-Git-Tag: release-6-0-pre-1~150 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=c39e85da6326aa344d4c2cd15073661d85e691b5;p=ack.git Modernised usage of system header files. Changed the patch buffer (which allowed the library path to be modified with a hex editor) to an environment variable instead. --- diff --git a/util/LLgen/src/machdep.c b/util/LLgen/src/machdep.c index 8214b09de..0c9dcbf18 100644 --- a/util/LLgen/src/machdep.c +++ b/util/LLgen/src/machdep.c @@ -16,6 +16,8 @@ * Machine dependant things */ +#include +#include # include "types.h" # ifndef NORCSID @@ -49,9 +51,6 @@ RENAME(x,y) string x,y; { #endif } -/* to make it easier to patch ... */ -char libdir[256] = LIBDIR; - string libpath(s) string s; { /* Must deliver a full pathname to the library file "s" */ @@ -61,6 +60,9 @@ libpath(s) string s; { p_mem alloc(); string strcpy(), strcat(); + char* libdir = getenv("LLGEN_LIB_DIR"); + if (!libdir) + libdir = LIBDIR; length = strlen(libdir) + strlen(s) + 2; p = (string) alloc((unsigned) length); strcpy(p,libdir);