diff --git a/direct/src/dcparser/dcPacker.cxx b/direct/src/dcparser/dcPacker.cxx index 160e59b3e2..868441ce21 100755 --- a/direct/src/dcparser/dcPacker.cxx +++ b/direct/src/dcparser/dcPacker.cxx @@ -762,7 +762,7 @@ pack_object(PyObject *object) { pack_int64(PyLong_AsLongLong(object)); } else if (PyString_Check(object) || PyUnicode_Check(object)) { char *buffer; - int length; + Py_ssize_t length; PyString_AsStringAndSize(object, &buffer, &length); if (buffer) { pack_string(string(buffer, length)); diff --git a/direct/src/dcparser/dcPython.h b/direct/src/dcparser/dcPython.h index 34032d7d6d..a03b02a44e 100755 --- a/direct/src/dcparser/dcPython.h +++ b/direct/src/dcparser/dcPython.h @@ -28,6 +28,13 @@ #undef _POSIX_C_SOURCE #include +// Python 2.5 adds Py_ssize_t; earlier versions don't have it. +#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) +typedef int Py_ssize_t; +#define PY_SSIZE_T_MAX INT_MAX +#define PY_SSIZE_T_MIN INT_MIN +#endif + // Several interfaces in this module that use Python also require // these header files, so we might as well pick them up too. #include "datagram.h" diff --git a/dtool/Config.Linux.pp b/dtool/Config.Linux.pp index 51364e924a..8b6b41c8c3 100644 --- a/dtool/Config.Linux.pp +++ b/dtool/Config.Linux.pp @@ -22,7 +22,7 @@ #define IS_LINUX 1 // What additional flags should we pass to interrogate? -#define SYSTEM_IGATE_FLAGS -D__i386__ -D__const=const -Dvolatile= +#define SYSTEM_IGATE_FLAGS -D__i386__ -D__const=const -Dvolatile -Dmutable // Is the platform big-endian (like an SGI workstation) or // little-endian (like a PC)? Define this to the empty string to diff --git a/dtool/Config.OSX.pp b/dtool/Config.OSX.pp index b551d6e84d..da3372dab0 100644 --- a/dtool/Config.OSX.pp +++ b/dtool/Config.OSX.pp @@ -25,7 +25,7 @@ #define HAVE_GL 1 // What additional flags should we pass to interrogate? -#define SYSTEM_IGATE_FLAGS -D__FLT_EVAL_METHOD__=0 -D__i386__ -D__const=const -Dvolatile -D__LITTLE_ENDIAN__ -D__inline__=inline -D__GNUC__ +#define SYSTEM_IGATE_FLAGS -D__FLT_EVAL_METHOD__=0 -D__i386__ -D__const=const -Dvolatile -Dmutable -D__LITTLE_ENDIAN__ -D__inline__=inline -D__GNUC__ // We don't need worry about defining WORDS_BIGENDIAN (and we // shouldn't anyway, since ppc and intel are different). We rely on diff --git a/dtool/Config.Win32.pp b/dtool/Config.Win32.pp index e54ec3839f..1b3c4253fc 100644 --- a/dtool/Config.Win32.pp +++ b/dtool/Config.Win32.pp @@ -20,7 +20,7 @@ // ******************************************************************* // What additional flags should we pass to interrogate? -#define SYSTEM_IGATE_FLAGS -longlong __int64 -D_X86_ -DWIN32_VC -D"_declspec(param)=" -D"__declspec(param)=" -D_near -D_far -D__near -D__far -D_WIN32 -D__stdcall -Dvolatile= +#define SYSTEM_IGATE_FLAGS -longlong __int64 -D_X86_ -DWIN32_VC -D"_declspec(param)=" -D"__declspec(param)=" -D_near -D_far -D__near -D__far -D_WIN32 -D__stdcall -Dvolatile -Dmutable // Additional flags to pass to the Tau instrumentor. #define TAU_INSTRUMENTOR_FLAGS -DTAU_USE_C_API -DPROFILING_ON -DWIN32_VC -D_WIN32 -D__cdecl= -D__stdcall= -D__fastcall= -D__i386 -D_MSC_VER=1310 -D_W64= -D_INTEGRAL_MAX_BITS=64 --exceptions --late_tiebreaker --no_class_name_injection --no_warnings --restrict --microsoft --new_for_init diff --git a/dtool/pptempl/Global.pp b/dtool/pptempl/Global.pp index 65b8c8b3df..34bfbe017e 100644 --- a/dtool/pptempl/Global.pp +++ b/dtool/pptempl/Global.pp @@ -748,7 +748,7 @@ Warning: Variable $[upcase $[tree]]_INSTALL is not set! // Caution! interrogate_ipath might be redefined in the // Global.platform.pp file. -#defer interrogate_ipath $[install_parser_inc_dir:%=-S%] $[target_ipath:%=-I%] -S/usr/include +#defer interrogate_ipath $[install_parser_inc_dir:%=-S%] $[target_ipath:%=-I%] #defer interrogate_options \ -DCPPPARSER -D__STDC__=1 -D__cplusplus $[SYSTEM_IGATE_FLAGS] \ diff --git a/dtool/src/parser-inc/Sources.pp b/dtool/src/parser-inc/Sources.pp index 4012eb3fda..7626fdbd1d 100644 --- a/dtool/src/parser-inc/Sources.pp +++ b/dtool/src/parser-inc/Sources.pp @@ -15,7 +15,7 @@ rtsp.h rtspcodes.h setjmp.h winsock2.h \ ode/ode.h collision_trimesh.h \ netinet/tcp.h netinet/ip.h \ - rfftw.h libtar.h malloc.h + rfftw.h libtar.h malloc.h ucontext.h diff --git a/dtool/src/parser-inc/stdtypedefs.h b/dtool/src/parser-inc/stdtypedefs.h index 806d8da98f..970814734c 100644 --- a/dtool/src/parser-inc/stdtypedefs.h +++ b/dtool/src/parser-inc/stdtypedefs.h @@ -52,5 +52,7 @@ typedef long long int64_t; #define NULL ((void *)0) +typedef int fd_set; + #endif diff --git a/dtool/src/parser-inc/ucontext.h b/dtool/src/parser-inc/ucontext.h new file mode 100644 index 0000000000..e4eb225d29 --- /dev/null +++ b/dtool/src/parser-inc/ucontext.h @@ -0,0 +1,19 @@ +// Filename: ucontext.h +// Created by: drose (17Jan08) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved +// +// All use of this software is subject to the terms of the Panda 3d +// Software license. You should have received a copy of this license +// along with this source code; you will also find a current copy of +// the license at http://etc.cmu.edu/panda3d/docs/license/ . +// +// To contact the maintainers of this program write to +// panda3d-general@lists.sourceforge.net . +// +//////////////////////////////////////////////////////////////////// + +typedef int ucontext_t; diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.h b/panda/src/glstuff/glGraphicsStateGuardian_src.h index 96bf692e7f..11f2674453 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.h +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.h @@ -81,6 +81,26 @@ typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); typedef void (APIENTRY * PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); +typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count); +typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights); +typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer); +typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers); +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer); +typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer); +typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers); +typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers); +typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target); #endif // __EDG__ //////////////////////////////////////////////////////////////////// diff --git a/panda/src/nativenet/socket_fdset.h b/panda/src/nativenet/socket_fdset.h index 7a1f7469be..40d1d72069 100755 --- a/panda/src/nativenet/socket_fdset.h +++ b/panda/src/nativenet/socket_fdset.h @@ -36,7 +36,7 @@ private: friend struct Socket_Selector; SOCKET _maxid; - fd_set _the_set; + mutable fd_set _the_set; }; //////////////////////////////////////////////////////////////////// diff --git a/panda/src/nativenet/socket_portable.h b/panda/src/nativenet/socket_portable.h index af4547bf60..62f88320ba 100755 --- a/panda/src/nativenet/socket_portable.h +++ b/panda/src/nativenet/socket_portable.h @@ -264,6 +264,8 @@ const int LOCAL_CONNECT_BLOCKING = EINPROGRESS; #include #include +typedef struct sockaddr_in AddressType; + typedef int SOCKET; const SOCKET BAD_SOCKET = -1; inline int DO_SELECT(SOCKET n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,struct timeval *timeout)