[matroska] r1012 - trunk/DvdMenuXtractor/libdvdread/dvdread
| Newsgroups | gmane.comp.multimedia.matroska.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: robux4
Date: 2005-01-05 19:19:39 +0300 (Wed, 05 Jan 2005)
New Revision: 1012
Modified:
trunk/DvdMenuXtractor/libdvdread/dvdread/bswap.h
trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_reader.c
Log:
DMX: patches from the VLC repository
Modified: trunk/DvdMenuXtractor/libdvdread/dvdread/bswap.h
===================================================================
--- trunk/DvdMenuXtractor/libdvdread/dvdread/bswap.h 2005-01-05 16:15:25 UTC (rev 1011)
+++ trunk/DvdMenuXtractor/libdvdread/dvdread/bswap.h 2005-01-05 16:19:39 UTC (rev 1012)
@@ -65,7 +65,7 @@
* functionality!
*/
-#elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(WIN32)
+#elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(WIN32) || defined( __BEOS__ )
#define B2N_16(x) \
x = ((((x) & 0xff00) >> 8) | \
(((x) & 0x00ff) << 8))
Modified: trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_reader.c
===================================================================
--- trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_reader.c 2005-01-05 16:15:25 UTC (rev 1011)
+++ trunk/DvdMenuXtractor/libdvdread/dvdread/dvd_reader.c 2005-01-05 16:19:39 UTC (rev 1012)
@@ -369,14 +369,26 @@
/* Resolve any symlinks and get the absolut dir name. */
#if !defined(WIN32)
{
+#ifdef __BEOS__
+ char *current_path;
+#endif
char *new_path;
+#ifndef __BEOS__
int cdir = open( ".", O_RDONLY );
if( cdir >= 0 ) {
+#else
+ current_path = getcwd( NULL, PATH_MAX );
+ if( current_path ) {
+#endif
chdir( path_copy );
new_path = getcwd( NULL, PATH_MAX );
+#ifndef __BEOS__
fchdir( cdir );
close( cdir );
+#else
+ chdir( current_path );
+#endif
if( new_path ) {
free( path_copy );
path_copy = new_path;