* Include NetBSD patch from Jeff. Thanks !

* Attempt to workaround the lua pkg-config problems. I'd like to know if it makes everyone happy ?


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1470 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues 2010-04-28 18:53:10 +00:00
parent 985e348fe4
commit 9644f7fb4a
5 changed files with 21 additions and 8 deletions

View File

@ -201,8 +201,13 @@ else
LUACOPT =
LUALOPT =
else
LUACOPT = `pkg-config lua5.1 --cflags`
LUALOPT = `pkg-config lua5.1 --libs`
ifeq (`pkg-config --exists lua --print-errors`,"")
LUACOPT = `pkg-config lua --cflags`
LUALOPT = `pkg-config lua --libs`
else
LUACOPT = `pkg-config lua5.1 --cflags`
LUALOPT = `pkg-config lua5.1 --libs`
endif
endif
# These can only be used under linux and maybe freebsd. They allow to compile for the gp2x or to create a windows binary

View File

@ -408,6 +408,11 @@ static const T_Help_table helptable_credits[] =
HELP_BOLD (" MORPHOS PORT")
HELP_TEXT ("")
HELP_TEXT (" Rusback")
HELP_TEXT (" OffseT")
HELP_TEXT ("")
HELP_BOLD (" NETBSD PORT")
HELP_TEXT ("")
HELP_TEXT (" Jeff Read")
HELP_TEXT ("")
HELP_BOLD (" SKYOS PORT")
HELP_TEXT ("")

View File

@ -666,6 +666,7 @@ void Load_image(T_IO_Context *context)
if (File_error>0)
{
fprintf(stderr,"Unable to load file %s!\n",context->File_name);
Error(0);
}

View File

@ -726,7 +726,7 @@ void Zoom_a_line(byte* original_line, byte* zoomed_line,
#if defined(__WIN32__)
#define _WIN32_WINNT 0x0500
#include <windows.h>
#elif defined(__macosx__) || defined(__FreeBSD__)
#elif defined(__macosx__) || defined(__FreeBSD__) || defined(__NetBSD__)
#include <sys/sysctl.h>
#elif defined(__BEOS__) || defined(__HAIKU__)
// sysinfo not implemented
@ -755,7 +755,7 @@ unsigned long Memory_free(void)
mstt.dwLength = sizeof(MEMORYSTATUS);
GlobalMemoryStatus(&mstt);
return mstt.dwAvailPhys;
#elif defined(__macosx__) || defined(__FreeBSD__)
#elif defined(__macosx__) || defined(__FreeBSD__) || defined(__NetBSD__)
int mib[2];
int maxmem;
size_t len;

View File

@ -25,6 +25,8 @@
// 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
#define MOUNTED_GETMNTINFO
#elif defined(__NetBSD__)
#define MOUNTED_GETMNTINFO2
#elif defined(__BEOS__) || defined(__HAIKU__)
#define MOUNTED_FS_STAT_DEV
#elif defined(__TRU64__)
@ -485,10 +487,10 @@ read_file_system_list (BROKEN bool need_fs_type)
return NULL;
for (; entries-- > 0; fsp++)
{
me = xmalloc (sizeof *me);
me->me_devname = xstrdup (fsp->f_mntfromname);
me->me_mountdir = xstrdup (fsp->f_mntonname);
me->me_type = xstrdup (fsp->f_fstypename);
me = malloc (sizeof *me);
me->me_devname = strdup (fsp->f_mntfromname);
me->me_mountdir = strdup (fsp->f_mntonname);
me->me_type = strdup (fsp->f_fstypename);
me->me_type_malloced = 1;
me->me_dummy = ME_DUMMY (me->me_devname, me->me_type);
me->me_remote = ME_REMOTE (me->me_devname, me->me_type);