--- TSRM/tsrm_virtual_cwd.c.orig Sun Mar 5 19:57:54 2006 +++ TSRM/tsrm_virtual_cwd.c Tue Nov 7 17:02:40 2006 @@ -46,8 +46,15 @@ #include #endif -#ifndef HAVE_REALPATH -#define realpath(x,y) strcpy(y,x) +#if !defined(HAVE_REALPATH) || !defined(REALLY_USE_REALPATH) +# define realpath(x,y) _xxx_realpath(x, y) +static inline char *_xxx_realpath(const char * const x, char * const y) +{ + strncpy(y, x, PATH_MAX - 1); + y[PATH_MAX - 1] = 0; + + return y; +} #endif #define VIRTUAL_CWD_DEBUG 0