Browse Source

Fix a compile issue or two

rdb 9 years ago
parent
commit
369df86096
4 changed files with 16 additions and 10 deletions
  1. 5 3
      .travis.yml
  2. 6 2
      makepanda/makepanda.py
  3. 2 2
      panda/src/grutil/shaderTerrainMesh.cxx
  4. 3 3
      panda/src/movies/dr_flac.h

+ 5 - 3
.travis.yml

@@ -3,9 +3,11 @@ sudo: false
 matrix:
   include:
     - compiler: gcc
-      env: PYTHONV=python2.7
+      env: PYTHONV=python2.7 FLAGS=
     - compiler: clang
-      env: PYTHONV=python3
+      env: PYTHONV=python3 FLAGS=--installer
+    - compiler: clang
+      env: PYTHONV=python2.7 FLAGS=--override=STDFLOAT_DOUBLE=1
 addons:
   apt:
     packages:
@@ -26,7 +28,7 @@ addons:
     - python-dev
     - python3-dev
     - zlib1g-dev
-script: $PYTHONV makepanda/makepanda.py --everything --git-commit $TRAVIS_COMMIT --installer --threads 4 && LD_LIBRARY_PATH=built/lib PYTHONPATH=built $PYTHONV makepanda/test_imports.py
+script: $PYTHONV makepanda/makepanda.py --everything --git-commit $TRAVIS_COMMIT $FLAGS --threads 4 && LD_LIBRARY_PATH=built/lib PYTHONPATH=built $PYTHONV makepanda/test_imports.py
 notifications:
   irc:
     channels:

+ 6 - 2
makepanda/makepanda.py

@@ -592,8 +592,12 @@ if (COMPILER == "MSVC"):
     if (PkgSkip("DIRECTCAM")==0): LibName("DIRECTCAM", "odbc32.lib")
     if (PkgSkip("DIRECTCAM")==0): LibName("DIRECTCAM", "odbccp32.lib")
     if (PkgSkip("OPENSSL")==0):
-        LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libpandassl.lib")
-        LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libpandaeay.lib")
+        if os.path.isfile(GetThirdpartyDir() + "openssl/lib/libpandassl.lib"):
+            LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libpandassl.lib")
+            LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libpandaeay.lib")
+        else:
+            LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libeay32.lib")
+            LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/ssleay32.lib")
     if (PkgSkip("PNG")==0):
         if os.path.isfile(GetThirdpartyDir() + "png/lib/libpng16_static.lib"):
             LibName("PNG", GetThirdpartyDir() + "png/lib/libpng16_static.lib")

+ 2 - 2
panda/src/grutil/shaderTerrainMesh.cxx

@@ -383,8 +383,8 @@ void ShaderTerrainMesh::do_create_chunk_geom() {
       // Stitched vertices at the cornders
       if (x == -1 || y == -1 || x == size + 1 || y == size + 1) {
         vtx_pos.set_z(-1.0f / (PN_stdfloat)size);
-        vtx_pos.set_x(max(0.0f, min(1.0f, vtx_pos.get_x())));
-        vtx_pos.set_y(max(0.0f, min(1.0f, vtx_pos.get_y())));
+        vtx_pos.set_x(max((PN_stdfloat)0, min((PN_stdfloat)1, vtx_pos.get_x())));
+        vtx_pos.set_y(max((PN_stdfloat)0, min((PN_stdfloat)1, vtx_pos.get_y())));
       }
       vertex_writer.add_data3(vtx_pos);
     }

+ 3 - 3
panda/src/movies/dr_flac.h

@@ -92,7 +92,7 @@
 
 #include <stddef.h>
 #include <stdint.h>
-#include <stdbool.h>
+//#include <stdbool.h>
 
 // As data is read from the client it is placed into an internal buffer for fast access. This controls the
 // size of that buffer. Larger values means more speed, but also more memory. In my testing there is diminishing
@@ -2244,7 +2244,7 @@ done_reading_block_header:
     }
 
     if (pIsLastBlockOut) {
-        *pIsLastBlockOut = isLastBlock;
+        *pIsLastBlockOut = (isLastBlock != 0);
     }
 
     return blockType;
@@ -2350,7 +2350,7 @@ static bool drflac__seek_to_sample__brute_force(drflac* pFlac, uint64_t sampleIn
         return false;
     }
 
-    return drflac_read_s16(pFlac, samplesToDecode, NULL);
+    return (drflac_read_s16(pFlac, samplesToDecode, NULL) != 0);
 }
 
 static bool drflac__seek_to_sample__seek_table(drflac* pFlac, uint64_t sampleIndex)