From d0c5158f5bac7cdd584a9364054cea933721bc0a Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Thu, 13 Aug 2009 00:47:55 +0000 Subject: [PATCH] eina hamster++ weird, undefined refernce to eina_cpu_count you have no cpus! dammit! try eina_hamster_count lo oh god now u did it i have to add that heheheh SVN revision: 41727 --- legacy/eina/src/include/Eina.h | 1 + legacy/eina/src/include/Makefile.am | 3 +- legacy/eina/src/include/eina_hamster.h | 44 ++++++++++++++ legacy/eina/src/lib/Makefile.am | 3 +- legacy/eina/src/lib/eina_hamster.c | 82 ++++++++++++++++++++++++++ 5 files changed, 131 insertions(+), 2 deletions(-) create mode 100644 legacy/eina/src/include/eina_hamster.h create mode 100644 legacy/eina/src/lib/eina_hamster.c diff --git a/legacy/eina/src/include/Eina.h b/legacy/eina/src/include/Eina.h index 997e0d476e..d953d5055d 100644 --- a/legacy/eina/src/include/Eina.h +++ b/legacy/eina/src/include/Eina.h @@ -166,6 +166,7 @@ extern "C" { #include "eina_convert.h" #include "eina_cpu.h" #include "eina_tiler.h" +#include "eina_hamster.h" #ifdef __cplusplus } diff --git a/legacy/eina/src/include/Makefile.am b/legacy/eina/src/include/Makefile.am index c02a04d565..e0dc39aa52 100644 --- a/legacy/eina/src/include/Makefile.am +++ b/legacy/eina/src/include/Makefile.am @@ -33,7 +33,8 @@ eina_trash.h \ eina_iterator.h \ eina_main.h \ eina_cpu.h \ -eina_tiler.h +eina_tiler.h \ +eina_hamster.h installed_mainheaderdir = $(includedir)/eina-@VMAJ@ dist_installed_mainheader_DATA = Eina.h eina_config.h diff --git a/legacy/eina/src/include/eina_hamster.h b/legacy/eina/src/include/eina_hamster.h new file mode 100644 index 0000000000..84682ce0d1 --- /dev/null +++ b/legacy/eina/src/include/eina_hamster.h @@ -0,0 +1,44 @@ +/* EINA - EFL data type library + * Copyright (C) 2008 Cedric Bail + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; + * if not, see . + */ + +#ifndef EINA_HAMSTER_H_ +#define EINA_HAMSTER_H_ + +/** + * @addtogroup Eina_Core_Group Core + * + * @{ + */ + +/** + * @defgroup Eina_Main_Group Hamster + * + * @{ + */ + +EAPI int eina_hamster_count(void); + +/** + * @} + */ + +/** + * @} + */ + +#endif /* EINA_HAMSTER_H_ */ diff --git a/legacy/eina/src/lib/Makefile.am b/legacy/eina/src/lib/Makefile.am index 9076b2054b..5aebda5d67 100644 --- a/legacy/eina/src/lib/Makefile.am +++ b/legacy/eina/src/lib/Makefile.am @@ -32,7 +32,8 @@ eina_benchmark.c \ eina_rectangle.c \ eina_stringshare.c \ eina_cpu.c \ -eina_tiler.c +eina_tiler.c \ +eina_hamster.c if EINA_STATIC_BUILD_CHAINED_POOL diff --git a/legacy/eina/src/lib/eina_hamster.c b/legacy/eina/src/lib/eina_hamster.c new file mode 100644 index 0000000000..7769b6d453 --- /dev/null +++ b/legacy/eina/src/lib/eina_hamster.c @@ -0,0 +1,82 @@ +/* EINA - EFL data type library + * Copyright (C) 2008 Cedric Bail + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; + * if not, see . + */ + +#include + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "eina_types.h" +#include "eina_main.h" +#include "eina_error.h" +#include "eina_hash.h" +#include "eina_stringshare.h" +#include "eina_list.h" +#include "eina_array.h" +#include "eina_counter.h" +#include "eina_benchmark.h" +#include "eina_magic.h" +#include "eina_rectangle.h" + +/*============================================================================* + * Local * + *============================================================================*/ + +/** + * @cond LOCAL + */ + +static int _eina_hamsters = 7; + +/** + * @endcond + */ + +/*============================================================================* + * Global * + *============================================================================*/ + +/*============================================================================* + * API * + *============================================================================*/ + +/** + * @addtogroup Eina_Main_Group Hamster + * + * @brief These functions provide hamster calls. + * + * @{ + */ + +/** + * @brief Get the hamster count. + * + * @return The number of available hamsters. + * + * This function returns how many hamsters you have. + */ +EAPI int +eina_hamster_count(void) +{ + return _eina_hamsters; +} + +/** + * @} + */