We can now build on tru64. Mountlist.c doesn't seem to work so it crashes when trying to do something in the loadsave screen.
As the available machines don't have gdb, I can't go much further... I could try building with compaq compiler but it seems a lot more strict than gcc. Do you want me to fix these problems to get cleaner ansi code (may be less readable...) git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1278 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
b36dee613e
commit
9933e1fddc
5
Makefile
5
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
|
||||
|
||||
2
const.h
2
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)
|
||||
|
||||
@ -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
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
/// The actual data is in hotkeys.c
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __VBCC__
|
||||
#if !defined(__VBCC__)
|
||||
#include <stdbool.h>
|
||||
#else
|
||||
#define bool char
|
||||
|
||||
2
misc.c
2
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 <sys/sysctl.h> 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 :)"
|
||||
|
||||
17
mountlist.c
17
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 <sys/types.h>
|
||||
#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);
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
#ifndef MOUNTLIST_H_
|
||||
# define MOUNTLIST_H_
|
||||
|
||||
#ifndef __VBCC__
|
||||
#if !defined(__VBCC__)
|
||||
# include <stdbool.h>
|
||||
#else
|
||||
#define bool char
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user