-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: rxvt-unicode-sixel
action: commit
revision:
path_from:
revision_from: b3d6eeeb2a552f439c68456f225fa3856ffca6f3:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

git://git.thebackupbox.net/rxvt-unicode-sixel

commit b3d6eeeb2a552f439c68456f225fa3856ffca6f3
Author: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
Date:   Fri Oct 24 14:53:20 2014 +0000

    Fix emman.c compilation on Solaris.

diff --git a/src/emman.c b/src/emman.c

index 241fc6adbdd2d64573bea96e8a8e228f612f3f4c..

index ..4cd7798c830bf6ef8cac665a9f595559308cef77 100644

--- a/src/emman.c
+++ b/src/emman.c
@@ -1,3 +1,17 @@
+/* enable mremap on GNU/Linux */
+#ifdef __linux__
+# define _GNU_SOURCE
+#endif
+
+/* enable the POSIX prototypes of mmap/munmap on Solaris */
+#ifdef __sun
+# if __STDC_VERSION__ - 0 >= 199901L
+#  define _XOPEN_SOURCE 600
+# else
+#  define _XOPEN_SOURCE 500
+# endif
+#endif
+
 #include "emman.h"

 #include <ecb.h>
@@ -10,9 +24,6 @@

 #if  _POSIX_MAPPED_FILES
 # define USE_MMAP 1
-# ifdef __linux__
-#  define _GNU_SOURCE
-# endif
 # include <sys/mman.h>
 # ifndef MAP_FAILED
 #  define MAP_FAILED ((void *)-1)
diff --git a/src/rxvtutil.C b/src/rxvtutil.C

index 0d4d943ebba2f32afabb8177c8fb82d18fed3564..

index ..663085fea1d2b136baa0b19c437a5adb6b8126f0 100644

--- a/src/rxvtutil.C
+++ b/src/rxvtutil.C
@@ -20,6 +20,14 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *----------------------------------------------------------------------*/

+// we include emman.c here to avoid relying on a C compiler, or
+// on the c++ compiler not complaining about .c, which is unlikely,
+// but...
+// This must be the first include, because the _GNU_SOURCE and
+// _XOPEN_SOURCE macros, used by emman.c, must be defined before
+// inclusion of any header.
+#include "emman.c"
+
 #include <stdlib.h>
 #include <string.h>
 #include <inttypes.h>
@@ -57,8 +65,3 @@ rxvt_temp_buf (int len)
   return temp_buf;
 }

-// we include emman.c here to avoid relying on a C compiler, or
-// on the c++ compiler not complaining about .c, which is unlikely,
-// but...
-#include "emman.c"
-

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 11:26:16 2024