Commit 118a5aa5 authored by Eric Petit's avatar Eric Petit

dvdnav.patch: prefixed all non-static functions in the included libdvdread.

  This fixes dvdsimple on OS X (either it crashed complaining about
  multiple definitions in the dvdnav and dvdread plugins, or it tried
  to use the libdvdread routines from the dvdnav plugin even though
  the dvdread access is used, but this modified libdvdread doesn't
  seem to be binary compatible... big mess here)
 ALL: fixed a minor libdvdread bug + cleaned the BeOS patch
parent 9b31c065
This diff is collapsed.
diff -ru libdvdread-original/dvdread/bswap.h libdvdread/dvdread/bswap.h diff -ru libdvdread-orig/dvdread/bswap.h libdvdread/dvdread/bswap.h
--- libdvdread-original/dvdread/bswap.h Sun Dec 15 00:09:12 2002 --- libdvdread-orig/dvdread/bswap.h Sat Mar 12 16:42:18 2005
+++ libdvdread/dvdread/bswap.h Fri Jul 23 12:06:10 2004 +++ libdvdread/dvdread/bswap.h Sat Mar 12 16:42:25 2005
@@ -65,7 +65,7 @@ @@ -65,7 +65,7 @@
* functionality! * functionality!
*/ */
...@@ -10,33 +10,41 @@ diff -ru libdvdread-original/dvdread/bswap.h libdvdread/dvdread/bswap.h ...@@ -10,33 +10,41 @@ diff -ru libdvdread-original/dvdread/bswap.h libdvdread/dvdread/bswap.h
#define B2N_16(x) \ #define B2N_16(x) \
x = ((((x) & 0xff00) >> 8) | \ x = ((((x) & 0xff00) >> 8) | \
(((x) & 0x00ff) << 8)) (((x) & 0x00ff) << 8))
diff -ru libdvdread-original/dvdread/dvd_reader.c libdvdread/dvdread/dvd_reader.c diff -ru libdvdread-orig/dvdread/dvd_reader.c libdvdread/dvdread/dvd_reader.c
--- libdvdread-original/dvdread/dvd_reader.c Thu Feb 13 22:31:21 2003 --- libdvdread-orig/dvdread/dvd_reader.c Sat Mar 12 16:42:18 2005
+++ libdvdread/dvdread/dvd_reader.c Fri Jul 23 12:11:59 2004 +++ libdvdread/dvdread/dvd_reader.c Sat Mar 12 16:48:29 2005
@@ -344,14 +344,26 @@ @@ -344,14 +344,16 @@
/* Resolve any symlinks and get the absolut dir name. */ /* Resolve any symlinks and get the absolut dir name. */
{ {
+#ifdef __BEOS__
+ char *current_path; + char *current_path;
+#endif
char *new_path; char *new_path;
+#ifndef __BEOS__ - int cdir = open( ".", O_RDONLY );
int cdir = open( ".", O_RDONLY ); -
- if( cdir >= 0 ) {
if( cdir >= 0 ) { +
+#else
+ current_path = getcwd( NULL, PATH_MAX ); + current_path = getcwd( NULL, PATH_MAX );
+ if( current_path ) { + if( current_path ) {
+#endif
chdir( path_copy ); chdir( path_copy );
new_path = getcwd( NULL, PATH_MAX ); new_path = getcwd( NULL, PATH_MAX );
+#ifndef __BEOS__ - fchdir( cdir );
fchdir( cdir ); - close( cdir );
close( cdir );
+#else
+ chdir( current_path ); + chdir( current_path );
+#endif + free( current_path );
+
if( new_path ) { if( new_path ) {
free( path_copy ); free( path_copy );
path_copy = new_path; path_copy = new_path;
@@ -504,10 +506,12 @@
sprintf( filename, "%s%s%s", path,
( ( path[ strlen( path ) - 1 ] == '/' ) ? "" : "/" ),
ent->d_name );
+ closedir( dir );
return 0;
}
}
+ closedir( dir );
return -1;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment