]> gitweb @ CieloNegro.org - pkgsrc-cinelerra-cv.git/blobdiff - patches/patch-title_C
Now it builds.
[pkgsrc-cinelerra-cv.git] / patches / patch-title_C
diff --git a/patches/patch-title_C b/patches/patch-title_C
new file mode 100644 (file)
index 0000000..e8e8174
--- /dev/null
@@ -0,0 +1,48 @@
+$NetBSD$
+
+--- plugins/titler/title.C.orig        2010-01-29 09:38:03.000000000 +0000
++++ plugins/titler/title.C
+@@ -35,6 +35,8 @@
+ #include FT_OUTLINE_H
+ #include FT_STROKER_H
++#include "config.h"
++
+ #include "language.h"
+ #include "mwindow.inc"
+ #include "picon_png.h"
+@@ -48,11 +50,14 @@
+ #include <stdint.h>
+ #include <stdio.h>
+ #include <string.h>
+-#include <endian.h>
+-#include <byteswap.h>
+ #include <iconv.h>
+ #include <sys/stat.h>
++#define bswap_32(x) ((((x) << 24) & 0xff000000) | \
++                     (((x) <<  8) & 0x00ff0000) | \
++                     (((x) >>  8) & 0x0000ff00) | \
++                     (((x) >> 24) & 0x000000ff))
++
+ #define ZERO (1.0 / 64.0)
+ #define FONT_SEARCHPATH "fonts"
+@@ -1517,14 +1522,15 @@ void TitleMain::draw_glyphs()
+                       size_t inbytes,outbytes;
+                       char inbuf;
+-                      char *inp = (char*)&inbuf, *outp = (char *)&char_code;
++                      const char *inp = &inbuf;
++            char *outp = (char *)&char_code;
+                       
+                       inbuf = (char)c;
+                       inbytes = 1;
+                       outbytes = 4;
+       
+                       iconv (cd, &inp, &inbytes, &outp, &outbytes);
+-#if     __BYTE_ORDER == __LITTLE_ENDIAN
++#if !defined(WORDS_BIGENDIAN)
+                               char_code = bswap_32(char_code);
+ #endif                          /* Big endian.  */