pidgin/pidgin

Clean up a bunch of stuff in internal.h

20 months ago, Gary Kramlich
289867067994
Parents 52dbe7ad39ce
Children 988a1c353704
Clean up a bunch of stuff in internal.h

Testing Done:
Compiled

Reviewed at https://reviews.imfreedom.org/r/1763/
--- a/libpurple/internal.h Mon Sep 12 22:18:06 2022 -0500
+++ b/libpurple/internal.h Mon Sep 12 22:24:33 2022 -0500
@@ -33,43 +33,13 @@
# include <config.h>
#endif
-#ifdef HAVE_ENDIAN_H
-# include <endian.h>
-#endif
-
-#define MSG_LEN 2048
-/* The above should normally be the same as BUF_LEN,
- * but just so we're explicitly asking for the max message
- * length. */
-#define BUF_LEN MSG_LEN
+#define BUF_LEN 2048
#define BUF_LONG BUF_LEN * 2
-#include <sys/types.h>
-
#ifndef _WIN32
# include <sys/time.h>
# include <sys/wait.h>
# include <sys/time.h>
-#endif
-
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#ifdef HAVE_ICONV
-# include <iconv.h>
-#endif
-
-#ifdef HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-
-#ifndef _WIN32
# include <netinet/in.h>
# include <sys/socket.h>
# include <arpa/inet.h>
@@ -98,22 +68,4 @@
#endif
#endif
-#ifdef __clang__
-
-#define PURPLE_BEGIN_IGNORE_CAST_ALIGN \
- _Pragma ("clang diagnostic push") \
- _Pragma ("clang diagnostic ignored \"-Wcast-align\"")
-
-#define PURPLE_END_IGNORE_CAST_ALIGN \
- _Pragma ("clang diagnostic pop")
-
-#else
-
-#define PURPLE_BEGIN_IGNORE_CAST_ALIGN
-#define PURPLE_END_IGNORE_CAST_ALIGN
-
-#endif /* __clang__ */
-
-#include <glib-object.h>
-
#endif /* PURPLE_INTERNAL_H */
--- a/libpurple/network.c Mon Sep 12 22:18:06 2022 -0500
+++ b/libpurple/network.c Mon Sep 12 22:24:33 2022 -0500
@@ -24,6 +24,8 @@
#include <gio/gio.h>
+#include <fcntl.h>
+
#ifndef _WIN32
#include <arpa/nameser.h>
#include <resolv.h>
--- a/libpurple/util.c Mon Sep 12 22:18:06 2022 -0500
+++ b/libpurple/util.c Mon Sep 12 22:24:33 2022 -0500
@@ -21,6 +21,8 @@
#include <glib/gi18n-lib.h>
+#include <ctype.h>
+
#include "purpleprivate.h"
#include "core.h"
--- a/libpurple/version.c Mon Sep 12 22:18:06 2022 -0500
+++ b/libpurple/version.c Mon Sep 12 22:24:33 2022 -0500
@@ -17,8 +17,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
-#include "internal.h"
-
#include "version.h"
const guint purple_major_version = PURPLE_MAJOR_VERSION;
--- a/libpurple/version.h.in Mon Sep 12 22:18:06 2022 -0500
+++ b/libpurple/version.h.in Mon Sep 12 22:24:33 2022 -0500
@@ -27,6 +27,8 @@
#ifndef PURPLE_VERSION_H
#define PURPLE_VERSION_H
+#include <glib.h>
+
/**
* PURPLE_MAJOR_VERSION:
*
--- a/meson.build Mon Sep 12 22:18:06 2022 -0500
+++ b/meson.build Mon Sep 12 22:24:33 2022 -0500
@@ -206,8 +206,6 @@
# of the C library
math = compiler.find_library('m', required: false)
-# before gettexting, in case iconv matters
-
IOKIT = []
if host_machine.system() == 'darwin'
IOKIT = dependency('appleframeworks',