diff --git a/gl_bumpgl2.c b/gl_bumpgl2.c index 66b2d32..c0cd5f5 100644 --- a/gl_bumpgl2.c +++ b/gl_bumpgl2.c @@ -162,6 +162,7 @@ typedef char GLcharARB; #define GL_ARB_vertex_shader 1 // Taken from ARB_vertex_program +#if !defined(__FreeBSD__) typedef void (APIENTRY * PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v); typedef void (APIENTRY * PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v); typedef void (APIENTRY * PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v); @@ -205,7 +206,7 @@ typedef void (APIENTRY * PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLu typedef void (APIENTRY * PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalize, GLsizei stride, const GLvoid *pointer); typedef void (APIENTRY * PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); typedef void (APIENTRY * PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); - +#endif typedef void (APIENTRY * PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name); typedef void (APIENTRY * PFNGLBINDARRAYGL2PROC) (GLhandleARB shaderObject, GLenum array, const GLcharARB *name, GLint length); typedef GLhandleARB (APIENTRY * PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); @@ -259,13 +260,17 @@ typedef void (APIENTRY * PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLin typedef void (APIENTRY * PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params); typedef void (APIENTRY * PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); typedef void (APIENTRY * PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj); +#if !defined (__FreeBSD__) typedef void (APIENTRY * PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, void **pointer); +#endif typedef void (APIENTRY * PFNGLGETOBJECTPARAMETERFVARBPROC)(GLhandleARB obj, GLenum pname, GLfloat *params); typedef void (APIENTRY * PFNGLGETOBJECTPARAMETERIVARBPROC)(GLhandleARB obj, GLenum pname, GLint *params); +#if !defined (__FreeBSD__) typedef void (APIENTRY * PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); + typedef void (APIENTRY * PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); typedef void (APIENTRY * PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); - +#endif typedef GLhandleARB (APIENTRY * PFNGLGETHANDLEARBPROC) (GLenum pname); typedef GLhandleARB (APIENTRY * PFNGLCREATEVERTEXARRAYOBJECTGL2PROC) (GLhandleARB formatObject, GLsizei count); typedef void (APIENTRY * PFNGLLOADVERTEXARRAYDATAGL2PROC) (GLhandleARB object, GLuint start, GLsizei count, GLvoid *data, GLenum preserve); @@ -274,6 +279,7 @@ typedef void (APIENTRY * PFNGLADDELEMENTGL2PROC) (GLhandleARB formatObject, GLen typedef void (APIENTRY * PFNGLENABLEVERTEXARRAYOBJECTGL2PROC) (GLhandleARB object); typedef void (APIENTRY * PFNGLDISABLEVERTEXARRAYOBJECTGL2PROC) (GLhandleARB object); typedef void (APIENTRY * PFNGLDRAWINDEXEDARRAYSGL2PROC) (GLenum mode, GLuint first, GLsizei count); + #endif // End for #ifndef GL_ARB_vertex_shader #endif // End for #ifndef GL_ARB_fragment_shader #endif // End for #ifndef GL_ARB_shader_objects diff --git a/gl_vidsdl.c b/gl_vidsdl.c index fc7397b..6674cec 100644 --- a/gl_vidsdl.c +++ b/gl_vidsdl.c @@ -5,8 +5,11 @@ #include #include +#if defined(__FreeBSD__) +#include +#else #include - +#endif #include "quakedef.h" viddef_t vid; // global video state diff --git a/glquake.h b/glquake.h index f028789..c97bda7 100644 --- a/glquake.h +++ b/glquake.h @@ -50,9 +50,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // - DC - -#if defined (SDL) +#if defined (SDL) +#if defined(__FreeBSD__) +#include +#else #include #endif +#endif #if defined (__glx__) #include diff --git a/net.h b/net.h index af46125..5bfaa78 100644 --- a/net.h +++ b/net.h @@ -240,13 +240,17 @@ extern hostcache_t hostcache[HOSTCACHESIZE]; #if !defined(_WIN32 ) && !defined (__linux__) && !defined (__sun__) #ifndef htonl +#if !defined(__FreeBSD__) extern unsigned long htonl (unsigned long hostlong); #endif +#endif #ifndef htons extern unsigned short htons (unsigned short hostshort); #endif #ifndef ntohl -extern unsigned long ntohl (unsigned long netlong); +#if !defined(__FreeBSD__) + extern unsigned long ntohl (unsigned long netlong); +#endif #endif #ifndef ntohs extern unsigned short ntohs (unsigned short netshort); diff --git a/nvparse/_rc1.0_lexer.cpp b/nvparse/_rc1.0_lexer.cpp index 32d5058..a3f4be8 100644 --- a/nvparse/_rc1.0_lexer.cpp +++ b/nvparse/_rc1.0_lexer.cpp @@ -39,8 +39,12 @@ #ifdef __cplusplus - +#if defined(__FreeBSD__) #include +#else +#include +#endif + //#include /* Use prototypes in function declarations. */ @@ -613,7 +617,6 @@ char *yytext; #line 7 "rc1.0_tokens.l" #include -#include #include "rc1.0_combiners.h" #include "_rc1.0_parser.h" diff --git a/nvparse/_rc1.0_parser.cpp b/nvparse/_rc1.0_parser.cpp index cf287e4..f80d3e8 100644 --- a/nvparse/_rc1.0_parser.cpp +++ b/nvparse/_rc1.0_parser.cpp @@ -55,8 +55,11 @@ int yylex ( void ); #endif #include +#if defined(__FreeBSD__) +#include +#else #include - +#endif #include "rc1.0_combiners.h" #include "nvparse_errors.h" #include "nvparse_externs.h" diff --git a/nvparse/nvparse_errors.cpp b/nvparse/nvparse_errors.cpp index 01ea340..4c60be5 100644 --- a/nvparse/nvparse_errors.cpp +++ b/nvparse/nvparse_errors.cpp @@ -1,4 +1,8 @@ +#if defined(__FreeBSD__) +#include +#else #include +#endif #include #include diff --git a/nvparse/rc1.0_grammar.y b/nvparse/rc1.0_grammar.y index a2faf3a..7ba0c02 100644 --- a/nvparse/rc1.0_grammar.y +++ b/nvparse/rc1.0_grammar.y @@ -15,8 +15,11 @@ int yylex ( void ); #include +#if defined(__FreeBSD__) +#include +#else #include - +#endif #include "rc1.0_combiners.h" #include "nvparse_errors.h" #include "nvparse_externs.h" diff --git a/sys_uxfindfirst.c b/sys_uxfindfirst.c index e5538ec..72a2ea0 100644 --- a/sys_uxfindfirst.c +++ b/sys_uxfindfirst.c @@ -36,7 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "quakedef.h" #include -#if !defined(__GLIBC__) +#if !defined(__FreeBSD__) && !defined(__GLIBC__) #include #include