[Pidgin] #3798: portability patch
Pidgin
trac at pidgin.im
Wed Oct 31 14:14:08 EDT 2007
#3798: portability patch
------------------+---------------------------------------------------------
Reporter: pogma | Owner: lschiere
Type: patch | Status: new
Priority: minor | Component: unclassified
Version: 2.2.2 | Keywords:
Pending: 0 |
------------------+---------------------------------------------------------
Hi,
Building pidgin-2.2.2 on solaris2.6-2.10, hpux11.00-11.23, aix5.1-5.3,
osf5.1, irix6.5 and red hat linux7.1 to rhel-5, we had some issues.
With the attached patch it works on all the above platforms.
Not included in the patch, because we scripted it, is a patch to add:
{{{
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
}}}
to the top of every .c file, prior to any other #include statements.
Without this, compilation failed on AIX.
The changes to delay initialization of GnuTLS are there because libgcrypt
will exit the application on those systems without /dev/random or other
entropy gathering socket source. Not good if you just want to use, e.g.
AIM.
The configure alloca check is needed by getopt.c.
We changed
{{{
char s[2] = {erasechar(), 0};
}}}
to
{{{
char s[2];
s[0] = erasechar();
s[1] = 0;
}}}
Because of compiler complaints that the initializers must be constants.
Similar changes in a lot of places.
{{{
static struct _node root = {.ref = 1, .flags = 0};
}}}
This is c99, we have a number of c89 only compilers, so it became (ick):
{{{
static struct _node root = {
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
1,
0};
}}}
There were a few places that we had to change dot initializers.
Some compilers complained until we put 'typedef enum' after the enum
involved.
osf segfaults using the forked dns resolver, forced it to use the blocking
version.
A couple of variable declarations in the middle of blocks were changed.
Use inet_ntoa if there is no inet_ntop
"fixed" and aix infinite loop in the signal handler.
--
Ticket URL: <http://developer.pidgin.im/ticket/3798>
Pidgin <http://pidgin.im>
Pidgin
More information about the Tracker
mailing list