Typing clib
Author: s | 2025-04-24
clibs are utility code (types, typedefs, macros, functions) used across C programs. They are self-contained and domain neutral, able to be applied to various situations. clibs is Download clib packages for NetBSD, Void Linux. clib latest versions: 2.7.0, 0.3. clib architectures: aarch64, amd64, x86_64. clib linux packages: tgz, xbps
clibs/clib: Package manager for the C programming language.
You will need the following external dependencies:a C++ compilation environment.CMake (>= 2.8), a cross-platform build system.Centreon Clib, The centreon Core library.ssh2 library to use ssh functions.gcrypt library to secure connections.This program is compatible only with Unix-like platforms (Linux, FreeBSD, Solaris, ...).PrerequisitesCentOSDebian/UbuntuOpenSUSEIn CentOS you need to add manually cmake. After that you can install binary packages. Either use the Package Manager orthe yum tool to install them. You should check packages version when necessary.Package required to build:SoftwarePackage NameDescriptionC++ compilation environmentgcc gcc-c++ makeMandatory tools to compile.CMake (>= 2.8)cmakeRead the build script and prepare sources for compilation.Centreon Clib (>= 1.0)centreon-clib-develCore library used by Centreon Connector.ssh2 librarylibssh2-develSSH library.gcrypt librarylibgcrypt-develGcrypt library.Install basic compilation toolsyum install gcc gcc-c++ make libssh2-devel libgcrypt-develInstall cmakeInstall Centreon ClibSee the Centreon Clib @TODO@:ref:documentation .BuildGet sourcesCentreon SSH Connector can be checked out from GitHub.The SSH connector sources reside in the ssh subdirectory. On a Linux box with git installed this is just a matter of:git clone the root of the project directory you'll find a ssh/build directory which holds build scripts. Generate the Makefileby running the following command:cd /path_to_centreon_connector/ssh/buildYour Centreon SSH Connector can be tweaked to your particular needs using CMake's variable system. Variables can be setlike this:cmake -Dvariable1>=value1> [-Dvariable2>=value2>] .Here's the list of variables available and their description:VariableDescriptionDefault valueWITH_CENTREON_CLIB_INCLUDE_DIRSet the directory path of centreon-clib include.auto detectionWITH_CENTREON_CLIB_LIBRARIESSet the centreon-clib library to use.auto detectionWITH_CENTREON_CLIB_LIBRARY_DIRSet the centreon-clib library directory (don't use it if you use WITH_CENTREON_CLIB_LIBRARIES)auto detectionWITH_KNOWN_HOSTS_CHECKEnable or disable Check hosts against user's known_hosts file.OFFWITH_LIBGCRYPT_INCLUDE_DIRSet the directory path of libgcrypt include.auto detectionWITH_LIBGCRYPT_LIBRARIESSet the libgcrypt library to use.auto detectionWITH_LIBGCRYPT_LIBRARY_DIRSet the libgcrypt library directory (don't use it if you use WITH_LIBGCRYPT_LIBRARIES)auto detectionWITH_LIBSSH2_INCLUDE_DIRSet the directory path of libssh2 include.auto detectionWITH_LIBSSH2_LIBRARIESSet the libssh2 library to use.auto detectionWITH_LIBSSH2_LIBRARY_DIRSet the libssh2 library directory (don't use it if you use WITH_LIBSSH2_LIBRARIES)auto detectionWITH_PREFIXBase directory for Centreon SSH Connector installation. If other prefixes are expressed as relative paths, they are relative to this path./usr/localWITH_PREFIX_BINARYDefine specific directory for Centreon Connector SSH binary.${WITH_PREFIX}/binWITH_TESTINGEnable generation of unit tests. They can later be run by typing make test. OFFExamplecmake \ -DWITH_PREFIX=/usr \ -DWITH_PREFIX_BINARY=/usr/lib/centreon-connector \ -DWITH_TESTING=0 .At this step, the software will check for existence and usability of the rerequisites. If one cannot be found, anappropriate error message will be printed. Otherwise an installation summary will be printed.If you need to change the options you used to compile your software, you might want to remove the CMakeCache.txtfile that is in the build directory. This will remove cache entries that might have been computed during the lastconfiguration step.CompilationOnce properly configured, the compilation process is really simple:And wait until compilation completes.InstallOnce compiled, the following command must be run as privileged user to finish installation:And wait for its completion.ConfigurationCentreon SSH Connector itself does not require any configuration. Itshould only be configured. clibs are utility code (types, typedefs, macros, functions) used across C programs. They are self-contained and domain neutral, able to be applied to various situations. clibs is Download clib packages for NetBSD, Void Linux. clib latest versions: 2.7.0, 0.3. clib architectures: aarch64, amd64, x86_64. clib linux packages: tgz, xbps Package manager for the C programming language. Contribute to clibs/clib development by creating an account on GitHub. This is an exact mirror of the clib project, hosted at SourceForge is not affiliated with clib. For more information, see the SourceForge Open Should check packages version when necessary.Package required to build:SoftwarePackage NameDescriptionC++ compilation environmentgcc gcc-c++ makeMandatory tools to compile.CMake (>= 2.8)cmakeRead the build script and prepare sources for compilation.Centreon Clib (>= 1.0)centreon-clib-develCore library used by Centreon Connector.PerlperlScripting language.Install basic compilation toolsyum install gcc gcc-c++ make perlInstall cmakeInstall Centreon ClibSee the Centreon Clib @TODO@:ref:documentation .BuildGet sourcesCentreon Perl Connector can be checked out from GitHub.The Perl connector sources reside in the perl subdirectory. On a Linux box with git installed this is just a matter of:git clone the root of the project directory you'll find a perl/build directory which holds build scripts. Generate the Makefileby running the following command:cd /path_to_centreon_connector/perl/buildYour Centreon Perl Connector can be tweaked to your particular needs using CMake's variable system. Variables can be setlike this:cmake -Dvariable1>=value1> [-Dvariable2>=value2>] .Here's the list of variables available and their description:VariableDescriptionDefault valueWITH_CENTREON_CLIB_INCLUDE_DIRSet the directory path of centreon-clib include.auto detectionWITH_CENTREON_CLIB_LIBRARIESSet the centreon-clib library to use.auto detectionWITH_CENTREON_CLIB_LIBRARY_DIRSet the centreon-clib library directory (don't use it if you use WITH_CENTREON_CLIB_LIBRARIES)auto detectionWITH_PREFIXBase directory for Centreon PErl Connector installation. If other prefixes are expressed as relative paths, they are relative to this path./usr/localWITH_PREFIX_BINARYDefine specific directory for Centreon Connector Perl binary.${WITH_PREFIX}/binWITH_TESTINGEnable generation of unit tests. They can later be run by typing make test.OFFExamplecmake \ -DWITH_PREFIX=/usr \ -DWITH_PREFIX_BINARY=/usr/lib/centreon-connector \ -DWITH_TESTING=0 .At this step, the software will check for existence and usability of the rerequisites. If one cannot be found, anappropriate error message will be printed. Otherwise an installation summary will be printed.If you need to change the options you used to compile your software, you might want to remove the CMakeCache.txtfile that is in the build directory. This will remove cache entries that might have been computed during the lastconfiguration step.CompilationOnce properly configured, the compilation process is really simple:And wait until compilation completes.InstallOnce compiled, the following command must be run as privileged user to finish installation:And wait for its completion.ConfigurationCentreon Perl Connector itself does not require any configuration. It should only be configured as a connector ofCentreon Engine.To execute Perl scripts with Centreon Perl Connector from Centreon Engine, one might configure commands that relates toPerl scripts. Such commands must only contain the path to the Perl script to execute followed by its arguments, justlike one would on the command line. To make it simple, you just have to add a connector property to your commanddefinition.Binary argumentsThese arguments are centreon_connector_perl options.Short nameLong nameDescription-d--debugIf this flag is specified, print all logs messages.-h--helpPrint help and exit.-v--versionPrint software version and exit.Example:define connector{ connector_name centreon_connector_perl connector_line /usr/bin/centreon-connector/centreon_connector_perl}define command{ command_name check_ping command_line $USER1$/check_ping.pl -H $HOSTADDRESS$ connector centreon_connector_perl}define command{ command_name check_disk command_line $USER1$/check_disk.pl -H $HOSTADDRESS$ -D $ARG1$ connector centreon_connector_perl}Technical detailsThis article describes how Centreon Perl Connector allow much gain on Perl script execution.First of all let's examine how aComments
You will need the following external dependencies:a C++ compilation environment.CMake (>= 2.8), a cross-platform build system.Centreon Clib, The centreon Core library.ssh2 library to use ssh functions.gcrypt library to secure connections.This program is compatible only with Unix-like platforms (Linux, FreeBSD, Solaris, ...).PrerequisitesCentOSDebian/UbuntuOpenSUSEIn CentOS you need to add manually cmake. After that you can install binary packages. Either use the Package Manager orthe yum tool to install them. You should check packages version when necessary.Package required to build:SoftwarePackage NameDescriptionC++ compilation environmentgcc gcc-c++ makeMandatory tools to compile.CMake (>= 2.8)cmakeRead the build script and prepare sources for compilation.Centreon Clib (>= 1.0)centreon-clib-develCore library used by Centreon Connector.ssh2 librarylibssh2-develSSH library.gcrypt librarylibgcrypt-develGcrypt library.Install basic compilation toolsyum install gcc gcc-c++ make libssh2-devel libgcrypt-develInstall cmakeInstall Centreon ClibSee the Centreon Clib @TODO@:ref:documentation .BuildGet sourcesCentreon SSH Connector can be checked out from GitHub.The SSH connector sources reside in the ssh subdirectory. On a Linux box with git installed this is just a matter of:git clone the root of the project directory you'll find a ssh/build directory which holds build scripts. Generate the Makefileby running the following command:cd /path_to_centreon_connector/ssh/buildYour Centreon SSH Connector can be tweaked to your particular needs using CMake's variable system. Variables can be setlike this:cmake -Dvariable1>=value1> [-Dvariable2>=value2>] .Here's the list of variables available and their description:VariableDescriptionDefault valueWITH_CENTREON_CLIB_INCLUDE_DIRSet the directory path of centreon-clib include.auto detectionWITH_CENTREON_CLIB_LIBRARIESSet the centreon-clib library to use.auto detectionWITH_CENTREON_CLIB_LIBRARY_DIRSet the centreon-clib library directory (don't use it if you use WITH_CENTREON_CLIB_LIBRARIES)auto detectionWITH_KNOWN_HOSTS_CHECKEnable or disable Check hosts against user's known_hosts file.OFFWITH_LIBGCRYPT_INCLUDE_DIRSet the directory path of libgcrypt include.auto detectionWITH_LIBGCRYPT_LIBRARIESSet the libgcrypt library to use.auto detectionWITH_LIBGCRYPT_LIBRARY_DIRSet the libgcrypt library directory (don't use it if you use WITH_LIBGCRYPT_LIBRARIES)auto detectionWITH_LIBSSH2_INCLUDE_DIRSet the directory path of libssh2 include.auto detectionWITH_LIBSSH2_LIBRARIESSet the libssh2 library to use.auto detectionWITH_LIBSSH2_LIBRARY_DIRSet the libssh2 library directory (don't use it if you use WITH_LIBSSH2_LIBRARIES)auto detectionWITH_PREFIXBase directory for Centreon SSH Connector installation. If other prefixes are expressed as relative paths, they are relative to this path./usr/localWITH_PREFIX_BINARYDefine specific directory for Centreon Connector SSH binary.${WITH_PREFIX}/binWITH_TESTINGEnable generation of unit tests. They can later be run by typing make test. OFFExamplecmake \ -DWITH_PREFIX=/usr \ -DWITH_PREFIX_BINARY=/usr/lib/centreon-connector \ -DWITH_TESTING=0 .At this step, the software will check for existence and usability of the rerequisites. If one cannot be found, anappropriate error message will be printed. Otherwise an installation summary will be printed.If you need to change the options you used to compile your software, you might want to remove the CMakeCache.txtfile that is in the build directory. This will remove cache entries that might have been computed during the lastconfiguration step.CompilationOnce properly configured, the compilation process is really simple:And wait until compilation completes.InstallOnce compiled, the following command must be run as privileged user to finish installation:And wait for its completion.ConfigurationCentreon SSH Connector itself does not require any configuration. Itshould only be configured
2025-04-08Should check packages version when necessary.Package required to build:SoftwarePackage NameDescriptionC++ compilation environmentgcc gcc-c++ makeMandatory tools to compile.CMake (>= 2.8)cmakeRead the build script and prepare sources for compilation.Centreon Clib (>= 1.0)centreon-clib-develCore library used by Centreon Connector.PerlperlScripting language.Install basic compilation toolsyum install gcc gcc-c++ make perlInstall cmakeInstall Centreon ClibSee the Centreon Clib @TODO@:ref:documentation .BuildGet sourcesCentreon Perl Connector can be checked out from GitHub.The Perl connector sources reside in the perl subdirectory. On a Linux box with git installed this is just a matter of:git clone the root of the project directory you'll find a perl/build directory which holds build scripts. Generate the Makefileby running the following command:cd /path_to_centreon_connector/perl/buildYour Centreon Perl Connector can be tweaked to your particular needs using CMake's variable system. Variables can be setlike this:cmake -Dvariable1>=value1> [-Dvariable2>=value2>] .Here's the list of variables available and their description:VariableDescriptionDefault valueWITH_CENTREON_CLIB_INCLUDE_DIRSet the directory path of centreon-clib include.auto detectionWITH_CENTREON_CLIB_LIBRARIESSet the centreon-clib library to use.auto detectionWITH_CENTREON_CLIB_LIBRARY_DIRSet the centreon-clib library directory (don't use it if you use WITH_CENTREON_CLIB_LIBRARIES)auto detectionWITH_PREFIXBase directory for Centreon PErl Connector installation. If other prefixes are expressed as relative paths, they are relative to this path./usr/localWITH_PREFIX_BINARYDefine specific directory for Centreon Connector Perl binary.${WITH_PREFIX}/binWITH_TESTINGEnable generation of unit tests. They can later be run by typing make test.OFFExamplecmake \ -DWITH_PREFIX=/usr \ -DWITH_PREFIX_BINARY=/usr/lib/centreon-connector \ -DWITH_TESTING=0 .At this step, the software will check for existence and usability of the rerequisites. If one cannot be found, anappropriate error message will be printed. Otherwise an installation summary will be printed.If you need to change the options you used to compile your software, you might want to remove the CMakeCache.txtfile that is in the build directory. This will remove cache entries that might have been computed during the lastconfiguration step.CompilationOnce properly configured, the compilation process is really simple:And wait until compilation completes.InstallOnce compiled, the following command must be run as privileged user to finish installation:And wait for its completion.ConfigurationCentreon Perl Connector itself does not require any configuration. It should only be configured as a connector ofCentreon Engine.To execute Perl scripts with Centreon Perl Connector from Centreon Engine, one might configure commands that relates toPerl scripts. Such commands must only contain the path to the Perl script to execute followed by its arguments, justlike one would on the command line. To make it simple, you just have to add a connector property to your commanddefinition.Binary argumentsThese arguments are centreon_connector_perl options.Short nameLong nameDescription-d--debugIf this flag is specified, print all logs messages.-h--helpPrint help and exit.-v--versionPrint software version and exit.Example:define connector{ connector_name centreon_connector_perl connector_line /usr/bin/centreon-connector/centreon_connector_perl}define command{ command_name check_ping command_line $USER1$/check_ping.pl -H $HOSTADDRESS$ connector centreon_connector_perl}define command{ command_name check_disk command_line $USER1$/check_disk.pl -H $HOSTADDRESS$ -D $ARG1$ connector centreon_connector_perl}Technical detailsThis article describes how Centreon Perl Connector allow much gain on Perl script execution.First of all let's examine how a
2025-04-04Running BREQUEST with v2.00 of the NetWare OS/2 Requester. Make positive to update your requester to v2.01.Question 44. After Installing Netware Btrieve (nlm) V6.10, Existing Applications Trying To Access Btrieve.Nlm Receive The Message "public Symbol Not Found." What Should I Do?Answer :This message outcomes from wrong set up of the Btrieve NLM. To install the NLM nicely, obtain BTR61.EXE and perform the subsequent ten steps:Create a brief sub-listing (as an instance, TEMPDIR).Copy BTR61.EXE to TEMPDIR and type BTR61.EXE -d. (This step creates two subdirectories, SYSTEM and PUBLIC and copies suitable files into each.)Back up all documents on the server wherein Btrieve can be established.Copy the files from TEMPDIRSYSTEM into SYSTEM on the server.Copy all the files from TEMPDIR PUBLIC to PUBLIC on the server.At the server console prompt, type "BSTOP" to unload the present versions of BTRIEVE.NLM and BSPXCOM.NLM.At the server console spark off, kind "UNLOAD CLIB".At the server console activate, type "LOAD CLIB" to load the brand new version of CLIB.At the server console set off, type "AFTER311".At theserver console prompt, kind "BSTART" to load BTRIEVE and BSPXCOM with default values. Question 45. I Am Using Netware Btrieve V6.0, But Sometimes I Need To Be Able To Switch Back To A Netware Btrieve five.X System. How Can I Do This?Answer :If your files are nevertheless in NetWare Btrieve v5.X layout, you can load Btrieve v6.X with the -d parameter, forcing new documents to be generated in 5.X layout. Otherwise, the simplest way to switch lower back to Btrieve v5.X
2025-04-07Embedded C Software Timer LibrarySoftware timer library for embedded (bare metal) projects. This provides the ability to create arbitrary numbers of software timers to track elapsed time, or to create expiration timers. It has no direct hardware dependencies, so it is portable to many platforms.InstallationThis library can be installed into your project using clib:$ clib install bradschl/embedded-c-soft-timerExample#include "stimer/stimer.h"static uint32_tget_current_time(void * hint){ (void) hint; // Timer is 1us resolution. The hardware counts down from the maximum // value, so the raw value needs to be flipped to be compatible with the // software timer return Timer_1_PERIOD - Timer_1_ReadCounter(); // If the hardware timer counts up, then no flip is needed // return Timer_1_ReadCounter();}intmain(){ // Create the timer context, 1us (1000ns) per Timer_1 tick, maximum value // returned by get_current_timer is Timer_1_PERIOD struct stimer_ctx * timer_ctx = stimer_alloc_context(NULL, get_current_time, Timer_1_PERIOD, 1000); ASSERT_NOT_NULL(timer_ctx); // Allocate a timer handle struct stimer * my_timer = stimer_alloc(timer_ctx); ASSERT_NOT_NULL(my_timer); // Set the timer to expire in 100ms from now stimer_expire_from_now_ms(my_timer, 100); for(;;) { // Periodically execute the timer context to drive the // internal timer rollover logic // This call is not strictly required, see stimer.h stimer_execute_context(timer_ctx); /* ... */ // Check if the timer expired, do stuff with it if(stimer_is_expired(my_timer)) { stimer_advance(my_timer); /* ... */ } }}">#include #include "stimer/stimer.h"static uint32_tget_current_time(void * hint){ (void) hint; // Timer is 1us resolution. The hardware counts down from the maximum // value, so the raw value needs to be flipped to be compatible with the // software timer return Timer_1_PERIOD - Timer_1_ReadCounter(); // If the hardware timer counts up, then no flip is needed // return Timer_1_ReadCounter();}intmain(){ // Create the timer context, 1us (1000ns) per Timer_1 tick, maximum value // returned by get_current_timer is Timer_1_PERIOD struct stimer_ctx * timer_ctx = stimer_alloc_context(NULL, get_current_time, Timer_1_PERIOD, 1000); ASSERT_NOT_NULL(timer_ctx); // Allocate a timer handle struct stimer * my_timer = stimer_alloc(timer_ctx); ASSERT_NOT_NULL(my_timer); // Set the timer to expire in 100ms from now stimer_expire_from_now_ms(my_timer, 100); for(;;) { // Periodically execute the timer context to drive the // internal timer rollover logic // This call is not strictly required, see stimer.h stimer_execute_context(timer_ctx); /* ... */ // Check if the timer expired, do stuff with it if(stimer_is_expired(my_timer)) { stimer_advance(my_timer); /* ... */ } }}APISee stimer.h for the C API.Dependencies and ResourcesThis library uses heap when allocating structures. After initialization, additional allocations will not be made. This should be fine for an embedded target, since memory fragmentation only happens if memory is freed.Compiled, this library is only a few kilobytes. Runtime memory footprint is very small, and is dependent on the number of timers allocated.LicenseMIT license for all files.
2025-03-28