OpenBSD compatibiliy patch from issue 461.
Thanks ! git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1886 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
6e8d18baed
commit
ad7e0d3f1a
@ -316,7 +316,7 @@ else
|
|||||||
|
|
||||||
# Compiles a regular linux executable for the native platform
|
# Compiles a regular linux executable for the native platform
|
||||||
BIN = ../bin/grafx2
|
BIN = ../bin/grafx2
|
||||||
COPT = -W -Wall -Wdeclaration-after-statement -std=c99 -c -g `sdl-config --cflags` $(TTFCOPT) $(LUACOPT) $(JOYCOPT) $(VKEYCOPT) -O$(OPTIM)
|
COPT = -W -Wall -Wdeclaration-after-statement -std=c99 -c -g `sdl-config --cflags` $(TTFCOPT) $(LUACOPT) $(JOYCOPT) $(VKEYCOPT) -O$(OPTIM) -I/usr/local/include/libpng
|
||||||
LOPT = `sdl-config --libs` -lSDL_image $(TTFLOPT) -lpng $(LUALOPT) -lm
|
LOPT = `sdl-config --libs` -lSDL_image $(TTFLOPT) -lpng $(LUALOPT) -lm
|
||||||
# Use gcc for compiling. Use ncc to build a callgraph and analyze the code.
|
# Use gcc for compiling. Use ncc to build a callgraph and analyze the code.
|
||||||
CC = gcc
|
CC = gcc
|
||||||
|
|||||||
@ -736,7 +736,10 @@ void Zoom_a_line(byte* original_line, byte* zoomed_line,
|
|||||||
#if defined(__WIN32__)
|
#if defined(__WIN32__)
|
||||||
#define _WIN32_WINNT 0x0500
|
#define _WIN32_WINNT 0x0500
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#elif defined(__macosx__) || defined(__FreeBSD__) || defined(__NetBSD__)
|
#elif defined(__macosx__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||||
|
#if defined(__OpenBSD__)
|
||||||
|
#include <sys/param.h>
|
||||||
|
#endif
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#elif defined(__BEOS__) || defined(__HAIKU__)
|
#elif defined(__BEOS__) || defined(__HAIKU__)
|
||||||
#include <kernel/OS.h>
|
#include <kernel/OS.h>
|
||||||
@ -775,7 +778,7 @@ unsigned long Memory_free(void)
|
|||||||
mstt.dwLength = sizeof(MEMORYSTATUS);
|
mstt.dwLength = sizeof(MEMORYSTATUS);
|
||||||
GlobalMemoryStatus(&mstt);
|
GlobalMemoryStatus(&mstt);
|
||||||
return mstt.dwAvailPhys;
|
return mstt.dwAvailPhys;
|
||||||
#elif defined(__macosx__) || defined(__FreeBSD__) || defined(__NetBSD__)
|
#elif defined(__macosx__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||||
int mib[2];
|
int mib[2];
|
||||||
int maxmem;
|
int maxmem;
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|||||||
@ -23,11 +23,16 @@
|
|||||||
#if(!defined(__WIN32__))&&(!defined(__amigaos4__))&&(!defined(__AROS__))&&(!defined(__MORPHOS__))&&(!defined(__amigaos__))
|
#if(!defined(__WIN32__))&&(!defined(__amigaos4__))&&(!defined(__AROS__))&&(!defined(__MORPHOS__))&&(!defined(__amigaos__))
|
||||||
|
|
||||||
// We don't use autoconf and all that in grafx2, so let's do the config here ...
|
// We don't use autoconf and all that in grafx2, so let's do the config here ...
|
||||||
#if defined(__macosx__) || defined(__FreeBSD__) // MacOS X is POSIX compliant
|
#if defined(__macosx__) || defined(__FreeBSD__) || defined(__OpenBSD__) // MacOS X is POSIX compliant
|
||||||
#define MOUNTED_GETMNTINFO
|
#define MOUNTED_GETMNTINFO
|
||||||
#if defined(__macosx__)
|
#if defined(__macosx__)
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(__OpenBSD__)
|
||||||
|
#define HAVE_STRUCT_STATFS_F_FSTYPENAME 1
|
||||||
|
#include <sys/param.h> /* types.h needs this */
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
#elif defined(__NetBSD__)
|
#elif defined(__NetBSD__)
|
||||||
#define MOUNTED_GETMNTINFO2
|
#define MOUNTED_GETMNTINFO2
|
||||||
#elif defined(__BEOS__) || defined(__HAIKU__)
|
#elif defined(__BEOS__) || defined(__HAIKU__)
|
||||||
@ -463,7 +468,7 @@ read_file_system_list (BROKEN bool need_fs_type)
|
|||||||
me = malloc (sizeof *me);
|
me = malloc (sizeof *me);
|
||||||
me->me_devname = strdup (fsp->f_mntfromname);
|
me->me_devname = strdup (fsp->f_mntfromname);
|
||||||
me->me_mountdir = strdup (fsp->f_mntonname);
|
me->me_mountdir = strdup (fsp->f_mntonname);
|
||||||
#if defined(__macosx__)
|
#if defined(__macosx__) || defined(__OpenBSD__)
|
||||||
me->me_type = fsp->f_fstypename;
|
me->me_type = fsp->f_fstypename;
|
||||||
#else
|
#else
|
||||||
me->me_type = fsp->fs_typename;
|
me->me_type = fsp->fs_typename;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user