Revision: 70794
          http://sourceforge.net/p/brlcad/code/70794
Author:   starseeker
Date:     2018-03-04 21:58:22 +0000 (Sun, 04 Mar 2018)
Log Message:
-----------
fixes for linux build

Modified Paths:
--------------
    brlcad/trunk/CMakeLists.txt
    brlcad/trunk/src/conv/intaval/tgf-g.cpp
    brlcad/trunk/src/libgcv/plugins/vrml/vrml_read/file_util.cpp
    brlcad/trunk/src/librt/primitives/bot/gct_decimation/auxiliary/mmthread.h
    brlcad/trunk/src/other/stepcode/CMakeLists.txt
    brlcad/trunk/src/other/stepcode/src/clstepcore/complexSupport.h

Modified: brlcad/trunk/CMakeLists.txt
===================================================================
--- brlcad/trunk/CMakeLists.txt 2018-03-01 13:51:04 UTC (rev 70793)
+++ brlcad/trunk/CMakeLists.txt 2018-03-04 21:58:22 UTC (rev 70794)
@@ -2493,6 +2493,11 @@
 BRLCAD_STRUCT_MEMBER("struct stat" st_blocks sys/stat.h STRUCT_STAT_ST_BLOCKS)
 BRLCAD_STRUCT_MEMBER("struct stat" st_rdev sys/stat.h STRUCT_STAT_ST_RDEV)
 
+# timespec can come in through sys/select.h
+if(HAVE_SYS_SELECT_H)
+  BRLCAD_STRUCT_MEMBER("struct timespec" tv_sec sys/select.h STRUCT_TIMESPEC)
+endif(HAVE_SYS_SELECT_H)
+
 # socklen_t
 BRLCAD_TYPE_SIZE("socklen_t" "")
 if(NOT HAVE_SOCKLEN_T)

Modified: brlcad/trunk/src/conv/intaval/tgf-g.cpp
===================================================================
--- brlcad/trunk/src/conv/intaval/tgf-g.cpp     2018-03-01 13:51:04 UTC (rev 
70793)
+++ brlcad/trunk/src/conv/intaval/tgf-g.cpp     2018-03-04 21:58:22 UTC (rev 
70794)
@@ -29,9 +29,12 @@
 
 #include "common.h"
 
+#include <cstdio>
+#include <cstring>
 #include <iostream>
 
 #ifndef HAVE_DECL_FSEEKO
+#include <sys/types.h> /* for off_t */
 extern "C" int fseeko(FILE *, off_t, int);
 extern "C" off_t ftello(FILE *);
 #endif

Modified: brlcad/trunk/src/libgcv/plugins/vrml/vrml_read/file_util.cpp
===================================================================
--- brlcad/trunk/src/libgcv/plugins/vrml/vrml_read/file_util.cpp        
2018-03-01 13:51:04 UTC (rev 70793)
+++ brlcad/trunk/src/libgcv/plugins/vrml/vrml_read/file_util.cpp        
2018-03-04 21:58:22 UTC (rev 70794)
@@ -28,17 +28,17 @@
 
 #include "file_util.h"
 
+#include <cstdio>
+#include <cstring>
 #include <iostream>
 
 #ifndef HAVE_DECL_FSEEKO
+#include <sys/types.h> /* for off_t */
 extern "C" int fseeko(FILE *, off_t, int);
 extern "C" off_t ftello(FILE *);
 #endif
 #include <fstream>
 
-#include <cstdio>
-#include <cstring>
-
 #include "bu.h"
 
 using namespace std;

Modified: 
brlcad/trunk/src/librt/primitives/bot/gct_decimation/auxiliary/mmthread.h
===================================================================
--- brlcad/trunk/src/librt/primitives/bot/gct_decimation/auxiliary/mmthread.h   
2018-03-01 13:51:04 UTC (rev 70793)
+++ brlcad/trunk/src/librt/primitives/bot/gct_decimation/auxiliary/mmthread.h   
2018-03-04 21:58:22 UTC (rev 70794)
@@ -38,12 +38,14 @@
 #include "common.h"
 
 #include <stddef.h>
+#ifdef HAVE_SYS_SELECT_H
+#  include <sys/select.h>
+#endif
 #include <time.h>
 
 #include "bu/exit.h"
 #include "mmatomic.h"
 
-
 #include "tinycthread.h"
 
 #if !defined(HAVE_STRUCT_TIMESPEC)

Modified: brlcad/trunk/src/other/stepcode/CMakeLists.txt
===================================================================
--- brlcad/trunk/src/other/stepcode/CMakeLists.txt      2018-03-01 13:51:04 UTC 
(rev 70793)
+++ brlcad/trunk/src/other/stepcode/CMakeLists.txt      2018-03-04 21:58:22 UTC 
(rev 70794)
@@ -77,6 +77,10 @@
   set(LIB_DIR lib)
 endif(NOT DEFINED LIB_DIR)
 
+# Because the STEPcode headers are used in BRL-CAD, we have added some decl 
code
+# to the headers for strict c89/c++98.  Don't use it for the stepcode build 
itself
+add_definitions(-DHAVE_DECL_FSEEKO)
+
 IF( NOT DEFINED SC_BUILD_TYPE )
   SET( SC_BUILD_TYPE "Debug" CACHE STRING "Build type" ) # By default set 
debug build
 ENDIF( NOT DEFINED SC_BUILD_TYPE )

Modified: brlcad/trunk/src/other/stepcode/src/clstepcore/complexSupport.h
===================================================================
--- brlcad/trunk/src/other/stepcode/src/clstepcore/complexSupport.h     
2018-03-01 13:51:04 UTC (rev 70793)
+++ brlcad/trunk/src/other/stepcode/src/clstepcore/complexSupport.h     
2018-03-04 21:58:22 UTC (rev 70794)
@@ -16,8 +16,11 @@
 
 #include <sc_export.h>
 #include <iostream>
+#include <cstdio>
+#include <cstring>
 
 #ifndef HAVE_DECL_FSEEKO
+#include <sys/types.h> /* for off_t */
 extern "C" int fseeko(FILE *, off_t, int);
 extern "C" off_t ftello(FILE *);
 #endif

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


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to