libi2ncommon
8 years agoincrease version to 2.8, soversion to 6 since we changed the interface v2.8
Gerd von Egidy [Thu, 17 Dec 2015 10:22:47 +0000]
increase version to 2.8, soversion to 6 since we changed the interface

8 years agoretry df test up to 5 times if it fails due to some other program writing/deleting...
Gerd von Egidy [Thu, 17 Dec 2015 10:19:52 +0000]
retry df test up to 5 times if it fails due to some other program writing/deleting in /tmp

8 years agoAlways initialize exit_set
Thomas Jarosch [Thu, 17 Dec 2015 10:01:38 +0000]
Always initialize exit_set

Be on the safe side.

8 years agorename pipe_to_string() to capture_exec() and improve it's interface
Gerd von Egidy [Thu, 17 Dec 2015 09:56:27 +0000]
rename pipe_to_string() to capture_exec() and improve it's interface

8 years agocheck if status_set != NULL before setting it
Gerd von Egidy [Thu, 17 Dec 2015 09:27:38 +0000]
check if status_set != NULL before setting it

8 years agosplit pipestream.hxx into .hxx and .cpp
Gerd von Egidy [Thu, 17 Dec 2015 09:26:07 +0000]
split pipestream.hxx into .hxx and .cpp

8 years agoFix typo in comment
Thomas Jarosch [Thu, 17 Dec 2015 08:26:09 +0000]
Fix typo in comment

8 years agoimplement pipe_to_string() and use it to shorten the test case sourcecode
Gerd von Egidy [Wed, 16 Dec 2015 23:57:29 +0000]
implement pipe_to_string() and use it to shorten the test case sourcecode

8 years agoimplement du()
Gerd von Egidy [Wed, 16 Dec 2015 23:32:07 +0000]
implement du()

8 years agoalso replace opendir() by our get_dir(), you get eye cancer when looking at the c...
Gerd von Egidy [Wed, 16 Dec 2015 23:04:39 +0000]
also replace opendir() by our get_dir(), you get eye cancer when looking at the c functions

8 years agofix symlink-dir-bug by switching from stat() to our Stat-class and using it's follow_...
Gerd von Egidy [Wed, 16 Dec 2015 22:59:32 +0000]
fix symlink-dir-bug by switching from stat() to our Stat-class and using it's follow_links=false

8 years agosanitize indent so that I can work with this code
Gerd von Egidy [Wed, 16 Dec 2015 22:36:50 +0000]
sanitize indent so that I can work with this code

8 years agotest handling of symlinks to directories in recursive_delete: seems to be buggy
Gerd von Egidy [Wed, 16 Dec 2015 15:37:55 +0000]
test handling of symlinks to directories in recursive_delete: seems to be buggy

8 years agoadd safeguard against infinite loop with EINTR, even if that case is very unlikely
Gerd von Egidy [Wed, 16 Dec 2015 14:33:09 +0000]
add safeguard against infinite loop with EINTR, even if that case is very unlikely

8 years agoadd Stat::BytesOnDisk()
Gerd von Egidy [Wed, 16 Dec 2015 14:19:55 +0000]
add Stat::BytesOnDisk()

8 years agofix typo
Gerd von Egidy [Wed, 16 Dec 2015 13:38:50 +0000]
fix typo

8 years agoadd get_free_diskspace()
Gerd von Egidy [Wed, 16 Dec 2015 13:37:17 +0000]
add get_free_diskspace()

8 years agofix code style
Gerd von Egidy [Wed, 16 Dec 2015 12:56:23 +0000]
fix code style

8 years agominor speed optimization
Gerd von Egidy [Wed, 16 Dec 2015 10:55:30 +0000]
minor speed optimization

8 years agoautomatically sanitize all messages logged through I2n::Logger, provide an option...
Gerd von Egidy [Wed, 16 Dec 2015 10:43:41 +0000]
automatically sanitize all messages logged through I2n::Logger, provide an option to disable this

8 years agoadd sanitize_for_logging() to stringfunc
Gerd von Egidy [Wed, 16 Dec 2015 09:57:43 +0000]
add sanitize_for_logging() to stringfunc

