If you want to compile libdv-0.98 from source on fink 0.4.1 / OS 10.1.5,
you run across a two problems while compiling: one is due to a compact
notation for constant arrays used in the source, e.g.:
  /bin/sh ../libtool --silent --mode=compile cc -DHAVE_CONFIG_H -I. -I.
-I..     -g -O2 -Wall -g -c -o vlc.lo `test -f vlc.c || echo './'`vlc.c
  vlc.c:61: illegal message expression, found `...'
  vlc.c:62: illegal external declaration, missing `;' after `,'
  [...]
  cpp-precomp: warning: errors during smart preprocessing, retrying in
basic mode
  vlc.c:61: parse error before `,'
  [...]
the other one is due to to the fact that localtime_r is missing on
10.1.5. The rest of the mail is a small diff -u patch that work around
these problems. The #undef __GNUC__ solution is not very elegant, but it
works, and I did not bother to write something cleaner as not very much
development  effort is going into fink 0.4.1 any more I guess. I just
hope this patch might help someone looking for a quick hack.
Adrian Daerr

localhost:/sw/src(1)#diff -r -u libdv-0.98.orig/ libdv-0.98/
diff -r -u libdv-0.98.orig/libdv/audio.c libdv-0.98/libdv/audio.c
--- libdv-0.98.orig/libdv/audio.c       Sun May 19 23:29:54 2002
+++ libdv-0.98/libdv/audio.c    Thu Dec 19 23:35:06 2002
@@ -91,7 +91,7 @@
   48000, 44100, 32000
 };

-
+#undef __GNUC__
 #ifdef __GNUC__
 static int quantization[8] = {
   [0] 16,
diff -r -u libdv-0.98.orig/libdv/headers.c libdv-0.98/libdv/headers.c
--- libdv-0.98.orig/libdv/headers.c     Thu Jul 25 05:47:20 2002
+++ libdv-0.98/libdv/headers.c  Fri Dec 20 01:21:14 2002
@@ -29,6 +29,17 @@

 #include "headers.h"

+#ifndef HAVE_LOCALTIME_R
+#define localtime_r(t, b) localtime(t)
+#define ctime_r(t, b) ctime(t)
+#define gmtime_r(t, b) gmtime(t)
+#define asctime_r(t, b) asctime(t)
+#endif
+//struct tm *localtime_r(const time_t *const timep, struct tm *p_tm)
+//{
+//  p_tm = localtime(timep);
+//};
+
 static void write_header_block(unsigned char* target, int ds, int
isPAL) {
        target[0] = 0x1f; /* header magic */
diff -r -u libdv-0.98.orig/libdv/vlc.c libdv-0.98/libdv/vlc.c
--- libdv-0.98.orig/libdv/vlc.c Mon May 20 14:31:25 2002
+++ libdv-0.98/libdv/vlc.c      Thu Dec 19 23:25:53 2002
@@ -30,6 +30,8 @@
 #include <stdio.h>
 #include "vlc.h"

+#undef __GNUC__
+
 /* We will used five vlc tables, divided into what I term vlc
  * "classes".  A vlc class is identified by the codeword prefix, and *
its corresponding lookup table indexed by codeword suffix.  The

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr f�r 1 ct/ Min. surfen!



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Fink-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to