The HP-UX compiler is an anal retentive bastard.

2002-10-18  Alexander Larsson  <alexl@redhat.com>

	* libnautilus-private/nautilus-directory-async.c:
	The HP-UX compiler is an anal retentive bastard.
This commit is contained in:
Alexander Larsson 2002-10-18 09:41:25 +00:00 committed by Alexander Larsson
parent dd979bc32a
commit 6efb3bdcac
2 changed files with 13 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2002-10-18 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
The HP-UX compiler is an anal retentive bastard.
2002-10-16 Alex Duggan <aldug@astrolinux.com>
* configure.in
require gnome-desktop >= 2.1.0 (fixes #95979)

View file

@ -1229,10 +1229,16 @@ ready_callback_key_compare (gconstpointer a, gconstpointer b)
return 1;
}
if (callback_a->file == NULL) {
if (callback_a->callback.directory < callback_b->callback.directory) {
/* ANSI C doesn't allow ordered compares of function pointers, so we cast them to
* normal pointers to make some overly pedantic compilers (*cough* HP-UX *cough*)
* compile this. Of course, on any compiler where ordered function pointers actually
* break this probably won't work, but at least it will compile on platforms where it
* works, but stupid compilers won't let you use it.
*/
if ((void *)callback_a->callback.directory < (void *)callback_b->callback.directory) {
return -1;
}
if (callback_a->callback.directory > callback_b->callback.directory) {
if ((void *)callback_a->callback.directory > (void *)callback_b->callback.directory) {
return 1;
}
} else {