Mercurial > pidgin
annotate src/internal.h @ 9070:f13172eed3ad
[gaim-migrate @ 9846]
This fixes what is hopefully the last common direct connect segfault.
Basicly, we were memcpying cookies, and one was null. This was because
our get the cookie function was returning null, because it checked if the
conn was a direct im conn and it wasn't. It was a listening conn instead.
So this adds NULL checks, and makes the get cookie function do less sanity
checking, since it was failing some valid cases.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Wed, 26 May 2004 04:55:10 +0000 |
parents | d72a23b2bfb5 |
children | 5d9c991549cd |
rev | line source |
---|---|
8790 | 1 /** |
5872 | 2 * @file internal.h Internal definitions and includes |
6371
8f94cce8faa5
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6170
diff
changeset
|
3 * @ingroup core |
5872 | 4 * |
5 * gaim | |
6 * | |
8046 | 7 * Gaim is the legal property of its developers, whose names are too numerous |
8 * to list here. Please refer to the COPYRIGHT file distributed with this | |
9 * source distribution. | |
5872 | 10 * |
11 * This program is free software; you can redistribute it and/or modify | |
12 * it under the terms of the GNU General Public License as published by | |
13 * the Free Software Foundation; either version 2 of the License, or | |
14 * (at your option) any later version. | |
15 * | |
16 * This program is distributed in the hope that it will be useful, | |
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 * GNU General Public License for more details. | |
20 * | |
21 * You should have received a copy of the GNU General Public License | |
22 * along with this program; if not, write to the Free Software | |
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
24 */ | |
25 #ifndef _GAIM_INTERNAL_H_ | |
26 #define _GAIM_INTERNAL_H_ | |
27 | |
28 #ifdef HAVE_CONFIG_H | |
6371
8f94cce8faa5
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6170
diff
changeset
|
29 # include <config.h> |
5872 | 30 #endif |
31 | |
32 #ifdef ENABLE_NLS | |
8737 | 33 # include <locale.h> |
5872 | 34 # include <libintl.h> |
35 # define _(x) gettext(x) | |
36 # ifdef gettext_noop | |
37 # define N_(String) gettext_noop (String) | |
38 # else | |
39 # define N_(String) (String) | |
40 # endif | |
41 #else | |
8730 | 42 # include <locale.h> |
5872 | 43 # define N_(String) (String) |
44 # define _(x) (x) | |
5976 | 45 # define ngettext(Singular, Plural, Number) ((Number == 1) ? (Singular) : (Plural)) |
5872 | 46 #endif |
5976 | 47 /* |
8793 | 48 * The Singular/Plural/Number ngettext definition above was taken |
49 * from an email to the texinfo mailing list by Manuel Guerrero. | |
50 * Thank you Manuel, and thank you Alex's good friend Google. | |
5976 | 51 */ |
5872 | 52 |
53 #ifdef HAVE_ENDIAN_H | |
54 # include <endian.h> | |
55 #endif | |
56 | |
57 #define MSG_LEN 2048 | |
58 /* The above should normally be the same as BUF_LEN, | |
8735
92cbf9713795
[gaim-migrate @ 9490]
Christian Hammond <chipx86@chipx86.com>
parents:
8730
diff
changeset
|
59 * but just so we're explicitly asking for the max message |
5872 | 60 * length. */ |
61 #define BUF_LEN MSG_LEN | |
62 #define BUF_LONG BUF_LEN * 2 | |
63 | |
64 #include <sys/stat.h> | |
65 #include <sys/time.h> | |
66 #include <sys/types.h> | |
5912
b3c412884a22
[gaim-migrate @ 6344]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5872
diff
changeset
|
67 #ifndef _WIN32 |
5872 | 68 #include <sys/wait.h> |
5912
b3c412884a22
[gaim-migrate @ 6344]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5872
diff
changeset
|
69 #endif |
5872 | 70 #include <ctype.h> |
71 #include <errno.h> | |
72 #include <fcntl.h> | |
73 #include <math.h> | |
74 #include <stdio.h> | |
75 #include <stdlib.h> | |
76 #include <string.h> | |
77 #include <time.h> | |
78 | |
79 #ifdef HAVE_ICONV | |
80 #include <iconv.h> | |
81 #endif | |
82 | |
83 #ifdef HAVE_LANGINFO_CODESET | |
84 #include <langinfo.h> | |
85 #endif | |
86 | |
87 #ifdef GAIM_PLUGINS | |
88 # include <gmodule.h> | |
89 # ifndef _WIN32 | |
90 # include <dlfcn.h> | |
91 # endif | |
92 #endif | |
93 | |
5912
b3c412884a22
[gaim-migrate @ 6344]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5872
diff
changeset
|
94 #ifndef _WIN32 |
5872 | 95 # include <netinet/in.h> |
96 # include <sys/socket.h> | |
6170 | 97 # include <arpa/inet.h> |
5872 | 98 # include <sys/un.h> |
99 # include <sys/utsname.h> | |
100 # include <netdb.h> | |
101 # include <signal.h> | |
102 # include <unistd.h> | |
103 #endif | |
104 | |
105 #ifndef MAXPATHLEN | |
106 # define MAXPATHLEN 1024 | |
107 #endif | |
108 | |
109 #ifndef HOST_NAME_MAX | |
110 # define HOST_NAME_MAX 255 | |
111 #endif | |
112 | |
113 #define PATHSIZE 1024 | |
114 | |
115 #include <glib.h> | |
116 | |
5912
b3c412884a22
[gaim-migrate @ 6344]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5872
diff
changeset
|
117 #ifdef _WIN32 |
b3c412884a22
[gaim-migrate @ 6344]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5872
diff
changeset
|
118 #include "win32dep.h" |
b3c412884a22
[gaim-migrate @ 6344]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5872
diff
changeset
|
119 #endif |
b3c412884a22
[gaim-migrate @ 6344]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5872
diff
changeset
|
120 |
b3c412884a22
[gaim-migrate @ 6344]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
5872
diff
changeset
|
121 |
6371
8f94cce8faa5
[gaim-migrate @ 6876]
Christian Hammond <chipx86@chipx86.com>
parents:
6170
diff
changeset
|
122 #define GAIM_WEBSITE "http://gaim.sourceforge.net/" |
5872 | 123 |
124 #endif /* _GAIM_INTERNAL_H_ */ |