diff --git a/src/Makefile b/src/Makefile index b1f1a81e..9e9224e6 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 diff --git a/src/helpfile.h b/src/helpfile.h index 121938b5..0351dc6d 100644 --- a/src/helpfile.h +++ b/src/helpfile.h @@ -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 ("") diff --git a/src/loadsave.c b/src/loadsave.c index 1b632fd6..3aacd162 100644 --- a/src/loadsave.c +++ b/src/loadsave.c @@ -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); } diff --git a/src/misc.c b/src/misc.c index 4abf635f..bc750078 100644 --- a/src/misc.c +++ b/src/misc.c @@ -726,7 +726,7 @@ void Zoom_a_line(byte* original_line, byte* zoomed_line, #if defined(__WIN32__) #define _WIN32_WINNT 0x0500 #include -#elif defined(__macosx__) || defined(__FreeBSD__) +#elif defined(__macosx__) || defined(__FreeBSD__) || defined(__NetBSD__) #include #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; diff --git a/src/mountlist.c b/src/mountlist.c index 7420b4e2..200a4c15 100644 --- a/src/mountlist.c +++ b/src/mountlist.c @@ -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);