Maelstrom: fix gcc82 build

Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
This commit is contained in:
Jürgen Buchmüller 2018-08-22 10:38:39 +02:00
parent ef609a967f
commit 406b92bc66
No known key found for this signature in database
GPG key ID: 6764EC32352D0647
2 changed files with 97 additions and 1 deletions

View file

@ -0,0 +1,94 @@
--- load.h 2016-10-08 10:10:38.000000000 +0200
+++ load.h 2018-08-22 10:13:31.696766996 +0200
@@ -108,9 +108,9 @@
delete[] path;
path = new char[strlen(directory)+1+strlen(filename)+1];
if ( strcmp(directory, DIR_SEP) == 0 ) {
- sprintf(path, DIR_SEP"%s", filename);
+ sprintf(path, DIR_SEP "%s", filename);
} else {
- sprintf(path, "%s"DIR_SEP"%s", directory, filename);
+ sprintf(path, "%s" DIR_SEP "%s", directory, filename);
}
return(path);
}
--- load.cpp 2000-02-15 03:47:39.000000000 +0100
+++ load.cpp 2018-08-22 10:23:36.123798178 +0200
@@ -81,7 +81,7 @@
SDL_Surface *bmp, *title;
/* Open the title file -- we know its colormap is our global one */
- sprintf(file, "Images"DIR_SEP"Maelstrom_Titles#%d.bmp", title_id);
+ sprintf(file, "Images" DIR_SEP "Maelstrom_Titles#%d.bmp", title_id);
bmp = SDL_LoadBMP(path.Path(file));
if ( bmp == NULL ) {
return(NULL);
@@ -103,7 +103,7 @@
Uint16 w, h;
/* Open the cicn sprite file.. */
- sprintf(file, "Images"DIR_SEP"Maelstrom_Icon#%hd.cicn", cicn_id);
+ sprintf(file, "Images" DIR_SEP "Maelstrom_Icon#%hd.cicn", cicn_id);
if ( (cicn_src=SDL_RWFromFile(path.Path(file), "r")) == NULL ) {
error("GetCIcon(%hd): Can't open CICN %s: ",
cicn_id, path.Path(file));
--- Maelstrom-netd.c 2000-02-12 10:58:59.000000000 +0100
+++ Maelstrom-netd.c 2018-08-22 10:14:38.352770435 +0200
@@ -2,6 +2,8 @@
/* Here we go... */
#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
#include <string.h>
#include <signal.h>
#include <errno.h>
--- buttonlist.h 2000-01-25 17:41:32.000000000 +0100
+++ buttonlist.h 2018-08-22 10:17:36.182779609 +0200
@@ -16,7 +16,7 @@
void Add_Button(Uint16 x, Uint16 y, Uint16 width, Uint16 height,
void (*callback)(void)) {
- struct button *belem;
+ ButtonList::button *belem;
for ( belem=&button_list; belem->next; belem=belem->next );
belem->next = new button;
@@ -30,7 +30,7 @@
}
void Activate_Button(Uint16 x, Uint16 y) {
- struct button *belem;
+ ButtonList::button *belem;
for ( belem=button_list.next; belem; belem=belem->next ) {
if ( (x >= belem->x1) && (x <= belem->x2) &&
@@ -42,7 +42,7 @@
}
void Delete_Buttons(void) {
- struct button *belem, *btemp;
+ ButtonList::button *belem, *btemp;
for ( belem=button_list.next; belem; ) {
btemp = belem;
@@ -58,7 +58,7 @@
Uint16 x1, y1;
Uint16 x2, y2;
void (*callback)(void);
- struct button *next;
+ struct ButtonList::button *next;
} button;
button button_list;
};
--- dialog.h 2001-07-20 17:08:10.000000000 +0200
+++ dialog.h 2018-08-22 10:21:41.404792260 +0200
@@ -402,7 +402,7 @@
/* Loop to end of radio box list */;
/* Which is ANSI C++? */
#ifdef linux
- radio->next = new struct Mac_RadioList::radio;
+ radio->next = new Mac_RadioList::radio;
#else
radio->next = new struct radio;
#endif

View file

@ -1,7 +1,7 @@
# Template file for 'Maelstrom'
pkgname=Maelstrom
version=3.0.6a
revision=1
revision=2
wrksrc="${pkgname}-${version%a}"
build_style=gnu-configure
hostmakedepends="automake libtool SDL_net-devel"
@ -13,6 +13,8 @@ homepage="https://www.libsdl.org/projects/${pkgname}/"
distfiles="${homepage}/src/${pkgname}-${version}.tar.gz"
checksum=342557bcc89eea57af4272778d3511be95fe46cf75e291298a15caa49a2f0e29
CXXFLAGS="-Wno-error -Wno-write-strings"
pre_configure() {
mv configure.{in,ac}
./autogen.sh