/*
-Copyright (C) 2004 Parallel Realities
+Copyright (C) 2004-2011 Parallel Realities
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
*/
+#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <SDL_image/SDL_image.h>
#include <SDL_mixer/SDL_mixer.h>
#include <SDL_ttf/SDL_ttf.h>
+#include <SDL_net/SDL_net.h>
#include <CoreFoundation/CoreFoundation.h>
extern C_LINKAGE void openHelpURL();
#ifndef SDL_GetGamma
extern DECLSPEC int SDLCALL SDL_GetGamma(float *red, float *green, float *blue);
#endif
#else
-#include "SDL/SDL.h"
-#include "SDL/SDL_image.h"
-#include "SDL/SDL_mixer.h"
-#include "SDL/SDL_ttf.h"
-#include "SDL/SDL_net.h"
+#include "SDL2/SDL.h"
+#include "SDL2/SDL_image.h"
+#include "SDL2/SDL_mixer.h"
+#include "SDL2/SDL_ttf.h"
+#include "SDL2/SDL_net.h"
#endif
+#ifndef WIN32
#include <libintl.h>
#define _(string) gettext(string)
+#else
+#define _(x) (x)
+#define gettext(x) (x)
+#define bindtextdomain(x, y) while(false)
+#define textdomain(x) while(false)
+#endif
+
+#if !defined(OpenBSD) && !defined(FreeBSD)
+#define strlcat(dest, src, n) strncat((dest), (src), (n) - 1)
+#define strlcpy(dest, src, n) do {strncpy((dest), (src), (n)); (dest)[(n) - 1] = 0;} while(false)
+#endif
#include "defs.h"