From d71fd1d89c65ad117eb55f94a9ecd2ea3931e239 Mon Sep 17 00:00:00 2001 From: Josh Yelon Date: Thu, 10 Apr 2008 20:03:16 +0000 Subject: [PATCH] Changes for 64-bit --- doc/makepanda/makepanda.py | 12 ++++++++---- dtool/src/pystub/pystub.cxx | 2 ++ panda/src/movies/ffmpegAudioCursor.cxx | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/doc/makepanda/makepanda.py b/doc/makepanda/makepanda.py index 7ca201d1a6..7bf130c3c8 100755 --- a/doc/makepanda/makepanda.py +++ b/doc/makepanda/makepanda.py @@ -12,7 +12,7 @@ # ######################################################################## -import sys,os,time,stat,string,re,getopt,cPickle,fnmatch,threading,Queue,signal,shutil +import sys,os,platform,time,stat,string,re,getopt,cPickle,fnmatch,threading,Queue,signal,shutil from makepandacore import * @@ -477,7 +477,11 @@ def CompileIgate(woutd,wsrc,opts): cmd = cmd + ' -D"_declspec(param)=" -D_near -D_far -D__near -D__far -D__stdcall' if (COMPILER=="LINUX"): cmd = "built/bin/interrogate -srcdir "+srcdir+" -I"+srcdir - cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__i386__ -D__const=const' + cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__const=const' + if (platform.machine()=="x86_64"): + cmd = cmd + ' -D_LP64' + else: + cmd = cmd + ' -D__i386__' optlevel=GetOptimizeOption(opts,OPTIMIZE) if (optlevel==1): cmd = cmd + ' ' if (optlevel==2): cmd = cmd + ' ' @@ -3426,7 +3430,7 @@ Package: panda3d Version: VERSION Section: libdevel Priority: optional -Architecture: i386 +Architecture: ARCH Essential: no Depends: PYTHONV Provides: panda3d @@ -3503,7 +3507,7 @@ def MakeInstallerLinux(): oscmd("chmod -R 555 linuxroot/usr/share/panda3d") if (os.path.exists("/usr/bin/dpkg-deb")): - txt = INSTALLER_DEB_FILE[1:].replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV) + txt = INSTALLER_DEB_FILE[1:].replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV).replace("ARCH",ARCH) oscmd("mkdir -p linuxroot/DEBIAN") oscmd("cd linuxroot ; (find usr -type f -exec md5sum {} \;) > DEBIAN/md5sums") oscmd("cd linuxroot ; (find etc -type f -exec md5sum {} \;) >> DEBIAN/md5sums") diff --git a/dtool/src/pystub/pystub.cxx b/dtool/src/pystub/pystub.cxx index b6f7b12986..a3ee4009c7 100644 --- a/dtool/src/pystub/pystub.cxx +++ b/dtool/src/pystub/pystub.cxx @@ -106,6 +106,7 @@ extern "C" { EXPCL_DTOOLCONFIG int PyUnicode_Type(...); EXPCL_DTOOLCONFIG int Py_BuildValue(...); EXPCL_DTOOLCONFIG int Py_InitModule4(...); + EXPCL_DTOOLCONFIG int Py_InitModule4_64(...); EXPCL_DTOOLCONFIG int Py_InitModule4TraceRefs(...); EXPCL_DTOOLCONFIG int _PyObject_DebugFree(...); EXPCL_DTOOLCONFIG int _PyObject_Del(...); @@ -206,6 +207,7 @@ int PyUnicodeUCS4_GetSize(...) { return 0; } int PyUnicode_Type(...) { return 0; } int Py_BuildValue(...) { return 0; } int Py_InitModule4(...) { return 0; } +int Py_InitModule4_64(...) { return 0; } int Py_InitModule4TraceRefs(...) { return 0; }; int _PyObject_DebugFree(...) { return 0; }; int _PyObject_Del(...) { return 0; }; diff --git a/panda/src/movies/ffmpegAudioCursor.cxx b/panda/src/movies/ffmpegAudioCursor.cxx index 5613fb2da5..cce355cc05 100644 --- a/panda/src/movies/ffmpegAudioCursor.cxx +++ b/panda/src/movies/ffmpegAudioCursor.cxx @@ -94,7 +94,7 @@ FfmpegAudioCursor(FfmpegAudio *src) : // Align the buffer to a 16-byte boundary // The ffmpeg codec likes this, because it uses SSE/SSE2. _buffer = _buffer_alloc; - while (((int)_buffer) & 15) { + while (((size_t)_buffer) & 15) { _buffer += 1; }