From 0698324cde3e0cef7eeb6cfd1640c5eefdf13698 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 11 Aug 2016 20:46:51 +0200 Subject: common: New function string_to_u64. * common/stringhelp.c (string_to_u64): New. * dirmngr/http.c (longcounter_t): Remove. (struct cookie_s): Change content_length to uint64_t. (parse_response): Use string_to_u64. -- Meanwhile we allow some C99 features including stdint.h. Thus we can simplify things now. Signed-off-by: Werner Koch --- common/stringhelp.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'common/stringhelp.h') diff --git a/common/stringhelp.h b/common/stringhelp.h index adf2f2060..79d228415 100644 --- a/common/stringhelp.h +++ b/common/stringhelp.h @@ -33,6 +33,7 @@ #ifndef GNUPG_COMMON_STRINGHELP_H #define GNUPG_COMMON_STRINGHELP_H +#include #include "types.h" /*-- stringhelp.c --*/ @@ -59,6 +60,7 @@ char *make_absfilename_try (const char *first_part, ...) GPGRT_ATTR_SENTINEL(0); int compare_filenames( const char *a, const char *b ); +uint64_t string_to_u64 (const char *string); int hextobyte (const char *s); size_t utf8_charcount (const char *s, int len); -- cgit v1.2.3