Revision: 65344
          http://sourceforge.net/p/brlcad/code/65344
Author:   starseeker
Date:     2015-06-17 03:25:09 +0000 (Wed, 17 Jun 2015)
Log Message:
-----------
Start preparing for the end of config_win.h - it's a leftover from the 
autotools/MSVC project days.  Now that we have CMake we should be testing for 
what it currently has hardcoded to make brlcad_config.h work for everyone.  
Will be a fair bit of logic to move over, but worth it from a long term 
perspective.

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

Modified: brlcad/trunk/CMakeLists.txt
===================================================================
--- brlcad/trunk/CMakeLists.txt 2015-06-17 03:05:55 UTC (rev 65343)
+++ brlcad/trunk/CMakeLists.txt 2015-06-17 03:25:09 UTC (rev 65344)
@@ -2007,7 +2007,6 @@
 BRLCAD_FUNCTION_EXISTS(memset HAVE_MEMSET)
 BRLCAD_FUNCTION_EXISTS(mkstemp HAVE_MKSTEMP)
 BRLCAD_FUNCTION_EXISTS(ntohll HAVE_NTOHLL)
-BRLCAD_FUNCTION_EXISTS(pipe HAVE_PIPE)
 BRLCAD_FUNCTION_EXISTS(popen HAVE_POPEN)
 BRLCAD_FUNCTION_EXISTS(posix_memalign HAVE_POSIX_MEMALIGN) # IEEE Std 
1003.1-2001
 BRLCAD_FUNCTION_EXISTS(random HAVE_RANDOM)
@@ -2052,6 +2051,35 @@
   endif(HAVE_HTONLL_SYS__ENDIAN AND CONFIG_H_FILE)
 endif("${HAVE_HTONLL}" STREQUAL "")
 
+# Windows has its own ideas about some functions - test and handle
+# accordingly.
+
+# execvp
+BRLCAD_FUNCTION_EXISTS(execvp HAVE_EXECVP)
+if (NOT HAVE_EXECVP)
+  BRLCAD_FUNCTION_EXISTS(_execvp HAVE__EXECVP)
+  if (HAVE__EXECVP)
+    CONFIG_H_APPEND(BRLCAD "#define execvp _execvp")
+  endif (HAVE__PIPE)
+endif (NOT HAVE_EXECVP)
+
+# pipe
+BRLCAD_FUNCTION_EXISTS(pipe HAVE_PIPE)
+if (NOT HAVE_PIPE)
+  BRLCAD_FUNCTION_EXISTS(_pipe HAVE__PIPE)
+  if (HAVE__PIPE)
+    # Note - why not just #define pipe _pipe?why not just #define pipe _pipe?
+    CONFIG_H_APPEND(BRLCAD "#define pipe(_FD)  (_pipe((_FD), 256, _O_TEXT))")
+  endif (HAVE__PIPE)
+endif (NOT HAVE_PIPE)
+
+#fork
+BRLCAD_FUNCTION_EXISTS(fork HAVE_FORK)
+if (NOT HAVE_FORK)
+    CONFIG_H_APPEND(BRLCAD "#define fork -1")
+endif (NOT HAVE_FORK)
+
+
 # we may compile in strict pedantic mode, but still want access to
 # some POSIX functions.  test whether some symbols (below) are
 # declared in addition to whether they resolve (above).

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