wsutil: Clean up some includes

Clean up some includes after 8285a9775f.
This commit is contained in:
Gerald Combs 2023-09-24 16:13:10 -07:00
parent 4d03e061ee
commit a8c9a4b976
5 changed files with 15 additions and 6 deletions

View File

@ -11,6 +11,9 @@
#include <string.h> /* for memcmp */
#include <stdio.h>
#include <glib.h>
#include "packet.h"
#include "address_types.h"
#include "to_str.h"
@ -19,7 +22,6 @@
#include "wsutil/str_util.h"
#include "wsutil/inet_addr.h"
#include <wsutil/ws_assert.h>
#include <wsutil/pint.h>
struct _address_type_t {
int addr_type; /* From address_type enumeration or registered value */

View File

@ -27,6 +27,8 @@
#include <stdio.h>
#include <errno.h>
#include <glib.h>
#include "wsutil/pint.h"
#include "wsutil/sign_ext.h"
#include "wsutil/strtoi.h"

View File

@ -14,6 +14,7 @@
#define __PINT_H__
#include <inttypes.h>
#include <glib.h>
/* Routines that take a possibly-unaligned pointer to a 16-bit, 24-bit,
@ -113,8 +114,7 @@ static inline uint32_t pntoh32(const void *p)
static inline uint64_t pntoh64(const void *p)
{
/* XXX uint64_t doesn't work on Windows. */
guint64 ret;
uint64_t ret;
memcpy(&ret, p, sizeof(ret));
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
ret = pint_bswap64(ret);
@ -144,8 +144,7 @@ static inline uint32_t pletoh32(const void *p)
static inline uint64_t pletoh64(const void *p)
{
/* XXX uint64_t doesn't work on Windows. */
guint64 ret;
uint64_t ret;
memcpy(&ret, p, sizeof(ret));
#if G_BYTE_ORDER == G_BIG_ENDIAN
ret = pint_bswap64(ret);

View File

@ -11,6 +11,9 @@
#define __WSUTIL_SIGN_EXT_H__
#include <inttypes.h>
#include <glib.h>
#include <wsutil/ws_assert.h>
/* sign extension routines */

View File

@ -12,8 +12,11 @@
#include "config.h"
#include "strtoi.h"
#include <errno.h>
#include <glib.h>
#include "strtoi.h"
#include <wsutil/ws_assert.h>
bool ws_strtoi64(const char* str, const char** endptr, int64_t* cint)