compbench-devel Mailing List for CompBenchmarks (Page 30)
Brought to you by:
xfred
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(48) |
Oct
(51) |
Nov
(66) |
Dec
(83) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(242) |
Feb
(56) |
Mar
(95) |
Apr
(120) |
May
(127) |
Jun
(32) |
Jul
(10) |
Aug
(55) |
Sep
(114) |
Oct
(3) |
Nov
|
Dec
|
From: Frederic T. <xf...@us...> - 2007-01-22 18:13:05
|
Update of /cvsroot/compbench/CompBenchmarks++/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv15946 Removed Files: Compiler-Options.cpp Compiler-Options.h Compiler.cpp Compiler.h Makefile.am Log Message: libcompbenchmarks moved in a separate directory. --- Compiler.h DELETED --- --- Makefile.am DELETED --- --- Compiler-Options.h DELETED --- --- Compiler.cpp DELETED --- --- Compiler-Options.cpp DELETED --- |
From: Frederic T. <xf...@us...> - 2007-01-22 18:13:05
|
Update of /cvsroot/compbench/CompBenchmarks++/Compiler/Compiler-TCC In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv15946/Compiler-TCC Removed Files: Compiler-TCC.cpp Compiler-TCC.h Makefile.am Log Message: libcompbenchmarks moved in a separate directory. --- Compiler-TCC.h DELETED --- --- Makefile.am DELETED --- --- Compiler-TCC.cpp DELETED --- |
From: Frederic T. <xf...@us...> - 2007-01-22 18:11:26
|
Update of /cvsroot/compbench/CompBenchmarks++/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv15515 Removed Files: Benchmark-Autotools.cpp Benchmark-Autotools.h Benchmark-DLLoader.cpp Benchmark-DLLoader.h Benchmark-xZIP.cpp Benchmark-xZIP.h Benchmark.cpp Benchmark.h Makefile.am Package.cpp Package.h Log Message: libcompbenchmarks moved in a separate directory. --- Benchmark.h DELETED --- --- Benchmark-DLLoader.cpp DELETED --- --- Package.h DELETED --- --- Benchmark-xZIP.cpp DELETED --- --- Benchmark.cpp DELETED --- --- Makefile.am DELETED --- --- Benchmark-xZIP.h DELETED --- --- Benchmark-DLLoader.h DELETED --- --- Package.cpp DELETED --- --- Benchmark-Autotools.cpp DELETED --- --- Benchmark-Autotools.h DELETED --- |
From: Frederic T. <xf...@us...> - 2007-01-22 18:10:07
|
Update of /cvsroot/compbench/CompBenchmarks++/share In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv15060 Removed Files: Makefile.am Log Message: libcompbenchmarks moved in a separate directory. --- Makefile.am DELETED --- |
From: Frederic T. <xf...@us...> - 2007-01-22 18:09:58
|
Update of /cvsroot/compbench/CompBenchmarks++/share/patches In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv15060/patches Removed Files: Makefile.am benchpp.patch.gz scimark2.patch.gz Log Message: libcompbenchmarks moved in a separate directory. --- Makefile.am DELETED --- --- scimark2.patch.gz DELETED --- --- benchpp.patch.gz DELETED --- |
From: Frederic T. <xf...@us...> - 2007-01-22 18:09:18
|
Update of /cvsroot/compbench/CompBenchmarks++/share/system In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv14880 Removed Files: Makefile.am Log Message: libcompbenchmarks moved in a separate directory. --- Makefile.am DELETED --- |
From: Frederic T. <xf...@us...> - 2007-01-22 18:09:12
|
Update of /cvsroot/compbench/CompBenchmarks++/share/system/cygwin In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv14880/cygwin Removed Files: Makefile.am systemInfo.vbs Log Message: libcompbenchmarks moved in a separate directory. --- Makefile.am DELETED --- --- systemInfo.vbs DELETED --- |
From: Frederic T. <xf...@us...> - 2007-01-22 18:08:18
|
Update of /cvsroot/compbench/CompBenchmarks++ In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv14554 Removed Files: CBM.h config.h.in libcompbenchmarks.cpp libcompbenchmarks.h Log Message: libcompbenchmarks moved in a separate directory. --- libcompbenchmarks.h DELETED --- --- CBM.h DELETED --- --- libcompbenchmarks.cpp DELETED --- --- config.h.in DELETED --- |
From: Frederic T. <xf...@us...> - 2007-01-22 18:07:18
|
Update of /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv14164 Modified Files: Makefile.am Log Message: libcompbenchmarks moved in a separate directory. Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 11 Jan 2007 20:11:38 -0000 1.3 --- Makefile.am 22 Jan 2007 18:07:12 -0000 1.4 *************** *** 1,3 **** ! # SupportedBenchmarks lib_LTLIBRARIES = libcompbenchmarks-bm-gzip.la \ --- 1,10 ---- ! # ----------------------------------------------------------------------------- ! # $Id$ ! # ! # This is free software. ! # For details, see the GNU Public License in the COPYING file, or ! # Look http://www.fsf.org ! # ----------------------------------------------------------------------------- ! lib_LTLIBRARIES = libcompbenchmarks-bm-gzip.la \ *************** *** 9,22 **** libcompbenchmarks-bm-linpackc.la ! ../libcompbenchmarks.la: ! make -C .. libcompbenchmarks.la ! ! libcompbenchmarks_bm_gzip_la_LIBADD = ../libcompbenchmarks.la ! libcompbenchmarks_bm_bzip2_la_LIBADD = ../libcompbenchmarks.la ! libcompbenchmarks_bm_nbench_la_LIBADD = ../libcompbenchmarks.la ! libcompbenchmarks_bm_scimark2_la_LIBADD = ../libcompbenchmarks.la ! libcompbenchmarks_bm_benchpp_la_LIBADD = ../libcompbenchmarks.la ! libcompbenchmarks_bm_benchpplinux_la_LIBADD = ../libcompbenchmarks.la ! libcompbenchmarks_bm_linpackc_la_LIBADD = ../libcompbenchmarks.la Benchmark-GZIP.cpp: $(top_srcdir)/SupportedBenchmarks/Benchmark-GZIP.libwrapper.h --- 16,26 ---- libcompbenchmarks-bm-linpackc.la ! libcompbenchmarks_bm_gzip_la_LIBADD = ../libcompbenchmarks/libcompbenchmarks.la ! libcompbenchmarks_bm_bzip2_la_LIBADD = ../libcompbenchmarks/libcompbenchmarks.la ! libcompbenchmarks_bm_nbench_la_LIBADD = ../libcompbenchmarks/libcompbenchmarks.la ! libcompbenchmarks_bm_scimark2_la_LIBADD = ../libcompbenchmarks/libcompbenchmarks.la ! libcompbenchmarks_bm_benchpp_la_LIBADD = ../libcompbenchmarks/libcompbenchmarks.la ! libcompbenchmarks_bm_benchpplinux_la_LIBADD = ../libcompbenchmarks/libcompbenchmarks.la ! libcompbenchmarks_bm_linpackc_la_LIBADD = ../libcompbenchmarks/libcompbenchmarks.la Benchmark-GZIP.cpp: $(top_srcdir)/SupportedBenchmarks/Benchmark-GZIP.libwrapper.h *************** *** 41,45 **** libcompbenchmarks_bm_linpackc_la_SOURCES = Benchmark-LINPACKC.cpp Benchmark-LINPACKC.h ! INCLUDES = -I $(top_srcdir) CBM_GENLIBWRAPPER = $(top_srcdir)/SupportedBenchmarks/benchmarks-genlibwrapper.pl --- 45,49 ---- libcompbenchmarks_bm_linpackc_la_SOURCES = Benchmark-LINPACKC.cpp Benchmark-LINPACKC.h ! INCLUDES = -I $(top_srcdir)/libcompbenchmarks -I $(top_srcdir) CBM_GENLIBWRAPPER = $(top_srcdir)/SupportedBenchmarks/benchmarks-genlibwrapper.pl |
From: Frederic T. <xf...@us...> - 2007-01-22 18:05:59
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv13405 Added Files: Makefile.am Log Message: libcompbenchmarks moved in a separate directory. --- NEW FILE: Makefile.am --- SUBDIRS = patches system |
From: Frederic T. <xf...@us...> - 2007-01-22 18:04:54
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/patches In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv13024 Added Files: Makefile.am benchpp.patch.gz scimark2.patch.gz Log Message: libcompbenchmarks moved in a separate directory. --- NEW FILE: Makefile.am --- data_DATA = scimark2.patch.gz benchpp.patch.gz datarootdir=@datarootdir@/compbenchmarks/@VERSION@/patches EXTRA_DIST = $(data_DATA) --- NEW FILE: scimark2.patch.gz --- (This appears to be a binary file; contents omitted.) --- NEW FILE: benchpp.patch.gz --- (This appears to be a binary file; contents omitted.) |
From: Frederic T. <xf...@us...> - 2007-01-22 18:03:59
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/system/cygwin In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12638/cygwin Added Files: Makefile.am systemInfo.vbs Log Message: libcompbenchmarks moved in a separate directory. --- NEW FILE: Makefile.am --- source_sys = systemInfo.vbs if CBM_SYSTEM_CYGWIN data_DATA = $(source_sys) endif datarootdir=@datarootdir@/compbenchmarks/@VERSION@/system EXTRA_DIST = $(source_sys) --- NEW FILE: systemInfo.vbs --- On Error Resume Next strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor",,48) Set n = 0 For Each objItem in colItems If (n=0) Then Wscript.Echo Trim(objItem.CurrentClockSpeed) Wscript.Echo Trim(objItem.L2CacheSize) Wscript.Echo Trim(objItem.Name) End if n=n+1 Next Wscript.Echo n |
From: Frederic T. <xf...@us...> - 2007-01-22 18:03:58
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/system In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12638 Added Files: Makefile.am Log Message: libcompbenchmarks moved in a separate directory. --- NEW FILE: Makefile.am --- SUBDIRS = cygwin |
From: Frederic T. <xf...@us...> - 2007-01-22 18:01:29
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/system/cygwin In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv11482/cygwin Log Message: Directory /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/system/cygwin added to the repository |
From: Frederic T. <xf...@us...> - 2007-01-22 17:58:24
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/patches In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv10633/patches Log Message: Directory /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/patches added to the repository |
From: Frederic T. <xf...@us...> - 2007-01-22 17:58:21
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/system In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv10633/system Log Message: Directory /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share/system added to the repository |
From: Frederic T. <xf...@us...> - 2007-01-22 17:51:34
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv7044 Added Files: Makefile.am System.cpp System-Cygwin.cpp System-Cygwin.h System-FreeBSD.cpp System-FreeBSD.h System.h System-Linux.cpp System-Linux.h System-Unix.cpp System-Unix.h Log Message: libcompbenchmarks moved in a separate directory. --- NEW FILE: System-Cygwin.cpp --- /* ---------------------------------------------------------------------------- $Id: System-Cygwin.cpp,v 1.1 2007/01/22 17:50:39 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #include <System/System-Cygwin.h> #include <string> #include <config.h> /* !!! */ SystemCygwin::SystemCygwin() : SystemUnix() { std::string cmd = "cscript.exe /nologo systemInfo.wmi"; exec(cmd, cache); } std::string SystemCygwin::processor_name(void) { std::string r = Split(cache, "\n", 2); Chomp(r); return(r); } std::string SystemCygwin::processor_mhz(void) { std::string r = Split(cache, "\n", 0); Chomp(r); return(r); } std::string SystemCygwin::processor_cache(void) { std::string r = Split(cache, "\n", 1); Chomp(r); return(r); } std::string SystemCygwin::processor_number(void) { std::string r = Split(cache, "\n", 3); Chomp(r); return(r); } SystemCygwin::~SystemCygwin() { } --- NEW FILE: System-Cygwin.h --- /* ---------------------------------------------------------------------------- $Id: System-Cygwin.h,v 1.1 2007/01/22 17:50:40 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef H_CBMSYSTEMCYGWIN #define H_CBMSYSTEMCYGWIN #include <System/System-Unix.h> namespace CBM { /** \brief Cygwin operating system support class. * * Implements a few methods not defined by SystemUnix to handle properly * Cygwin systems in CompBenchmarks. */ class SystemCygwin : public SystemUnix { private: std::string cache; protected: public: /** Constructor */ SystemCygwin(); /** Returns processor name * Uses WMI to get the name of the first installed processor. * \return Processor name, as clear text * \sa processor_number() */ virtual std::string processor_name(void); /** Returns processor speed * Uses WMI to get the speed, in MHz, of the first installed processor. * \return Processor speed in MHz, as clear text (integer returned) * \sa processor_number() */ virtual std::string processor_mhz(void); /** Returns processor cache * Uses WMI to get processor second level cache in Kb. Integer expected. * \return std::string coding (first) processor second level cache in Kb. */ virtual std::string processor_cache(void); /** Returns processors' number * Uses WMI to get information. * \return std::string coding the number of processors (physical and logical) on host */ virtual std::string processor_number(void); /** Virtual destructor */ virtual ~SystemCygwin(); }; } #endif --- NEW FILE: System-Linux.cpp --- /* ---------------------------------------------------------------------------- $Id: System-Linux.cpp,v 1.1 2007/01/22 17:50:41 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #include <System/System-Linux.h> #include <string> #include <config.h> /* !!! */ using namespace CBM; SystemLinux::SystemLinux() : SystemUnix() { } std::string SystemLinux::processor_name(void) { std::string r; r=exec0("cat /proc/cpuinfo | grep 'model name' | head -1 | cut -f2 -d':' | sed 's/^ //' 2> /dev/null"); Chomp(r); return(r); } std::string SystemLinux::processor_mhz(void) { std::string r = exec0("(cat /proc/cpuinfo | grep 'cpu MHz' | head -1 | cut -f2 -d':' | sed 's/^ //' | cut -f1 -d'.') 2> /dev/null"); Chomp(r); return(r); } std::string SystemLinux::processor_cache(void) { std::string r = exec0("(cat /proc/cpuinfo | grep 'cache size' | head -1 | cut -f2 -d':' | sed 's/^ //' | sed 's/KB//') 2> /dev/null"); Chomp(r); return(r); } std::string SystemLinux::processor_number(void) { std::string r = exec0("(cat /proc/cpuinfo | grep 'model name' | wc -l) 2> /dev/null"); Chomp(r); return(r); } SystemLinux::~SystemLinux() { } --- NEW FILE: System.h --- /* ---------------------------------------------------------------------------- $Id: System.h,v 1.1 2007/01/22 17:50:40 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef H_CBMSYSTEM #define H_CBMSYSTEM #include <vector> #include <string> #include <time.h> namespace CBM { /** Defines a vector of packages. */ typedef std::vector<std::string> PackageVector; /** \brief Operating system (and optionnaly hardware) abstraction layer. * * This class defines the base abstract (pure) object for all supported operating * systems. It may also introduces hardware-related dependencies. */ class System { public: /** Temporary directory. * Defines typedef used to query temporary directories used by CompBenchmarks. */ typedef enum Temp { Root, /*!< Root directory */ HostDep, /*!< Prefix for host-dependend directory */ Extract, /*!< Archive extraction temporary directory */ Patches, /*!< Directory holding patches */ OS, /*!< System specific material */ Download, /*!< Downloads temporary directory */ Status, /*!< Directory holding status of packages and * benchmarks */ Configuration /*!< Directory for configuration related * informations */ }; private: /** Check if the given directory holds patches. * Check if given arguments holds patches needed by libcompbenchmarks. * \param dir directory to check * \return non-null if ok. */ virtual int verifyPatchDirectory(std::string dir); protected: /** \sa Packages() */ PackageVector packages; /** Stores the last (shell) command executed by compbenchmarks library. */ std::string lastCommand; /** Stores the output of the last (shell) command executed by * compbenchmarks library. */ std::string lastCommandOutput; /** Constructor. */ System(); /** Virtual destructor */ virtual ~System(); /** External command execution. * Uses shell to execute command. * \param command shell command to execute * \return stdout dump * \sa exec() */ virtual std::string exec0(std::string& command); virtual std::string exec0(char *command); /** Checks a given directory. Directory is given according to its purpose in CompBenchmarks. \sa Temp \sa checkDirectory() \return 1 if ok. */ virtual int CheckDirectory(Temp where); public: /** Initialize for CompBenchmarks usage. * Checks for temporary directories. * \return 1 if ok. * \sa CheckDirectory() */ virtual int init(void); /** Get host ID * As hostid command does on UNIX. * \return Host ID as string.*/ virtual std::string hostid(void); /** Returns hostname * Returns the shortname. * \return hostname */ virtual std::string hostname(void); /** Returns operating system name * \return Operating system name (as uname command on UNIX) */ virtual std::string os(void); /** Returns operating system version * \return Operating system version (as uname -r command on most UNIXes) */ virtual std::string os_version(void); /** Returns processor name * Here we infer that each processor on the node are identical, which is the case * on x86 and compatible hardware. * \return Processor name, as clear text * \sa processor_number() */ virtual std::string processor_name(void); /** Returns processor speed * Processor speed in MHz. Integer expected. * \return std::string coding an integer matching the (first) processor speed, in MHz. */ virtual std::string processor_mhz(void); /** Returns processor cache * Processor second level cache in Kb. Integer expected. * \return std::string coding the (first) processor second level cache in Kb. */ virtual std::string processor_cache(void); /** Returns processors' number * \return std::string coding the number of processors (physical and logical) on host */ virtual std::string processor_number(void); /** Returns host's architecture. * As uname -m on UNIX. * \return Host's architecture */ virtual std::string arch(void); /** Give a list containing the compatible benchmarks * in declared directories. * \return a std::string list of benchmarks (id) * \sa Package() */ virtual PackageVector& packageList(int _force = 0); /** Get supported packages' number * \return integer * \sa Package() */ virtual int packageNumber(void); /** Get a package according to its index * \return Package instance * \sa packageNumber() */ virtual class Package *Package(int index); /** Get a package acoording to its internal identifier * \param pid std::string containing the package's identifier * \return CBMPackage instance * \sa packageList() */ virtual class Package *Package(std::string pid); /** Get a benchmark according to its internal identifier * \param bid std:string containing the benchmark's identifier * \return Benchmark instance */ virtual class Benchmark *Benchmark(std::string bid); /** Display informations about all packages * Used by compbenchmarks-core */ virtual void displayAllPackages(void); /** Display informations about all benchmarks * Used by compbenchmarks-core */ virtual void displayAllBenchmarks(void); /** Split a std::string. * Split given string as sub-strings, according to an arbitrary delimiter. * \param str string to split * \param delim delimiter * \param wantedIndex sub-string index */ virtual std::string Split(const std::string& str, const std::string& delim, unsigned int wantedIndex); /** Remove trailing line-feed (and carriage return) from specified string. * \param str the string */ virtual void Chomp(std::string& str); /** Describe host. * Displays informations about processors, OS, and so on. */ virtual void display(void); /** Describe external programs. * Displays informations about external programs used in CompBenchmarks or in * compbenchmark-config program. */ virtual void displayPrograms(void); /** External command execution. * Uses shell to execute command. * \param command shell command to execute * \param result stdout dump * \return return code of the shell command */ virtual int exec(std::string& command, std::string& result) = 0; /** Computes MD5 from a string * \param data Data to checksum * \return std::string coding data's checksum */ virtual std::string md5(std::string& data); /** Computes MD5 from a file * \param filename absolute filename * \return MD5 of the file passed. May be NULL (""). */ virtual std::string md5File(std::string& filename); /** Download a file or a page to a physical file. * Uses wget for now. * \param url URL containing data to download * \param localfile local filename used to store data * \return 1 if ok. */ \ virtual int download(std::string url, std::string localfile); /** Copy a local file. * Will uses cp on UNIX. * \param from source file to be copied * \param to destination of the file * \return 1 if ok. */ virtual int copy(std::string from, std::string to) = 0; /** Creates a directory * \param dir directory name * \return 1 if ok. */ virtual int mkdir(std::string dir) = 0; /** Checks if a directory is presents and has correct rights * \param dir directory to check * \return 1 if ok. */ virtual int checkDirectory(std::string dir) = 0; /** Gives an absolute directory * According to the where parameter, returns the temporary directory to use for * patches, download, or whatever. Note that System::Extract, * System::Status and System::Configuration are host specific in * System::Root. * \param where directory type * \return an absolute directory name */ virtual std::string temporaryDirectory(Temp where); /** Removes (unlink) a file * \param localfile file to remove * \return 1 if Ok. */ virtual int unlink(std::string localfile) = 0; /** Stores an couple key/value Each key must be unique. Value can be text, or number. \param key Key name \param value Value for the key. \return 1 if ok. */ virtual int store(char *key, std::string value); /** Retrieves the value of a key * \param key key name * \return key's value */ virtual std::string read(char *key); /** Tests if a file exists * \param fn (absolute) filename to test for * \return 1 if the file exists */ virtual int fileExists(std::string fn); /** Returns current time in seconds, since EPOC. * \return Current time. */ virtual time_t Time(void); /** Release the object. Frees internal pointers, and removes lockfiles. \sa init() \return 1 if ok. */ virtual int done(void); /** Returns the last command executed by compbenchmarks library. \sa lastCommand \sa getLastCommandOutput() \result a std::string containing the command */ virtual std::string& getLastCommand(void); /** Returns the last command's output executed by compbenchmarks library. \sa lastCommandOutput \sa getLastCommand() \result a std::string containing the command's output */ virtual std::string& getLastCommandOutput(void); }; extern System *cbmSystem; } #endif --- NEW FILE: System-FreeBSD.cpp --- /* ---------------------------------------------------------------------------- $Id: System-FreeBSD.cpp,v 1.1 2007/01/22 17:50:40 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #include <System/System-FreeBSD.h> #include <string> #include <config.h> /* !!! */ using namespace CBM; SystemFreeBSD::SystemFreeBSD() : SystemUnix() { } std::string SystemFreeBSD::processor_name(void) { std::string r = exec0("echo $(/sbin/sysctl hw.model | head -1 | cut -f2 -d'=')"); Chomp(r); return(r); } std::string SystemFreeBSD::processor_mhz(void) { std::string r = exec0("echo $(/sbin/sysctl hw.cpuspeed | head -1 | cut -f2 -d'=')"); Chomp(r); return(r); } std::string SystemFreeBSD::processor_cache(void) { std::string r = exec0("echo $(/sbin/sysctl hw.l2cachesize 2> /dev/null | head -1 | cut -f2 -d'=')"); Chomp(r); return(r); } std::string SystemFreeBSD::processor_number(void) { std::string r = exec0("echo $(/sbin/sysctl hw.ncpu | head -1 | cut -f2 -d'=')"); Chomp(r); return(r); } SystemFreeBSD::~SystemFreeBSD() { } --- NEW FILE: Makefile.am --- # ----------------------------------------------------------------------------- # $Id: Makefile.am,v 1.1 2007/01/22 17:50:39 xfred Exp $ # # This is free software. # For details, see the GNU Public License in the COPYING file, or # Look http://www.fsf.org # ----------------------------------------------------------------------------- noinst_LTLIBRARIES = libSystem.la if CBM_SYSTEM_LINUX source_sys = System-Linux.cpp else if CBM_SYSTEM_CYGWIN source_sys = System-Cygwin.cpp else if CBM_SYSTEM_FREEBSD source_sys = System-FreeBSD.cpp endif endif endif sources = System.cpp System-Unix.cpp libSystem_la_SOURCES = $(sources) $(source_sys) EXTRA_DIST = System-Linux.cpp System-Cygwin.cpp System-FreeBSD.cpp libSysteminclude_HEADERS= $(sources:.cpp=.h) $(EXTRA_DIST:.cpp=.h) libSystemincludedir = $(includedir)/compbenchmarks/System AM_CXXFLAGS = -DERRNO_DONE=1 -DDATAROOTDIR=\"@datarootdir@\" INCLUDES = -I $(top_srcdir)/libcompbenchmarks # -I /usr/include/w3c-libwww # !!! --- NEW FILE: System.cpp --- #include <System/System.h> #include <Base/md5.h> #include <Benchmark/Benchmark-DLLoader.h> #include <UI/UI.h> #include <iostream> #include <fstream> #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <unistd.h> #include <ctype.h> #include <dirent.h> #include <config.h> #define BUF 65535 using namespace CBM; System *CBM::cbmSystem =0; System::System() { std::string tmp; cbmSystem=this; if (!cbmUI) cbmUI=new CBM::UI; tmp=PREFIX; tmp+="/lib"; CBM::cbmlib_paths.push_back(tmp); CBM::cbmlib_paths.push_back("./SupportedBenchmarks/.libs"); CBM::cbmlib_paths.push_back("../../SupportedBenchmarks/.libs"); } int System::verifyPatchDirectory(std::string dir) { std::string fn; if (!checkDirectory(dir)) { return(0); } fn+="/scimark2.patch.gz"; return(fileExists(fn)); } int System::CheckDirectory(Temp where) { std::string dir = temporaryDirectory(where); int r; cbmUI->Information(CBM::UI::DirectoryCheck, dir); if (!checkDirectory(dir)) { r=mkdir(dir); if (!r) { std::string msg = "Can't create "; msg+=dir; cbmUI->Fatal(msg); } } return(1); } int System::download(std::string url, std::string localfile) { /* HTRequest * request; FILE * fp = NULL; HTProfile_newPreemptiveClient("TestApp", "1.0"); HTAlert_setInteractive(NO); request = HTRequest_new(); printf("download %s lpa='%s'\n", url.c_str(), localfile.c_str()); printf("%d\n", HTLoadToFile(url.c_str(), request, localfile.c_str())); printf("here\n"); HTRequest_delete(request); HTProfile_delete(); */ std::string cmd = CBM_PROG_WGET; cmd+=" --timeout=60 -t1 -q "; cmd+=url; cmd+=" -O "; cmd+=localfile; exec0(cmd); return(1); } int System::init(void) { std::string pid; pid=read("lockfile.pid"); if (pid!="") { cbmUI->Fatal("According to lockfile.pid, process " \ " already uses Compbenchmarks' administrative files."); } else { CheckDirectory(Root); CheckDirectory(HostDep); CheckDirectory(Extract); CheckDirectory(Download); CheckDirectory(Status); CheckDirectory(Configuration); char c[16] = { 0 }; std::string tmp; sprintf(c, "%d", (int) getpid()); tmp=c; packageList(); return(store("lockfile.pid", tmp)); } return(0); } std::string System::arch(void) { return(""); } std::string System::hostid(void) { return(""); } std::string System::hostname(void) { return(""); } std::string System::os(void) { return(""); } std::string System::os_version(void) { return(""); } std::string System::processor_name(void) { return(""); } std::string System::processor_mhz(void) { return(""); } std::string System::processor_cache(void) { return(""); } std::string System::processor_number(void) { return(""); } PackageVector &System::packageList(int _force) { DIR *fd; struct dirent *de; std::string dum; unsigned int e; int p_i; int p_n = CBM::cbmlib_paths.size(); std::string dir; int r_i; int r_n; int inserted; if ((packages.size()!=0) && (!_force)) return(packages); for(p_i=0;p_i<p_n;p_i++) { dir= CBM::cbmlib_paths[p_i]; fd=opendir(dir.c_str()); if (fd) { while ( (de=readdir(fd)) != 0) { dum=de->d_name; if (dum.size()<=3) continue; if (dum.substr(dum.size()-3) != ".so") continue; if (dum.substr(0, 21) != "libcompbenchmarks-bm-") continue; e=dum.find(".so", 0); dum=dum.substr(21, e-21); inserted=0; r_n=packages.size(); for(r_i=0;r_i<r_n;r_i++) { if (packages[r_i] == dum) { inserted=1; break; } } if (!inserted) packages.push_back(dum); } } closedir(fd); } return(packages); } int System::packageNumber(void) { return(packages.size()); } Package *System::Package(int index) { return(Package(packages[index])); } Package *System::Package(std::string pid) { CBM::cbmlib_internal *p = CBM::cbmlib_load((char*) pid.c_str()); if (p) return(p->PackageGet()); return(0); } Benchmark *System::Benchmark(std::string bid) { std::string pid; CBM::Package *P = 0; pid=Split(bid, "-", 0); P=Package(pid); if (P) { return(P->Benchmark(bid)); } return(0); } void System::displayAllPackages(void) { int i; int n = packageNumber(); CBM::Package *P; for(i=0; i<n; i++) { P=Package(i); P->display(); } } void System::displayAllBenchmarks(void) { int i; int n = packageNumber(); CBM::Package *P; for(i=0; i<n; i++) { P=Package(i); P->display(); P->displayBenchmarks(); } } std::string System::Split(const std::string& str, const std::string& delim, unsigned int wantedIndex) { unsigned int offset = 0; unsigned int delimIndex = 0; unsigned int nowIndex = 0; delimIndex = str.find(delim, offset); while (delimIndex != std::string::npos) { if (wantedIndex==nowIndex) return(str.substr(offset, delimIndex - offset)); offset += delimIndex - offset + delim.length(); delimIndex = str.find(delim, offset); nowIndex++; } if (wantedIndex==nowIndex) return(str.substr(offset)); else return(""); } void System::Chomp(std::string& str) { int l = str.length(); int i; int sp = 1; std::string dum; while (l) { if ((str[l-1]=='\n') || (str[l-1]=='\r') || (isspace(str[l-1]))) { str.resize(l-1); l--; } else break; } l=str.length(); for(i=0;i<l;i++) { if ((!sp) || (!(isspace((int) str[i])))) { sp=0; dum+=str[i]; } } str=dum; } void System::display(void) { std::cout << "host::arch=" << arch() << std::endl << "host::hostid=" << hostid() << std::endl << "host::hostname=" << hostname() << std::endl << "host::os=" << os() << std::endl << "host::os_version=" << os_version() << std::endl << "host::processor_name=" << processor_name() << std::endl << "host::processor_mhz=" << processor_mhz() << std::endl << "host::processor_cache=" << processor_cache() << std::endl << "host::processor_number=" << processor_number() << std::endl; } void System::displayPrograms(void) { std::cout << "BZIP2:" << CBM_PROG_BZIP2 << std::endl << "CUT:" << CBM_PROG_CUT << std::endl << "DD:" << CBM_PROG_DD << std::endl << "DIALOG:" << CBM_PROG_DIALOG << std::endl << "GREP:" << CBM_PROG_GREP << std::endl << "GZIP:" << CBM_PROG_GZIP << std::endl << "HEAD:" << CBM_PROG_HEAD << std::endl << "MAKE:" << CBM_PROG_MAKE << std::endl << "MKDIR:" << CBM_PROG_MKDIR << std::endl << "PATCH:" << CBM_PROG_PATCH << std::endl << "RM:" << CBM_PROG_RM << std::endl << "TAIL:" << CBM_PROG_TAIL << std::endl << "TAR:" << CBM_PROG_TAR << std::endl << "UNZIP:" << CBM_PROG_UNZIP << std::endl << "WGET:" << CBM_PROG_WGET << std::endl << "ZCAT:" << CBM_PROG_ZCAT << std::endl << "CAT:" << CBM_PROG_CAT << std::endl << "PERL:" << CBM_PROG_PERL << std::endl; } std::string System::exec0(std::string& command) { std::string result; if (!exec(command, result)) { return(result); } else { return(0); } } std::string System::exec0(char *command) { std::string tmp = command; return(exec0(tmp)); } std::string System::md5(std::string& data) { md5_state_t state; md5_byte_t digest[16]; std::string result; int i; char tmp[3] = { 0 }; md5_init(&state); md5_append(&state, (const md5_byte_t *)data.c_str(), data.length()); md5_finish(&state, digest); for(i=0; i<16; i++) { sprintf(tmp, "%02x", (unsigned int) digest[i]); result+=tmp; } return(result); } std::string System::md5File(std::string& filename) { std::ifstream IN(filename.c_str(), std::ios::in | std::ios::binary | std::ios::ate); char *buf; std::ifstream::pos_type size; std::string result; std::string tmp; tmp=""; if (IN.is_open()) { size=IN.tellg(); buf=new char[size]; IN.seekg(0, std::ios::beg); IN.read(buf, size); IN.close(); tmp.append(buf, size); delete[](buf); result=md5(tmp); } else { std::string str; str="Invalid MD5 for "; str+=filename; cbmUI->Fatal(str); result=""; } return(result); } std::string System::temporaryDirectory(Temp where) { std::string result; std::string host; result=getenv("HOME"); result+="/.compbenchmarks"; host=hostname(); switch(where) { case Root: break; case HostDep: result+="/"; result+=host; break; case Extract: result+="/"; result+=host; result+="/Extracts"; break; case Download: result+="/Downloads"; break; case Status: result+="/"; result+=host; result+="/Status"; break; case Configuration: result+="/"; result+=host; result+="/Configuration"; break; case Patches: result=DATAROOTDIR; result+="/"; result+=PACKAGE; result+="/"; result+=VERSION; result+="/"; result+="patches"; if (!verifyPatchDirectory(result)) { result=getenv("PWD"); result+="/share/patches"; if (!verifyPatchDirectory(result)) { result=getenv("PWD"); result+="/../share/patches"; } } break; case OS: result=DATAROOTDIR; result+="/"; result+=PACKAGE; result+="/"; result+=VERSION; result+="/"; result+="system"; if (!checkDirectory(result)) { result=getenv("PWD"); result+="/share/system/"; #ifdef CBM_SYSTEM_CYGWIN result+="cygwin"; #else result=""; #endif } break; default: cbmUI->Fatal("Internal : Bad 'where' parameters in System::temporaryDirectory();"); return(""); } return(result); } int System::store(char *key, std::string value) { std::string fn; std::ofstream OUT; fn=temporaryDirectory(System::Status); fn+="/"; fn+=key; OUT.open(fn.c_str(),std::ios::out); OUT << value; OUT.close(); /* !!! */ return(1); } std::string System::read(char *key) { std::string fn; std::ifstream IN; std::ifstream::pos_type size; char *buf; std::string result; fn=temporaryDirectory(System::Status); fn+="/"; fn+=key; IN.open(fn.c_str(), std::ios::in | std::ios::binary | std::ios::ate); if (IN.is_open()) { size=IN.tellg(); buf=new char[size]; IN.seekg(0, std::ios::beg); IN.read(buf, size); IN.close(); result.append(buf, size); delete[](buf); } else { /* !!! */ } return(result); } int System::fileExists(std::string fn) { std::ifstream IN; IN.open(fn.c_str(), std::ios::in | std::ios::binary | std::ios::ate); if (IN.is_open()) { IN.close(); return(1); } else { return(0); } } time_t System::Time(void) { return(time(NULL)); } int System::done(void) { std::string fn; CBM::cbmlib_done(); fn=temporaryDirectory(System::Status); fn+="/"; fn+="lockfile.pid"; return(unlink(fn)); } std::string& System::getLastCommand(void) { return(lastCommand); } std::string& System::getLastCommandOutput(void) { return(lastCommandOutput); } System::~System() { } --- NEW FILE: System-Linux.h --- /* ---------------------------------------------------------------------------- $Id: System-Linux.h,v 1.1 2007/01/22 17:50:41 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef H_CBMSYSTEMLINUX #define H_CBMSYSTEMLINUX #include <System/System-Unix.h> namespace CBM { /** \brief Linux operating system support class. * * Implements a few methods not defined by SystemUnix to handle properly * Linux systems in CompBenchmarks. */ class SystemLinux : public SystemUnix { protected: public: /** Constructor */ SystemLinux(); /** Returns processor name * Uses /proc to get the name of the first installed processor. * \return Processor name, as clear text * \sa processor_number() */ virtual std::string processor_name(void); /** Returns processor speed * Uses /proc to get the speed, in MHz, of the first installed processor. * \return Processor speed in MHz, as clear text (integer returned) * \sa processor_number() */ virtual std::string processor_mhz(void); /** Returns processor cache * Uses /proc to get processor second level cache in Kb. Integer expected. * \return std::string coding (first) processor second level cache in Kb. */ virtual std::string processor_cache(void); /** Returns processors' number * Uses /proc to get information. * \return std::string coding the number of processors (physical and logical) on host */ virtual std::string processor_number(void); /** Virtual destructor */ virtual ~SystemLinux(); }; } #endif --- NEW FILE: System-FreeBSD.h --- /* ---------------------------------------------------------------------------- $Id: System-FreeBSD.h,v 1.1 2007/01/22 17:50:40 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef H_CBMSYSTEMFREEBSD #define H_CBMSYSTEMFREEBSD #include <System/System-Unix.h> namespace CBM { /** \brief FreeBSD operating system support class. * * Implements a few methods not defined by SystemUnix to handle properly * FreeBSD systems in CompBenchmarks. */ class SystemFreeBSD : public SystemUnix { protected: public: /** Constructor */ SystemFreeBSD(); /** Returns processor name * Uses /sbin/sysctl to get the name of the first installed processor. * \return Processor name, as clear text * \sa processor_number() */ virtual std::string processor_name(void); /** Returns processor speed * Uses /sbin/sysctl to get the speed, in MHz, of the first installed processor. * \return Processor speed in MHz, as clear text (integer returned) * \sa processor_number() */ virtual std::string processor_mhz(void); /** Returns processor cache * Uses /sbin/sysctl to get processor second level cache in Kb. Integer expected. * \return std::string coding (first) processor second level cache in Kb. */ virtual std::string processor_cache(void); /** Returns processors' number * Uses /sbin/sysctl to get information. * \return std::string coding the number of processors (physical and logical) on host */ virtual std::string processor_number(void); /** Virtual destructor */ virtual ~SystemFreeBSD(); }; } #endif --- NEW FILE: System-Unix.cpp --- #include <System/System-Unix.h> #include <libcompbenchmarks.h> #include <UI/UI.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <signal.h> #include <iostream> #include <stdio.h> using namespace CBM; void sysunix_sighandler(int signal) { std::cout << "Signal #" << signal << "received. Exiting properly" << std::endl; if (cbmSystem) cbmSystem->done(); exit(0); } SystemUnix::SystemUnix() : System() { signal(SIGINT, sysunix_sighandler); } int SystemUnix::copy(std::string from, std::string to) { std::string cmd; std::string sstdout; cmd="cp -f "; cmd+=from; cmd+=" "; cmd+=to; if (! UO_verbose) { cmd+=" 2> /dev/null"; } return(exec(cmd, sstdout)); } int SystemUnix::exec(std::string& command, std::string& result) { FILE *fpipe; char line[256]; result=""; lastCommand=command; if ( !(fpipe = (FILE*)popen(command.c_str(),"r")) ) { cbmUI->Fatal("Can't create pipe."); } while ( fgets( line, sizeof line, fpipe)) { result+=line; } lastCommandOutput=result; return(pclose(fpipe)); } int SystemUnix::mkdir(std::string dir) { return(!::mkdir(dir.c_str(), 0755)); } int SystemUnix::checkDirectory(std::string dir) { struct stat buf; stat(dir.c_str(), &buf); return( S_ISDIR(buf.st_mode) && ((S_IRUSR & buf.st_mode) == S_IRUSR) && ((S_IWUSR & buf.st_mode) == S_IWUSR) && ((S_IXUSR & buf.st_mode) == S_IXUSR) ); } std::string SystemUnix::arch(void) { std::string r = exec0("uname -m 2> /dev/null"); Chomp(r); return(r); } std::string SystemUnix::hostid(void) { std::string r = exec0("hostid 2> /dev/null"); Chomp(r); return(r); } std::string SystemUnix::hostname(void) { std::string r = exec0("hostname 2> /dev/null"); Chomp(r); return(r); } std::string SystemUnix::os(void) { std::string r = exec0("uname 2> /dev/null"); Chomp(r); return(r); } std::string SystemUnix::os_version(void) { std::string r = exec0("uname -r 2> /dev/null"); Chomp(r); return(r); } int SystemUnix::unlink(std::string localfile) { return(!::unlink(localfile.c_str())); } SystemUnix::~SystemUnix() { } --- NEW FILE: System-Unix.h --- /* ---------------------------------------------------------------------------- $Id: System-Unix.h,v 1.1 2007/01/22 17:50:41 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef H_CBMSYSTEMUNIX #define H_CBMSYSTEMUNIX #include <System/System.h> namespace CBM { /** \brief UNIX operating system basic support class. * * Implements methods not defined by SystemUnix to handle properly * UNIX and compatibles systems in CompBenchmarks. This class may be overloaded. */ class SystemUnix : public System { protected: /** External command execution. * Uses system() call to execute command. * \param command shell command to execute * \param result stdout dump * \return return code of the shell command */ virtual int exec(std::string& command, std::string& result); public: /** Constructor. */ SystemUnix(); virtual int copy(std::string from, std::string to); /** Creates a directory * Uses mkdir() POSIX call. * \param dir directory name * \return 1 if ok. */ virtual int mkdir(std::string dir); /** Checks if a directory is presents and has correct rights * Expected rights are rwx access for user. stat() call used. * \param dir directory to check * \return 1 if ok. */ virtual int checkDirectory(std::string dir); /** Returns host's architecture. * Uses uname. * \return Host's architecture */ virtual std::string arch(void); /** Get host ID * Uses hostid command. * \return hostid, as std::string. */ virtual std::string hostid(void); /** Returns hostname * Returns the shortname, using hostname external command. * \return hostname as std::string*/ virtual std::string hostname(void); /** Returns operating system name * Uses uname. * \return Operating system name, as std::string */ virtual std::string os(void); /** Returns operating system version * Uses uname -r. * \return Operating system version, as std::string */ virtual std::string os_version(void); /** Removes (unlink) a file * unlink() POSIX function used. * \param localfile file to remove * \return 1 if Ok. */ virtual int unlink(std::string localfile); /** Virtual destructor. */ virtual ~SystemUnix(); }; } #endif |
From: Frederic T. <xf...@us...> - 2007-01-22 17:46:39
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv5475 Added Files: Makefile.am md5.cpp md5.h XML.cpp XML.h Log Message: libcompbenchmarks moved in a separate directory. --- NEW FILE: XML.h --- /* ---------------------------------------------------------------------------- $Id: XML.h,v 1.1 2007/01/22 17:46:29 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef H_CBMXML #define H_CBMXML #include <string> #include <vector> namespace CBM { /** \brief XML Attribute * Internal representation for an XML attribute. * \sa XMLNode */ class XMLAttribute { protected: std::string name; /*!< Attribute name */ std::string value; /*!< Attribute value */ public: /** Constructor * Initialise a new attribute. * \param _name Attribute's name * \param _value Attribute's value (optional) */ XMLAttribute(std::string _name, std::string _value = ""); /** Get attribute's name \return a std::string */ virtual std::string Name(void); /** Get attribute's value \return a std::string */ virtual std::string Value(void); /** Set attribute's value \param _value new value (std::string) */ virtual void setValue(std::string _value); /** Destructor */ virtual ~XMLAttribute(); }; /** \brief XML Node * Internal representation of an XML node. * \sa XMLAttribute */ class XMLNode { protected: std::vector<XMLNode*> childs; /*!< Child nodes */ std::vector<XMLAttribute*> attributes; /*!< Node's attributes */ std::string name; /*!< Node's name */ std::string value; /*!< Node value */ virtual void indent(std::string& str, int _indent); public: /** Constructor * Initialise a new node. * \param _name Node's name * \param _value Node's value (optional) */ XMLNode(std::string _name, std::string _value = ""); /** Get node's name \return a std::string */ virtual std::string Name(void); /** Get node's value \return a std::string */ virtual std::string Value(void); /** Set node's value \param _value new value (std::string) */ virtual void setValue(std::string _value); /** Get childs' number * \return number of nodes held by current node * \sa getChild() */ virtual int childNumber(void); /** Get a child node according to its index * \return A node * \sa childNumber() */ virtual XMLNode *getChild(int _index); /** Get attributes' number * \return number of attributes on current node * \sa getAttribute() */ virtual int attributeNumber(void); /** Get an attribute according to its index * \return An attribute * \sa attributeNumber() */ virtual XMLAttribute *getAttribute(int _index); /** Add a node into current node * \param _child node to add * \return node added (_child) * \sa addNode() */ virtual XMLNode *add(XMLNode *_child); /** Add a node into current node * \param _name name of the node * \param _value value of the node (optional) * \return node added (_child) * \sa add() */ virtual XMLNode *addNode(std::string _name, std::string _value = ""); /** Add an attribute on current node * \param _attribute to add * \return attribute added (_attribute) * \sa addAttribute() */ virtual XMLAttribute *add(XMLAttribute *_attribute); /** Add an attribute on current node * \param _name name of the attribute * \param _value value of the attribute (optional) * \return attribute added (_attribute) * \sa add() */ virtual XMLAttribute *addAttribute(std::string _name, std::string _value = ""); /** Get textual (XML) representation of the node * Build a string corresponding to the XML elements of current node and * childs (includes attributes and value). * \param _indent Optional indentation level; internal use only. * \return string (XML formatted) */ virtual std::string str(int _indent = 0); virtual ~XMLNode(); }; } #endif --- NEW FILE: XML.cpp --- /* ---------------------------------------------------------------------------- $Id: XML.cpp,v 1.1 2007/01/22 17:46:28 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #include <Base/XML.h> using namespace CBM; XMLAttribute::XMLAttribute(std::string _name, std::string _value) { name=_name; value=_value; } std::string XMLAttribute::Name(void) { return(name); } std::string XMLAttribute::Value(void) { return(value); } void XMLAttribute::setValue(std::string _value) { value=_value; } XMLAttribute::~XMLAttribute() { } XMLNode::XMLNode(std::string _name, std::string _value) { name=_name; value=_value; } void XMLNode::indent(std::string& str, int _indent) { while (_indent--) str+=" "; } std::string XMLNode::Name(void) { return(name); } std::string XMLNode::Value(void) { return(value); } void XMLNode::setValue(std::string _value) { value=_value; } int XMLNode::childNumber(void) { return(childs.size()); } XMLNode *XMLNode::getChild(int _index) { return(childs[_index]); } int XMLNode::attributeNumber(void) { return(attributes.size()); } XMLAttribute *XMLNode::getAttribute(int _index) { return(attributes[_index]); } XMLNode *XMLNode::add(XMLNode *_child) { childs.push_back(_child); return(_child); } XMLNode *XMLNode::addNode(std::string _name, std::string _value) { XMLNode *result = new XMLNode(_name, _value); return(add(result)); } XMLAttribute *XMLNode::add(XMLAttribute *_attribute) { attributes.push_back(_attribute); return(_attribute); } XMLAttribute *XMLNode::addAttribute(std::string _name, std::string _value) { XMLAttribute *result = new XMLAttribute(_name, _value); return(add(result)); } std::string XMLNode::str(int _indent) { std::string result; XMLAttribute *att; int i; int n_child; int n_attr; indent(result, _indent); n_attr=attributes.size(); n_child=childs.size(); result+="<" + name; if (n_attr) { result+=" "; for(i=0; i<n_attr; i++) { att=getAttribute(i); result+=att->Name() + "=\"" + att->Value() + "\""; if (i!=n_attr-1) { result+=" "; } } } if ((!n_child) && (value=="")) { result+="/>\n"; return(result); } result+=">\n"; if (n_child) { for(i=0; i<n_child; i++) { result+=childs[i]->str(_indent+1); } if (value!="") { indent(result, _indent+1); result+=value; result+="\n"; } indent(result, _indent); result+="</" + name + ">\n"; } else { if (value!="") { indent(result, _indent+1); result+=value; result+="\n"; } indent(result, _indent); result+="</" + name + ">\n"; } return(result); } XMLNode::~XMLNode() { } --- NEW FILE: md5.cpp --- /* This file comes from libmd5-rfc project, http://sourceforge.net/projects/libmd5-rfc/ and has been renamed from md5.c to md5.cpp for convenience. Original author is L. Peter Deutsh, like given in original notice bellow. */ /* Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. L. Peter Deutsch gh...@al... */ /* $Id: md5.cpp,v 1.1 2007/01/22 17:46:28 xfred Exp $ */ /* Independent implementation of MD5 (RFC 1321). This code implements the MD5 Algorithm defined in RFC 1321, whose text is available at http://www.ietf.org/rfc/rfc1321.txt The code is derived from the text of the RFC, including the test suite (section A.5) but excluding the rest of Appendix A. It does not include any code or documentation that is identified in the RFC as being copyrighted. The original and principal author of md5.c is L. Peter Deutsch <gh...@al...>. Other authors are noted in the change history that follows (in reverse chronological order): 2002-04-13 lpd Clarified derivation from RFC 1321; now handles byte order either statically or dynamically; added missing #include <string.h> in library. 2002-03-11 lpd Corrected argument list for main(), and added int return type, in test program and T value program. 2002-02-21 lpd Added missing #include <stdio.h> in test program. 2000-07-03 lpd Patched to eliminate warnings about "constant is unsigned in ANSI C, signed in traditional"; made test program self-checking. 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5). 1999-05-03 lpd Original version. */ #include <Base/md5.h> #include <string.h> #undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */ #ifdef ARCH_IS_BIG_ENDIAN # define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1) #else # define BYTE_ORDER 0 #endif #define T_MASK ((md5_word_t)~0) #define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87) #define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9) #define T3 0x242070db #define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111) #define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050) #define T6 0x4787c62a #define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec) #define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe) #define T9 0x698098d8 #define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850) #define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e) #define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841) #define T13 0x6b901122 #define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c) #define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71) #define T16 0x49b40821 #define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d) #define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf) #define T19 0x265e5a51 #define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855) #define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2) #define T22 0x02441453 #define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e) #define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437) #define T25 0x21e1cde6 #define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829) #define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278) #define T28 0x455a14ed #define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa) #define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07) #define T31 0x676f02d9 #define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375) #define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd) #define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e) #define T35 0x6d9d6122 #define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3) #define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb) #define T38 0x4bdecfa9 #define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f) #define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f) #define T41 0x289b7ec6 #define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805) #define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a) #define T44 0x04881d05 #define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6) #define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a) #define T47 0x1fa27cf8 #define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a) #define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb) #define T50 0x432aff97 #define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58) #define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6) #define T53 0x655b59c3 #define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d) #define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82) #define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e) #define T57 0x6fa87e4f #define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f) #define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb) #define T60 0x4e0811a1 #define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d) #define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca) #define T63 0x2ad7d2bb #define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e) static void md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/) { md5_word_t a = pms->abcd[0], b = pms->abcd[1], c = pms->abcd[2], d = pms->abcd[3]; md5_word_t t; #if BYTE_ORDER > 0 /* Define storage only for big-endian CPUs. */ md5_word_t X[16]; #else /* Define storage for little-endian or both types of CPUs. */ md5_word_t xbuf[16]; const md5_word_t *X; #endif { #if BYTE_ORDER == 0 /* * Determine dynamically whether this is a big-endian or * little-endian machine, since we can use a more efficient * algorithm on the latter. */ static const int w = 1; if (*((const md5_byte_t *)&w)) /* dynamic little-endian */ #endif #if BYTE_ORDER <= 0 /* little-endian */ { /* * On little-endian machines, we can process properly aligned * data without copying it. */ if (!((data - (const md5_byte_t *)0) & 3)) { /* data are properly aligned */ X = (const md5_word_t *)data; } else { /* not aligned */ memcpy(xbuf, data, 64); X = xbuf; } } #endif #if BYTE_ORDER == 0 else /* dynamic big-endian */ #endif #if BYTE_ORDER >= 0 /* big-endian */ { /* * On big-endian machines, we must arrange the bytes in the * right order. */ const md5_byte_t *xp = data; int i; # if BYTE_ORDER == 0 X = xbuf; /* (dynamic only) */ # else # define xbuf X /* (static only) */ # endif for (i = 0; i < 16; ++i, xp += 4) xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24); } #endif } #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) /* Round 1. */ /* Let [abcd k s i] denote the operation a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */ #define F(x, y, z) (((x) & (y)) | (~(x) & (z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + F(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 0, 7, T1); SET(d, a, b, c, 1, 12, T2); SET(c, d, a, b, 2, 17, T3); SET(b, c, d, a, 3, 22, T4); SET(a, b, c, d, 4, 7, T5); SET(d, a, b, c, 5, 12, T6); SET(c, d, a, b, 6, 17, T7); SET(b, c, d, a, 7, 22, T8); SET(a, b, c, d, 8, 7, T9); SET(d, a, b, c, 9, 12, T10); SET(c, d, a, b, 10, 17, T11); SET(b, c, d, a, 11, 22, T12); SET(a, b, c, d, 12, 7, T13); SET(d, a, b, c, 13, 12, T14); SET(c, d, a, b, 14, 17, T15); SET(b, c, d, a, 15, 22, T16); #undef SET /* Round 2. */ /* Let [abcd k s i] denote the operation a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */ #define G(x, y, z) (((x) & (z)) | ((y) & ~(z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + G(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 1, 5, T17); SET(d, a, b, c, 6, 9, T18); SET(c, d, a, b, 11, 14, T19); SET(b, c, d, a, 0, 20, T20); SET(a, b, c, d, 5, 5, T21); SET(d, a, b, c, 10, 9, T22); SET(c, d, a, b, 15, 14, T23); SET(b, c, d, a, 4, 20, T24); SET(a, b, c, d, 9, 5, T25); SET(d, a, b, c, 14, 9, T26); SET(c, d, a, b, 3, 14, T27); SET(b, c, d, a, 8, 20, T28); SET(a, b, c, d, 13, 5, T29); SET(d, a, b, c, 2, 9, T30); SET(c, d, a, b, 7, 14, T31); SET(b, c, d, a, 12, 20, T32); #undef SET /* Round 3. */ /* Let [abcd k s t] denote the operation a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */ #define H(x, y, z) ((x) ^ (y) ^ (z)) #define SET(a, b, c, d, k, s, Ti)\ t = a + H(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 5, 4, T33); SET(d, a, b, c, 8, 11, T34); SET(c, d, a, b, 11, 16, T35); SET(b, c, d, a, 14, 23, T36); SET(a, b, c, d, 1, 4, T37); SET(d, a, b, c, 4, 11, T38); SET(c, d, a, b, 7, 16, T39); SET(b, c, d, a, 10, 23, T40); SET(a, b, c, d, 13, 4, T41); SET(d, a, b, c, 0, 11, T42); SET(c, d, a, b, 3, 16, T43); SET(b, c, d, a, 6, 23, T44); SET(a, b, c, d, 9, 4, T45); SET(d, a, b, c, 12, 11, T46); SET(c, d, a, b, 15, 16, T47); SET(b, c, d, a, 2, 23, T48); #undef SET /* Round 4. */ /* Let [abcd k s t] denote the operation a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */ #define I(x, y, z) ((y) ^ ((x) | ~(z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + I(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 0, 6, T49); SET(d, a, b, c, 7, 10, T50); SET(c, d, a, b, 14, 15, T51); SET(b, c, d, a, 5, 21, T52); SET(a, b, c, d, 12, 6, T53); SET(d, a, b, c, 3, 10, T54); SET(c, d, a, b, 10, 15, T55); SET(b, c, d, a, 1, 21, T56); SET(a, b, c, d, 8, 6, T57); SET(d, a, b, c, 15, 10, T58); SET(c, d, a, b, 6, 15, T59); SET(b, c, d, a, 13, 21, T60); SET(a, b, c, d, 4, 6, T61); SET(d, a, b, c, 11, 10, T62); SET(c, d, a, b, 2, 15, T63); SET(b, c, d, a, 9, 21, T64); #undef SET /* Then perform the following additions. (That is increment each of the four registers by the value it had before this block was started.) */ pms->abcd[0] += a; pms->abcd[1] += b; pms->abcd[2] += c; pms->abcd[3] += d; } void md5_init(md5_state_t *pms) { pms->count[0] = pms->count[1] = 0; pms->abcd[0] = 0x67452301; pms->abcd[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476; pms->abcd[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301; pms->abcd[3] = 0x10325476; } void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes) { const md5_byte_t *p = data; int left = nbytes; int offset = (pms->count[0] >> 3) & 63; md5_word_t nbits = (md5_word_t)(nbytes << 3); if (nbytes <= 0) return; /* Update the message length. */ pms->count[1] += nbytes >> 29; pms->count[0] += nbits; if (pms->count[0] < nbits) pms->count[1]++; /* Process an initial partial block. */ if (offset) { int copy = (offset + nbytes > 64 ? 64 - offset : nbytes); memcpy(pms->buf + offset, p, copy); if (offset + copy < 64) return; p += copy; left -= copy; md5_process(pms, pms->buf); } /* Process full blocks. */ for (; left >= 64; p += 64, left -= 64) md5_process(pms, p); /* Process a final partial block. */ if (left) memcpy(pms->buf, p, left); } void md5_finish(md5_state_t *pms, md5_byte_t digest[16]) { static const md5_byte_t pad[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; md5_byte_t data[8]; int i; /* Save the length before padding. */ for (i = 0; i < 8; ++i) data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3)); /* Pad to 56 bytes mod 64. */ md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1); /* Append the length. */ md5_append(pms, data, 8); for (i = 0; i < 16; ++i) digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3)); } --- NEW FILE: md5.h --- /* Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. L. Peter Deutsch gh...@al... */ /* $Id: md5.h,v 1.1 2007/01/22 17:46:28 xfred Exp $ */ /* Independent implementation of MD5 (RFC 1321). This code implements the MD5 Algorithm defined in RFC 1321, whose text is available at http://www.ietf.org/rfc/rfc1321.txt The code is derived from the text of the RFC, including the test suite (section A.5) but excluding the rest of Appendix A. It does not include any code or documentation that is identified in the RFC as being copyrighted. The original and principal author of md5.h is L. Peter Deutsch <gh...@al...>. Other authors are noted in the change history that follows (in reverse chronological order): 2002-04-13 lpd Removed support for non-ANSI compilers; removed references to Ghostscript; clarified derivation from RFC 1321; now handles byte order either statically or dynamically. 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5); added conditionalization for C++ compilation from Martin Purschke <pur...@bn...>. 1999-05-03 lpd Original version. */ #ifndef md5_INCLUDED # define md5_INCLUDED /* * This package supports both compile-time and run-time determination of CPU * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is * defined as non-zero, the code will be compiled to run only on big-endian * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to * run on either big- or little-endian CPUs, but will run slightly less * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined. */ typedef unsigned char md5_byte_t; /* 8-bit byte */ typedef unsigned int md5_word_t; /* 32-bit word */ /* Define the state of the MD5 Algorithm. */ typedef struct md5_state_s { md5_word_t count[2]; /* message length in bits, lsw first */ md5_word_t abcd[4]; /* digest buffer */ md5_byte_t buf[64]; /* accumulate block */ } md5_state_t; #ifdef __cplusplus extern "C" { #endif /* Initialize the algorithm. */ void md5_init(md5_state_t *pms); /* Append a string to the message. */ void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes); /* Finish the message and return the digest. */ void md5_finish(md5_state_t *pms, md5_byte_t digest[16]); #ifdef __cplusplus } /* end extern "C" */ #endif #endif /* md5_INCLUDED */ --- NEW FILE: Makefile.am --- noinst_LTLIBRARIES = libBase.la sources = XML.cpp md5.cpp libBase_la_SOURCES = $(sources) $(source_sys) libBaseinclude_HEADERS= $(sources:.cpp=.h) $(EXTRA_DIST:.cpp=.h) libBaseincludedir = $(includedir)/compbenchmarks/Base INCLUDES = -I $(top_srcdir)/libcompbenchmarks # -I /usr/include/w3c-libwww # !!! |
From: Frederic T. <xf...@us...> - 2007-01-22 17:42:47
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv4004 Added Files: CBM.h config.h.in libcompbenchmarks.cpp libcompbenchmarks.h Makefile.am Log Message: libcompbenchmarks moved in a separate directory. --- NEW FILE: libcompbenchmarks.h --- /* ---------------------------------------------------------------------------- $Id: libcompbenchmarks.h,v 1.1 2007/01/22 17:42:42 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef H_CBMLIBCOMPBENCHMARKS #define H_CBMLIBCOMPBENCHMARKS 1 #include <config.h> #ifdef CBM_SYSTEM_LINUX # include <System/System-Linux.h> #endif #ifdef CBM_SYSTEM_CYGWIN # include <System/System-Cygwin.h> #endif #ifdef CBM_SYSTEM_FREEBSD # include <System/System-FreeBSD.h> #endif namespace CBM { /** Enable/disable verbosity * \sa UO_verbose */ extern void setVerbosity(int v); /** Defines version of the libcompbenchmarks library */ extern char *libcompbenchmarks_version; /** User option defining if package's test suite has to be run */ extern int UO_enableTestSuite; /** User option defining 'force' mode */ extern int UO_force; /** Verbose mode. * If set to 0, disable verbose mode (UI messages disabled). */ extern int UO_verbose; /** Enable exits on fatal error. * Set to 1 in Perl wrapper; defaults to 0. */ extern int UO_fatal; } #endif --- NEW FILE: CBM.h --- /* ---------------------------------------------------------------------------- $Id: CBM.h,v 1.1 2007/01/22 17:42:42 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef CBM_LIB #define CBM_LIB #include <libcompbenchmarks.h> #include <Compiler/Compiler.h> #include <Benchmark/Benchmark.h> #endif --- NEW FILE: Makefile.am --- # libcompbenchmarks/Makefile.am SUBDIRS = share System Compiler Benchmark UI lib_LTLIBRARIES = libcompbenchmarks.la libcompbenchmarks_la_SOURCES = libcompbenchmarks.cpp libcompbenchmarks_la_LIBADD = System/libSystem.la \ Compiler/libCompiler.la \ Benchmark/libBenchmark.la \ UI/libUI.la # -lwwwcore -lwwwapp -lwwwinit # !!! libcompbenchmarks_la_DEPENDENCIES = $(libcompbenchmarks_la_LIBADD) libcompbenchmarksinclude_HEADERS = config.h libcompbenchmarks.h config.h CBM.h libcompbenchmarksincludedir = $(includedir)/compbenchmarks noinst_HEADERS = $(libcompbenchmarks_la_SOURCES:.cpp=.h) # !!! INCLUDES = -I $(top_srcdir) --- NEW FILE: libcompbenchmarks.cpp --- #include <libcompbenchmarks.h> char *CBM::libcompbenchmarks_version = VERSION; int CBM::UO_enableTestSuite = 1; int CBM::UO_force = 0; int CBM::UO_verbose = 1; int CBM::UO_fatal = 1; void CBM::setVerbosity(int v) { CBM::UO_verbose=v; } --- NEW FILE: config.h.in --- /* libcompbenchmarks/config.h.in. Generated from configure.in by autoheader. */ /* bzip2 */ #undef CBM_PROG_BZIP2 /* cat */ #undef CBM_PROG_CAT /* cp */ #undef CBM_PROG_CP /* cut */ #undef CBM_PROG_CUT /* dd */ #undef CBM_PROG_DD /* dialog */ #undef CBM_PROG_DIALOG /* grep */ #undef CBM_PROG_GREP /* gzip */ #undef CBM_PROG_GZIP /* head */ #undef CBM_PROG_HEAD /* make */ #undef CBM_PROG_MAKE /* mkdir */ #undef CBM_PROG_MKDIR /* patch */ #undef CBM_PROG_PATCH /* perl */ #undef CBM_PROG_PERL /* rm */ #undef CBM_PROG_RM /* tail */ #undef CBM_PROG_TAIL /* tar */ #undef CBM_PROG_TAR /* unzip */ #undef CBM_PROG_UNZIP /* wget */ #undef CBM_PROG_WGET /* zcat */ #undef CBM_PROG_ZCAT /* System */ #undef CBM_SYSTEM /* Cygwin */ #undef CBM_SYSTEM_CYGWIN /* FreeBSD */ #undef CBM_SYSTEM_FREEBSD /* Linux */ #undef CBM_SYSTEM_LINUX /* Define to 1 if you have the <ctype.h> header file. */ #undef HAVE_CTYPE_H /* Define to 1 if you have the <dirent.h> header file. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the <getopt.h> header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `dl' library (-ldl). */ #undef HAVE_LIBDL /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the <stat.h> header file. */ #undef HAVE_STAT_H /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the <string> header file. */ #undef HAVE_STRING /* Define to 1 if you have the <strings.h> header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the <sys/types.h> header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the <time.h> header file. */ #undef HAVE_TIME_H /* Define to 1 if you have the <types.h> header file. */ #undef HAVE_TYPES_H /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Installation prefix */ #undef PREFIX /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION |
From: Frederic T. <xf...@us...> - 2007-01-22 17:41:49
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3521/UI Log Message: Directory /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI added to the repository |
From: Frederic T. <xf...@us...> - 2007-01-22 17:41:48
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3521/Benchmark Log Message: Directory /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Benchmark added to the repository |
From: Frederic T. <xf...@us...> - 2007-01-22 17:41:46
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3521/share Log Message: Directory /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/share added to the repository |
From: Frederic T. <xf...@us...> - 2007-01-22 17:41:45
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3521/Compiler Log Message: Directory /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler added to the repository |
From: Frederic T. <xf...@us...> - 2007-01-22 17:41:45
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3521/Base Log Message: Directory /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base added to the repository |
From: Frederic T. <xf...@us...> - 2007-01-22 17:41:45
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv3521/System Log Message: Directory /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System added to the repository |