Revision: 77062
          http://sourceforge.net/p/brlcad/code/77062
Author:   starseeker
Date:     2020-09-04 15:41:39 +0000 (Fri, 04 Sep 2020)
Log Message:
-----------
See if this lets us use system realpath.  If so, we may be able to yank the bsd 
fallback implementation.

Modified Paths:
--------------
    brlcad/trunk/CMakeLists.txt

Modified: brlcad/trunk/CMakeLists.txt
===================================================================
--- brlcad/trunk/CMakeLists.txt 2020-09-04 15:30:34 UTC (rev 77061)
+++ brlcad/trunk/CMakeLists.txt 2020-09-04 15:41:39 UTC (rev 77062)
@@ -2936,17 +2936,11 @@
   endif(HAVE__SNPRINTF)
 endif(NOT HAVE_SNPRINTF)
 
-# So far I haven't been able to come up with a reliable self contained
-# test for this, but libbu's #2 realpath test triggers a stack smash
-# on some linux systems.  For the moment, fall back on OpenBSD's
-# userspace implementation, which does seem to work.  Once we can
-# get a self-contained reproduction of this failure, put it below
-# and we can use the system realpath again.
 if(HAVE_REALPATH)
-  #check_c_source_runs("#include<limits.h>\n#include <stdlib.h>\nint main() { 
char dir[512]; const char *d = \"/tmp/REALPATH_TEST_PATH\"; d = (const char 
*)realpath(d, dir); return 0; }" HAVE_WORKING_REALPATH)
-  #if(HAVE_WORKING_REALPATH)
-  #  CONFIG_H_APPEND(BRLCAD "#define HAVE_WORKING_REALPATH 1\n")
-  #endif(HAVE_WORKING_REALPATH)
+  check_c_source_runs("#include<limits.h>\n#include <stdlib.h>\nint main() { 
char dir[PATH_MAX]; const char *d = \"/tmp/REALPATH_TEST_PATH\"; d = (const 
char *)realpath(d, dir); return 0; }" HAVE_WORKING_REALPATH)
+  if(HAVE_WORKING_REALPATH)
+    CONFIG_H_APPEND(BRLCAD "#define HAVE_WORKING_REALPATH 1\n")
+  endif(HAVE_WORKING_REALPATH)
 endif(HAVE_REALPATH)
 
 # GetFullPathName

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to