- Fix portability issues with config.h header. Now it is

included by the compiler (via a flag) and the visibility
macros have been moved to a separate header. You'll
probably need to cleanup your source dir and re-run autogen.sh
before compiling sgpem again.


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1191 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-09-16 13:34:43 +00:00
parent 74a2d8ff91
commit d128ee8608
118 changed files with 171 additions and 393 deletions

View file

@ -21,7 +21,7 @@
#ifndef CONCRETE_ENVIRONMENT_HH
#define CONCRETE_ENVIRONMENT_HH 1
#include "config.h"
#include <sgpemv2/environment.hh>
#include <sgpemv2/resource.hh>
#include "dynamic_process.hh"

View file

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "config.h"
#include "dynamic_process.hh"
#include "dynamic_thread.hh"

View file

@ -21,7 +21,7 @@
#ifndef CONCRETE_HISTORY_HH
#define CONCRETE_HISTORY_HH 1
#include "config.h"
#include "concrete_environment.hh"
#include "dynamic_process.hh"

View file

@ -21,7 +21,7 @@
#ifndef CONCRETE_PROCESS_STATISTICS_HH
#define CONCRETE_PROCESS_STATISTICS_HH 1
#include "config.h"
#include <sgpemv2/process_statistics.hh>
#include <sgpemv2/thread_statistics.hh>

View file

@ -21,7 +21,7 @@
#ifndef CONCRETE_SIMULATION_HH
#define CONCRETE_SIMULATION_HH 1
#include "config.h"
#include <sgpemv2/simulation.hh>
#include "concrete_history.hh"

View file

@ -21,7 +21,7 @@
#ifndef CONCRETE_SIMULATION_STATISTICS_HH
#define CONCRETE_SIMULATION_STATISTICS_HH 1
#include "config.h"
#include <sgpemv2/simulation_statistics.hh>
#include "concrete_process_statistics.hh"

View file

@ -21,7 +21,7 @@
#ifndef CONCRETE_STATISTICS_HH
#define CONCRETE_STATISTICS_HH 1
#include "config.h"
#include <sgpemv2/statistics.hh>
#include "concrete_process_statistics.hh"

View file

@ -21,7 +21,7 @@
#ifndef CONCRETE_THREAD_STATISTICS_HH
#define CONCRETE_THREAD_STATISTICS_HH 1
#include "config.h"
#include <sgpemv2/thread_statistics.hh>

View file

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "config.h"
#include <sgpemv2/cpu_policies_gatekeeper.hh>
#include <sgpemv2/cpu_policy_manager.hh>

View file

@ -21,7 +21,7 @@
#ifndef DYNAMIC_PROCESS_HH
#define DYNAMIC_PROCESS_HH 1
#include "config.h"
#include "gettext.h"
#include <sgpemv2/process.hh>

View file

@ -21,7 +21,7 @@
#ifndef DYNAMIC_REQUEST_HH
#define DYNAMIC_REQUEST_HH 1
#include "config.h"
#include <sgpemv2/request.hh>
#include "static_request.hh"

View file

@ -21,7 +21,7 @@
#ifndef DYNAMIC_RESOURCE_HH
#define DYNAMIC_RESOURCE_HH 1
#include "config.h"
#include "glibmm/ustring.h"
#include <sgpemv2/templates/smartp.hh>

View file

@ -21,7 +21,7 @@
#ifndef DYNAMIC_SCHEDULABLE_HH
#define DYNAMIC_SCHEDULABLE_HH 1
#include "config.h"
#include <sgpemv2/schedulable.hh>
#include "static_schedulable.hh"

View file

@ -21,7 +21,7 @@
#ifndef DYNAMIC_SUB_REQUEST_HH
#define DYNAMIC_SUB_REQUEST_HH 1
#include "config.h"
#include <sgpemv2/request.hh>
#include <sgpemv2/sub_request.hh>

View file

@ -21,7 +21,7 @@
#ifndef DYNAMIC_THREAD_HH
#define DYNAMIC_THREAD_HH 1
#include "config.h"
#include "gettext.h"
#include "glibmm/ustring.h"
#include <vector>

View file

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "config.h"
#include "gettext.h"
#include <glib/gstdio.h>

View file

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "config.h"
#include <sgpemv2/history.hh>
#include <sgpemv2/history_observer.hh>