8 years agoadd attention about the string_to interface usage
Gerd von Egidy [Wed, 16 Dec 2015 09:13:53 +0000]
add attention about the string_to interface usage

8 years agoAdd new option to recursive_delete: keep_parent_dir
Thomas Jarosch [Tue, 15 Dec 2015 10:06:24 +0000]
Add new option to recursive_delete: keep_parent_dir

Also added unit tests for the new feature.

8 years agoadded comments to pipestream, including WEXITSTATUS
Christian Herdtweck [Mon, 30 Nov 2015 08:27:38 +0000]
added comments to pipestream, including WEXITSTATUS

8 years agoStart .gitignore
Thomas Jarosch [Wed, 11 Nov 2015 17:51:11 +0000]
Start .gitignore

8 years agoNew function to check if two files differ: file_content_differs()
Thomas Jarosch [Wed, 11 Nov 2015 17:47:19 +0000]
New function to check if two files differ: file_content_differs()

8 years agoProperly initialize FollowLinks in the default constructor
Thomas Jarosch [Mon, 22 Jun 2015 19:24:09 +0000]
Properly initialize FollowLinks in the default constructor

Detected by cppcheck.

8 years agoadd test to make sure tmpofstream handles file creation errors gracefully
Gerd von Egidy [Tue, 12 May 2015 08:20:16 +0000]
add test to make sure tmpofstream handles file creation errors gracefully

8 years agoRelease libi2ncommon 2.7 v2.7
Thomas Jarosch [Mon, 11 May 2015 08:08:52 +0000]
Release libi2ncommon 2.7

8 years agomake pid_of work with processes owned by other users, same method used as in 'ps'
Gerd von Egidy [Sun, 10 May 2015 14:56:29 +0000]
make pid_of work with processes owned by other users, same method used as in 'ps'

8 years agowhen running the unit test without root, you don't have write access to /var/run
Gerd von Egidy [Sun, 10 May 2015 14:30:48 +0000]
when running the unit test without root, you don't have write access to /var/run

8 years agoMove includedir to /usr/include/libi2ncommon
Thomas Jarosch [Tue, 5 May 2015 08:04:43 +0000]
Move includedir to /usr/include/libi2ncommon

Some of our header filenames are very generic,
so let's group them in an own subdirectory.

9 years agomake licensing more transparent
Gerd von Egidy [Wed, 8 Apr 2015 12:53:45 +0000]
make licensing more transparent

9 years agorelease libi2ncommon 2.6 v2.6
Gerd von Egidy [Wed, 8 Apr 2015 09:06:18 +0000]
release libi2ncommon 2.6

9 years agonew directories - increase the soversion to really make sure we don't miss to update...
Gerd von Egidy [Wed, 8 Apr 2015 08:51:31 +0000]
new directories - increase the soversion to really make sure we don't miss to update any dependent program

9 years agofix & improve packaging
Gerd von Egidy [Wed, 8 Apr 2015 08:44:38 +0000]
fix & improve packaging

9 years agolibi2ncommon is no Intranator-specific lib anymore, it is open source. So don't insta...
Gerd von Egidy [Wed, 8 Apr 2015 08:07:54 +0000]
libi2ncommon is no Intranator-specific lib anymore, it is open source. So don't install it into /usr/intranator anymore

9 years agowrite libs into lib64 dir on 64 bit platforms
Gerd von Egidy [Wed, 8 Apr 2015 07:58:29 +0000]
write libs into lib64 dir on 64 bit platforms

9 years agoboost::shared_dynamic_cast is deprecated and removed in recent versions of boost...
Gerd von Egidy [Thu, 2 Apr 2015 15:28:27 +0000]
boost::shared_dynamic_cast is deprecated and removed in recent versions of boost, replace it with dynamic_pointer_cast

9 years agoadd function html_entities_to_console to stringfunc
Gerd von Egidy [Thu, 5 Feb 2015 14:34:12 +0000]
add function html_entities_to_console to stringfunc

