1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

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 <wk@gnupg.org>
This commit is contained in:
Werner Koch 2016-08-11 20:46:51 +02:00
parent 72fa314b71
commit 0698324cde
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
4 changed files with 25 additions and 14 deletions

View file

@ -33,6 +33,7 @@
#ifndef GNUPG_COMMON_STRINGHELP_H
#define GNUPG_COMMON_STRINGHELP_H
#include <stdint.h>
#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);