pidgin/android/libpurple

Fix warnings for ciphers

2013-04-14, Tomasz Wasilczyk
9b112a06cbdc
Parents 2f2dd47bf56b
Children 29a7df06f410
Fix warnings for ciphers
--- a/libpurple/cipher.c Sat Apr 13 12:24:43 2013 -0400
+++ b/libpurple/cipher.c Sun Apr 14 01:04:19 2013 +0200
@@ -35,6 +35,7 @@
*/
#include "internal.h"
#include "cipher.h"
+#include "ciphers/ciphers.h"
#include "dbus-maybe.h"
#include "debug.h"
#include "signals.h"
@@ -223,20 +224,6 @@
return &handle;
}
-/* These are implemented in the purple-ciphers sublibrary built in the ciphers
- * directory. We could put a header file in there, but it's less hassle for
- * the developer to just add it here since they have to register it here as
- * well.
- */
-PurpleCipherOps *purple_des_cipher_get_ops();
-PurpleCipherOps *purple_des3_cipher_get_ops();
-PurpleCipherOps *purple_hmac_cipher_get_ops();
-PurpleCipherOps *purple_md4_cipher_get_ops();
-PurpleCipherOps *purple_md5_cipher_get_ops();
-PurpleCipherOps *purple_rc4_cipher_get_ops();
-PurpleCipherOps *purple_sha1_cipher_get_ops();
-PurpleCipherOps *purple_sha256_cipher_get_ops();
-
void
purple_ciphers_init() {
gpointer handle;
--- a/libpurple/ciphers/Makefile.am Sat Apr 13 12:24:43 2013 -0400
+++ b/libpurple/ciphers/Makefile.am Sun Apr 14 01:04:19 2013 +0200
@@ -7,6 +7,9 @@
md4.c \
rc4.c
+noinst_HEADERS =\
+ ciphers.h
+
INCLUDES = -I$(top_srcdir)/libpurple
AM_CPPFLAGS = \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/libpurple/ciphers/ciphers.h Sun Apr 14 01:04:19 2013 +0200
@@ -0,0 +1,38 @@
+/* purple
+ *
+ * Purple is the legal property of its developers, whose names are too numerous
+ * to list here. Please refer to the COPYRIGHT file distributed with this
+ * source distribution.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
+ */
+
+/* des.c */
+PurpleCipherOps * purple_des_cipher_get_ops(void);
+PurpleCipherOps * purple_des3_cipher_get_ops(void);
+
+/* gchecksum.c */
+PurpleCipherOps * purple_md5_cipher_get_ops(void);
+PurpleCipherOps * purple_sha1_cipher_get_ops(void);
+PurpleCipherOps * purple_sha256_cipher_get_ops(void);
+
+/* hmac.c */
+PurpleCipherOps * purple_hmac_cipher_get_ops(void);
+
+/* md4.c */
+PurpleCipherOps * purple_md4_cipher_get_ops(void);
+
+/* rc4.c */
+PurpleCipherOps * purple_rc4_cipher_get_ops(void);
--- a/libpurple/ciphers/des.c Sat Apr 13 12:24:43 2013 -0400
+++ b/libpurple/ciphers/des.c Sun Apr 14 01:04:19 2013 +0200
@@ -34,6 +34,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#include <cipher.h>
+#include "ciphers.h"
/******************************************************************************
* DES
--- a/libpurple/ciphers/gchecksum.c Sat Apr 13 12:24:43 2013 -0400
+++ b/libpurple/ciphers/gchecksum.c Sun Apr 14 01:04:19 2013 +0200
@@ -1,4 +1,5 @@
#include <cipher.h>
+#include "ciphers.h"
static void
purple_g_checksum_init(PurpleCipherContext *context, GChecksumType type)
--- a/libpurple/ciphers/hmac.c Sat Apr 13 12:24:43 2013 -0400
+++ b/libpurple/ciphers/hmac.c Sun Apr 14 01:04:19 2013 +0200
@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#include <cipher.h>
+#include "ciphers.h"
#include <util.h>
--- a/libpurple/ciphers/md4.c Sat Apr 13 12:24:43 2013 -0400
+++ b/libpurple/ciphers/md4.c Sun Apr 14 01:04:19 2013 +0200
@@ -34,6 +34,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#include <cipher.h>
+#include "ciphers.h"
#define MD4_DIGEST_SIZE 16
#define MD4_HMAC_BLOCK_SIZE 64
--- a/libpurple/ciphers/rc4.c Sat Apr 13 12:24:43 2013 -0400
+++ b/libpurple/ciphers/rc4.c Sun Apr 14 01:04:19 2013 +0200
@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#include <cipher.h>
+#include "ciphers.h"
#include <util.h>
struct RC4Context {