9 years agomoved function remove_unlisted_files from intranator/generate to libi2ncommon because...
Christian Herdtweck [Tue, 25 Nov 2014 12:44:42 +0000]
moved function remove_unlisted_files from intranator/generate to libi2ncommon because is needed in other places, also

9 years agochanged doc only to make doxygen happier and get less warnings during build
Christian Herdtweck [Tue, 25 Nov 2014 12:43:39 +0000]
changed doc only to make doxygen happier and get less warnings during build

9 years agofixed problem with absolute path for boost iostreams lib in pkg-config file
Christian Herdtweck [Tue, 18 Nov 2014 09:03:43 +0000]
fixed problem with absolute path for boost iostreams lib in pkg-config file

9 years agoadded function get_log_level_string to logfunc.cpp/hpp
Christian Herdtweck [Wed, 5 Nov 2014 16:26:34 +0000]
added function get_log_level_string to logfunc.cpp/hpp

10 years agoIncrease version
Thomas Jarosch [Mon, 18 Nov 2013 14:48:12 +0000]
Increase version

10 years agoadd new trunc option to write_file
Gerd von Egidy [Tue, 20 Aug 2013 13:55:48 +0000]
add new trunc option to write_file

10 years agoAdd ugly cast for our siginfo_t forward declaration.
Thomas Jarosch [Mon, 17 Jun 2013 15:03:05 +0000]
Add ugly cast for our siginfo_t forward declaration.

gcc complained:
/root/rpmbuild/BUILD/libi2ncommon-2.4/utils/signalfunc.cpp: In function ‘bool I2n::SystemTools::install_signal_handler(I2n::SystemTools::Signal, void (*)(int, siginfo*, void*))’:
/root/rpmbuild/BUILD/libi2ncommon-2.4/utils/signalfunc.cpp:370: error: invalid static_cast from type ‘void (*)(int, siginfo*, void*)’ to type ‘void (*)(int, siginfo_t*, void*)’

We can get away with casting function pointer types on x86:
http://stackoverflow.com/questions/559581/casting-a-function-pointer-to-another-type

Not sure if it's really worth to avoid including signal.h from signalfunc.hpp...

10 years agoFix pkgconfig library dependency on boost iostreams library (newer binutils needs -l)
Thomas Jarosch [Mon, 17 Jun 2013 13:34:01 +0000]
Fix pkgconfig library dependency on boost iostreams library (newer binutils needs -l)

11 years agomake code compile with newer gcc versions too
Gerd von Egidy [Thu, 24 Jan 2013 13:24:43 +0000]
make code compile with newer gcc versions too

12 years agoTest if write_file() creates empty files, too
Thomas Jarosch [Wed, 15 Feb 2012 09:01:27 +0000]
Test if write_file() creates empty files, too

12 years agoone more time_t fix, the other functions look good
Gerd von Egidy [Fri, 10 Feb 2012 12:28:03 +0000]
one more time_t fix, the other functions look good

12 years agofix unit test for pid_of in case of systemd
Gerd von Egidy [Fri, 10 Feb 2012 12:18:23 +0000]
fix unit test for pid_of in case of systemd

12 years agomake format_full_time work on 64 bit systems too: need to use time_t and no int
Gerd von Egidy [Fri, 10 Feb 2012 10:54:25 +0000]
make format_full_time work on 64 bit systems too: need to use time_t and no int

12 years agounit test for Tribool
Gerd von Egidy [Fri, 10 Feb 2012 10:38:36 +0000]
unit test for Tribool

12 years agoadd ostream handling to Tribool
Gerd von Egidy [Fri, 10 Feb 2012 10:38:01 +0000]
add ostream handling to Tribool

12 years agoAdd support for i18n_plural(): Translation of plural forms
Thomas Jarosch [Mon, 12 Dec 2011 16:55:16 +0000]
Add support for i18n_plural(): Translation of plural forms

To recognize our custom i18n_plural keyword in poedit, use this syntax:

i18n_plural:1,2

We also need to set a "plural form" in poedit. Example for German:

nplurals=2; plural=n != 1;

12 years agoRemove i18n_get_string() function signature where we pass the 'return value' as refer...
Thomas Jarosch [Mon, 12 Dec 2011 16:35:08 +0000]
Remove i18n_get_string() function signature where we pass the 'return value' as reference parameter

