[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcaca] hacks for solaris 8 + gcc 2.95.2
Moin moin,
I've attached a patch file to make caca 0.99 beta 11 compile and
work on solaris 8 with gcc 2.95.2 (I know, outdated system, but
anyway, life sucks).
I know it isn't perfect, that's because I've no clue about autotools
and where to put/ change stuff properly.
Especially the "#define kkk is just a leftover of moving the
"deprecated" stuff onto a separate line, because it borked, but I
had no idea how/ what to replace it with.
Additionally I had to set
LIBS = -lnsl -lsocket
in src/Makefile to let it know about the network symbols.
So please, if you can make any sense out of the patch, correct the
code properly in the sources of the autotools stuff.
--
© Rado S. -- You must provide YOUR effort for your goal!
EVERY effort counts: at least to show your attitude.
You're responsible for ALL you do: you get what you give.
diff -ur libcaca-0.99.beta11/caca/driver_ncurses.c caca-rado/caca/driver_ncurses.c
--- libcaca-0.99.beta11/caca/driver_ncurses.c Tue Nov 14 00:41:59 2006
+++ caca-rado/caca/driver_ncurses.c Fri Oct 26 19:50:59 2007
@@ -38,6 +38,7 @@
#endif
#if defined HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
+# include <termios.h>
#endif
#if defined HAVE_LOCALE_H
# include <locale.h>
@@ -220,6 +221,9 @@
struct winsize size;
#if defined HAVE_SYS_IOCTL_H
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
if(ioctl(fileno(stdout), TIOCGWINSZ, &size) == 0)
{
dp->resize.w = size.ws_col;
@@ -227,7 +231,7 @@
#if defined HAVE_RESIZE_TERM
resize_term(dp->resize.h, dp->resize.w);
#else
- resizeterm(*dp->resize.h, *dp->resize.w);
+ resizeterm(dp->resize.h, dp->resize.w);
#endif
wrefresh(curscr);
return;
diff -ur libcaca-0.99.beta11/cucul/cucul.h caca-rado/cucul/cucul.h
--- libcaca-0.99.beta11/cucul/cucul.h Tue Nov 14 00:15:52 2006
+++ caca-rado/cucul/cucul.h Thu Oct 25 20:41:14 2007
@@ -252,7 +252,8 @@
/* Legacy stuff from beta versions, will probably disappear in 1.0 */
typedef struct cucul_buffer cucul_buffer_t;
# ifdef __GNUC__
-# define CUCUL_DEPRECATED __attribute__ ((deprecated))
+# define CUCUL_DEPRECATED
+# define kkk __attribute__ ((deprecated))
# else
# define CUCUL_DEPRECATED
# endif
--- libcaca-0.99.beta11/test/font.c Sat Nov 11 17:29:01 2006
+++ caca-rado/test/font.c Fri Oct 26 21:22:03 2007
@@ -78,6 +78,7 @@
cucul_set_canvas_size(cv, 80, 32);
dp = caca_create_display(cv);
+{
#if defined(HAVE_ENDIAN_H)
if(__BYTE_ORDER == __BIG_ENDIAN)
#else
@@ -90,6 +91,7 @@
else
d = cucul_create_dither(32, w, h, 4 * w,
0x0000ff00, 0x00ff0000, 0xff000000, 0x000000ff);
+}
cucul_dither_bitmap(cv, 0, 0, cucul_get_canvas_width(cv),
cucul_get_canvas_height(cv), d, buf);