View file

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "config.h"
#include <sgpemv2/invalid_plugin_exception.hh>

View file

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "config.h"
#include <sgpemv2/key_file.hh>
#include <fstream>
#include <string.h>

View file

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "config.h"
#include <sgpemv2/module.hh>

View file

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "config.h"
#include <sgpemv2/plugin_manager.hh>
#include <sgpemv2/module.hh>

View file

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "config.h"
#include "gettext.h"
#include <sgpemv2/ready_queue.hh>

View file

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "config.h"
#include <sgpemv2/resource_policies_gatekeeper.hh>
#include <sgpemv2/resource_policy_manager.hh>

View file

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "config.h"
#include <sgpemv2/serializer_error.hh>

View file

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "config.h"
#include <sgpemv2/serializers_gatekeeper.hh>
#include <sgpemv2/serializer.hh>

View file

@ -28,7 +28,7 @@ namespace sgpem
class History;
}
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <vector>
#include <map>

View file

@ -21,7 +21,7 @@
#ifndef CPU_POLICY_HH
#define CPU_POLICY_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include "gettext.h"
#include "glibmm/ustring.h"

View file

@ -25,7 +25,7 @@
#ifndef CPU_POLICY_EXCEPTION
#define CPU_POLICY_EXCEPTION 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <stdexcept>

View file

@ -26,7 +26,7 @@ namespace sgpem
class CPUPolicyManager;
}
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <sgpemv2/cpu_policy.hh>

View file

@ -26,7 +26,7 @@ namespace sgpem
class ResourcePolicy;
}
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <sgpemv2/resource_policy_manager.hh>

View file

@ -21,7 +21,7 @@
#ifndef ENVIRONMENT_HH
#define ENVIRONMENT_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <sgpemv2/sub_request.hh>

View file

@ -21,7 +21,7 @@
#ifndef GLOBAL_PREFERENCES_HH
#define GLOBAL_PREFERENCES_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <glibmm/fileutils.h>
#include <glibmm/ustring.h>

View file

@ -21,7 +21,7 @@
#ifndef HISTORY_HH
#define HISTORY_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <sgpemv2/environment.hh>

View file

@ -21,7 +21,7 @@
#ifndef HISTORY_OBSERVER_HH
#define HISTORY_OBSERVER_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
namespace sgpem
{

View file

@ -21,7 +21,7 @@
#ifndef INVALID_PLUGIN_EXCEPTION_HH
#define INVALID_PLUGIN_EXCEPTION_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <stdexcept>

View file

@ -26,7 +26,7 @@ namespace sgpem
class KeyFile;
}
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <glibmm/ustring.h>

View file

@ -25,7 +25,7 @@
#ifndef MALFORMED_POLICY_EXCEPTION
#define MALFORMED_POLICY_EXCEPTION 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <sgpemv2/cpu_policy_exception.hh>

View file

@ -21,7 +21,7 @@
#ifndef MODULE_HH
#define MODULE_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <sgpemv2/invalid_plugin_exception.hh>

View file

@ -25,7 +25,7 @@
#ifndef NULL_POLICY_EXCEPTION
#define NULL_POLICY_EXCEPTION 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <stdexcept>

View file

@ -21,7 +21,7 @@
#ifndef SGPEMV2__PLUGIN_HH
#define SGPEMV2__PLUGIN_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#ifdef __cplusplus
extern "C"

View file

@ -26,7 +26,7 @@ namespace sgpem
class Module;
}
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <sgpemv2/templates/singleton.hh>

View file

@ -21,7 +21,7 @@
#ifndef POLICY_PARAMETERS_HH
#define POLICY_PARAMETERS_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <map>
#include <stdexcept>

View file

@ -21,7 +21,7 @@
#ifndef PROCESS_HH
#define PROCESS_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include "glibmm/ustring.h"
#include <vector>

View file

@ -21,7 +21,7 @@
#ifndef PROCESS_STATISTICS_HH
#define PROCESS_STATISTICS_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <sgpemv2/schedulable_statistics.hh>
#include <sgpemv2/thread_statistics.hh>

View file

@ -21,7 +21,7 @@
#ifndef READY_QUEUE_HH
#define READY_QUEUE_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <stdexcept>
#include <vector>

View file

@ -29,7 +29,7 @@ namespace sgpem
class Thread;
}
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <vector>
namespace sgpem

View file

