Some systems (BSD,MacOsX,HP-UX,...) define MAP_ANON and not MAP_ANONYMOUS. Make each...
authorLaurent Monin <geeqie@norz.org>
Thu, 30 Jul 2009 17:59:20 +0000 (17:59 +0000)
committerLaurent Monin <geeqie@norz.org>
Thu, 30 Jul 2009 17:59:20 +0000 (17:59 +0000)
src/compat.h
src/main.c

index 6652587..fa94dda 100644 (file)
@@ -21,5 +21,13 @@ GList* hash_table_get_keys(GHashTable *hash_table);
 #endif
 
 
+/* Some systems (BSD,MacOsX,HP-UX,...) define MAP_ANON and not MAP_ANONYMOUS */
+#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
+#define        MAP_ANONYMOUS   MAP_ANON
+#elif defined(MAP_ANONYMOUS) && !defined(MAP_ANON)
+#define        MAP_ANON        MAP_ANONYMOUS
+#endif
+
+
 #endif /* COMPAT_H */
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
index aa456f8..3e407a1 100644 (file)
  * This software comes with no warranty of any kind, use at your own risk!
  */
 
+#include <gdk/gdkkeysyms.h> /* for keyboard values */
+#ifdef HAVE_LIBCHAMPLAIN
+#ifdef HAVE_LIBCHAMPLAIN_GTK
+#include <clutter-gtk/gtk-clutter-embed.h>
+#endif
+#endif
+
+#include <signal.h>
+#include <sys/mman.h>
+
+#include <math.h>
+#ifdef G_OS_UNIX
+#include <pwd.h>
+#endif
 
 #include "main.h"
 
 #include "histogram.h"
 #include "pixbuf_util.h"
 
-#include <gdk/gdkkeysyms.h> /* for keyboard values */
-#ifdef HAVE_LIBCHAMPLAIN
-#ifdef HAVE_LIBCHAMPLAIN_GTK
-#include <clutter-gtk/gtk-clutter-embed.h>
-#endif
-#endif
-
-#include <signal.h>
-#include <sys/mman.h>
-
-#include <math.h>
-#ifdef G_OS_UNIX
-#include <pwd.h>
-#endif
 
 gboolean thumb_format_changed = FALSE;
 static RemoteConnection *remote_connection = NULL;