--- sal/osl/unx/file.cxx.orig.port	Wed Feb 18 16:18:51 2009
+++ sal/osl/unx/file.cxx	Thu May  7 23:14:17 2009
@@ -93,7 +93,7 @@ static const sal_Char* MOUNTTAB="/etc/mnttab";
 #include <ctype.h>
 static const sal_Char* MOUNTTAB="/etc/mtab";
 
-#elif defined(NETBSD) || defined(FREEBSD)
+#elif defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD)
 #include <sys/param.h>
 #include <sys/ucred.h>
 #include <sys/mount.h>
@@ -1447,12 +1447,11 @@ oslFileError SAL_CALL osl_syncFile(oslFileHandle Handl
 
 #ifdef HAVE_STATFS_H
 
-#if defined(FREEBSD) || defined(NETBSD) || defined(MACOSX)
+#if defined(FREEBSD) || defined(NETBSD) || defined(MACOSX) || defined(OPENBSD)
 #   define __OSL_STATFS_STRUCT      			struct statfs
 #   define __OSL_STATFS(dir, sfs)   			statfs((dir), (sfs))
 #   define __OSL_STATFS_BLKSIZ(a)   			((sal_uInt64)((a).f_bsize))
 #   define __OSL_STATFS_TYPENAME(a) 			((a).f_fstypename)
-#   define __OSL_STATFS_ISREMOTE(a) 			(((a).f_type & MNT_LOCAL) == 0)
 
 /* always return true if queried for the properties of
    the file system. If you think this is wrong under any
@@ -1471,7 +1470,6 @@ oslFileError SAL_CALL osl_syncFile(oslFileHandle Handl
 #   define __OSL_STATFS_BLKSIZ(a)    			 ((sal_uInt64)((a).f_bsize))
 #   define __OSL_STATFS_IS_NFS(a)     			 (__OSL_NFS_SUPER_MAGIC == (a).f_type) 
 #   define __OSL_STATFS_IS_SMB(a)     			 (__OSL_SMB_SUPER_MAGIC == (a).f_type) 
-#   define __OSL_STATFS_ISREMOTE(a)  			 (__OSL_STATFS_IS_NFS((a)) || __OSL_STATFS_IS_SMB((a)))
 #	define __OSL_STATFS_IS_CASE_SENSITIVE_FS(a)  ((__OSL_MSDOS_SUPER_MAGIC != (a).f_type) && (__OSL_NTFS_SUPER_MAGIC != (a).f_type))
 #	define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) ((__OSL_MSDOS_SUPER_MAGIC != (a).f_type))
 #endif /* LINUX */
@@ -1497,7 +1495,6 @@ oslFileError SAL_CALL osl_syncFile(oslFileHandle Handl
 #   define __OSL_STATFS_STRUCT        			 struct dummy {int i;}
 #   define __OSL_STATFS_INIT(a)       			 ((void)0)
 #   define __OSL_STATFS(dir, sfs)     		     (1)
-#   define __OSL_STATFS_ISREMOTE(sfs) 			 (0)
 #	define __OSL_STATFS_IS_CASE_SENSITIVE_FS(a)	 (1)
 #	define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) (1)
 #endif /* HAVE_STATFS_H */
@@ -1525,10 +1522,6 @@ static oslFileError osl_psz_getVolumeInformation (
     /* FIXME: how to detect the kind of storage (fixed, cdrom, ...) */
 	if (uFieldMask & osl_VolumeInfo_Mask_Attributes)
 	{	
-	    if (__OSL_STATFS_ISREMOTE(sfs))
-			pInfo->uAttributes  |= osl_Volume_Attribute_Remote;
-						
-		pInfo->uValidFields |= osl_VolumeInfo_Mask_Attributes;	
 	}
 
 	if (uFieldMask & osl_VolumeInfo_Mask_FileSystemCaseHandling)
@@ -2247,7 +2240,7 @@ int UnicodeToText( char * buffer, size_t bufLen, const
 
     if( nInfo & RTL_UNICODETOTEXT_INFO_DESTBUFFERTOSMALL )
     {
-        errno = EOVERFLOW;
+        errno = ENOMEM;
         return 0;
     }
 
@@ -2299,7 +2292,7 @@ int TextToUnicode(
 
     if (nInfo & RTL_TEXTTOUNICODE_INFO_DESTBUFFERTOSMALL)
     {
-        errno = EOVERFLOW;
+        errno = ENOMEM;
         return 0;
     }
 
@@ -3427,35 +3420,35 @@ static sal_Bool osl_isFloppyMounted(oslVolumeDeviceHan
  *
  *****************************************************************************/
 
-#if (defined(MACOSX) || defined(NETBSD) || defined(FREEBSD))
+#if (defined(MACOSX) || defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD))
 static oslVolumeDeviceHandle osl_isFloppyDrive(const sal_Char* pszPath)
 {
     return NULL;
 }
 #endif /* MACOSX */
 
-#if ( defined(MACOSX) || defined(NETBSD) || defined(FREEBSD))
+#if ( defined(MACOSX) || defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD))
 static oslFileError osl_mountFloppy(oslVolumeDeviceHandle hFloppy)
 {
     return osl_File_E_BUSY;
 }
 #endif /* MACOSX */
 
-#if ( defined(MACOSX) || defined(NETBSD) || defined(FREEBSD))
+#if ( defined(MACOSX) || defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD))
 static oslFileError osl_unmountFloppy(oslVolumeDeviceHandle hFloppy)
 {
     return osl_File_E_BUSY;
 }
 #endif /* MACOSX */
 
-#if ( defined(NETBSD) || defined(FREEBSD) )
+#if ( defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD) )
 static sal_Bool osl_getFloppyMountEntry(const sal_Char* pszPath, oslVolumeDeviceHandleImpl* pItem)
 {
     return sal_False;
 }
 #endif /* NETBSD || FREEBSD */
 
-#if ( defined(NETBSD) || defined(FREEBSD) )
+#if ( defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD) )
 static sal_Bool osl_isFloppyMounted(oslVolumeDeviceHandleImpl* pDevice)
 {
     return sal_False;
