mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-31 04:43:06 +02:00
glib/gtimezone.c: Declare Unix-only functions under G_OS_UNIX
Fixes the following warnings on CLang when compiling for Windows: ../glib/glib/gtimezone.c:95:22: warning: unused function 'gint64_from_be' [-Wunused-function] static inline gint64 gint64_from_be (const gint64_be be) { ^ ../glib/glib/gtimezone.c:99:22: warning: unused function 'gint32_from_be' [-Wunused-function] static inline gint32 gint32_from_be (const gint32_be be) { ^ ../glib/glib/gtimezone.c:103:23: warning: unused function 'guint32_from_be' [-Wunused-function] static inline guint32 guint32_from_be (const guint32_be be) { ^
This commit is contained in:
parent
5400f4e128
commit
107311afce
@ -92,6 +92,8 @@ typedef struct { gchar bytes[8]; } gint64_be;
|
|||||||
typedef struct { gchar bytes[4]; } gint32_be;
|
typedef struct { gchar bytes[4]; } gint32_be;
|
||||||
typedef struct { gchar bytes[4]; } guint32_be;
|
typedef struct { gchar bytes[4]; } guint32_be;
|
||||||
|
|
||||||
|
#ifdef G_OS_UNIX
|
||||||
|
|
||||||
static inline gint64 gint64_from_be (const gint64_be be) {
|
static inline gint64 gint64_from_be (const gint64_be be) {
|
||||||
gint64 tmp; memcpy (&tmp, &be, sizeof tmp); return GINT64_FROM_BE (tmp);
|
gint64 tmp; memcpy (&tmp, &be, sizeof tmp); return GINT64_FROM_BE (tmp);
|
||||||
}
|
}
|
||||||
@ -104,6 +106,8 @@ static inline guint32 guint32_from_be (const guint32_be be) {
|
|||||||
guint32 tmp; memcpy (&tmp, &be, sizeof tmp); return GUINT32_FROM_BE (tmp);
|
guint32 tmp; memcpy (&tmp, &be, sizeof tmp); return GUINT32_FROM_BE (tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/* The layout of an IANA timezone file header */
|
/* The layout of an IANA timezone file header */
|
||||||
struct tzhead
|
struct tzhead
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user