aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/avifile/files/patch-ab
blob: e90a06661eba36fa5b35c4bbfe39a956f0980e1b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
--- lib/avifile/AviWrite.cpp.orig   Mon Sep 11 15:40:31 2000
+++ lib/avifile/AviWrite.cpp    Wed Sep 13 20:52:55 2000
@@ -19,7 +19,11 @@
     try
     {
         m_status=0;
+#ifdef O_LARGEFILE
    m_fd=open(name, O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, mask);
+#else
+   m_fd=open(name, O_WRONLY | O_CREAT | O_TRUNC, mask);
+#endif
         if(m_fd==-1)
        throw FATAL("Can't open file for writing");
 
@@ -203,7 +207,11 @@
 }
 long long AviWriteFile::FileSize()
 {
+#ifdef __Linux__
     return lseek64(m_fd, 0, SEEK_CUR);
+#else
+    return lseek(m_fd, 0, SEEK_CUR);
+#endif
 }
 
 AviWriteStream::AviWriteStream
--- lib/videocodec/Module.h.orig    Sat Sep  9 14:24:49 2000
+++ lib/videocodec/Module.h Wed Sep 13 20:20:25 2000
@@ -4,6 +4,10 @@
 #include <videoencoder.h>
 #include <list>
 #include <string>
+#ifdef __FreeBSD__
+#include <sys/time.h>
+#endif
+
 using namespace std;
 
 class VideoCodecControl;
--- player/renderer.cpp.orig    Mon Sep 11 08:38:07 2000
+++ player/renderer.cpp Fri Sep 15 20:22:55 2000
@@ -11,6 +11,7 @@
 #ifdef __FreeBSD__
 #include <machine/param.h>
 #include <sys/types.h>
+#include <unistd.h>
 #endif
 #include <sys/ipc.h>
 #include <sys/shm.h>                               
--- lib/aviplay/aviutil.cpp.orig    Sat Sep 16 13:49:08 2000
+++ lib/aviplay/aviutil.cpp Sat Sep 16 13:54:06 2000
@@ -28,16 +28,18 @@
 }
 CPU_Freq::CPU_Freq()
 {
-   FILE *f = fopen ("/proc/cpuinfo", "r");
    char line[200];
    char model[200]="unknown";
    char flags[500]="";
    char    *s,*value;
    
+#ifdef __FreeBSD__
+   freq=old_freq();
+   cerr<<freq/1000.<<" MHz processor detected"<<endl;
+#else
+   FILE *f = fopen ("/proc/cpuinfo", "r");
+
    freq=-1;
-//     freq=old_freq();
-//     cerr<<freq/1000.<<" MHz processor detected"<<endl;
-//     return;
    if (!f)
    {
        printf("Can't open /proc/cpuinfo for reading\n");
@@ -86,6 +88,7 @@
    }
 #endif
    fclose(f);
+#endif
 }
 
 CPU_Freq freq;