Grepped whole Intranator source tree, seems to be used nowhere and this simplifies the API.

12 years agoUnit test for i18n_get_string()
Thomas Jarosch [Mon, 12 Dec 2011 16:31:33 +0000]
Unit test for i18n_get_string()

12 years agoBump .so version and project version
Thomas Jarosch [Mon, 17 Oct 2011 12:30:37 +0000]
Bump .so version and project version

12 years agoAdd 'make dist' target
Thomas Jarosch [Mon, 17 Oct 2011 12:28:17 +0000]
Add 'make dist' target

12 years agoMake IP_RANGE::resolve_ip() thread safe
Thomas Jarosch [Mon, 17 Oct 2011 12:24:20 +0000]
Make IP_RANGE::resolve_ip() thread safe

12 years agoReplace readdir() by thread-safe readdir_r() function
Thomas Jarosch [Mon, 17 Oct 2011 09:53:37 +0000]
Replace readdir() by thread-safe readdir_r() function

12 years agoReplace localtime() with thread safe localtime_r()
Thomas Jarosch [Mon, 17 Oct 2011 09:40:18 +0000]
Replace localtime() with thread safe localtime_r()

12 years agoPass some const strings by reference
Thomas Jarosch [Mon, 17 Oct 2011 09:21:07 +0000]
Pass some const strings by reference

12 years agoConstification and minimal performance improvements
Thomas Jarosch [Mon, 17 Oct 2011 09:18:03 +0000]
Constification and minimal performance improvements

12 years agoReplace bzero() with memset(). bzero() is removed in POSIX-2008
Thomas Jarosch [Mon, 17 Oct 2011 09:15:22 +0000]
Replace bzero() with memset(). bzero() is removed in POSIX-2008

12 years agoAlways initialize variables
Thomas Jarosch [Mon, 17 Oct 2011 09:13:41 +0000]
Always initialize variables

12 years agoEnable all compile warnings
Thomas Jarosch [Mon, 17 Oct 2011 09:00:40 +0000]
Enable all compile warnings

12 years agoFix wrong bracket placing (luckily the code is unreleased)
Thomas Jarosch [Mon, 17 Oct 2011 08:58:58 +0000]
Fix wrong bracket placing (luckily the code is unreleased)

12 years agoSilence compile warning about Undef not being handled in switch()
Thomas Jarosch [Mon, 17 Oct 2011 08:54:37 +0000]
Silence compile warning about Undef not being handled in switch()

12 years agoFix signed/unsigned comparison
Thomas Jarosch [Mon, 17 Oct 2011 08:50:11 +0000]
Fix signed/unsigned comparison

12 years agoFix signed/unsigned comparison warning
Thomas Jarosch [Mon, 17 Oct 2011 08:48:47 +0000]
Fix signed/unsigned comparison warning

12 years agoRemove unused variables
Thomas Jarosch [Mon, 17 Oct 2011 08:47:42 +0000]
Remove unused variables

12 years agoFix initialization order
Thomas Jarosch [Mon, 17 Oct 2011 08:46:30 +0000]
Fix initialization order

12 years agoFix initialization order
Thomas Jarosch [Mon, 17 Oct 2011 08:40:07 +0000]
Fix initialization order

12 years agoAlso update else/endif statement
Thomas Jarosch [Mon, 17 Oct 2011 08:37:05 +0000]
Also update else/endif statement

12 years agoBuild documentation optionally
Thomas Jarosch [Mon, 17 Oct 2011 08:36:19 +0000]
Build documentation optionally

12 years agoAdd required boost version
Guilherme Maciel Ferreira [Mon, 17 Oct 2011 08:31:49 +0000]
Add required boost version

12 years agoFix off-by-one buffer access
Thomas Jarosch [Fri, 23 Sep 2011 07:18:45 +0000]
Fix off-by-one buffer access

12 years agoIncrease version. Remove unused MAJOR_/MINOR_VERSION
Thomas Jarosch [Thu, 15 Sep 2011 14:22:55 +0000]
Increase version. Remove unused MAJOR_/MINOR_VERSION

