Compare commits

..
4 Commits
Author SHA1 Message Date
Joachim Nilsson 02d9d9f8c1 Update ChangeLog and bump version for v2.0.2 release
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-05-10 19:13:56 +02:00
Joachim Nilsson 9f92a9d572 Fix #12: Add missing includes for INT32_MAX and MIN()
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-05-10 19:06:07 +02:00
Joachim Nilsson f0e3ed3342 Add basic unit test for strlite.h
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-05-10 19:05:48 +02:00
Joachim Nilsson 34f23a77f8 Missing defines for LLONG_MAX and LLONG_MIN
Some systems may not yet have defined LLONG_MAX and LLONG_MIN in
limits.h, in particular older GLIBC installs are affected.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-02-28 10:43:08 +01:00
8 changed files with 52 additions and 2 deletions

No files matched your search

+10 -1
View File
@@ -4,6 +4,14 @@ Change Log
All notable changes to the project are documented in this file. All notable changes to the project are documented in this file.
[v2.0.2][] - 2018-05-10
-----------------------
### Fixes
- Fix issue #12, missing includes in `strlite.h` for standalone use
- FTBFS `strtonum.c` on older systems w/o `LLONG_MAX` and `LLONG_MIN`
[v2.0.1][] - 2017-12-22 [v2.0.1][] - 2017-12-22
----------------------- -----------------------
@@ -316,7 +324,8 @@ problems this may cause!
Initial extraction of frog DNA from [Finit][]. See [README][] for API details. Initial extraction of frog DNA from [Finit][]. See [README][] for API details.
[UNRELEASED]: https://github.com/troglobit/libite/compare/v2.0.1...HEAD [UNRELEASED]: https://github.com/troglobit/libite/compare/v2.0.2...HEAD
[v2.0.2]: https://github.com/troglobit/libite/compare/v2.0.1...v2.0.2
[v2.0.1]: https://github.com/troglobit/libite/compare/v2.0.0...v2.0.1 [v2.0.1]: https://github.com/troglobit/libite/compare/v2.0.0...v2.0.1
[v2.0.0]: https://github.com/troglobit/libite/compare/v1.9.3...v2.0.0 [v2.0.0]: https://github.com/troglobit/libite/compare/v1.9.3...v2.0.0
[v1.9.3]: https://github.com/troglobit/libite/compare/v1.9.2...v1.9.3 [v1.9.3]: https://github.com/troglobit/libite/compare/v1.9.2...v1.9.3
+1 -1
View File
@@ -1,4 +1,4 @@
AC_INIT(libite, 2.0.1, https://github.com/troglobit/libite/issues) AC_INIT(libite, 2.0.2, https://github.com/troglobit/libite/issues)
AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
AM_SILENT_RULES([yes]) AM_SILENT_RULES([yes])
+8
View File
@@ -1,3 +1,10 @@
libite (2.0.2) unstable; urgency=medium
* Fix issues with using `strlite.h` standalone
* Fix build issue with `strtonum.c` older GLIBC
-- Joachim Nilsson <troglobit@gmail.com> Thu, 10 May 2018 19:12:57 +0200
libite (2.0.1-1) unstable; urgency=medium libite (2.0.1-1) unstable; urgency=medium
* New upstream release, v2.0.1, fixes to: * New upstream release, v2.0.1, fixes to:
@@ -5,6 +12,7 @@ libite (2.0.1-1) unstable; urgency=medium
- unit test for which() - unit test for which()
- add missing initscr() declaration in conio.h - add missing initscr() declaration in conio.h
- ifdef guards around min()/max() macros - ifdef guards around min()/max() macros
-- Joachim Nilsson <troglobit@gmail.com> Fri, 22 Dec 2017 12:11:41 +0100 -- Joachim Nilsson <troglobit@gmail.com> Fri, 22 Dec 2017 12:11:41 +0100
libite (2.0.0-1) unstable; urgency=low libite (2.0.0-1) unstable; urgency=low
+3
View File
@@ -24,7 +24,10 @@
#ifndef LITE_STRING_H_ #ifndef LITE_STRING_H_
#define LITE_STRING_H_ #define LITE_STRING_H_
#include <stdint.h> /* uint8_t, uint16_t, uint32_t, INT32_MAX, etc. */
#include <string.h> #include <string.h>
#include <sys/param.h> /* MAX(), isset(), setbit(), TRUE, FALSE, et consortes. :-) */
#include "strdupa.h" #include "strdupa.h"
#include "strndupa.h" #include "strndupa.h"
#include "strnlen.h" #include "strnlen.h"
+9
View File
@@ -26,6 +26,15 @@
#define TOOSMALL 2 #define TOOSMALL 2
#define TOOLARGE 3 #define TOOLARGE 3
#ifndef LLONG_MAX
# define LLONG_MAX 0x7fffffffffffffffLL
#endif
#ifndef LLONG_MIN
# define LLONG_MIN (-0x7fffffffffffffffLL - 1)
#endif
long long long long
strtonum(const char *numstr, long long minval, long long maxval, strtonum(const char *numstr, long long minval, long long maxval,
const char **errstrp) const char **errstrp)
+1
View File
@@ -11,6 +11,7 @@ makepath
pidfile pidfile
progress progress
rsync rsync
str
tempfile tempfile
touch touch
tree tree
+1
View File
@@ -11,6 +11,7 @@ TESTS += fsendfile
TESTS += lfile TESTS += lfile
TESTS += makepath TESTS += makepath
TESTS += pidfile TESTS += pidfile
TESTS += str
TESTS += touch TESTS += touch
TESTS += progress TESTS += progress
TESTS += rsync TESTS += rsync
+19
View File
@@ -0,0 +1,19 @@
#include "../src/strlite.h"
int main(void)
{
int val;
val = atonum("42");
if (val != 42)
return 1;
if (!string_match("eth1", "eth1234"))
return 1;
if (string_compare("eth1", "eth1234"))
return 1;
return 0;
}