diff --git a/Makefile b/Makefile index 8e99bd89..e40c577c 100644 --- a/Makefile +++ b/Makefile @@ -196,12 +196,11 @@ else ZIP = zip PLATFORMFILES = gfx2.png BIN = grafx2 - COPT = -W -Wall -std=c99 -c -g -D__TRU64__ `sdl-config --cflags` $(TTFCOPT) $(LUACOPT) + COPT = -W -Wall -std=c99 -c -g -gstabs -D__TRU64__ `sdl-config --cflags` $(TTFCOPT) $(LUACOPT) LOPT = `sdl-config --libs` -lSDL_image $(TTFLOPT) -lpng $(LUALOPT) -lm - CC = gcc OBJDIR = obj/unix X11LOPT = -lX11 - + CC = gcc else ifeq ($(findstring Kickstart,$(shell version)),Kickstart) # 9 diff --git a/const.h b/const.h index 7030cb7f..f01c2720 100644 --- a/const.h +++ b/const.h @@ -28,7 +28,9 @@ #ifndef _CONST_H_ #define _CONST_H_ +#ifndef M_2PI #define M_2PI 6.28318530717958647692528676656 ///< Hmm, pie... +#endif #define VERSION1 2 ///< Version number for gfx2.cfg (1/4) #define VERSION2 0 ///< Version number for gfx2.cfg (2/4) diff --git a/factory.c b/factory.c index 35d69cb8..bd1d1de7 100644 --- a/factory.c +++ b/factory.c @@ -270,4 +270,10 @@ void Button_Brush_Factory(void) Display_cursor(); } +#else // NOLUA +void Button_Brush_Factory(void) +{ + Verbose_error_message("The brush factory is not available in this build of GrafX2."); +} + #endif diff --git a/hotkeys.h b/hotkeys.h index 380964d5..98ef7256 100644 --- a/hotkeys.h +++ b/hotkeys.h @@ -26,7 +26,7 @@ /// The actual data is in hotkeys.c ////////////////////////////////////////////////////////////////////////////// -#ifndef __VBCC__ +#if !defined(__VBCC__) #include #else #define bool char diff --git a/misc.c b/misc.c index e1d7854b..69dbd3f6 100644 --- a/misc.c +++ b/misc.c @@ -758,7 +758,7 @@ unsigned long Memory_free(void) len = sizeof(maxmem); sysctl(mib,2,&maxmem,&len,NULL,0); return maxmem; -#elif defined(__BEOS__) || defined(__HAIKU__) || defined(__SKYOS__) || defined(__amigaos4__) +#elif defined(__BEOS__) || defined(__HAIKU__) || defined(__SKYOS__) || defined(__amigaos4__) || defined(__TRU64__) // No on BeOS or Haiku // AvailMem is misleading on os4 (os4 caches stuff in memory that you can still allocate) #warning "There is missing code there for your platform ! please check and correct :)" diff --git a/mountlist.c b/mountlist.c index 36171754..c12b1b22 100644 --- a/mountlist.c +++ b/mountlist.c @@ -27,6 +27,10 @@ #define MOUNTED_GETMNTINFO #elif defined(__BEOS__) || defined(__HAIKU__) #define MOUNTED_FS_STAT_DEV +#elif defined(__TRU64__) + #define MOUNTED_GETFSSTAT 1 + #define HAVE_SYS_MOUNT_H 1 + #include #elif defined(__SKYOS__) #warning "Your platform is missing some specific code here ! please check and fix :)" #else @@ -630,11 +634,12 @@ read_file_system_list (bool need_fs_type) numsys = getfsstat ((struct statfs *)0, 0L, MNT_NOWAIT); if (numsys < 0) return (NULL); + /* if (SIZE_MAX / sizeof *stats <= numsys) - xalloc_die (); + xalloc_die ();*/ bufsize = (1 + numsys) * sizeof *stats; - stats = xmalloc (bufsize); + stats = malloc (bufsize); numsys = getfsstat (stats, bufsize, MNT_NOWAIT); if (numsys < 0) @@ -645,10 +650,10 @@ read_file_system_list (bool need_fs_type) for (counter = 0; counter < numsys; counter++) { - me = xmalloc (sizeof *me); - me->me_devname = xstrdup (stats[counter].f_mntfromname); - me->me_mountdir = xstrdup (stats[counter].f_mntonname); - me->me_type = xstrdup (FS_TYPE (stats[counter])); + me = malloc (sizeof *me); + me->me_devname = strdup (stats[counter].f_mntfromname); + me->me_mountdir = strdup (stats[counter].f_mntonname); + //me->me_type = strdup (FS_TYPE (stats[counter])); 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); diff --git a/mountlist.h b/mountlist.h index 7cf87fef..ae0c2944 100644 --- a/mountlist.h +++ b/mountlist.h @@ -28,7 +28,7 @@ #ifndef MOUNTLIST_H_ # define MOUNTLIST_H_ -#ifndef __VBCC__ +#if !defined(__VBCC__) # include #else #define bool char