Let this build with newer GCC.

XXX Might have LP64 issues with the casts
This commit is contained in:
joerg 2011-11-26 17:12:24 +00:00
parent d160a91a21
commit cb14797aa4
6 changed files with 92 additions and 1 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.3 2009/08/25 11:56:35 wiz Exp $
$NetBSD: distinfo,v 1.4 2011/11/26 17:12:24 joerg Exp $
SHA1 (TheCallyDemo-0.9.1b.zip) = e4d1d4b14504e0971f5cb56e7daa1133f62ad2b8
RMD160 (TheCallyDemo-0.9.1b.zip) = bbcb4dec803b754a55d0318aa3c6eb8656dc309b
@ -10,3 +10,8 @@ SHA1 (patch-ab) = 74ca6b1b75016253bd45e38ba09fce1f2f7573f1
SHA1 (patch-ac) = 7c71ee949fecf2755d0461962075dda496a6bc51
SHA1 (patch-ad) = 3128f69512bf3c88d1b04b2f10c9b0ee6660a8df
SHA1 (patch-ae) = b5e6552950208c996e74bef982b9d2b3a7b06aee
SHA1 (patch-examples_cally_src_demo.h) = e3bde0785970183dba1d3f360b50c73da49f1812
SHA1 (patch-examples_cally_src_model.cpp) = 4bba658d7ec766033af69b4b9ce10fad13984560
SHA1 (patch-examples_miniviewer__gl_src_viewer.cpp) = f44a9f26f52efcfb03a9907c6d24c7f33ff72f55
SHA1 (patch-examples_miniviewer__gl_src_viewer.h) = 19dae4f8bdab3d4de0bc4c08844b00aa9f728779
SHA1 (patch-tools_converter_src_main.cpp) = da8a3915ae45d2dcaf7549708c71fe40733f1e9e

View file

@ -0,0 +1,14 @@
$NetBSD: patch-examples_cally_src_demo.h,v 1.1 2011/11/26 17:12:24 joerg Exp $
--- examples/cally/src/demo.h.orig 2003-09-08 03:03:32.000000000 +0000
+++ examples/cally/src/demo.h
@@ -11,6 +11,9 @@
#ifndef DEMO_H
#define DEMO_H
+#include <cstring>
+#include <strings.h>
+
//----------------------------------------------------------------------------//
// Includes //
//----------------------------------------------------------------------------//

View file

@ -0,0 +1,22 @@
$NetBSD: patch-examples_cally_src_model.cpp,v 1.1 2011/11/26 17:12:24 joerg Exp $
--- examples/cally/src/model.cpp.orig 2003-11-29 16:53:38.000000000 +0000
+++ examples/cally/src/model.cpp
@@ -17,6 +17,8 @@
#include "menu.h"
#include "tga.h"
+#include <inttypes.h>
+
//----------------------------------------------------------------------------//
// Static member variables initialization //
//----------------------------------------------------------------------------//
@@ -633,7 +635,7 @@ void Model::renderMesh(bool bWireframe,
glEnable(GL_COLOR_MATERIAL);
// set the texture id we stored in the map user data
- glBindTexture(GL_TEXTURE_2D, (GLuint)pCalRenderer->getMapUserData(0));
+ glBindTexture(GL_TEXTURE_2D, (GLuint)(uintptr_t)pCalRenderer->getMapUserData(0));
// set the texture coordinate buffer
glTexCoordPointer(2, GL_FLOAT, 0, &meshTextureCoordinates[0][0]);

View file

@ -0,0 +1,22 @@
$NetBSD: patch-examples_miniviewer__gl_src_viewer.cpp,v 1.1 2011/11/26 17:12:24 joerg Exp $
--- examples/miniviewer_gl/src/viewer.cpp.orig 2003-10-13 20:06:46.000000000 +0000
+++ examples/miniviewer_gl/src/viewer.cpp
@@ -20,6 +20,8 @@
#include "tick.h"
#include "tga.h"
+#include <inttypes.h>
+
//----------------------------------------------------------------------------//
// The one and only Viewer instance //
//----------------------------------------------------------------------------//
@@ -870,7 +872,7 @@ void Viewer::renderModel()
glEnable(GL_COLOR_MATERIAL);
// set the texture id we stored in the map user data
- glBindTexture(GL_TEXTURE_2D, (GLuint)pCalRenderer->getMapUserData(0));
+ glBindTexture(GL_TEXTURE_2D, (GLuint)(uintptr_t)pCalRenderer->getMapUserData(0));
// set the texture coordinate buffer
glTexCoordPointer(2, GL_FLOAT, 0, &meshTextureCoordinates[0][0]);

View file

@ -0,0 +1,14 @@
$NetBSD: patch-examples_miniviewer__gl_src_viewer.h,v 1.1 2011/11/26 17:12:24 joerg Exp $
--- examples/miniviewer_gl/src/viewer.h.orig 2003-09-08 03:03:34.000000000 +0000
+++ examples/miniviewer_gl/src/viewer.h
@@ -11,6 +11,9 @@
#ifndef VIEWER_H
#define VIEWER_H
+#include <cstring>
+#include <strings.h>
+
//----------------------------------------------------------------------------//
// Includes //
//----------------------------------------------------------------------------//

View file

@ -0,0 +1,14 @@
$NetBSD: patch-tools_converter_src_main.cpp,v 1.1 2011/11/26 17:12:24 joerg Exp $
--- tools/converter/src/main.cpp.orig 2011-11-26 15:10:20.000000000 +0000
+++ tools/converter/src/main.cpp
@@ -10,6 +10,9 @@
#include "cal3d/cal3d.h"
+#include <cstring>
+#include <strings.h>
+
#define SKELETON 0
#define MESH 1
#define ANIMATION 2