@ -21,7 +21,7 @@
#ifndef RESOURCE_HH
#define RESOURCE_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include "glibmm/ustring.h"
namespace sgpem

View file

@ -28,7 +28,7 @@ namespace sgpem
class History;
}
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <vector>
#include <map>

View file

@ -21,7 +21,7 @@
#ifndef RESOURCE_POLICY_HH
#define RESOURCE_POLICY_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include "gettext.h"
#include "glibmm/ustring.h"

View file

@ -21,7 +21,7 @@
#ifndef RESOURCE_POLICY_FIFO_HH
#define RESOURCE_POLICY_FIFO_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include "gettext.h"
#include "glibmm/ustring.h"

View file

@ -21,7 +21,7 @@
#ifndef RESOURCE_POLICY_LIFO_HH
#define RESOURCE_POLICY_LIFO_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include "gettext.h"
#include "glibmm/ustring.h"

View file

@ -26,7 +26,7 @@ namespace sgpem
class ResourcePolicy;
}
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <vector>

View file

@ -21,7 +21,7 @@
#ifndef RESOURCE_POLICY_PRIORITY_HH
#define RESOURCE_POLICY_PRIORITY_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include "gettext.h"
#include "glibmm/ustring.h"

View file

@ -26,7 +26,7 @@ namespace sgpem
class ResourcePolicyPriorityInheritance;
}
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include "gettext.h"
#include <sgpemv2/resource_policy.hh>

View file

@ -21,7 +21,7 @@
#ifndef SCHEDULABLE_HH
#define SCHEDULABLE_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <glibmm/ustring.h>

View file

@ -21,7 +21,7 @@
#ifndef SCHEDULABLE_STATISTICS_HH
#define SCHEDULABLE_STATISTICS_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include "schedulable.hh"
#include <glibmm/ustring.h>

View file

@ -26,7 +26,7 @@ namespace sgpem
class CPUPolicy;
}
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <sgpemv2/history.hh>
#include <sgpemv2/cpu_policy.hh>

View file

@ -32,7 +32,7 @@ namespace sgpem
class SubRequest;
}
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <sgpemv2/serializer_error.hh>

View file

@ -21,7 +21,7 @@
#ifndef SERIALIZER_HH
#define SERIALIZER_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <sgpemv2/history.hh>
#include <sgpemv2/serializer_error.hh>

View file

@ -21,7 +21,7 @@
#ifndef SERIALIZER_ERROR_HH
#define SERIALIZER_ERROR_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <stdexcept>

View file

@ -26,7 +26,7 @@ namespace sgpem
class Serializer;
}
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <vector>

View file

@ -0,0 +1,32 @@
// Visibility macros for GNU GCC
#if defined __GNUC__ && (__GNUC__) >= 4
/* Attribute for objects to be exported from DSOs */
#define SG_DLLEXPORT __attribute__ ((visibility("default")))
/* Attribute for objects to be imported from DSOs */
#define SG_DLLIMPORT /* intentionally left with no value */
/* Attribute for objects local to current DSO */
#define SG_DLLLOCAL __attribute__ ((visibility("hidden")))
/* Attribute for DSO public objects */
#define SG_DLLPUBLIC __attribute__ ((visibility("default")))
#else
/* Attribute for objects to be exported from DSOs */
#define SG_DLLEXPORT /* Unsupported */
/* Attribute for objects to be imported from DSOs */
#define SG_DLLIMPORT /* Unsupported */
/* Attribute for objects local to current DSO */
#define SG_DLLLOCAL /* Unsupported */
/* Attribute for DSO public objects */
#define SG_DLLPUBLIC /* Unsupported */
#endif

View file

@ -29,7 +29,7 @@ namespace sgpem
class SimulationObserver;
}
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <sgpemv2/history.hh>
#include <sgpemv2/templates/singleton.hh>
#include <sgpemv2/cpu_policy_exception.hh>

View file

