Skip to content

Commit

Permalink
Fixed|Server: Fixed compilation issues on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Dec 30, 2012
1 parent 72dc958 commit f6dfe93
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 4 deletions.
8 changes: 8 additions & 0 deletions doomsday/engine/api/dd_vectorgraphic.h
Expand Up @@ -35,12 +35,20 @@ typedef struct def_svgline_s {
const Point2Rawf* points;
} def_svgline_t;

#ifdef __cplusplus
extern "C" {
#endif

void R_NewSvg(svgid_t svgId, const def_svgline_t* lines, uint numLines);

void GL_DrawSvg(svgid_t svgId, const Point2Rawf* origin);
void GL_DrawSvg2(svgid_t svgId, const Point2Rawf* origin, float scale);
void GL_DrawSvg3(svgid_t svgId, const Point2Rawf* origin, float scale, float angle);

#ifdef __cplusplus
} // extern "C"
#endif

///@}

#endif /* LIBDENG_API_VECTORGRAPHIC_H */
1 change: 1 addition & 0 deletions doomsday/engine/include/de_platform.h
Expand Up @@ -85,6 +85,7 @@ const char* strcasestr(const char* text, const char* sub);
*/
#if defined(UNIX)
#include <string.h>
#include <strings.h>
#include <errno.h>

#ifdef __GNUC__
Expand Down
4 changes: 4 additions & 0 deletions doomsday/engine/include/gl/gl_deferredapi.h
Expand Up @@ -29,6 +29,8 @@
#ifndef LIBDENG_DEFERRED_GL_API_H
#define LIBDENG_DEFERRED_GL_API_H

#ifdef __CLIENT__

/**
* @def LIBDENG_DISABLE_DEFERRED_GL_API
* Disables the automatic rerouting of GL API calls to the deferring queue.
Expand Down Expand Up @@ -60,5 +62,7 @@ void Deferred_glFogfv(GLenum p, const GLfloat* v);
} // extern "C"
#endif

#endif // __CLIENT__

#endif // LIBDENG_DISABLE_DEFERRED_GL_API
#endif // LIBDENG_DEFERRED_GL_API_H
4 changes: 3 additions & 1 deletion doomsday/engine/include/gl/sys_opengl.h
Expand Up @@ -56,7 +56,9 @@
# include <GL/glu.h>
# include <OpenGL/OpenGL.h>
# else
# include <SDL.h>
# ifdef __CLIENT__
# include <SDL.h>
# endif
# include <GL/gl.h>
# include <GL/glext.h>
# include <GL/glu.h>
Expand Down
4 changes: 2 additions & 2 deletions doomsday/engine/src/filesys/sys_direc.c
Expand Up @@ -37,8 +37,8 @@
#include <string.h>
#include <ctype.h>

#include "de_platform.h"
#include "de_base.h"
#include "de_platform.h"
#include "de_system.h"
#include "m_misc.h"

Expand Down Expand Up @@ -206,7 +206,7 @@ static void resolveHomeRelativeDirectives(char* path, size_t maxLen)
}
else
{
char userName[PATH_MAX], *end = NULL;
char userName[4096], *end = NULL;
struct passwd *pw;

end = strchr(path + 1, '/');
Expand Down
2 changes: 1 addition & 1 deletion doomsday/server/include/server_dummies.h
Expand Up @@ -34,7 +34,7 @@
#include "dd_gl.h"

#ifndef __SERVER__
# error Attempted to include server's header in a non-server build
# error "Attempted to include server's header in a non-server build"
#endif

DENG_EXTERN_C void ClMobj_EnableLocalActions(struct mobj_s *mo, boolean enable);
Expand Down
4 changes: 4 additions & 0 deletions doomsday/server/server.pro
Expand Up @@ -43,9 +43,13 @@ win32 {
else:macx {
}
else {
DEFINES += __USE_BSD _GNU_SOURCE=1

# Generic Unix.
QMAKE_LFLAGS += -rdynamic

LIBS += -lX11 # TODO: Get rid of this! -jk

!freebsd-*: LIBS += -ldl
}

Expand Down

0 comments on commit f6dfe93

Please sign in to comment.