-- 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:
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
--- 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
--- 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