@ -21,7 +21,7 @@
#ifndef SIMULATION_OBSERVER_HH
#define SIMULATION_OBSERVER_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
namespace sgpem
{

View file

@ -21,7 +21,7 @@
#ifndef SIMULATION_STATISTICS_HH
#define SIMULATION_STATISTICS_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
namespace sgpem

View file

@ -21,7 +21,7 @@
#ifndef STATISTICS_HH
#define STATISTICS_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <sgpemv2/templates/singleton.hh>
#include <sgpemv2/process_statistics.hh>
#include <sgpemv2/simulation_statistics.hh>

View file

@ -21,7 +21,7 @@
#ifndef STRING_UTILS_HH
#define STRING_UTILS_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <sstream>
#include <iostream>
#include <vector>

View file

@ -21,7 +21,7 @@
#ifndef SUB_REQUEST_HH
#define SUB_REQUEST_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <sgpemv2/request.hh>

View file

@ -20,7 +20,7 @@
#define SINGLETON_HH 1
#include <glibmm/thread.h>
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
namespace sgpem
{

View file

@ -21,7 +21,7 @@
#ifndef THREAD_HH
#define THREAD_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <vector>
#include <sgpemv2/schedulable.hh>

View file

@ -21,7 +21,7 @@
#ifndef THREAD_STATISTICS_HH
#define THREAD_STATISTICS_HH 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <sgpemv2/schedulable_statistics.hh>
#include <sgpemv2/thread.hh>

View file

@ -25,7 +25,7 @@
#ifndef USER_INTERRUPT_EXCEPTION
#define USER_INTERRUPT_EXCEPTION 1
#include "config.h"
#include <sgpemv2/sgpemv2-visibility.hh>
#include <sgpemv2/cpu_policy_exception.hh>
#include <stdexcept>

View file

@ -18,7 +18,7 @@
// along with SGPEMv2; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "config.h"
#include <sgpemv2/simulation.hh>
#include <sgpemv2/simulation_observer.hh>

View file

@ -21,7 +21,7 @@
#ifndef STATIC_PROCESS_HH
#define STATIC_PROCESS_HH 1
#include "config.h"
#include "static_schedulable.hh"
#include "static_thread.hh"
@ -38,7 +38,7 @@ namespace sgpem
It IS a Schedulable object.
*/
class SG_DLLLOCAL StaticProcess : public StaticSchedulable
class StaticProcess : public StaticSchedulable
{
public:
/** \brief Creates a new object with the given parameters. */

View file

@ -23,7 +23,7 @@
#include "static_thread.hh"
#include "config.h"
#include "glibmm/ustring.h"
namespace sgpem
@ -31,7 +31,7 @@ namespace sgpem
class StaticRequest;
class SerializeVisitor;
class SG_DLLLOCAL StaticRequest
class StaticRequest
{
public:
StaticRequest(StaticThread* thread, unsigned int instant);

View file

@ -21,7 +21,7 @@
#ifndef STATIC_RESOURCE_HH
#define STATIC_RESOURCE_HH 1
#include "config.h"
#include "glibmm/ustring.h"
namespace sgpem
@ -29,7 +29,7 @@ namespace sgpem
class StaticResource;
class SerializeVisitor;
class SG_DLLLOCAL StaticResource
class StaticResource
{
public:
StaticResource(const Glib::ustring& name, unsigned int places = 1);

View file

@ -21,7 +21,7 @@
#ifndef STATIC_SCHEDULABLE_HH
#define STATIC_SCHEDULABLE_HH 1
#include "config.h"
#include "glibmm/ustring.h"
namespace sgpem
@ -38,7 +38,7 @@ namespace sgpem
*
* \see DynamicSchedulable
*/
class SG_DLLLOCAL StaticSchedulable
class StaticSchedulable
{
public:
/** \brief Create a new object with the given parameters */

View file

@ -21,7 +21,7 @@
#ifndef STATIC_SUB_REQUEST_HH
#define STATIC_SUB_REQUEST_HH 1
#include "config.h"
#include <sgpemv2/sub_request.hh>
@ -31,7 +31,7 @@ namespace sgpem
class StaticRequest;
class StaticResource;
class SG_DLLLOCAL StaticSubRequest
class StaticSubRequest
{
public:
typedef SubRequest::resource_key_t resource_key_t;

View file

@ -24,7 +24,7 @@
#include "static_process.hh"
#include "static_schedulable.hh"
#include "config.h"
#include "gettext.h"
#include <glibmm/ustring.h>
@ -37,7 +37,7 @@ namespace sgpem
class StaticThread;
class StaticRequest;
class SG_DLLLOCAL StaticThread : public StaticSchedulable
class StaticThread : public StaticSchedulable
{
public:
StaticThread(const Glib::ustring& name,

0
src/backend/statistics.cc Executable file → Normal file
View file