Files
haikuports/app-emulation/fuse/patches/fuse-1.1.1.patchset
Chris Moore ffe548bd1d libspectrum and fuse: Build fixes for x86_64 and x86_gcc2 (#1547)
* Add x86_64 and fix to declare libgcrypt as requirement

* Correct libpng dependency; Modified recipe and patch to enable x86_64 build
2017-08-02 19:34:44 -04:00

593 lines
23 KiB
Plaintext

From dd064ec69a2c95c9c37a58fed0fc800b219350e0 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Tue, 12 May 2015 21:38:51 +0200
Subject: C89 "declaration after statement" fixes.
diff --git a/event.c b/event.c
index 2e4f823..62b7ae7 100644
--- a/event.c
+++ b/event.c
@@ -120,8 +120,9 @@ event_do_events( void )
event_t *ptr;
while(event_next_event <= tstates) {
+ event_descriptor_t descriptor;
ptr = event_list->data;
- event_descriptor_t descriptor =
+ descriptor =
g_array_index( registered_events, event_descriptor_t, ptr->type );
/* Remove the event from the list *before* processing */
diff --git a/machines/spec16.c b/machines/spec16.c
index 5fea25e..27172ca 100644
--- a/machines/spec16.c
+++ b/machines/spec16.c
@@ -69,10 +69,11 @@ static void
ensure_empty_mapping( void )
{
int i;
+ libspectrum_byte *empty_chunk;
if( empty_mapping_allocated ) return;
- libspectrum_byte *empty_chunk = memory_pool_allocate_persistent( 0x4000, 1 );
+ empty_chunk = memory_pool_allocate_persistent( 0x4000, 1 );
memset( empty_chunk, 0xff, 0x4000 );
for( i = 0; i < MEMORY_PAGES_IN_16K; i++ ) {
diff --git a/machines/tc2068.c b/machines/tc2068.c
index 0206c78..f2ce375 100644
--- a/machines/tc2068.c
+++ b/machines/tc2068.c
@@ -85,10 +85,11 @@ static void
ensure_empty_mapping( void )
{
int i;
+ libspectrum_byte *empty_chunk;
if( empty_mapping_allocated ) return;
- libspectrum_byte *empty_chunk = memory_pool_allocate_persistent( 0x2000, 1 );
+ empty_chunk = memory_pool_allocate_persistent( 0x2000, 1 );
memset( empty_chunk, 0xff, 0x2000 );
for( i = 0; i < MEMORY_PAGES_IN_8K; i++ ) {
diff --git a/options.h b/options.h
index da643fb..fef7c43 100644
--- a/options.h
+++ b/options.h
@@ -1,5 +1,5 @@
/* options.h: options dialog boxes public declarations
- Copyright (c) 2001-2002 Philip Kendall
+ Copyright (c) 2001-2002,2004 Philip Kendall
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/periph.c b/periph.c
index 0a93813..27cc562 100644
--- a/periph.c
+++ b/periph.c
@@ -86,10 +86,12 @@ port_register( periph_type type, const periph_port_t *port )
void
periph_register( periph_type type, const periph_t *periph )
{
+ periph_private_t *private;
+
if( !peripherals )
peripherals = g_hash_table_new_full( NULL, NULL, NULL, libspectrum_free );
- periph_private_t *private = libspectrum_malloc( sizeof( *private ) );
+ private = libspectrum_malloc( sizeof( *private ) );
private->present = PERIPH_PRESENT_NEVER;
private->active = 0;
diff --git a/peripherals/nic/w5100.c b/peripherals/nic/w5100.c
index 386e0a5..eed1a48 100644
--- a/peripherals/nic/w5100.c
+++ b/peripherals/nic/w5100.c
@@ -146,10 +146,11 @@ nic_w5100_alloc( void )
{
int error;
int i;
+ nic_w5100_t *self;
compat_socket_networking_init();
- nic_w5100_t *self = malloc( sizeof( *self ) );
+ self = malloc( sizeof( *self ) );
if( !self ) {
ui_error( UI_ERROR_ERROR, "%s:%d out of memory", __FILE__, __LINE__ );
fuse_abort();
diff --git a/peripherals/nic/w5100_internals.h b/peripherals/nic/w5100_internals.h
index 491cccf..f321778 100644
--- a/peripherals/nic/w5100_internals.h
+++ b/peripherals/nic/w5100_internals.h
@@ -30,6 +30,7 @@
#define FUSE_W5100_INTERNALS_H
#include <signal.h>
+#include <sys/select.h>
typedef enum w5100_socket_mode {
W5100_SOCKET_MODE_CLOSED = 0x00,
diff --git a/peripherals/nic/w5100_socket.c b/peripherals/nic/w5100_socket.c
index af87f2e..6126ef4 100644
--- a/peripherals/nic/w5100_socket.c
+++ b/peripherals/nic/w5100_socket.c
@@ -141,11 +141,11 @@ nic_w5100_socket_reset( nic_w5100_socket_t *socket )
static void
w5100_write_socket_mr( nic_w5100_socket_t *socket, libspectrum_byte b )
{
- nic_w5100_debug( "w5100: writing 0x%02x to S%d_MR\n", b, socket->id );
-
w5100_socket_mode mode = b & 0x0f;
libspectrum_byte flags = b & 0xf0;
+ nic_w5100_debug( "w5100: writing 0x%02x to S%d_MR\n", b, socket->id );
+
switch( mode ) {
case W5100_SOCKET_MODE_CLOSED:
break;
diff --git a/peripherals/spectranet.c b/peripherals/spectranet.c
index 710ab30..054144c 100644
--- a/peripherals/spectranet.c
+++ b/peripherals/spectranet.c
@@ -201,6 +201,8 @@ spectranet_activate( void )
if( !spectranet_memory_allocated ) {
int i, j;
+ libspectrum_byte *rom;
+ libspectrum_byte *ram;
libspectrum_byte *fake_bank =
memory_pool_allocate_persistent( 0x1000, 1 );
@@ -220,8 +222,7 @@ spectranet_activate( void )
}
/* Pages 0x00 to 0x1f are the flash ROM */
- libspectrum_byte *rom =
- memory_pool_allocate_persistent( SPECTRANET_ROM_LENGTH, 1 );
+ rom = memory_pool_allocate_persistent( SPECTRANET_ROM_LENGTH, 1 );
memset( rom, 0xff, SPECTRANET_ROM_LENGTH );
for( i = 0; i < SPECTRANET_ROM_LENGTH / SPECTRANET_PAGE_LENGTH; i++ ) {
@@ -238,8 +239,7 @@ spectranet_activate( void )
and writebyte() */
/* Pages 0xc0 to 0xff are the RAM */
- libspectrum_byte *ram =
- memory_pool_allocate_persistent( SPECTRANET_RAM_LENGTH, 1 );
+ ram = memory_pool_allocate_persistent( SPECTRANET_RAM_LENGTH, 1 );
for( i = 0; i < SPECTRANET_RAM_LENGTH / SPECTRANET_PAGE_LENGTH; i++ ) {
int base = (SPECTRANET_RAM_BASE + i) * MEMORY_PAGES_IN_4K;
diff --git a/ui.c b/ui.c
index 1bbe624..053ba50 100644
--- a/ui.c
+++ b/ui.c
@@ -163,10 +163,10 @@ static int mouse_grab_suspended = 0;
void
ui_mouse_button( int button, int down )
{
- if( !ui_mouse_grabbed && !mouse_grab_suspended ) button = 2;
-
int kempston_button = !settings_current.mouse_swap_buttons;
+ if( !ui_mouse_grabbed && !mouse_grab_suspended ) button = 2;
+
/* Possibly we'll end up handling _more_ than one mouse interface... */
switch( button ) {
case 1:
diff --git a/ui/sdl/sdldisplay.c b/ui/sdl/sdldisplay.c
index 22c05d5..0a49670 100644
--- a/ui/sdl/sdldisplay.c
+++ b/ui/sdl/sdldisplay.c
@@ -292,9 +292,10 @@ sdldisplay_find_best_fullscreen_scaler( void )
fullscreen to avoid the "postage stamp" on machines that don't support
320x240 anymore e.g. Mac notebooks */
if( settings_current.full_screen ) {
+ int i = 0;
+
if( searching_fullscreen_scaler ) return;
searching_fullscreen_scaler = 1;
- int i = 0;
while( i < SCALER_NUM &&
( image_height*sdldisplay_current_size <= min_fullscreen_height/2 ||
image_height*sdldisplay_current_size > max_fullscreen_height ) ) {
diff --git a/ui/widget/filesel.c b/ui/widget/filesel.c
index a28562a..f31f160 100644
--- a/ui/widget/filesel.c
+++ b/ui/widget/filesel.c
@@ -82,7 +82,7 @@ static int is_drivesel = 0;
static int is_rootdir;
#endif /* #ifdef WIN32 */
-#define PAGESIZE (is_saving ? 32 : 36)
+#define FUSE_PAGESIZE (is_saving ? 32 : 36)
/* The number of the filename in the top-left corner of the current
display, that of the filename which the `cursor' is on, and that
@@ -605,7 +605,7 @@ static int widget_print_all_filenames( struct widget_dirent **filenames, int n,
/* Print the filenames, mostly normally, but with the currently
selected file inverted */
- for( i = top_left; i < n && i < top_left + PAGESIZE; i++ ) {
+ for( i = top_left; i < n && i < top_left + FUSE_PAGESIZE; i++ ) {
if( i == current ) {
widget_print_filename( filenames[i], i-top_left, 1 );
} else {
@@ -806,6 +806,9 @@ http://thread.gmane.org/gmane.comp.gnu.mingw.user/9197
void
widget_filesel_keyhandler( input_key key )
{
+ char *fn;
+ char *dirtitle;
+
/* If there are no files (possible on the Wii), can't really do anything */
if( widget_numfiles == 0 ) {
if( key == INPUT_KEY_Escape ) widget_end_widget( WIDGET_FINISHED_CANCEL );
@@ -819,9 +822,6 @@ widget_filesel_keyhandler( input_key key )
widget_end_widget( err );
}
#else /* ifndef AMIGA */
- char *fn;
- char *dirtitle;
-
new_current_file = current_file;
switch(key) {
@@ -868,13 +868,13 @@ widget_filesel_keyhandler( input_key key )
break;
case INPUT_KEY_Page_Up:
- new_current_file = ( current_file > PAGESIZE ) ?
- current_file - PAGESIZE :
+ new_current_file = ( current_file > FUSE_PAGESIZE ) ?
+ current_file - FUSE_PAGESIZE :
0;
break;
case INPUT_KEY_Page_Down:
- new_current_file = current_file + PAGESIZE;
+ new_current_file = current_file + FUSE_PAGESIZE;
if( new_current_file >= widget_numfiles )
new_current_file = widget_numfiles - 1;
break;
@@ -965,9 +965,9 @@ widget_filesel_keyhandler( input_key key )
widget_print_all_filenames( widget_filenames, widget_numfiles,
top_left_file, new_current_file, dirtitle );
- } else if( new_current_file >= top_left_file+PAGESIZE ) {
+ } else if( new_current_file >= top_left_file+FUSE_PAGESIZE ) {
- top_left_file = new_current_file & ~1; top_left_file -= PAGESIZE - 2;
+ top_left_file = new_current_file & ~1; top_left_file -= FUSE_PAGESIZE - 2;
widget_print_all_filenames( widget_filenames, widget_numfiles,
top_left_file, new_current_file, dirtitle );
diff --git a/ui/widget/menu_data.c b/ui/widget/menu_data.c
index ea5a348..127d500 100644
--- a/ui/widget/menu_data.c
+++ b/ui/widget/menu_data.c
@@ -21,7 +21,7 @@
*/
-/* This file is autogenerated from menu_data.dat by ../../../ui/widget/../../menu_data.pl.
+/* This file is autogenerated from menu_data.dat by ./../../menu_data.pl.
Any changes made here will not be preserved. */
#include <config.h>
@@ -71,8 +71,6 @@ static widget_menu_entry menu_file[] = {
{ "S\012a\011ve Screen as SCR...", INPUT_KEY_a, NULL, menu_file_savescreenasscr, NULL, 0 },
{ "Save S\012c\011reen as PNG...", INPUT_KEY_c, NULL, menu_file_savescreenaspng, NULL, 0 },
{ "\012M\011ovie", INPUT_KEY_m, menu_file_movie, NULL, NULL, 0 },
- { "Loa\012d\011 binary data...", INPUT_KEY_d, NULL, menu_file_loadbinarydata, NULL, 0 },
- { "Save \012b\011inary data...", INPUT_KEY_b, NULL, menu_file_savebinarydata, NULL, 0 },
{ "E\012x\011it...", INPUT_KEY_x, NULL, menu_file_exit, NULL, 0 },
{ NULL }
};
@@ -128,6 +126,7 @@ static widget_menu_entry menu_options[] = {
{ "\012J\011oysticks", INPUT_KEY_j, menu_options_joysticks, NULL, NULL, 0 },
{ "S\012e\011lect ROMs", INPUT_KEY_e, menu_options_selectroms, NULL, NULL, 0 },
{ "\012F\011ilter...", INPUT_KEY_f, NULL, menu_options_filter, menu_filter_detail, 0 },
+ { "F\012u\011ll screen", INPUT_KEY_u, NULL, menu_options_fullscreen, NULL, 0 },
{ "\012D\011isk options...", INPUT_KEY_d, NULL, menu_options_diskoptions, NULL, 0 },
{ "S\012a\011ve", INPUT_KEY_a, NULL, menu_options_save, NULL, 0 },
{ NULL }
@@ -142,7 +141,6 @@ static widget_menu_entry menu_machine_profiler[] = {
static widget_menu_entry menu_machine[] = {
{ "Machine" },
- { "\012P\011ause...", INPUT_KEY_p, NULL, menu_machine_pause, NULL, 0 },
{ "\012R\011eset...", INPUT_KEY_r, NULL, menu_machine_reset, NULL, 0 },
{ "\012H\011ard reset...", INPUT_KEY_h, NULL, menu_machine_reset, NULL, 1 },
{ "\012S\011elect...", INPUT_KEY_s, NULL, menu_machine_select, menu_machine_detail, 0 },
diff --git a/ui/widget/options.c b/ui/widget/options.c
index ea2e997..3a7fd3b 100644
--- a/ui/widget/options.c
+++ b/ui/widget/options.c
@@ -303,6 +303,8 @@ static void widget_bw_tv_click( void );
static void widget_option_bw_tv_draw( int left_edge, int width, struct widget_option_entry *menu, settings_info *show );
static void widget_pal_tv2x_click( void );
static void widget_option_pal_tv2x_draw( int left_edge, int width, struct widget_option_entry *menu, settings_info *show );
+static void widget_full_screen_click( void );
+static void widget_option_full_screen_draw( int left_edge, int width, struct widget_option_entry *menu, settings_info *show );
static void widget_confirm_actions_click( void );
static void widget_option_confirm_actions_draw( int left_edge, int width, struct widget_option_entry *menu, settings_info *show );
static void widget_statusbar_click( void );
@@ -330,8 +332,6 @@ static void widget_printer_click( void );
static void widget_option_printer_draw( int left_edge, int width, struct widget_option_entry *menu, settings_info *show );
static void widget_zxprinter_click( void );
static void widget_option_zxprinter_draw( int left_edge, int width, struct widget_option_entry *menu, settings_info *show );
-static void widget_speccyboot_click( void );
-static void widget_option_speccyboot_draw( int left_edge, int width, struct widget_option_entry *menu, settings_info *show );
static void widget_specdrum_click( void );
static void widget_option_specdrum_draw( int left_edge, int width, struct widget_option_entry *menu, settings_info *show );
static void widget_spectranet_click( void );
@@ -448,10 +448,11 @@ static widget_option_entry options_general[] = {
{ "RS-232 \012h\001andshake", 13, INPUT_KEY_h, NULL, NULL, widget_rs232_handshake_click, widget_option_rs232_handshake_draw },
{ "Black and white T\012V\001", 14, INPUT_KEY_v, NULL, NULL, widget_bw_tv_click, widget_option_bw_tv_draw },
{ "\012P\001AL-TV use TV2x effect", 15, INPUT_KEY_p, NULL, NULL, widget_pal_tv2x_click, widget_option_pal_tv2x_draw },
- { "\012C\001onfirm actions", 16, INPUT_KEY_c, NULL, NULL, widget_confirm_actions_click, widget_option_confirm_actions_draw },
- { "Show status\012b\001ar", 17, INPUT_KEY_b, NULL, NULL, widget_statusbar_click, widget_option_statusbar_draw },
- { "Snap \012j\001oystick prompt", 18, INPUT_KEY_j, NULL, NULL, widget_joy_prompt_click, widget_option_joy_prompt_draw },
- { "Late t\012i\001mings", 19, INPUT_KEY_i, NULL, NULL, widget_late_timings_click, widget_option_late_timings_draw },
+ { "Full \012s\001creen", 16, INPUT_KEY_s, NULL, NULL, widget_full_screen_click, widget_option_full_screen_draw },
+ { "\012C\001onfirm actions", 17, INPUT_KEY_c, NULL, NULL, widget_confirm_actions_click, widget_option_confirm_actions_draw },
+ { "Show status\012b\001ar", 18, INPUT_KEY_b, NULL, NULL, widget_statusbar_click, widget_option_statusbar_draw },
+ { "Snap \012j\001oystick prompt", 19, INPUT_KEY_j, NULL, NULL, widget_joy_prompt_click, widget_option_joy_prompt_draw },
+ { "Late t\012i\001mings", 20, INPUT_KEY_i, NULL, NULL, widget_late_timings_click, widget_option_late_timings_draw },
{ NULL }
};
@@ -466,10 +467,9 @@ static widget_option_entry options_peripherals_general[] = {
{ "In\012t\001erface 2", 6, INPUT_KEY_t, NULL, NULL, widget_interface2_click, widget_option_interface2_draw },
{ "Emulate \012p\001rinters", 7, INPUT_KEY_p, NULL, NULL, widget_printer_click, widget_option_printer_draw },
{ "\012Z\001X Printer", 8, INPUT_KEY_z, NULL, NULL, widget_zxprinter_click, widget_option_zxprinter_draw },
- { "Speccy\012B\001oot interface", 9, INPUT_KEY_b, NULL, NULL, widget_speccyboot_click, widget_option_speccyboot_draw },
- { "Spec\012D\001rum interface", 10, INPUT_KEY_d, NULL, NULL, widget_specdrum_click, widget_option_specdrum_draw },
- { "Spectra\012n\001et", 11, INPUT_KEY_n, NULL, NULL, widget_spectranet_click, widget_option_spectranet_draw },
- { "Spe\012c\001tranet disable", 12, INPUT_KEY_c, NULL, NULL, widget_spectranet_disable_click, widget_option_spectranet_disable_draw },
+ { "Spec\012D\001rum interface", 9, INPUT_KEY_d, NULL, NULL, widget_specdrum_click, widget_option_specdrum_draw },
+ { "Spectra\012n\001et", 10, INPUT_KEY_n, NULL, NULL, widget_spectranet_click, widget_option_spectranet_draw },
+ { "Spe\012c\001tranet disable", 11, INPUT_KEY_c, NULL, NULL, widget_spectranet_disable_click, widget_option_spectranet_disable_draw },
{ NULL }
};
@@ -685,6 +685,8 @@ widget_options_finish( widget_finish_state finished )
/* If we exited normally, actually set the options */
if( finished == WIDGET_FINISHED_OK ) {
+ int needs_hard_reset;
+
/* Get a copy of current settings */
settings_info original_settings;
memset( &original_settings, 0, sizeof( settings_info ) );
@@ -693,8 +695,7 @@ widget_options_finish( widget_finish_state finished )
/* Apply new options */
settings_copy( &settings_current, &widget_options_settings );
- int needs_hard_reset = periph_postcheck();
-
+ needs_hard_reset = periph_postcheck();
if( needs_hard_reset ) {
error = widget_do( WIDGET_TYPE_QUERY,
"Some options need to reset the machine. Reset?" );
@@ -1002,6 +1003,18 @@ widget_option_pal_tv2x_draw( int left_edge, int width, struct widget_option_entr
}
static void
+widget_full_screen_click( void )
+{
+ widget_options_settings.full_screen = ! widget_options_settings.full_screen;
+}
+
+static void
+widget_option_full_screen_draw( int left_edge, int width, struct widget_option_entry *menu, settings_info *show )
+{
+ widget_options_print_option( left_edge, width, menu->index, menu->text, show->full_screen );
+}
+
+static void
widget_confirm_actions_click( void )
{
widget_options_settings.confirm_actions = ! widget_options_settings.confirm_actions;
@@ -1065,7 +1078,7 @@ widget_general_keyhandler( input_key key )
#if 0
case INPUT_KEY_Resize: /* Fake keypress used on window resize */
- widget_dialog_with_border( 1, 2, 30, 2 + 20 );
+ widget_dialog_with_border( 1, 2, 30, 2 + 21 );
widget_general_show_all( &widget_options_settings );
break;
#endif
@@ -1088,7 +1101,7 @@ widget_general_keyhandler( input_key key )
case INPUT_KEY_Down:
case INPUT_KEY_6:
case INPUT_JOYSTICK_DOWN:
- if ( highlight_line + 1 < 20 ) {
+ if ( highlight_line + 1 < 21 ) {
new_highlight_line = highlight_line + 1;
cursor_pressed = 1;
}
@@ -1102,8 +1115,8 @@ widget_general_keyhandler( input_key key )
break;
case INPUT_KEY_End:
- if ( highlight_line + 2 < 20 ) {
- new_highlight_line = 20 - 1;
+ if ( highlight_line + 2 < 21 ) {
+ new_highlight_line = 21 - 1;
cursor_pressed = 1;
}
break;
@@ -1277,18 +1290,6 @@ widget_option_zxprinter_draw( int left_edge, int width, struct widget_option_ent
}
static void
-widget_speccyboot_click( void )
-{
- widget_options_settings.speccyboot = ! widget_options_settings.speccyboot;
-}
-
-static void
-widget_option_speccyboot_draw( int left_edge, int width, struct widget_option_entry *menu, settings_info *show )
-{
- widget_options_print_option( left_edge, width, menu->index, menu->text, show->speccyboot );
-}
-
-static void
widget_specdrum_click( void )
{
widget_options_settings.specdrum = ! widget_options_settings.specdrum;
@@ -1340,7 +1341,7 @@ widget_peripherals_general_keyhandler( input_key key )
#if 0
case INPUT_KEY_Resize: /* Fake keypress used on window resize */
- widget_dialog_with_border( 1, 2, 30, 2 + 13 );
+ widget_dialog_with_border( 1, 2, 30, 2 + 12 );
widget_peripherals_general_show_all( &widget_options_settings );
break;
#endif
@@ -1363,7 +1364,7 @@ widget_peripherals_general_keyhandler( input_key key )
case INPUT_KEY_Down:
case INPUT_KEY_6:
case INPUT_JOYSTICK_DOWN:
- if ( highlight_line + 1 < 13 ) {
+ if ( highlight_line + 1 < 12 ) {
new_highlight_line = highlight_line + 1;
cursor_pressed = 1;
}
@@ -1377,8 +1378,8 @@ widget_peripherals_general_keyhandler( input_key key )
break;
case INPUT_KEY_End:
- if ( highlight_line + 2 < 13 ) {
- new_highlight_line = 13 - 1;
+ if ( highlight_line + 2 < 12 ) {
+ new_highlight_line = 12 - 1;
cursor_pressed = 1;
}
break;
diff --git a/ui/widget/pokemem.c b/ui/widget/pokemem.c
index 8774fc0..10c925a 100644
--- a/ui/widget/pokemem.c
+++ b/ui/widget/pokemem.c
@@ -183,6 +183,8 @@ widget_pokemem_print_trainer( unsigned int left_edge, unsigned int width,
char buffer[128];
size_t l, w;
int colour = WIDGET_COLOUR_BACKGROUND;
+ int x;
+ int y;
if( number == highlight_line ) colour = WIDGET_COLOUR_HIGHLIGHT;
widget_rectangle( left_edge * 8 + 1, number * 8 + 24, width * 8 - 2, 1 * 8,
@@ -202,8 +204,8 @@ widget_pokemem_print_trainer( unsigned int left_edge, unsigned int width,
widget_putpixel( w, number * 8 + 31, 0 );
/* print check */
- int x = ( left_edge + width - 2 ) * 8 - 2;
- int y = number * 8 + 24;
+ x = ( left_edge + width - 2 ) * 8 - 2;
+ y = number * 8 + 24;
widget_rectangle( x, y, 8, 8, colour );
widget_print_checkbox( x, y,
--
2.13.1
From 7bf9395298be0b3d7d5b027de8c308c101aaf1c0 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sat, 26 Mar 2016 17:39:58 +0100
Subject: gcc2 build fix.
diff --git a/ui/widget/options.c b/ui/widget/options.c
index 3a7fd3b..9967007 100644
--- a/ui/widget/options.c
+++ b/ui/widget/options.c
@@ -685,8 +685,6 @@ widget_options_finish( widget_finish_state finished )
/* If we exited normally, actually set the options */
if( finished == WIDGET_FINISHED_OK ) {
- int needs_hard_reset;
-
/* Get a copy of current settings */
settings_info original_settings;
memset( &original_settings, 0, sizeof( settings_info ) );
@@ -695,7 +693,8 @@ widget_options_finish( widget_finish_state finished )
/* Apply new options */
settings_copy( &settings_current, &widget_options_settings );
- needs_hard_reset = periph_postcheck();
+ int needs_hard_reset = periph_postcheck();
+
if( needs_hard_reset ) {
error = widget_do( WIDGET_TYPE_QUERY,
"Some options need to reset the machine. Reset?" );
diff --git a/ui/widget/options.pl b/ui/widget/options.pl
index 89f8249..5d1fb84 100755
--- a/ui/widget/options.pl
+++ b/ui/widget/options.pl
@@ -364,6 +364,7 @@ int
widget_options_finish( widget_finish_state finished )
{
int error;
+ int needs_hard_reset;
/* If we exited normally, actually set the options */
if( finished == WIDGET_FINISHED_OK ) {
@@ -375,7 +376,7 @@ widget_options_finish( widget_finish_state finished )
/* Apply new options */
settings_copy( &settings_current, &widget_options_settings );
- int needs_hard_reset = periph_postcheck();
+ needs_hard_reset = periph_postcheck();
if( needs_hard_reset ) {
error = widget_do( WIDGET_TYPE_QUERY,
--
2.13.1
From 7b166283895f621eb15862c8ed11d8d0e264f4ee Mon Sep 17 00:00:00 2001
From: Chris Moore <chris@mooreonline.org>
Date: Wed, 2 Aug 2017 13:41:49 +0100
Subject: Fix broken detection of libspectrum
diff --git a/configure b/configure
index 9b1a35d..aaacb7f 100755
--- a/configure
+++ b/configure
@@ -15944,7 +15944,7 @@ fi
# Check whether --with-libspectrum-prefix was given.
if test "${with_libspectrum_prefix+set}" = set; then :
- withval=$with_libspectrum_prefix; LIBSPEC_CFLAGS=-I$withval/include; LIBSPEC_LIBS=-L$withval/lib
+ withval=$with_libspectrum_prefix; LIBSPEC_CFLAGS=-I$withval/headers; LIBSPEC_LIBS=-L$withval/lib
else
LIBSPEC_CFLAGS=""; LIBSPEC_LIBS=""
fi
@@ -15954,14 +15954,10 @@ CPPFLAGS="$CPPFLAGS $LIBSPEC_CFLAGS $GTK_CFLAGS $GLIB_CFLAGS"
for ac_header in libspectrum.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "libspectrum.h" "ac_cv_header_libspectrum_h" "$ac_includes_default"
-if test "x$ac_cv_header_libspectrum_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBSPECTRUM_H 1
_ACEOF
LIBSPEC_LIBS="$LIBSPEC_LIBS -lspectrum"
-else
- as_fn_error $? "Sorry - I need libspectrum to be available" "$LINENO" 5
-fi
done
--
2.13.1