Index: trunk/configure.ac
===================================================================
--- trunk/configure.ac	(revision 220)
+++ trunk/configure.ac	(revision 221)
@@ -59,5 +59,5 @@
 	AC_DEFINE(HOST_IS_LINUX)
         AC_DEFINE(HAVE_EXT2_IOCTLS)
-	AC_MSG_RESULT(use ioctl to get e2fs flags)
+	AC_MSG_RESULT([use ioctl to get e2fs flags])
 	case "$host_cpu" in 
 	   i*86*)
@@ -75,7 +75,7 @@
 	  CFLAGS="$CFLAGS -O2 -assume noaligned_objects"
 	  myneedg3=yes
-	  AC_MSG_RESULT(compiler needs assume noaligned_objects)
+	  AC_MSG_RESULT([compiler needs assume noaligned_objects])
 	else
-	  AC_MSG_RESULT(none)
+	  AC_MSG_RESULT([none])
         fi
         ;;
@@ -84,10 +84,11 @@
 	AC_DEFINE(HOST_IS_CYGWIN)
 	dnmalloc_ok=no
-	AC_MSG_RESULT(no trusted paths and no dnmalloc)
+	AC_MSG_RESULT([no trusted paths and no dnmalloc])
 	;;
 
 	*darwin*) 
 	AC_DEFINE(HOST_IS_DARWIN)
-	AC_MSG_RESULT(check resource forks)
+	dnmalloc_ok=no
+	AC_MSG_RESULT([check resource forks, no dnmalloc])
 	;;
 
@@ -102,5 +103,5 @@
 		;;
 		*)
-		AC_MSG_RESULT(none)
+		AC_MSG_RESULT([none])
 		;;
 	esac
@@ -110,5 +111,5 @@
 	AC_DEFINE(HOST_IS_FREEBSD)
 	selectconfig=freebsd
-	AC_MSG_RESULT(none)
+	AC_MSG_RESULT([none])
 	;;
 	
@@ -117,5 +118,5 @@
 	selectconfig=freebsd
 	dnmalloc_ok=no
-	AC_MSG_RESULT(dnmalloc does not work with pthreads)
+	AC_MSG_RESULT([dnmalloc does not work with pthreads])
 	;;
 
@@ -123,5 +124,5 @@
 	mynetbsd=yes
 	selectconfig=netbsd
-	AC_MSG_RESULT(bug with libresolve)
+	AC_MSG_RESULT([bug with libresolve])
 	;;
 
@@ -132,8 +133,8 @@
 		i*86)
 		AC_DEFINE(HOST_IS_I86SOLARIS)
-		AC_MSG_RESULT(vsnprintf prototype)
+		AC_MSG_RESULT([vsnprintf prototype])
 		;;
 		*)
-		AC_MSG_RESULT(none)
+		AC_MSG_RESULT([none])
 		;;
 	esac
@@ -156,5 +157,5 @@
 	selectconfig=solaris
 	AC_DEFINE(HOST_IS_SOLARIS)
-	AC_MSG_RESULT(none)
+	AC_MSG_RESULT([none])
         ;;
 
@@ -173,12 +174,12 @@
     		CFLAGS="$CFLAGS -qstrict"
   	  fi
-          AC_MSG_RESULT(AIX size_t in the accept call and optimize O3 qstrict)
+          AC_MSG_RESULT([AIX size_t in the accept call and optimize O3 qstrict])
 	else
-          AC_MSG_RESULT(AIX size_t in the accept call)
+          AC_MSG_RESULT([AIX size_t in the accept call])
         fi
         ;;
 	
         *hpux*)
-        AC_MSG_RESULT(HPUX need _XOPEN_SOURCE_EXTENDED for h_errno)
+        AC_MSG_RESULT([HPUX need _XOPEN_SOURCE_EXTENDED for h_errno])
 	AC_DEFINE(HOST_IS_HPUX)
 	if test "x$GCC" != "xyes"; then
@@ -193,10 +194,10 @@
 
         *ultrix*)
-        AC_MSG_RESULT(ULTRIX getcwd uses popen)
+        AC_MSG_RESULT([ULTRIX getcwd uses popen])
         AC_DEFINE(HAVE_BROKEN_GETCWD)
         ;;
 
         *)
-        AC_MSG_RESULT(none)
+        AC_MSG_RESULT([none])
         ;;
 esac
Index: trunk/docs/Changelog
===================================================================
--- trunk/docs/Changelog	(revision 220)
+++ trunk/docs/Changelog	(revision 221)
@@ -1,3 +1,6 @@
 2.5.3:
+	* disable dnmalloc on MacOS X, doesn't work properly
+	* stat -> lstat in sh_unix_file_exists (OS X nameforks, report
+	  by David)
 	* Fix problem in standalone trustfile, does not work correctly on
 	  group-writeable files (reported by David).
Index: trunk/src/sh_unix.c
===================================================================
--- trunk/src/sh_unix.c	(revision 220)
+++ trunk/src/sh_unix.c	(revision 221)
@@ -4272,8 +4272,8 @@
   SL_ENTER(_("sh_unix_file_exists"));
 
-  if (-1 == retry_stat(FIL__, __LINE__, path, &buf))
-    SL_RETURN( S_FALSE, _("sh_unix_file_exists"));
+  if (0 == retry_lstat(FIL__, __LINE__, path, &buf))
+    SL_RETURN( S_TRUE,   _("sh_unix_file_exists"));
   else 
-    SL_RETURN( S_TRUE,  _("sh_unix_file_exists"));
+    SL_RETURN( S_FALSE,  _("sh_unix_file_exists"));
 }
 
Index: trunk/src/trustfile.c
===================================================================
--- trunk/src/trustfile.c	(revision 220)
+++ trunk/src/trustfile.c	(revision 221)
@@ -366,4 +366,5 @@
 #else
       strncat(rbuf, "/",   rsz-strlen(rbuf)-1);
+      rbuf[rsz-1] = '\0';
       strncat(rbuf, fname, rsz-strlen(rbuf)-1);
       rbuf[rsz-1] = '\0';
