libpurple/internal.h

Thu, 25 Aug 2022 20:28:46 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Thu, 25 Aug 2022 20:28:46 -0500
branch
gtk4
changeset 41588
1d0457d4b245
parent 41276
03f98ece6b26
child 41682
289867067994
permissions
-rw-r--r--

Fix up the add buddy dialog

Testing Done:
Opened the dialog and made sure everything works.

Reviewed at https://reviews.imfreedom.org/r/1646/

20147
66f05a854eee applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents: 19859
diff changeset
1 /* purple
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
3 * Purple is the legal property of its developers, whose names are too numerous
8046
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 6371
diff changeset
4 * to list here. Please refer to the COPYRIGHT file distributed with this
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 6371
diff changeset
5 * source distribution.
11137
cf40226ddff7 [gaim-migrate @ 13201]
Mark Doliner <markdoliner@pidgin.im>
parents: 10589
diff changeset
6 *
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 * (at your option) any later version.
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 *
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * GNU General Public License for more details.
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 *
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19742
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 */
35487
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35469
diff changeset
21
40474
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40439
diff changeset
22 #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40439
diff changeset
23 # error "only <purple.h> may be included directly"
40439
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40307
diff changeset
24 #endif
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40307
diff changeset
25
41276
03f98ece6b26 Fix a ton of missing and incorrect global header guards
Gary Kramlich <grim@reaperworld.com>
parents: 41208
diff changeset
26 #ifndef PURPLE_INTERNAL_H
03f98ece6b26 Fix a ton of missing and incorrect global header guards
Gary Kramlich <grim@reaperworld.com>
parents: 41208
diff changeset
27 #define PURPLE_INTERNAL_H
03f98ece6b26 Fix a ton of missing and incorrect global header guards
Gary Kramlich <grim@reaperworld.com>
parents: 41208
diff changeset
28
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29 #ifdef HAVE_CONFIG_H
40439
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40307
diff changeset
30 # ifdef GETTEXT_PACKAGE
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40307
diff changeset
31 # undef GETTEXT_PACKAGE
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40307
diff changeset
32 # endif
6371
e92b66ee5518 [gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents: 6170
diff changeset
33 # include <config.h>
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
34 #endif
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
35
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
36 #ifdef HAVE_ENDIAN_H
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
37 # include <endian.h>
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
38 #endif
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
39
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
40 #define MSG_LEN 2048
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
41 /* The above should normally be the same as BUF_LEN,
8735
01248ea222d3 [gaim-migrate @ 9490]
Jonathan Champ <royanee@users.sourceforge.net>
parents: 8730
diff changeset
42 * but just so we're explicitly asking for the max message
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
43 * length. */
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
44 #define BUF_LEN MSG_LEN
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
45 #define BUF_LONG BUF_LEN * 2
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
46
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
47 #include <sys/types.h>
40439
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40307
diff changeset
48
5912
32619a71edd2 [gaim-migrate @ 6344]
Herman Bloggs <herman@bluedigits.com>
parents: 5872
diff changeset
49 #ifndef _WIN32
40439
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40307
diff changeset
50 # include <sys/time.h>
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40307
diff changeset
51 # include <sys/wait.h>
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40307
diff changeset
52 # include <sys/time.h>
5912
32619a71edd2 [gaim-migrate @ 6344]
Herman Bloggs <herman@bluedigits.com>
parents: 5872
diff changeset
53 #endif
40439
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40307
diff changeset
54
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
55 #include <ctype.h>
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
56 #include <errno.h>
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
57 #include <fcntl.h>
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
58 #include <math.h>
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
59 #include <stdio.h>
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
60 #include <stdlib.h>
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
61 #include <string.h>
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
62 #include <time.h>
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
63
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
64 #ifdef HAVE_ICONV
40439
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40307
diff changeset
65 # include <iconv.h>
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
66 #endif
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
67
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
68 #ifdef HAVE_LANGINFO_CODESET
40439
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40307
diff changeset
69 # include <langinfo.h>
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
70 #endif
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
71
5912
32619a71edd2 [gaim-migrate @ 6344]
Herman Bloggs <herman@bluedigits.com>
parents: 5872
diff changeset
72 #ifndef _WIN32
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
73 # include <netinet/in.h>
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
74 # include <sys/socket.h>
6170
19976e14da97 [gaim-migrate @ 6655]
Matthew Luckie
parents: 5976
diff changeset
75 # include <arpa/inet.h>
5872
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
76 # include <sys/un.h>
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
77 # include <sys/utsname.h>
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
78 # include <netdb.h>
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
79 # include <signal.h>
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
80 # include <unistd.h>
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
81 #endif
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
82
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
83 #ifndef HOST_NAME_MAX
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
84 # define HOST_NAME_MAX 255
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
85 #endif
754c63f29b77 [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
86
14974
8180f0f2e20c [gaim-migrate @ 17684]
Daniel Atallah <datallah@pidgin.im>
parents: 14707
diff changeset
87 #ifdef _WIN32
40439
e9838d634d5e Make sure that internal.h can only be included by libpurple and split out some pieces to purpleprivate.h
Gary Kramlich <grim@reaperworld.com>
parents: 40307
diff changeset
88 # include "win32/win32dep.h"
14974
8180f0f2e20c [gaim-migrate @ 17684]
Daniel Atallah <datallah@pidgin.im>
parents: 14707
diff changeset
89 #endif
8180f0f2e20c [gaim-migrate @ 17684]
Daniel Atallah <datallah@pidgin.im>
parents: 14707
diff changeset
90
27708
5dc9e57a6685 HAVE_CONFIG_H is not defined when building the perl plugin, so work around
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 27705
diff changeset
91 #ifdef HAVE_CONFIG_H
27705
06cdb9c6366f Fix this compiler warning:
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 27539
diff changeset
92 #if SIZEOF_TIME_T == 4
06cdb9c6366f Fix this compiler warning:
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 27539
diff changeset
93 # define PURPLE_TIME_T_MODIFIER "lu"
06cdb9c6366f Fix this compiler warning:
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 27539
diff changeset
94 #elif SIZEOF_TIME_T == 8
06cdb9c6366f Fix this compiler warning:
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 27539
diff changeset
95 # define PURPLE_TIME_T_MODIFIER "zu"
06cdb9c6366f Fix this compiler warning:
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 27539
diff changeset
96 #else
06cdb9c6366f Fix this compiler warning:
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 27539
diff changeset
97 #error Unknown size of time_t
06cdb9c6366f Fix this compiler warning:
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 27539
diff changeset
98 #endif
27708
5dc9e57a6685 HAVE_CONFIG_H is not defined when building the perl plugin, so work around
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 27705
diff changeset
99 #endif
27705
06cdb9c6366f Fix this compiler warning:
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 27539
diff changeset
100
35977
9b7b48f446f4 Backport warning fixes from default
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35660
diff changeset
101 #ifdef __clang__
9b7b48f446f4 Backport warning fixes from default
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35660
diff changeset
102
36024
27580a47ae28 Oops, bad merge
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 36023
diff changeset
103 #define PURPLE_BEGIN_IGNORE_CAST_ALIGN \
35977
9b7b48f446f4 Backport warning fixes from default
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35660
diff changeset
104 _Pragma ("clang diagnostic push") \
36024
27580a47ae28 Oops, bad merge
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 36023
diff changeset
105 _Pragma ("clang diagnostic ignored \"-Wcast-align\"")
35977
9b7b48f446f4 Backport warning fixes from default
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35660
diff changeset
106
36024
27580a47ae28 Oops, bad merge
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 36023
diff changeset
107 #define PURPLE_END_IGNORE_CAST_ALIGN \
35977
9b7b48f446f4 Backport warning fixes from default
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35660
diff changeset
108 _Pragma ("clang diagnostic pop")
9b7b48f446f4 Backport warning fixes from default
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35660
diff changeset
109
36024
27580a47ae28 Oops, bad merge
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 36023
diff changeset
110 #else
27580a47ae28 Oops, bad merge
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 36023
diff changeset
111
27580a47ae28 Oops, bad merge
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 36023
diff changeset
112 #define PURPLE_BEGIN_IGNORE_CAST_ALIGN
27580a47ae28 Oops, bad merge
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 36023
diff changeset
113 #define PURPLE_END_IGNORE_CAST_ALIGN
27580a47ae28 Oops, bad merge
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 36023
diff changeset
114
35977
9b7b48f446f4 Backport warning fixes from default
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35660
diff changeset
115 #endif /* __clang__ */
9b7b48f446f4 Backport warning fixes from default
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35660
diff changeset
116
26615
2171a9101814 Add G_DEFINE_TYPE compatibility define from gobjectification branch.
Michael Ruprecht <maiku@pidgin.im>
parents: 25888
diff changeset
117 #include <glib-object.h>
13105
8f9c66e4af87 [gaim-migrate @ 15466]
Richard Laager <rlaager@pidgin.im>
parents: 11677
diff changeset
118
39659
e4dfb99b0cef Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39433
diff changeset
119 #endif /* PURPLE_INTERNAL_H */

mercurial