12 years agoAdd initgroups() call to drop_root_privileges
Thomas Jarosch [Thu, 15 Sep 2011 14:22:32 +0000]
Add initgroups() call to drop_root_privileges

12 years agoIncrease 'libi2ncommon' version to 2.2
Thomas Jarosch [Wed, 7 Sep 2011 12:07:03 +0000]
Increase 'libi2ncommon' version to 2.2

12 years agoUse std::vector instead of std::list for active ScopeTracker management (we just...
Thomas Jarosch [Fri, 15 Jul 2011 14:59:11 +0000]
Use std::vector instead of std::list for active ScopeTracker management (we just append/delete at the end of the list all the time)

12 years agoMake ScopeTracker thread safe via TLS (thread local storage)
Thomas Jarosch [Fri, 15 Jul 2011 14:55:35 +0000]
Make ScopeTracker thread safe via TLS (thread local storage)

Thanks to Gerd for the idea

12 years agoMake our log functions thread safe
Thomas Jarosch [Fri, 15 Jul 2011 13:42:24 +0000]
Make our log functions thread safe

12 years agoImplement umask()
Thomas Jarosch [Thu, 8 Jul 2010 14:25:25 +0000]
Implement umask()

12 years agoImplement mkdir(), rmdir(), getcwd() and chdir()
Thomas Jarosch [Thu, 8 Jul 2010 14:21:13 +0000]
Implement mkdir(), rmdir(), getcwd() and chdir()

12 years agoImplement mkdtemp()
Thomas Jarosch [Thu, 8 Jul 2010 12:37:57 +0000]
Implement mkdtemp()

12 years agoReplaced all occurences of 'include_directories(*${CMAKE_CURRENT_SOURCE_DIR}*)' by...
Kristóf Katus [Mon, 8 Aug 2011 10:56:20 +0000]
Replaced all occurences of 'include_directories(*${CMAKE_CURRENT_SOURCE_DIR}*)' by hand in CMakeLists.txt files to 'include_directories(*BEFORE ${CMAKE_CURRENT_SOURCE_DIR}*)'

12 years agoIncrease version of own packages
Thomas Jarosch [Wed, 20 Jul 2011 13:04:18 +0000]
Increase version of own packages

12 years agoMerge branch 'winmail-dat-fix'
Thomas Jarosch [Wed, 20 Jul 2011 12:23:12 +0000]
Merge branch 'winmail-dat-fix'

12 years agoMerge branch 'cyrus-duplicates'
Thomas Jarosch [Wed, 20 Jul 2011 12:22:33 +0000]
Merge branch 'cyrus-duplicates'

12 years agoMerge branch 'postfix-relay'
Gerd von Egidy [Fri, 8 Jul 2011 13:52:22 +0000]
Merge branch 'postfix-relay'

12 years agoMerge branch 'fsav-update'
Thomas Jarosch [Wed, 6 Jul 2011 08:54:32 +0000]
Merge branch 'fsav-update'

12 years agoImproved log file parser code from Guilherme. Fixes memleak on exception
Thomas Jarosch [Tue, 14 Jun 2011 14:19:02 +0000]
Improved log file parser code from Guilherme. Fixes memleak on exception

12 years agoMerge branch 'file-magic'
Gerd von Egidy [Thu, 26 May 2011 09:58:57 +0000]
Merge branch 'file-magic'

12 years agoIncrease .so version (=API version) of libi2ncommon
Thomas Jarosch [Wed, 25 May 2011 07:25:45 +0000]
Increase .so version (=API version) of libi2ncommon

12 years agoMerge branch 'raid-fix'
Gerd von Egidy [Mon, 23 May 2011 14:51:44 +0000]
Merge branch 'raid-fix'

12 years agoFix libi2ncommon pkgconfig file
Thomas Jarosch [Thu, 19 May 2011 13:00:36 +0000]
Fix libi2ncommon pkgconfig file

12 years agoDon't pass the full library path with -l
Thomas Jarosch [Fri, 13 May 2011 13:23:11 +0000]
Don't pass the full library path with -l