diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-07-13 10:22:16 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-07-13 10:22:16 +0000 |
commit | a1811ef52374d28346eb554930bd40f885fbed22 (patch) | |
tree | 595b10651ef938e11a2d3c6faa79c19a92f3e10b | |
parent | d6afd4b928a3e2875297cd9cba11b570a83d95f9 (diff) | |
download | skalibs-a1811ef52374d28346eb554930bd40f885fbed22.tar.gz skalibs-a1811ef52374d28346eb554930bd40f885fbed22.tar.xz skalibs-a1811ef52374d28346eb554930bd40f885fbed22.zip |
- sysdeps for strnlen (Solaris... sigh)
- rc for 2.3.5.2
-rwxr-xr-x | configure | 1 | ||||
-rw-r--r-- | doc/index.html | 2 | ||||
-rw-r--r-- | doc/upgrade.html | 6 | ||||
-rw-r--r-- | package/deps.mak | 2 | ||||
-rw-r--r-- | package/info | 2 | ||||
-rw-r--r-- | src/include/skalibs/bytestr.h | 9 | ||||
-rw-r--r-- | src/sysdeps/trystrnlen.c | 4 |
7 files changed, 22 insertions, 4 deletions
diff --git a/configure b/configure index 5655761..b1d38cb 100755 --- a/configure +++ b/configure @@ -468,6 +468,7 @@ EOF choose clr signalfd SIGNALFD 'signalfd()' choose clr splice SPLICE 'splice()' choose cl strcasestr STRCASESTR 'strcasestr()' + choose cl strnlen STRNLEN 'strnlen()' choose c uint64t UINT64T 'uint64_t' if $forcedevr ; then diff --git a/doc/index.html b/doc/index.html index cebacec..f702f1c 100644 --- a/doc/index.html +++ b/doc/index.html @@ -60,7 +60,7 @@ with a standard C development environment </li> <h3> Download </h3> <ul> - <li> The current released version of skalibs is <a href="skalibs-2.3.5.1.tar.gz">2.3.5.1</a>. </li> + <li> The current released version of skalibs is <a href="skalibs-2.3.5.2.tar.gz">2.3.5.2</a>. </li> <li> Alternatively, you can checkout a copy of the skalibs git repository: <pre> git clone git://git.skarnet.org/skalibs </pre> </li> </ul> diff --git a/doc/upgrade.html b/doc/upgrade.html index 9de38a2..9311332 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -18,6 +18,12 @@ <h1> What has changed in skalibs </h1> +<h2> in 2.3.5.2 </h2> + +<ul> + <li> No functional changes. </li> +</ul> + <h2> in 2.3.5.1 </h2> <ul> diff --git a/package/deps.mak b/package/deps.mak index e81c27d..3a73767 100644 --- a/package/deps.mak +++ b/package/deps.mak @@ -11,7 +11,7 @@ src/include/skalibs/biguint.h: src/include/skalibs/gccattributes.h src/include/s src/include/skalibs/bitarray.h: src/include/skalibs/gccattributes.h src/include/skalibs/bufalloc.h: src/include/skalibs/gccattributes.h src/include/skalibs/stralloc.h src/include/skalibs/buffer.h: src/include/skalibs/allreadwrite.h src/include/skalibs/bytestr.h src/include/skalibs/cbuffer.h src/include/skalibs/functypes.h src/include/skalibs/gccattributes.h src/include/skalibs/siovec.h -src/include/skalibs/bytestr.h: src/include/skalibs/config.h src/include/skalibs/gccattributes.h +src/include/skalibs/bytestr.h: src/include/skalibs/config.h src/include/skalibs/gccattributes.h src/include/skalibs/sysdeps.h src/include/skalibs/cbuffer.h: src/include/skalibs/bytestr.h src/include/skalibs/diuint.h src/include/skalibs/gccattributes.h src/include/skalibs/siovec.h src/include/skalibs/cdb.h: src/include/skalibs/gccattributes.h src/include/skalibs/uint32.h src/include/skalibs/cdb_make.h: src/include/skalibs/allreadwrite.h src/include/skalibs/buffer.h src/include/skalibs/diuint32.h src/include/skalibs/genalloc.h src/include/skalibs/uint32.h diff --git a/package/info b/package/info index c4e2eba..81ac9d5 100644 --- a/package/info +++ b/package/info @@ -1,4 +1,4 @@ package=skalibs -version=2.3.5.1 +version=2.3.5.2 category=prog package_macro_name=SKALIBS diff --git a/src/include/skalibs/bytestr.h b/src/include/skalibs/bytestr.h index b241197..2340a2f 100644 --- a/src/include/skalibs/bytestr.h +++ b/src/include/skalibs/bytestr.h @@ -11,6 +11,7 @@ #ifndef SKALIBS_FLAG_REPLACE_LIBC +#include <skalibs/sysdeps.h> #include <sys/types.h> #include <string.h> #include <strings.h> @@ -20,7 +21,13 @@ #define byte_diff(a, n, b) memcmp(a, (b), n) #define byte_zero(p, n) memset(p, 0, n) #define str_len strlen -#define str_nlen strnlen + +#ifdef SKALIBS_HASSTRNLEN +# define str_nlen strnlen +#else +# define str_nlen(s, max) byte_chr(s, (max), 0) +#endif + #define str_diff strcmp #define str_diffn strncmp #define str_copy(to, from) strlen(strcpy(to, from)) diff --git a/src/sysdeps/trystrnlen.c b/src/sysdeps/trystrnlen.c new file mode 100644 index 0000000..5361cc9 --- /dev/null +++ b/src/sysdeps/trystrnlen.c @@ -0,0 +1,4 @@ +/* ISC license. */ + +#include <string.h> +int main () { return strnlen("/", 1) ; } |