summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2014-05-11 12:19:42 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2014-05-11 12:19:42 +0900
commitc1a1b2a176d01fb9db2630a01736c5d39b5b2e68 (patch)
tree74199763708059479d93b53dcf69242ac663abcb
parent8c0324af159f4e316244585f5299e48704de4c35 (diff)
downloadtdegames-c1a1b2a176d01fb9db2630a01736c5d39b5b2e68.tar.gz
tdegames-c1a1b2a176d01fb9db2630a01736c5d39b5b2e68.zip
Fixed FTBFS on Slackware. This resolves bug 2046.
-rw-r--r--kpat/freecell-solver/Makefile.lite2
-rw-r--r--kpat/freecell-solver/caas.c4
-rw-r--r--kpat/freecell-solver/inline.h20
-rw-r--r--kpat/freecell-solver/move.c4
-rw-r--r--kpat/freecell-solver/ms_ca.h4
-rw-r--r--kpat/freecell-solver/rand.h6
6 files changed, 7 insertions, 33 deletions
diff --git a/kpat/freecell-solver/Makefile.lite b/kpat/freecell-solver/Makefile.lite
index 2a6248eb..aacf557a 100644
--- a/kpat/freecell-solver/Makefile.lite
+++ b/kpat/freecell-solver/Makefile.lite
@@ -7,7 +7,7 @@ DLFLAGS =
END_OLFLAGS =
END_DLFLAGS =
-INCLUDES = alloc.h app_str.h caas.h card.h cl_chop.h fcs_config.h fcs_cl.h fcs.h fcs_dm.h fcs_enums.h fcs_hash.h fcs_isa.h fcs_move.h fcs_user.h inline.h jhjtypes.h lookup2.h move.h ms_ca.h prefix.h pqueue.h preset.h rand.h state.h test_arr.h tests.h
+INCLUDES = alloc.h app_str.h caas.h card.h cl_chop.h fcs_config.h fcs_cl.h fcs.h fcs_dm.h fcs_enums.h fcs_hash.h fcs_isa.h fcs_move.h fcs_user.h jhjtypes.h lookup2.h move.h ms_ca.h prefix.h pqueue.h preset.h rand.h state.h test_arr.h tests.h
TARGETS = fc-solve
diff --git a/kpat/freecell-solver/caas.c b/kpat/freecell-solver/caas.c
index 82492f34..062e2659 100644
--- a/kpat/freecell-solver/caas.c
+++ b/kpat/freecell-solver/caas.c
@@ -285,7 +285,7 @@
#endif
#ifdef INDIRECT_STACK_STATES
-static GCC_INLINE void freecell_solver_cache_stacks(
+static inline void freecell_solver_cache_stacks(
freecell_solver_hard_thread_t * hard_thread,
fcs_state_with_locations_t * new_state
)
@@ -498,7 +498,7 @@ guint freecell_solver_hash_function(gconstpointer key)
*
* */
-GCC_INLINE int freecell_solver_check_and_add_state(
+inline int freecell_solver_check_and_add_state(
freecell_solver_soft_thread_t * soft_thread,
fcs_state_with_locations_t * new_state,
fcs_state_with_locations_t * * existing_state
diff --git a/kpat/freecell-solver/inline.h b/kpat/freecell-solver/inline.h
deleted file mode 100644
index 81f4f8e1..00000000
--- a/kpat/freecell-solver/inline.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * inline.h - the purpose of this file is to define the GCC_INLINE
- * macro.
- *
- * Written by Shlomi Fish, 2002
- *
- * This file is in the public domain (it's uncopyrighted).
- * */
-
-#ifndef FC_SOLVE__INLINE_H
-#define FC_SOLVE__INLINE_H
-
-#if defined(__GNUC__)
-#define GCC_INLINE __inline__
-#else
-#define GCC_INLINE
-#endif
-
-
-#endif
diff --git a/kpat/freecell-solver/move.c b/kpat/freecell-solver/move.c
index aa8ed560..6ea0b125 100644
--- a/kpat/freecell-solver/move.c
+++ b/kpat/freecell-solver/move.c
@@ -16,8 +16,6 @@
#include "dmalloc.h"
#endif
-#include "inline.h"
-
#if 0
/* This variable was used for debugging. */
int msc_counter=0;
@@ -369,7 +367,7 @@ void freecell_solver_move_stack_normalize(
freecell_solver_move_stack_swallow_stack(moves, temp_moves);
}
-GCC_INLINE int convert_freecell_num(int fcn)
+static inline int convert_freecell_num(int fcn)
{
if (fcn >= 7)
return (fcn+3);
diff --git a/kpat/freecell-solver/ms_ca.h b/kpat/freecell-solver/ms_ca.h
index 5c1b44ec..49c8124d 100644
--- a/kpat/freecell-solver/ms_ca.h
+++ b/kpat/freecell-solver/ms_ca.h
@@ -7,9 +7,7 @@
* This file is in the public domain (it's uncopyrighted).
* */
-#include "inline.h"
-
-static GCC_INLINE fcs_move_stack_t * freecell_solver_move_stack_compact_allocate(freecell_solver_hard_thread_t * hard_thread, fcs_move_stack_t * old_move_stack_to_parent)
+static inline fcs_move_stack_t * freecell_solver_move_stack_compact_allocate(freecell_solver_hard_thread_t * hard_thread, fcs_move_stack_t * old_move_stack_to_parent)
{
char * ptr;
fcs_move_stack_t * new_move_stack_to_parent;
diff --git a/kpat/freecell-solver/rand.h b/kpat/freecell-solver/rand.h
index 0cecfafd..6ee5edfb 100644
--- a/kpat/freecell-solver/rand.h
+++ b/kpat/freecell-solver/rand.h
@@ -6,8 +6,6 @@
extern "C" {
#endif
-#include "inline.h"
-
struct fcs_rand_struct
{
unsigned long seed;
@@ -20,7 +18,7 @@ extern void freecell_solver_rand_free(fcs_rand_t * rand);
extern void freecell_solver_rand_srand(fcs_rand_t * rand, unsigned int seed);
-static GCC_INLINE int freecell_solver_rand_rand15(fcs_rand_t * rand)
+static inline int freecell_solver_rand_rand15(fcs_rand_t * rand)
{
rand->seed = (rand->seed * 214013 + 2531011);
return (rand->seed >> 16) & 0x7fff;
@@ -32,7 +30,7 @@ static GCC_INLINE int freecell_solver_rand_rand15(fcs_rand_t * rand)
* 15-bit ones.
*
* */
-static GCC_INLINE int freecell_solver_rand_get_random_number(fcs_rand_t * rand)
+static inline int freecell_solver_rand_get_random_number(fcs_rand_t * rand)
{
int one, two;
one = freecell_solver_rand_rand15(rand);