]> granicus.if.org Git - zziplib/commitdiff
edit last patch - move stdlib to ifdef-section, and make the internal function static #25
authorGuido Draheim <guidod@gmx.de>
Thu, 1 Mar 2018 00:18:43 +0000 (01:18 +0100)
committerGuido Draheim <guidod@gmx.de>
Thu, 1 Mar 2018 00:18:43 +0000 (01:18 +0100)
zzip/__string.h

index d65c022a4ae1f1bff21387ae9178b73ad613df3c..cd567142fc526e2e572357853848f63a7ef23f13 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef __ZZIP_INTERNAL_STRING_H
 #define __ZZIP_INTERNAL_STRING_H
 
-#include <stdlib.h>
-
 #ifdef __linux__
 #define _GNU_SOURCE _glibc_developers_are_idiots_to_call_strndup_gnu_specific_
 #endif
 #if defined ZZIP_HAVE_STRNLEN || defined strnlen
 #define _zzip_strnlen strnlen
 #else
+#include <stdlib.h>
 
 /* if your system does not have strnlen: */
-zzip__new__ size_t
+zzip__new__ static size_t
 _zzip_strnlen(const char *p, size_t maxlen)
 {
     const char * stop = (char *)memchr(p, '\0', maxlen);