Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
type_util.h
Go to the documentation of this file.
1
11#ifndef __TYPE_UTIL_H__
12#define __TYPE_UTIL_H__
13
14#include <inttypes.h>
15#include "ws_symbol_export.h"
16
17/*
18 * uint64_t to double conversions taken from gstutils.h of GStreamer project
19 *
20 * GStreamer
21 * Copyright (C) 1999,2000 Erik Walthinsen <[email protected]>
22 * 2000 Wim Taymans <[email protected]>
23 * 2002 Thomas Vander Stichele <[email protected]>
24 *
25 * gstutils.h: Header for various utility functions
26 *
27 * GNU GPL v2
28 *
29 */
30
31WS_DLL_PUBLIC
32uint64_t type_util_double_to_uint64(double value);
33WS_DLL_PUBLIC
34double type_util_uint64_to_double(uint64_t value);
35
36#ifdef _WIN32
37#define double_to_uint64(value) type_util_double_to_uint64(value)
38#define uint64_to_double(value) type_util_uint64_to_double(value)
39#else
40#define double_to_uint64(value) ((uint64_t)(value))
41#define uint64_to_double(value) ((double)(value))
42#endif
43
44#endif /* __TYPE_UTIL_H__ */