From 3491b61048bed93145316abb0932d6c35e4114ea Mon Sep 17 00:00:00 2001 From: joerg Date: Tue, 3 Jul 2012 18:41:58 +0000 Subject: Fix build with compilers implementing C99 inline semantics --- games/freesci/distinfo | 4 +++- games/freesci/patches/patch-src_engine_klists.c | 22 ++++++++++++++++++ games/freesci/patches/patch-src_sound_fmopl.c | 31 +++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 games/freesci/patches/patch-src_engine_klists.c create mode 100644 games/freesci/patches/patch-src_sound_fmopl.c diff --git a/games/freesci/distinfo b/games/freesci/distinfo index c46cc71b448..f1f817bf058 100644 --- a/games/freesci/distinfo +++ b/games/freesci/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.5 2007/04/05 20:47:10 dillo Exp $ +$NetBSD: distinfo,v 1.6 2012/07/03 18:41:58 joerg Exp $ SHA1 (freesci-0.3.5.tar.gz) = 4773fa34df8d4108a5116eca4626a4ce32a62b1f RMD160 (freesci-0.3.5.tar.gz) = 2d306102a09cb9b6c0327a88938d39f049dfc0e6 @@ -9,3 +9,5 @@ SHA1 (patch-ac) = b1d01703301dffb233e1c300a8717785b224c3e9 SHA1 (patch-ad) = f413de3289ac2a424d5ee35de62a78a5dcef7e35 SHA1 (patch-ae) = 137ec032ad33e647ea4ecf80955ad8916e8dd383 SHA1 (patch-af) = a2897fcf2d3526797c3cef3ce9003b071d2125be +SHA1 (patch-src_engine_klists.c) = 3ebfdc1c39643586491482dc688831786e06bfd3 +SHA1 (patch-src_sound_fmopl.c) = 6b6562317d7dfe84e085564dd6351c25cf427630 diff --git a/games/freesci/patches/patch-src_engine_klists.c b/games/freesci/patches/patch-src_engine_klists.c new file mode 100644 index 00000000000..d4a310f2ed9 --- /dev/null +++ b/games/freesci/patches/patch-src_engine_klists.c @@ -0,0 +1,22 @@ +$NetBSD: patch-src_engine_klists.c,v 1.1 2012/07/03 18:41:58 joerg Exp $ + +--- src/engine/klists.c.orig 2012-07-03 15:42:02.000000000 +0000 ++++ src/engine/klists.c +@@ -98,7 +98,7 @@ kNewList(state_t *s, int funct_nr, int a + } + + +-inline heap_ptr ++static inline heap_ptr + _k_new_node(state_t *s, int value, int key) + { + heap_ptr nodebase = heap_allocate(s->_heap, 8); +@@ -127,7 +127,7 @@ kNewNode(state_t *s, int funct_nr, int a + } + + +-inline void ++static inline void + _k_add_to_end(state_t *s, heap_ptr listbase, heap_ptr nodebase) + { + heap_ptr old_lastnode = GET_HEAP(listbase + LIST_LAST_NODE); diff --git a/games/freesci/patches/patch-src_sound_fmopl.c b/games/freesci/patches/patch-src_sound_fmopl.c new file mode 100644 index 00000000000..2d6b36b746c --- /dev/null +++ b/games/freesci/patches/patch-src_sound_fmopl.c @@ -0,0 +1,31 @@ +$NetBSD: patch-src_sound_fmopl.c,v 1.1 2012/07/03 18:41:58 joerg Exp $ + +--- src/sound/fmopl.c.orig 2012-07-03 15:42:31.000000000 +0000 ++++ src/sound/fmopl.c +@@ -380,7 +380,7 @@ INLINE void CALC_FCSLOT(OPL_CH *CH, OPL_ + } + + /* set multi,am,vib,EG-TYP,KSR,mul */ +-INLINE void set_mul(FM_OPL *OPL, int slot, int v) { ++static INLINE void set_mul(FM_OPL *OPL, int slot, int v) { + OPL_CH *CH = &OPL->P_CH[slot / 2]; + OPL_SLOT *SLOT = &CH->SLOT[slot & 1]; + +@@ -443,7 +443,7 @@ INLINE void set_sl_rr(FM_OPL *OPL, int s + /* operator output calcrator */ + #define OP_OUT(slot,env,con) slot->wavetable[((slot->Cnt + con) / (0x1000000 / SIN_ENT)) & (SIN_ENT-1)][env] + /* ---------- calcrate one of channel ---------- */ +-INLINE void OPL_CALC_CH(OPL_CH *CH) { ++static INLINE void OPL_CALC_CH(OPL_CH *CH) { + guint32 env_out; + OPL_SLOT *SLOT; + +@@ -486,7 +486,7 @@ INLINE void OPL_CALC_CH(OPL_CH *CH) { + + /* ---------- calcrate rythm block ---------- */ + #define WHITE_NOISE_db 6.0 +-INLINE void OPL_CALC_RH(OPL_CH *CH) { ++static INLINE void OPL_CALC_RH(OPL_CH *CH) { + guint32 env_tam, env_sd, env_top, env_hh; + int whitenoise = (int)((rand()&1) * (WHITE_NOISE_db / EG_STEP)); + int tone8; -- cgit v1.2.3