[Libreoffice-commits] .: 2 commits - bridges/source sal/inc sal/osl sal/qa sal/rtl sal/textenc sal/workben store/source store/workben xml2cmp/source

Michael Meeks mmeeks at kemper.freedesktop.org
Mon Oct 18 08:26:34 PDT 2010


 bridges/source/cpp_uno/gcc3_freebsd_x86-64/abi.cxx |  449 ---------------
 bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx   |  449 ---------------
 bridges/source/cpp_uno/gcc3_netbsd_x86-64/abi.cxx  |  448 ---------------
 sal/inc/sal/main.h                                 |   10 
 sal/inc/systools/win32/snprintf.h                  |   22 
 sal/osl/os2/debug.c                                |    6 
 sal/osl/os2/file.cxx                               |  211 -------
 sal/osl/os2/file_url.cxx                           |  615 ---------------------
 sal/osl/os2/helpers/debug.h                        |   11 
 sal/osl/os2/helpers/setup.h                        |    8 
 sal/osl/os2/libutil.c                              |   52 -
 sal/osl/os2/makefile.mk                            |    1 
 sal/osl/os2/process.c                              |   21 
 sal/osl/os2/profile.c                              |  526 -----------------
 sal/osl/os2/socket.c                               |  251 --------
 sal/osl/unx/file_misc.cxx                          |   10 
 sal/osl/unx/socket.c                               |  186 ------
 sal/osl/w32/file_url.cxx                           |    7 
 sal/osl/w32/profile.cxx                            |    5 
 sal/osl/w32/socket.cxx                             |   19 
 sal/qa/osl/file/osl_File.cxx                       |  410 --------------
 sal/qa/osl/mutex/osl_Mutex.cxx                     |    9 
 sal/qa/osl/socket/osl_AcceptorSocket.cxx           |   41 -
 sal/qa/osl/socket/osl_Socket.cxx                   |   50 -
 sal/qa/osl/socket/osl_SocketAddr.cxx               |   10 
 sal/rtl/source/alloc_arena.c                       |   15 
 sal/textenc/tencinfo.c                             |  160 -----
 sal/workben/t_readline.c                           |    5 
 store/source/stordata.cxx                          |   25 
 store/source/storpage.cxx                          |   65 --
 store/source/stortree.cxx                          |   35 -
 store/source/stortree.hxx                          |    6 
 store/workben/t_base.cxx                           |    9 
 store/workben/t_file.cxx                           |   22 
 store/workben/t_leak.cxx                           |    4 
 store/workben/t_page.cxx                           |  219 -------
 store/workben/t_store.cxx                          |   17 
 xml2cmp/source/xcd/main.cxx                        |   66 --
 xml2cmp/source/xcd/xmltree.cxx                     |   36 -
 39 files changed, 6 insertions(+), 4505 deletions(-)

New commits:
commit a8ac6c40db8f3b0ba1693c6e7135fb559e56be2c
Author: Povilas Kanapickas <povilas.kanapickas at gmail.com>
Date:   Mon Oct 18 16:25:37 2010 +0100

    remove non-compiled code

diff --git a/sal/inc/sal/main.h b/sal/inc/sal/main.h
index 01d14c8..c78ac13 100644
--- a/sal/inc/sal/main.h
+++ b/sal/inc/sal/main.h
@@ -71,14 +71,6 @@ int SAL_CALL main(int argc, char ** argv) \
 
 /* Sorry but this is neccessary cause HINSTANCE is a typedef that differs (C++ causes an error) */
 
-#if 0
-
-#ifndef _WINDOWS_
-#include <windows.h>
-#endif
-
-#else /* Simulated what windows.h does */
-
 #ifndef WINAPI
 #	define WINAPI	__stdcall
 #endif
@@ -95,7 +87,7 @@ int SAL_CALL main(int argc, char ** argv) \
 DECLARE_HANDLE(HINSTANCE);
 #endif
 
-#endif
+
 
 #define SAL_WIN_WinMain \
 int WINAPI WinMain( HINSTANCE _hinst, HINSTANCE _dummy, char* _cmdline, int _nshow ) \
diff --git a/sal/inc/systools/win32/snprintf.h b/sal/inc/systools/win32/snprintf.h
index e3751c8..43d396f 100644
--- a/sal/inc/systools/win32/snprintf.h
+++ b/sal/inc/systools/win32/snprintf.h
@@ -17,27 +17,18 @@
 
 /* Define needed types if they are not yet defined */
 
-#if 0
-#	ifndef _INC_STDARG
-#	include <stdarg.h>
-#	endif
-#else
+
 #	ifndef _VA_LIST_DEFINED
     typedef char *  va_list;
 #	define _VA_LIST_DEFINED
 #	endif
-#endif
 
-#if 0
-#	ifndef _INC_WCHAR
-#	include <wchar.h>
-#	endif
-#else
+
 #	ifndef _WCHAR_T_DEFINED
     typedef unsigned short wchar_t;
 #	define _WCHAR_T_DEFINED
 #	endif
-#endif
+
 
 #ifndef _SNPRINTF_DLLIMPORT
 #define _SNPRINTF_DLLIMPORT	__declspec( dllimport )
@@ -65,13 +56,6 @@ _SNPRINTF_DLLIMPORT int __cdecl snwprintf( wchar_t *buffer, size_t count, const
 _SNPRINTF_DLLIMPORT int __cdecl snprintf( char *buffer, size_t count, const char *format, ... );
 
 /* Conflict with STL_port inline implementation */
-#if 0
-/* UNICODE version */
-_SNPRINTF_DLLIMPORT int __cdecl vsnwprintf( wchar_t *buffer, size_t count, const wchar_t *format, va_list ap );
-
-/* SBCS and MBCS version */
-_SNPRINTF_DLLIMPORT int __cdecl vsnprintf( char *buffer, size_t count, const char *format, va_list ap );
-#endif
 
 #ifdef __cplusplus
 }
diff --git a/sal/osl/os2/debug.c b/sal/osl/os2/debug.c
index 68b4fc9..94878de 100644
--- a/sal/osl/os2/debug.c
+++ b/sal/osl/os2/debug.c
@@ -2090,14 +2090,12 @@ VOID dbgPrintStack(FILE *LogFile,           // in: text log file to write to
         if (!fExceptionAddress)
         {
             LastEbp = Ebp;
-#if 0
-            Ebp = (PUSHORT) MAKEULONG(Bp, Sp);
-#else // Inserted by Kim Rasmussen 26/06 1996 to allow big stacks
+
             if (f32bit)
                 Ebp = (PUSHORT) *(PULONG) LastEbp;
             else
                 Ebp = (PUSHORT) MAKEULONG((*Ebp), Sp);
-#endif
+
             if (f32bit)
             {
                 dbgPrintVariables(LogFile, (ULONG) Ebp);
diff --git a/sal/osl/os2/file.cxx b/sal/osl/os2/file.cxx
index 349d9f5..956e1a6 100644
--- a/sal/osl/os2/file.cxx
+++ b/sal/osl/os2/file.cxx
@@ -480,14 +480,6 @@ oslFileError SAL_CALL osl_closeDirectory( oslDirectory Directory )
     case DIRECTORYTYPE_LOCALROOT:
         err = osl_File_E_None;
         break;
-#if 0
-    case DIRECTORYTYPE_NETROOT:
-        {
-            DWORD err = WNetCloseEnum(pDirImpl->hDirectory);
-            eError = (err == NO_ERROR) ? osl_File_E_None : MapError(err);
-        }
-        break;
-#endif
     default:
         OSL_ENSURE( 0, "Invalid directory type" );
         break;
@@ -2575,209 +2567,6 @@ static oslFileError osl_psz_setFileTime( const sal_Char* pszFilePath,
 }
 
 
-/*****************************************
- * osl_psz_removeFile
- ****************************************/
-#if 0
-static oslFileError osl_psz_removeFile( const sal_Char* pszPath )
-{
-    int nRet=0;
-    struct stat aStat;
-
-    nRet = stat(pszPath,&aStat);
-    if ( nRet < 0 )
-    {
-        nRet=errno;
-        return oslTranslateFileError(OSL_FET_ERROR, nRet);
-    }
-
-    if ( S_ISDIR(aStat.st_mode) )
-    {
-        return osl_File_E_ISDIR;
-    }
-
-    nRet = unlink(pszPath);
-    if ( nRet < 0 )
-    {
-        nRet=errno;
-        return oslTranslateFileError(OSL_FET_ERROR, nRet);
-    }
-
-    return osl_File_E_None;
-}
-#endif
-
-/*****************************************
- * osl_psz_createDirectory
- ****************************************/
-#if 0
-static oslFileError osl_psz_createDirectory( const sal_Char* pszPath )
-{
-    int nRet=0;
-    int mode = S_IRWXU | S_IRWXG | S_IRWXO;
-
-    nRet = mkdir(pszPath,mode);
-
-    if ( nRet < 0 )
-    {
-        nRet=errno;
-        return oslTranslateFileError(OSL_FET_ERROR, nRet);
-    }
-
-    return osl_File_E_None;
-}
-#endif
-/*****************************************
- * osl_psz_removeDirectory
- ****************************************/
-#if 0
-static oslFileError osl_psz_removeDirectory( const sal_Char* pszPath )
-{
-    int nRet=0;
-
-    nRet = rmdir(pszPath);
-
-    if ( nRet < 0 )
-    {
-        nRet=errno;
-        return oslTranslateFileError(OSL_FET_ERROR, nRet);
-    }
-
-    return osl_File_E_None;
-}
-#endif
-/*****************************************
- * oslDoMoveFile
- ****************************************/
-#if 0
-static oslFileError oslDoMoveFile( const sal_Char* pszPath, const sal_Char* pszDestPath)
-{
-    oslFileError tErr=osl_File_E_invalidError;
-
-    tErr = osl_psz_moveFile(pszPath,pszDestPath);
-    if ( tErr == osl_File_E_None )
-    {
-        return tErr;
-    }
-
-    if ( tErr != osl_File_E_XDEV )
-    {
-        return tErr;
-    }
-
-    tErr=osl_psz_copyFile(pszPath,pszDestPath);
-
-    if ( tErr != osl_File_E_None )
-    {
-        oslFileError tErrRemove;
-        tErrRemove=osl_psz_removeFile(pszDestPath);
-        return tErr;
-    }
-
-    tErr=osl_psz_removeFile(pszPath);
-
-    return tErr;
-}
-#endif
-/*****************************************
- * osl_psz_moveFile
- ****************************************/
-#if 0
-static oslFileError osl_psz_moveFile(const sal_Char* pszPath, const sal_Char* pszDestPath)
-{
-
-    int nRet = 0;
-
-    nRet = rename(pszPath,pszDestPath);
-
-    if ( nRet < 0 )
-    {
-        nRet=errno;
-        return oslTranslateFileError(OSL_FET_ERROR, nRet);
-    }
-
-    return osl_File_E_None;
-}
-#endif
-/*****************************************
- * osl_psz_copyFile
- ****************************************/
-#if 0
-static oslFileError osl_psz_copyFile( const sal_Char* pszPath, const sal_Char* pszDestPath )
-{
-    time_t nAcTime=0;
-    time_t nModTime=0;
-    uid_t nUID=0;
-    gid_t nGID=0;
-    int nRet=0;
-    mode_t nMode=0;
-    struct stat aFileStat;
-    oslFileError tErr=osl_File_E_invalidError;
-    size_t nSourceSize=0;
-    int DestFileExists=1;
-
-    /* mfe: does the source file really exists? */
-    nRet = lstat(pszPath,&aFileStat);
-
-    if ( nRet < 0 )
-    {
-        nRet=errno;
-        return oslTranslateFileError(OSL_FET_ERROR, nRet);
-    }
-
-    /* mfe: we do only copy files here! */
-    if ( S_ISDIR(aFileStat.st_mode) )
-    {
-        return osl_File_E_ISDIR;
-    }
-
-    nSourceSize=(size_t)aFileStat.st_size;
-    nMode=aFileStat.st_mode;
-    nAcTime=aFileStat.st_atime;
-    nModTime=aFileStat.st_mtime;
-    nUID=aFileStat.st_uid;
-    nGID=aFileStat.st_gid;
-
-    nRet = stat(pszDestPath,&aFileStat);
-    if ( nRet < 0 )
-    {
-        nRet=errno;
-
-        if ( nRet == ENOENT )
-        {
-            DestFileExists=0;
-        }
-/*        return oslTranslateFileError(nRet);*/
-    }
-
-    /* mfe: the destination file must not be a directory! */
-    if ( nRet == 0 && S_ISDIR(aFileStat.st_mode) )
-    {
-        return osl_File_E_ISDIR;
-    }
-    else
-    {
-        /* mfe: file does not exists or is no dir */
-    }
-
-    tErr = oslDoCopy(pszPath,pszDestPath,nMode,nSourceSize,DestFileExists);
-
-    if ( tErr != osl_File_E_None )
-    {
-        return tErr;
-    }
-
-    /*
-     *   mfe: ignore return code
-     *        since only  the success of the copy is
-     *        important
-     */
-    oslChangeFileModes(pszDestPath,nMode,nAcTime,nModTime,nUID,nGID);
-
-    return tErr;
-}
-#endif
-
 /******************************************************************************
  *
  *                  Utility Functions
diff --git a/sal/osl/os2/file_url.cxx b/sal/osl/os2/file_url.cxx
index 6ea7490..e774f6d 100644
--- a/sal/osl/os2/file_url.cxx
+++ b/sal/osl/os2/file_url.cxx
@@ -346,14 +346,7 @@ DWORD WINAPI IsValidFilePath(LPCTSTR lpszPath, LPCTSTR *lppError, DWORD dwFlags)
             
             if ( !lpComponent )
             {
-#if 0
-                /* We only have a Server specification what is invalid */
-
-                lpComponent = lpszPath;
-                fValid = FALSE;
-#else
                 dwPathType |= PATHTYPE_IS_SERVER;
-#endif
             }
             else
             {
@@ -653,118 +646,6 @@ oslFileError SAL_CALL _osl_getFileURLFromSystemPath( rtl_uString* strPath, rtl_u
 oslFileError SAL_CALL osl_getFileURLFromSystemPath( rtl_uString *ustrSystemPath, rtl_uString **pustrFileURL )
 {
     return _osl_getFileURLFromSystemPath( ustrSystemPath, pustrFileURL );
-#if 0	
-    static const sal_Unicode pDoubleSlash[2] = { '/', '/' };
-    
-    rtl_uString *pTmp = NULL;
-    sal_Int32 nIndex;
-
-    if( 0 == ustrSystemPath->length )
-        return osl_File_E_INVAL;
-
-    /* YD convert '\' to '/' */
-    rtl_ustr_replaceChar( ustrSystemPath->buffer, '\\', '/' );
-    
-    /* temporary hack: if already file url, return ustrSystemPath */
-    if( 0 == rtl_ustr_ascii_shortenedCompare_WithLength( ustrSystemPath->buffer, ustrSystemPath->length,"file:", 5 ) )
-    {
-    /*
-        if( 0 == rtl_ustr_ascii_shortenedCompare_WithLength( ustrSystemPath->buffer, ustrSystemPath->length,"file://", 7 ) )
-        {
-            OSL_ENSURE( 0, "osl_getFileURLFromSystemPath: input is already file URL" );
-            rtl_uString_assign( pustrFileURL, ustrSystemPath );
-        }
-        else
-        {
-            rtl_uString *pTmp2 = NULL;
-
-            OSL_ENSURE( 0, "osl_getFileURLFromSystemPath: input is wrong file URL" );
-            rtl_uString_newFromStr_WithLength( pustrFileURL, ustrSystemPath->buffer + 5, ustrSystemPath->length - 5 );
-            rtl_uString_newFromAscii( &pTmp2, "file://" );
-            rtl_uString_newConcat( pustrFileURL, *pustrFileURL, pTmp2 );
-            rtl_uString_release( pTmp2 );
-        }
-        return osl_File_E_None;
-        */
-        return osl_File_E_INVAL;
-    }
-    
-        
-    /* check if system path starts with ~ or ~user and replace it with the appropriate home dir */
-    if( (sal_Unicode) '~' == ustrSystemPath->buffer[0] )
-    {
-        /* check if another user is specified */
-        if( ( 1 == ustrSystemPath->length ) || ( (sal_Unicode)'/' == ustrSystemPath->buffer[1] ) )
-        {
-            /* osl_getHomeDir returns file URL */
-            osl_getHomeDir( osl_getCurrentSecurity(), &pTmp );
-
-            /* remove "file://" prefix */
-            rtl_uString_newFromStr_WithLength( &pTmp, pTmp->buffer + 7, pTmp->length - 7 );
-
-            /* replace '~' in original string */             
-            rtl_uString_newReplaceStrAt( &pTmp, ustrSystemPath, 0, 1, pTmp );
-        }
-
-        else
-        {
-            /* FIXME: replace ~user with users home directory */
-            return osl_File_E_INVAL;
-        }
-    }
-    
-    /* check if initial string contains double instances of '/' */ 
-    nIndex = rtl_ustr_indexOfStr_WithLength( ustrSystemPath->buffer, ustrSystemPath->length, pDoubleSlash, 2 );
-    if( -1 != nIndex )
-    {
-        sal_Int32 nSrcIndex;
-        sal_Int32 nDeleted = 0;
-        
-        /* if pTmp is not already allocated, copy ustrSystemPath for modification */
-        if( NULL == pTmp )
-            rtl_uString_newFromString( &pTmp, ustrSystemPath );
-        
-        /* adapt index to pTmp */
-        nIndex += pTmp->length - ustrSystemPath->length;
-        
-        /* remove all occurances of '//' */
-        for( nSrcIndex = nIndex + 1; nSrcIndex < pTmp->length; nSrcIndex++ )
-        {
-            if( ((sal_Unicode) '/' == pTmp->buffer[nSrcIndex]) && ((sal_Unicode) '/' == pTmp->buffer[nIndex]) )
-                nDeleted++;
-            else
-                pTmp->buffer[++nIndex] = pTmp->buffer[nSrcIndex];
-        }
-        
-        /* adjust length member */
-        pTmp->length -= nDeleted;
-    }               
-    
-    if( NULL == pTmp )
-        rtl_uString_assign( &pTmp, ustrSystemPath ); 
-
-    /* temporary check for top 5 wrong usage strings (which are valid but unlikly filenames) */
-    /*
-    OSL_ASSERT( !findWrongUsage( pTmp->buffer, pTmp->length ) );
-    */
-        
-    /* file URLs must be URI encoded */
-    rtl_uriEncode( pTmp, uriCharClass, rtl_UriEncodeIgnoreEscapes, RTL_TEXTENCODING_UTF8, pustrFileURL );
-    
-    rtl_uString_release( pTmp );    
-    
-    /* absolute urls should start with 'file://' */
-    if( (sal_Unicode)'/' == (*pustrFileURL)->buffer[0] )
-    {
-        rtl_uString *pProtocol = NULL;
-        
-        rtl_uString_newFromAscii( &pProtocol, "file://" );
-        rtl_uString_newConcat( pustrFileURL, pProtocol, *pustrFileURL );
-        rtl_uString_release( pProtocol );
-    }
-
-    return osl_File_E_None;
-#endif
 }
 
 //#############################################      
@@ -869,140 +750,6 @@ oslFileError SAL_CALL _osl_getSystemPathFromFileURL( rtl_uString *strURL, rtl_uS
 oslFileError SAL_CALL osl_getSystemPathFromFileURL( rtl_uString *ustrFileURL, rtl_uString **pustrSystemPath )
 {
     return _osl_getSystemPathFromFileURL( ustrFileURL, pustrSystemPath, sal_True );
-#if 0
-    sal_Int32 nIndex = 0;
-    rtl_uString * pTmp = NULL;
-
-    sal_Unicode encodedSlash[3] = { '%', '2', 'F' };
-
-    /* temporary hack: if already system path, return ustrFileURL */
-    /*
-    if( (sal_Unicode) '/' == ustrFileURL->buffer[0] ) 
-    {
-        OSL_ENSURE( 0, "osl_getSystemPathFromFileURL: input is already system path" );
-        rtl_uString_assign( pustrSystemPath, ustrFileURL );
-        return osl_File_E_None;
-    }
-    */
-        
-    /* a valid file url may not start with '/' */
-    if( ( 0 == ustrFileURL->length ) || ( (sal_Unicode) '/' == ustrFileURL->buffer[0] ) )
-    {
-        return osl_File_E_INVAL;
-    }
-
-    /* search for encoded slashes (%2F) and decode every single token if we find one */
-    if( -1 != rtl_ustr_indexOfStr_WithLength( ustrFileURL->buffer, ustrFileURL->length, encodedSlash, 3 ) )
-    {
-        rtl_uString * ustrPathToken = NULL;
-        sal_Int32 nOffset = 7;
-        
-        do
-        {
-            nOffset += nIndex;
-
-            /* break url down in '/' devided tokens tokens */
-            nIndex = rtl_ustr_indexOfChar_WithLength( ustrFileURL->buffer + nOffset, ustrFileURL->length - nOffset, (sal_Unicode) '/' );
-            
-            /* copy token to new string */
-            rtl_uString_newFromStr_WithLength( &ustrPathToken, ustrFileURL->buffer + nOffset, 
-                -1 == nIndex ? ustrFileURL->length - nOffset : nIndex++ );
-
-            /* decode token */
-            rtl_uriDecode( ustrPathToken, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8, &pTmp );
-            
-            /* the result should not contain any '/' */
-            if( -1 != rtl_ustr_indexOfChar_WithLength( pTmp->buffer, pTmp->length, (sal_Unicode) '/' ) )
-            {
-                rtl_uString_release( pTmp );
-                rtl_uString_release( ustrPathToken );
-
-                return osl_File_E_INVAL;
-            }
-                
-        } while( -1 != nIndex );
-
-        /* release temporary string and restore index variable */
-        rtl_uString_release( ustrPathToken );
-        nIndex = 0;        
-    }
- 
-    /* protocol and server should not be encoded, so decode the whole string */
-    rtl_uriDecode( ustrFileURL, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8, &pTmp );
-    
-    /* check if file protocol specified */    
-    /* FIXME: use rtl_ustr_ascii_shortenedCompareIgnoreCase_WithLength when available */
-    if( 7 <= pTmp->length )
-    {
-        rtl_uString * pProtocol = NULL;
-        rtl_uString_newFromStr_WithLength( &pProtocol, pTmp->buffer, 7 );
-        
-        /* protocol is case insensitive */
-        rtl_ustr_toAsciiLowerCase_WithLength( pProtocol->buffer, pProtocol->length );
-        
-        if( 0 == rtl_ustr_ascii_shortenedCompare_WithLength( pProtocol->buffer, pProtocol->length,"file://", 7 ) )
-            nIndex = 7;
-            
-        rtl_uString_release( pProtocol );
-    }
-     
-    /* skip "localhost" or "127.0.0.1" if "file://" is specified */
-    /* FIXME: use rtl_ustr_ascii_shortenedCompareIgnoreCase_WithLength when available */
-    if( nIndex && ( 10 <= pTmp->length - nIndex ) )
-    {
-        rtl_uString * pServer = NULL;
-        rtl_uString_newFromStr_WithLength( &pServer, pTmp->buffer + nIndex, 10 );
-
-        /* server is case insensitive */
-        rtl_ustr_toAsciiLowerCase_WithLength( pServer->buffer, pServer->length );
-        
-        if( ( 0 == rtl_ustr_ascii_shortenedCompare_WithLength( pServer->buffer, pServer->length,"localhost/", 10 ) ) ||
-            ( 0 == rtl_ustr_ascii_shortenedCompare_WithLength( pServer->buffer, pServer->length,"127.0.0.1/", 10 ) ) )
-        {
-            /* don't exclude the '/' */
-            nIndex += 9;
-        }
-
-        rtl_uString_release( pServer );
-    }
-                
-    if( nIndex )
-        rtl_uString_newFromStr_WithLength( &pTmp, pTmp->buffer + nIndex, pTmp->length - nIndex );
-
-    /* check if system path starts with ~ or ~user and replace it with the appropriate home dir */
-    if( (sal_Unicode) '~' == pTmp->buffer[0] )
-    {
-        /* check if another user is specified */
-        if( ( 1 == pTmp->length ) || ( (sal_Unicode)'/' == pTmp->buffer[1] ) )
-        {
-            rtl_uString *pTmp2 = NULL;
-
-            /* osl_getHomeDir returns file URL */
-            osl_getHomeDir( osl_getCurrentSecurity(), &pTmp2 );
-
-            /* remove "file://" prefix */
-            rtl_uString_newFromStr_WithLength( &pTmp2, pTmp2->buffer + 7, pTmp2->length - 7 );
-
-            /* replace '~' in original string */             
-            rtl_uString_newReplaceStrAt( &pTmp, pTmp, 0, 1, pTmp2 );
-            rtl_uString_release( pTmp2 );
-        }
-
-        else
-        {
-            /* FIXME: replace ~user with users home directory */
-            return osl_File_E_INVAL;
-        }
-    }
-
-    /* temporary check for top 5 wrong usage strings (which are valid but unlikly filenames) */
-    /*
-    OSL_ASSERT( !findWrongUsage( pTmp->buffer, pTmp->length ) );
-    */
-        
-    *pustrSystemPath = pTmp;
-    return osl_File_E_None;
-#endif // 0
 }
 
         
@@ -1016,336 +763,8 @@ oslFileError osl_getSystemPathFromFileURL_Ex(
     rtl_uString *ustrFileURL, rtl_uString **pustrSystemPath, sal_Bool bAllowRelative)
 {
     return _osl_getSystemPathFromFileURL( ustrFileURL, pustrSystemPath, bAllowRelative);
-#if 0
-    rtl_uString* temp = 0;
-    oslFileError osl_error = osl_getSystemPathFromFileURL(ustrFileURL, &temp);
-    
-    if (osl_File_E_None == osl_error)
-    {
-        if (bAllowRelative
-            || (UNICHAR_SLASH == temp->buffer[0])
-            || (UNICHAR_COLON == temp->buffer[1] && UNICHAR_SLASH == temp->buffer[2]))
-        {
-            *pustrSystemPath = temp;
-        }
-        else
-        {
-            rtl_uString_release(temp);
-            osl_error = osl_File_E_INVAL;                  
-        }
-    }
-    
-    return osl_error;
-#endif
 }
 
-namespace /* private */
-{
-
-#if 0 // YD
-
-    /******************************************************
-     * Helper function, return a pinter to the final '\0'
-     * of a string
-     ******************************************************/
- 
-    sal_Unicode* ustrtoend(sal_Unicode* pStr)
-    {		
-        return (pStr + rtl_ustr_getLength(pStr));
-    }
-    
-    /*********************************************
-
-     ********************************************/
-    sal_Unicode* ustrcpy(const sal_Unicode* s, sal_Unicode* d)
-    {
-        const sal_Unicode* sc = s;
-        sal_Unicode*       dc = d;
-        
-        while ((*dc++ = *sc++))
-            /**/;
-            
-        return d;
-    }
-    
-    /*********************************************
-
-     ********************************************/
-     
-    sal_Unicode* ustrncpy(const sal_Unicode* s, sal_Unicode* d, unsigned int n)
-    {
-        const sal_Unicode* sc = s;
-        sal_Unicode*       dc = d;
-        unsigned int       i  = n;		
-        
-        while (i--)	
-            *dc++ = *sc++;
-        
-        if (n)
-            *dc = 0;
-            
-        return d;
-    }
-    
-    /*********************************************
-
-     ********************************************/
-     
-    sal_Unicode* ustrchrcat(const sal_Unicode chr, sal_Unicode* d)
-    {
-        sal_Unicode* p = ustrtoend(d);
-        *p++ = chr;
-        *p   = 0;		
-        return d;	
-    }
-
-    /*********************************************
-
-     ********************************************/
-     
-    sal_Unicode* ustrcat(const sal_Unicode* s, sal_Unicode* d)
-    {
-        sal_Unicode* dc = ustrtoend(d);					
-        ustrcpy(s, dc);		
-        return d;
-    }	
-
-    /******************************************************
-     *
-     ******************************************************/
- 
-    bool _islastchr(sal_Unicode* pStr, sal_Unicode Chr)
-    {
-           sal_Unicode* p = ustrtoend(pStr);
-           if (p > pStr)
-               p--;
-           return (*p == Chr);  
-    }
-
-    /******************************************************
-     * Ensure that the given string has the specified last 
-     * character if necessary append it
-     ******************************************************/
- 
-    sal_Unicode* _strensurelast(sal_Unicode* pStr, sal_Unicode Chr)
-    {
-        if (!_islastchr(pStr, Chr))
-            ustrchrcat(Chr, pStr);
-        return pStr;
-    }	
-
-    /******************************************************
-     * Remove the last part of a path, a path that has 
-     * only a '/' or no '/' at all will be returned
-     * unmodified 
-     ******************************************************/
- 
-    sal_Unicode* _rmlastpathtoken(sal_Unicode* aPath)
-    {
-        /* 	we always may skip -2 because we
-               may at least stand on a '/' but
-               either there is no other character
-               before this '/' or it's another 
-               character than the '/' 
-        */
-        sal_Unicode* p = ustrtoend(aPath) - 2;
-
-        // move back to the next path separator
-        // or to the start of the string
-        while ((p > aPath) && (*p != UNICHAR_SLASH))
-            p--;
-
-        if (p >= aPath)
-        {
-            if (UNICHAR_SLASH == *p)
-            {
-                p++;
-               *p = '\0';
-            }
-            else
-            {
-                   *p = '\0';
-            }
-        }
-    
-        return aPath;
-    }
-
-    /******************************************************
-     * 
-     ******************************************************/
- 
-    oslFileError _osl_resolvepath(
-        /*inout*/ sal_Unicode* path, 
-        /*inout*/ sal_Unicode* current_pos, 
-        /*in   */ sal_Unicode* sentinel, 
-        /*inout*/ bool* failed)
-    {
-        oslFileError ferr = osl_File_E_None;
-    
-        if (!*failed)
-        {
-            char unresolved_path[PATH_MAX];			
-            if (!UnicodeToText(unresolved_path, sizeof(unresolved_path), path, rtl_ustr_getLength(path)))
-                return oslTranslateFileError(OSL_FET_ERROR, ENAMETOOLONG);
-                
-            char resolved_path[PATH_MAX];			
-            if (realpath(unresolved_path, resolved_path))
-            {
-                if (!TextToUnicode(resolved_path, strlen(resolved_path), path, PATH_MAX))		
-                    return oslTranslateFileError(OSL_FET_ERROR, ENAMETOOLONG);
-                    
-                current_pos = ustrtoend(path) - 1;	    					
-            }
-            else
-            {
-                if (EACCES == errno || ENOTDIR == errno || ENOENT == errno)
-                    *failed = true;
-                else
-                    ferr = oslTranslateFileError(OSL_FET_ERROR, errno);
-            }
-        }
-        
-        return ferr;
-    }	
-
-    /******************************************************
-     * Works even with non existing paths. The resulting 
-     * path must not exceed PATH_MAX else 
-     * osl_File_E_NAMETOOLONG is the result
-     ******************************************************/
- 
-    oslFileError osl_getAbsoluteFileURL_impl_(const rtl::OUString& unresolved_path, rtl::OUString& resolved_path)
-    {
-        // the given unresolved path must not exceed PATH_MAX 
-        if (unresolved_path.getLength() >= (PATH_MAX - 2))
-            return oslTranslateFileError(OSL_FET_ERROR, ENAMETOOLONG);
-        
-        sal_Unicode        path_resolved_so_far[PATH_MAX];	    
-        const sal_Unicode* punresolved = unresolved_path.getStr(); 
-        sal_Unicode*       presolvedsf = path_resolved_so_far;
-    
-        // reserve space for leading '/' and trailing '\0'
-        // do not exceed this limit 
-        sal_Unicode* sentinel = path_resolved_so_far + PATH_MAX - 2; 
-    
-        // if realpath fails with error ENOTDIR, EACCES or ENOENT
-        // we will not call it again, because _osl_realpath should also
-        // work with non existing directories etc. 
-        bool realpath_failed = false;
-        oslFileError ferr;
-              
-        path_resolved_so_far[0] = '\0';
-    
-        while (*punresolved != '\0')
-        {
-            // ignore '/.' , skip one part back when '/..' 
-    
-            if ((UNICHAR_DOT == *punresolved) && (UNICHAR_SLASH == *presolvedsf))
-            {            
-                if ('\0' == *(punresolved + 1))
-                {
-                    punresolved++;
-                    continue;
-                }
-                else if (UNICHAR_SLASH == *(punresolved + 1))
-                {
-                    punresolved += 2;
-                    continue;
-                }            
-                else if ((UNICHAR_DOT == *(punresolved + 1)) && ('\0' == *(punresolved + 2) || (UNICHAR_SLASH == *(punresolved + 2))))
-                {                
-                    _rmlastpathtoken(path_resolved_so_far);
-                
-                    presolvedsf = ustrtoend(path_resolved_so_far) - 1;
-                
-                    if (UNICHAR_SLASH == *(punresolved + 2))
-                        punresolved += 3;
-                    else
-                        punresolved += 2;
-                    
-                    continue;
-                }                    
-                else // a file or directory name may start with '.' 
-                {
-                    if ((presolvedsf = ustrtoend(path_resolved_so_far)) > sentinel)
-                        return oslTranslateFileError(OSL_FET_ERROR, ENAMETOOLONG);
-                    
-                    ustrchrcat(*punresolved++, path_resolved_so_far); 
-                
-                    if ('\0' == *punresolved && !realpath_failed)
-                    {
-                        ferr = _osl_resolvepath(
-                            path_resolved_so_far, 
-                            presolvedsf, 
-                            sentinel, 
-                            &realpath_failed);
-                    
-                        if (osl_File_E_None != ferr)
-                            return ferr;
-                    }
-                }
-            }
-            else if (UNICHAR_SLASH == *punresolved)
-            {  
-                if ((presolvedsf = ustrtoend(path_resolved_so_far)) > sentinel)
-                    return oslTranslateFileError(OSL_FET_ERROR, ENAMETOOLONG);
-                        
-                ustrchrcat(*punresolved++, path_resolved_so_far); 
-            
-                if (!realpath_failed)
-                {                
-                    ferr = _osl_resolvepath(
-                        path_resolved_so_far, 
-                        presolvedsf, 
-                        sentinel, 
-                        &realpath_failed);
-            
-                    if (osl_File_E_None != ferr)
-                        return ferr;
-                
-                    if (!_islastchr(path_resolved_so_far, UNICHAR_SLASH))
-                    {
-                        if ((presolvedsf = ustrtoend(path_resolved_so_far)) > sentinel)
-                            return oslTranslateFileError(OSL_FET_ERROR, ENAMETOOLONG);
-                    
-                        ustrchrcat(UNICHAR_SLASH, path_resolved_so_far); 
-                    }
-                }
-            }
-            else // any other character
-            {
-                if ((presolvedsf = ustrtoend(path_resolved_so_far)) > sentinel)
-                    return oslTranslateFileError(OSL_FET_ERROR, ENAMETOOLONG);
-                
-                ustrchrcat(*punresolved++, path_resolved_so_far); 
-            
-                if ('\0' == *punresolved && !realpath_failed)
-                {            
-                    ferr = _osl_resolvepath(
-                        path_resolved_so_far, 
-                        presolvedsf, 
-                        sentinel, 
-                        &realpath_failed);
-            
-                    if (osl_File_E_None != ferr)
-                        return ferr;
-                }
-            }
-        }
-
-        sal_Int32 len = rtl_ustr_getLength(path_resolved_so_far);
-        
-        OSL_ASSERT(len < PATH_MAX);
-        
-        resolved_path = rtl::OUString(path_resolved_so_far, len);
-        
-        return osl_File_E_None;
-    }
-
-#endif // 0 // YD
-
-} // end namespace private
 
 #if OSL_DEBUG_LEVEL > 0
 
@@ -1455,40 +874,6 @@ oslFileError SAL_CALL osl_getAbsoluteFileURL( rtl_uString* ustrBaseURL, rtl_uStr
         rtl_uString_release( ustrRelSysPath );
 
     return	eError;
-#if 0	
-    FileBase::RC  rc;
-    rtl::OUString unresolved_path;    
-    
-    rc = FileBase::getSystemPathFromFileURL(rtl::OUString(ustrRelativeURL), unresolved_path);
-    
-    if(FileBase::E_None != rc)
-        return oslFileError(rc);
-
-    if (systemPathIsRelativePath(unresolved_path))
-    {
-        rtl::OUString base_path;		
-        rc = (FileBase::RC) osl_getSystemPathFromFileURL_Ex(ustrBaseDirURL, &base_path.pData, sal_False);
-
-        if (FileBase::E_None != rc)		
-            return oslFileError(rc);
-        
-        rtl::OUString abs_path;				
-        systemPathMakeAbsolutePath(base_path, unresolved_path, abs_path);
-
-        unresolved_path = abs_path;        
-    }
-
-    rtl::OUString resolved_path;	  
-    rc = (FileBase::RC) osl_getAbsoluteFileURL_impl_(unresolved_path, resolved_path);
-        
-    if (FileBase::E_None == rc)
-    {
-        rc = (FileBase::RC) osl_getFileURLFromSystemPath(resolved_path.pData, pustrAbsoluteURL);            
-        OSL_ASSERT(FileBase::E_None == rc);            
-    }
-    
-    return oslFileError(rc);
-#endif // 0
 }  
 
 
diff --git a/sal/osl/os2/helpers/debug.h b/sal/osl/os2/helpers/debug.h
index 6352f5b..9a8536f 100644
--- a/sal/osl/os2/helpers/debug.h
+++ b/sal/osl/os2/helpers/debug.h
@@ -326,17 +326,6 @@
        BYTE     name_len;                  // Length of name (wich follows)
     };
 
-    #if 0
-    // Linenumbers header
-    struct linhead_rec
-    {
-       BYTE     id;                        // 0x95 for flat mem, 32 bit progs
-       USHORT   length;                    // Record length
-       USHORT   base_group;                // Base group
-       USHORT   base_segment;              // Base segment
-    };
-    #endif
-
     // First linenumber record
     struct linfirst_rec
     {
diff --git a/sal/osl/os2/helpers/setup.h b/sal/osl/os2/helpers/setup.h
index 24336d0..7dfa8ed 100644
--- a/sal/osl/os2/helpers/setup.h
+++ b/sal/osl/os2/helpers/setup.h
@@ -58,14 +58,6 @@
         typedef unsigned short APIRET16;
         typedef unsigned long  APIRET32;
 
-#if 0
-//YD do not use with gcc 3.3.5
-        #define _System
-        #define APIENTRY
-            // with VAC++, this defines _System linkage, which
-            // EMX doesn't have, or does it?!?
-#endif // 0
-
     #endif
 
     // the following is a VAC++-specific macro, which doesn't exist
diff --git a/sal/osl/os2/libutil.c b/sal/osl/os2/libutil.c
deleted file mode 100644
index 44b45e5..0000000
--- a/sal/osl/os2/libutil.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#if 0 // YD
-
-#include <windows.h>
-
-static BOOL  g_bInit = FALSE;
-static DWORD g_dwPlatformId = VER_PLATFORM_WIN32_WINDOWS;
-
-DWORD GetPlatformId()
-{
-
-    if (!g_bInit)
-    {
-        OSVERSIONINFO aInfo;
-
-        aInfo.dwOSVersionInfoSize = sizeof(aInfo);
-        if (GetVersionEx(&aInfo))
-            g_dwPlatformId = aInfo.dwPlatformId;
-
-        g_bInit = TRUE;
-    }
-
-    return g_dwPlatformId;
-}
-
-#endif // 0
diff --git a/sal/osl/os2/makefile.mk b/sal/osl/os2/makefile.mk
index c9bfd3f..d677866 100644
--- a/sal/osl/os2/makefile.mk
+++ b/sal/osl/os2/makefile.mk
@@ -82,7 +82,6 @@ SLOFILES=   $(SLO)$/conditn.obj  \
 
 OBJFILES=   $(OBJ)$/conditn.obj  \
             $(OBJ)$/diagnose.obj \
-            $(OBJ)$/libutil.obj  \
             $(OBJ)$/semaphor.obj \
             $(OBJ)$/interlck.obj \
             $(OBJ)$/nlsupport.obj\
diff --git a/sal/osl/os2/process.c b/sal/osl/os2/process.c
index f2c18c5..a6807a3 100644
--- a/sal/osl/os2/process.c
+++ b/sal/osl/os2/process.c
@@ -141,27 +141,6 @@ oslProcessError SAL_CALL osl_executeProcess_WithRedirectedIO(
     char szImagePath[PATH_MAX] = "";
     char szWorkDir[PATH_MAX] = "";
 
-#if 0
-    if (Options & osl_Process_SEARCHPATH)
-    {
-        const rtl::OUString PATH1;
-        OUString PATH (RTL_CONSTASCII_USTRINGPARAM("PATH"));
-
-        rtl_uString * pSearchPath = 0;
-        osl_getEnvironment (PATH.pData, &pSearchPath);
-        if (pSearchPath)
-        {
-            rtl_uString * pSearchResult = 0;
-            osl_searchPath (ustrImageName, pSearchPath, &pSearchResult);
-            if (pSearchResult)
-            {
-                rtl_uString_assign (ustrImageName, pSearchResult);
-                rtl_uString_release (pSearchResult);
-            }
-            rtl_uString_release (pSearchPath);
-        }
-    }
-#endif
 
     if ( ustrImageName && ustrImageName->length )
     {
diff --git a/sal/osl/os2/profile.c b/sal/osl/os2/profile.c
index 85c46d6..8df4aa8 100644
--- a/sal/osl/os2/profile.c
+++ b/sal/osl/os2/profile.c
@@ -873,224 +873,6 @@ sal_uInt32 SAL_CALL osl_getProfileSections(oslProfile Profile, sal_Char* pszBuff
     return (n);
 }
 
-#if 0 // YD
-sal_Bool SAL_CALL osl_getProfileName(rtl_uString* strPath, rtl_uString* strName, rtl_uString** strProfileName)
-{
-    sal_Bool bFailed;
-    sal_Char File[_MAX_PATH];
-    sal_Char Path[_MAX_PATH];
-    sal_uInt32  nFileLen;
-    sal_uInt32  nPathLen = 0;
-
-    rtl_uString * strTmp = NULL;
-    oslFileError nError;
-
-    /* build file name */
-    if (strName && strName->length)
-    {
-        if(strName->length >= _MAX_PATH)
-            return sal_False;
-
-        strcpy(File, (char*)strName->buffer);
-        nFileLen = strName->length;
-
-        if (rtl_ustr_indexOfChar( File, L'.' ) == -1)
-        {
-            if (nFileLen + strlen(STR_INI_EXTENSION) >= _MAX_PATH)
-                return sal_False;
-
-            /* add default extension */
-            strcpy(File + nFileLen, STR_INI_EXTENSION);
-            nFileLen += strlen(STR_INI_EXTENSION);
-        }
-    }
-    else
-    {
-        rtl_uString *strProgName = NULL;
-        sal_Unicode *pProgName;
-        sal_Int32 nOffset = 0;
-        sal_Int32 nLen;
-        sal_Int32 nPos;
-
-        if (osl_getExecutableFile(&strProgName) != osl_Process_E_None)
-            return sal_False;
-
-        /* remove path and extension from filename */
-        pProgName = strProgName->buffer;
-        nLen = strProgName->length ;
-
-        if ((nPos = rtl_ustr_lastIndexOfChar( pProgName, L'/' )) != -1)
-            nOffset = nPos + 1;
-        else if ((nPos = rtl_ustr_lastIndexOfChar( pProgName, L':' )) != -1)
-            nOffset = nPos + 1;
-
-        if ((nPos = rtl_ustr_lastIndexOfChar( pProgName, L'.' )) != -1 )
-            nLen -= 4;
-
-        if ((nFileLen = nLen - nOffset) >= _MAX_PATH)
-            return sal_False;
-
-        strncpy(File, pProgName + nOffset, nFileLen);
-
-        if (nFileLen + strlen(STR_INI_EXTENSION) >= _MAX_PATH)
-            return sal_False;
-
-        /* add default extension */
-        strcpy(File + nFileLen, STR_INI_EXTENSION);
-        nFileLen += strlen(STR_INI_EXTENSION);
-
-        rtl_uString_release( strProgName );
-    }
-
-    if (File[0] == 0)
-        return sal_False;
-
-    /* build directory path */
-    if (strPath && strPath->length)
-    {
-        sal_Unicode *pPath = rtl_uString_getStr(strPath);
-        sal_Int32 nLen = rtl_uString_getLength(strPath);
-
-        if ((rtl_ustr_ascii_compare_WithLength(pPath, RTL_CONSTASCII_LENGTH(STR_INI_METAHOME) , STR_INI_METAHOME) == 0) &&
-            ((nLen == RTL_CONSTASCII_LENGTH(STR_INI_METAHOME)) || (pPath[RTL_CONSTASCII_LENGTH(STR_INI_METAHOME)] == '/')))
-        {
-            rtl_uString * strHome = NULL;
-            oslSecurity security = osl_getCurrentSecurity();
-
-            bFailed = ! osl_getHomeDir(security, &strHome);
-            osl_freeSecurityHandle(security);
-
-            if (bFailed) return (sal_False);
-
-            if (strHome->length >= _MAX_PATH)
-                return sal_False;
-
-            strcpy( Path, strHome->buffer);
-            nPathLen = strHome->length;
-
-            if (nLen > RTL_CONSTASCII_LENGTH(STR_INI_METAHOME))
-            {
-                pPath += RTL_CONSTASCII_LENGTH(STR_INI_METAHOME);
-                nLen -= RTL_CONSTASCII_LENGTH(STR_INI_METAHOME);
-
-                if (nLen + nPathLen >= _MAX_PATH)
-                    return sal_False;
-
-                strcpy(Path + nPathLen, pPath);
-                nPathLen += nLen;
-            }
-
-            rtl_uString_release(strHome);
-        }
-
-        else if ((rtl_ustr_ascii_compare_WithLength(pPath, RTL_CONSTASCII_LENGTH(STR_INI_METACFG), STR_INI_METACFG) == 0) &&
-            ((nLen == RTL_CONSTASCII_LENGTH(STR_INI_METACFG)) || (pPath[RTL_CONSTASCII_LENGTH(STR_INI_METACFG)] == '/')))
-        {
-            rtl_uString * strConfig = NULL;
-            oslSecurity security = osl_getCurrentSecurity();
-
-            bFailed = ! osl_getConfigDir(security, &strConfig);
-            osl_freeSecurityHandle(security);
-
-            if (bFailed) return (sal_False);
-
-            if (strConfig->length >= _MAX_PATH)
-                return sal_False;
-
-            strcpy( Path, strConfig->buffer);
-            nPathLen = strConfig->length;
-
-            if (nLen > RTL_CONSTASCII_LENGTH(STR_INI_METACFG))
-            {
-                pPath += RTL_CONSTASCII_LENGTH(STR_INI_METACFG);
-                nLen -= RTL_CONSTASCII_LENGTH(STR_INI_METACFG);
-
-                if (nLen + nPathLen >= _MAX_PATH)
-                    return sal_False;
-
-                strcpy(Path + nPathLen, pPath);
-                nPathLen += nLen;
-            }
-
-            rtl_uString_release(strConfig);
-        }
-
-        else if ((rtl_ustr_ascii_compare_WithLength(pPath, RTL_CONSTASCII_LENGTH(STR_INI_METASYS), STR_INI_METASYS) == 0) &&
-            ((nLen == RTL_CONSTASCII_LENGTH(STR_INI_METASYS)) || (pPath[RTL_CONSTASCII_LENGTH(STR_INI_METASYS)] == '/')))
-        {
-            if (((nPathLen = GetWindowsDirectoryW(Path, _MAX_PATH)) == 0) || (nPathLen >= _MAX_PATH))
-                return (sal_False);
-
-            if (nLen > RTL_CONSTASCII_LENGTH(STR_INI_METASYS))
-            {
-                pPath += RTL_CONSTASCII_LENGTH(STR_INI_METASYS);
-                nLen -= RTL_CONSTASCII_LENGTH(STR_INI_METASYS);
-
-                if (nLen + nPathLen >= MAX_PATH)
-                    return sal_False;
-
-                strcpy(Path + nPathLen, pPath);
-                nPathLen += nLen;
-            }
-        }
-
-        else if ((rtl_ustr_ascii_compare_WithLength(pPath, RTL_CONSTASCII_LENGTH(STR_INI_METAINS), STR_INI_METAINS) == 0) &&
-            ((nLen == RTL_CONSTASCII_LENGTH(STR_INI_METAINS)) || (pPath[RTL_CONSTASCII_LENGTH(STR_INI_METAINS)] == '/') ||
-                (pPath[RTL_CONSTASCII_LENGTH(STR_INI_METAINS)] == '"') ) )
-        {
-            if (! lookupProfile(pPath + RTL_CONSTASCII_LENGTH(STR_INI_METAINS), File, Path))
-                return (sal_False);
-
-            nPathLen = strlen(Path);
-        }
-
-        else if(nLen < MAX_PATH)
-        {
-            strcpy(Path, pPath);
-            nPathLen = strlen(Path);
-        }
-        else
-            return sal_False;
-    }
-    else
-    {
-        rtl_uString * strConfigDir = NULL;
-        oslSecurity security = osl_getCurrentSecurity();
-
-        bFailed = ! osl_getConfigDir(security, &strConfigDir);
-        osl_freeSecurityHandle(security);
-
-        if (bFailed) return (sal_False);
-        if (strConfigDir->length >= MAX_PATH)
-            return sal_False;
-
-        strcpy(Path, strConfigDir->buffer);
-        nPathLen = strConfigDir->length;
-    }
-
-    if (nPathLen && (Path[nPathLen - 1] != L'/') && (Path[nPathLen - 1] != L'\\'))
-    {
-        Path[nPathLen++] = L'\\';
-        Path[nPathLen] = 0;
-    }
-
-    if (nPathLen + nFileLen >= MAX_PATH)
-        return sal_False;
-
-    /* append file name */
-    strcpy(Path + nPathLen, File);
-    nPathLen += nFileLen;
-
-    /* copy filename */
-    rtl_uString_newFromStr_WithLength(&strTmp, Path, nPathLen);
-    nError = osl_getFileURLFromSystemPath(strTmp, strProfileName);
-    rtl_uString_release(strTmp);
-
-    return nError == osl_File_E_None;
-}
-#endif // 0 // YD
-
-
 /*****************************************************************************/
 /* Static Module Functions */
 /*****************************************************************************/
@@ -1983,311 +1765,3 @@ static sal_Bool releaseProfile(osl_TProfileImpl* pProfile)
 #endif
     return (sal_True);
 }
-
-#if 0 // YD
-static sal_Bool lookupProfile(const sal_Char *pszPath, const sal_Char *pszFile, sal_Char *pPath)
-{
-    sal_Char *pChr, *pStr;
-    sal_Char Path[_MAX_PATH] = "";
-    sal_Char Product[132] = "";
-    sal_Char Buffer[1024];
-
-    if (*pszPath == '"')
-    {
-        int i = 0;
-        
-        pszPath++;
-
-        while ((*pszPath != '"') && (*pszPath != '\0')) 
-            Product[i++] = *pszPath++;
-
-        Product[i] = '\0';
-
-        if (*pszPath == '"')
-            pszPath++;
-
-        if ( (*pszPath == '/') || (*pszPath == '\\') )
-        {
-            pszPath++;
-        }
-    }
-    else
-    {
-        /* if we have not product identfication, do a special handling for soffice.ini */
-        if (stricmp(SVERSION_PROFILE, pszFile) == 0)
-        {
-            sal_Char   Profile[_MAX_PATH];
-            sal_Char   Dir[_MAX_PATH];
-            oslProfile hProfile;
-
-            /* open sversion.ini in the system directory, and try to locate the entry
-               with the highest version for StarOffice */
-            if ((osl_getProfileName(SVERSION_FALLBACK, SVERSION_NAME, Profile, sizeof(Profile))) &&
-                (hProfile = osl_openProfile(Profile, osl_Profile_READLOCK)))
-            {
-                  osl_getProfileSectionEntries(hProfile, SVERSION_SECTION,
-                                                Buffer, sizeof(Buffer));
-
-                for (pChr = Buffer; *pChr != '\0'; pChr += strlen(pChr) + 1)
-                {
-                    if ((strnicmp(pChr, SVERSION_SOFFICE, sizeof(SVERSION_SOFFICE) - 1) == 0) &&
-                        (stricmp(Product, pChr) < 0))
-                    {
-                        osl_readProfileString(hProfile, SVERSION_SECTION, pChr, 
-                                              Dir, sizeof(Dir), "");
-
-                        /* check for existence of path */
-                        if (access(Dir, 0) >= 0)
-                            strcpy(Product, pChr);
-                    }
-                }
-
-                osl_closeProfile(hProfile);
-            }
-
-            /* open sversion.ini in the users directory, and try to locate the entry
-               with the highest version for StarOffice */
-            if ((strcmp(SVERSION_LOCATION, SVERSION_FALLBACK) != 0) &&
-                (osl_getProfileName(SVERSION_LOCATION, SVERSION_NAME, Profile, sizeof(Profile))) &&
-                (hProfile = osl_openProfile(Profile, osl_Profile_READLOCK)))
-            {
-                  osl_getProfileSectionEntries(hProfile, SVERSION_SECTION,
-                                                Buffer, sizeof(Buffer));
-
-                for (pChr = Buffer; *pChr != '\0'; pChr += strlen(pChr) + 1)
-                {
-                    if ((strnicmp(pChr, SVERSION_SOFFICE, sizeof(SVERSION_SOFFICE) - 1) == 0) &&
-                        (stricmp(Product, pChr) < 0))
-                    {
-                        osl_readProfileString(hProfile, SVERSION_SECTION, pChr, 
-                                              Dir, sizeof(Dir), "");
-
-                        /* check for existence of path */
-                        if (access(Dir, 0) >= 0)
-                            strcpy(Product, pChr);
-                    }
-                }
-
-                osl_closeProfile(hProfile);
-            }
-
-            /* remove any trailing build number */
-            if ((pChr = strrchr(Product, '/')) != NULL)
-                *pChr = '\0';
-        }
-    }
-
-
-    /* if we have an userid option eg. "-userid:rh[/usr/home/rh/staroffice]", 
-       this will supercede all other locations */
-    if (osl_getCommandArgs(Buffer, sizeof(Buffer)) == osl_Process_E_None)
-    {
-        sal_Char *pStart, *pEnd;
-
-        for (pChr = Buffer; *pChr != '\0'; pChr += strlen(pChr) + 1)
-            if (((*pChr == '-') || (*pChr == '+')) &&
-                (strnicmp(pChr + 1, SVERSION_OPTION, sizeof(SVERSION_OPTION) - 1) == 0))
-            {
-                if (((pStart = strchr(pChr + sizeof(SVERSION_OPTION), '[')) != NULL) && 
-                    ((pEnd = strchr(pStart + 1, ']')) != NULL))
-                {
-                    strncpy(Path, pStart + 1, pEnd - (pStart + 1));
-                    Path[pEnd - (pStart + 1)] = '\0';
-
-                    /* build full path */						
-                    if ((Path[strlen(Path) - 1] != '/') && (Path[strlen(Path) - 1] != '\\'))
-                    {
-                        strcat(Path, "\\");				
-                    }
-
-                    pChr =&Path[strlen(Path)];
-                    if ( strlen(pszPath) <= 0 )
-                    {
-                        strcat(Path,SVERSION_USER);
-
-                        if ( access(Path, 0) < 0 )
-                        {
-                            *pChr='\0';
-                        }
-                    }
-                    else
-                    {
-                        strcat(Path, pszPath);
-                    }
-
-                    break;
-                }
-            }
-    }	
-
-    if (strlen(Path) <= 0)
-    {
-        /* try to find the file in the directory of the executbale */
-        if (osl_getExecutableFile(Path, sizeof(Path)) != osl_Process_E_None)
-            return (sal_False);
-
-        /* seperate path from filename */
-        if ((pChr = strrchr(Path, '\\')) == NULL)
-            if ((pChr = strrchr(Path, ':')) == NULL)
-                return (sal_False);
-            else
-                *pChr = '\0';
-        else
-            *pChr = '\0';
-
-        /* if we have no product identification use the executable file name */
-        if (strlen(Product) <= 0)
-        {
-            strcpy(Product, pChr + 1);
-
-            /* remove extension */
-            if ((pChr = strrchr(Product, '.')) != NULL)
-                *pChr = '\0';			
-        }
-
-        /* remember last subdir */
-        pStr = strrchr(Path, '\\');
-
-        strcat(Path, "\\");
-
-        if ( strlen(pszPath) <= 0 )
-        {
-            strcat(Path, pszPath);
-        }
-        else
-        {
-            strcat(Path,pszPath);
-        }
-
-        /* if file not exists, remove any specified subdirectories 
-           like "bin" or "program" */
-        if (((access(Path, 0) < 0) && (pStr != NULL)) || (strlen(pszPath) <= 0))
-        {
-            static sal_Char *SubDirs[] = SVERSION_DIRS;
-
-            int i = 0;
-
-            for (i = 0; i < SAL_N_ELEMENTS(SubDirs); i++)
-                if (strnicmp(pStr + 1, SubDirs[i], strlen(SubDirs[i])) == 0)
-                {
-                    if ( strlen(pszPath) <= 0)
-                    {
-                        strcpy(pStr + 1,SVERSION_USER);
-                        if ( access(Path, 0) < 0 )
-                        {
-                            *(pStr+1)='\0';
-                        }
-                    }
-                    else
-                    {
-                        strcpy(pStr + 1, pszPath);
-                    }
-                    
-                    break;
-                }
-        }
-
-        pChr = &Path[strlen(Path)];
-        if ((Path[strlen(Path) - 1] != '/') && (Path[strlen(Path) - 1] != '\\'))
-            strcat(Path, "\\");
-        strcat(Path, pszFile);
-
-        if ((access(Path, 0) < 0) && (strlen(Product) > 0))
-        {
-            sal_Char   Profile[_MAX_PATH];
-            oslProfile hProfile;
-
-            /* remove appended filename */
-            *pChr = '\0';
-
-            /* open sversion.ini in the system directory, and try to locate the entry
-               with the highest version for StarOffice */
-            if ((osl_getProfileName(SVERSION_LOCATION, SVERSION_NAME, Profile, sizeof(Profile))) &&
-                (hProfile = osl_openProfile(Profile, osl_Profile_READLOCK)))
-            {
-                pChr = &Product[strlen(Product)];
-
-                /* append build number */
-                strcat(Product, "/");
-                strcat(Product, BUILD_STR(SUPD));
-
-                osl_readProfileString(hProfile, SVERSION_SECTION, Product, 
-                                      Buffer, sizeof(Buffer), "");
-
-                /* if not found, try it without build number */
-                if (strlen(Buffer) <= 0)
-                {
-                    *pChr = '\0';
-
-                    osl_readProfileString(hProfile, SVERSION_SECTION, Product, 
-                                          Buffer, sizeof(Buffer), "");
-
-                    osl_closeProfile(hProfile);
-
-                    /* if not found, try the fallback */
-                    if ((strlen(Buffer) <= 0) && (strcmp(SVERSION_LOCATION, SVERSION_FALLBACK) != 0))
-                    {
-                        if ((osl_getProfileName(SVERSION_FALLBACK, SVERSION_NAME, Profile, sizeof(Profile))) &&
-                            (hProfile = osl_openProfile(Profile, osl_Profile_READLOCK)))
-                        {
-                            /* prepare build number */
-                            *pChr = '/';
-
-                            osl_readProfileString(hProfile, SVERSION_SECTION, Product, 
-                                                  Buffer, sizeof(Buffer), "");
-
-                            /* if not found, try it without build number */
-                            if (strlen(Buffer) <= 0)
-                            {
-                                *pChr = '\0';
-
-                                osl_readProfileString(hProfile, SVERSION_SECTION, Product, 
-                                                      Buffer, sizeof(Buffer), "");
-                            }								
-
-                            osl_closeProfile(hProfile);
-                        }
-                    }
-                }
-                else
-                    osl_closeProfile(hProfile);
-
-                if (strlen(Buffer) > 0)
-                {
-                    strcpy(Path, Buffer);
-
-                    /* build full path */						
-                    if ((Path[strlen(Path) - 1] != '/') && (Path[strlen(Path) - 1] != '\\'))
-                    {
-                        if ((*pszPath != '/') && (*pszPath != '\\'))
-                            strcat(Path, "\\");				
-                    }
-
-                    pChr=&Path[strlen(pszPath)];
-                    if ( strlen(pszPath) > 0 )
-                    {
-                        strcat(Path, pszPath);
-                    }
-                    else
-                    {
-                        strcat(Path,SVERSION_USER);
-                        if ( access(Path, 0) < 0 )
-                        {
-                            *pChr='\0';
-                        }
-                    }
-                }
-            }			
-        }
-        else
-            /* remove appended filename */
-            *pChr = '\0';
-    }
-
-    strcpy(pPath, Path);
-
-    return (sal_True);
-}
-
-#endif // 0 // YD
-
diff --git a/sal/osl/os2/socket.c b/sal/osl/os2/socket.c
index a175e64..0339c84 100644
--- a/sal/osl/os2/socket.c
+++ b/sal/osl/os2/socket.c
@@ -464,21 +464,6 @@ void SAL_CALL osl_psz_getLastSocketErrorDescription (
 static sal_uInt32 g_nSocketImpl = 0;
 static sal_uInt32 g_nSocketAddr = 0;
 
-/* sorry, must be implemented otherwise */
-#if 0
-struct LeakWarning
-{
-    ~LeakWarning()
-    {
-        if( g_nSocketImpl )
-            OSL_TRACE( "sal_socket: %d socket instances leak\n" , g_nSocketImpl );
-        if( g_nSocketAddr )
-            OSL_TRACE( "sal_socket: %d socket address instances leak\n" , g_nSocketAddr );
-    }
-};
-LeakWarning socketWarning;
-#endif
-
 #endif /* OSL_DEBUG_LEVEL */
 
 
@@ -818,53 +803,6 @@ static sal_Bool  _osl_getDomainName (sal_Char *buffer, sal_Int32 bufsiz)
 
     result = sal_False;
 
-#if 0 // YD 17/04/06 libc panic for fork() from thread!=1
-
-    if (pipe (p) == 0)
-    {
-        pid_t pid;
-        int nStatus;
-
-        pid = fork();
-        if (pid == 0)
-        {
-            char *argv[] =
-            {
-                "/bin/domainname",
-                NULL
-            };
-
-            close (p[0]);
-            dup2  (p[1], 1);
-            close (p[1]);
-
-            execv ("/bin/domainname", argv);
-            // arriving here means exec failed
-            _exit(-1);
-        }
-        else if (pid > 0)
-        {
-            sal_Int32 k = 0, n = bufsiz;
-
-            close (p[1]);
-            if ((k = read (p[0], buffer, n - 1)) > 0)
-            {
-                buffer[k] = 0;
-                if (buffer[k - 1] == '\n')
-                    buffer[k - 1] = 0;
-                result = sal_True;
-            }
-            close (p[0]);
-            waitpid (pid, &nStatus, 0);
-        }
-        else
-        {
-            close (p[0]);
-            close (p[1]);
-        }
-    }
-#endif // 0
-
     return (result);
 }
 
@@ -876,9 +814,6 @@ static sal_Char* _osl_getFullQualifiedDomainName (const sal_Char *pHostName)
     static sal_Char    *pDomainName = NULL;
 
     sal_Char  *pFullQualifiedName;
-#if 0  /* OBSOLETE */
-    FILE      *pPipeToDomainnameExe;
-#endif /* OBSOLETE */
 
     /* get a '\0' terminated domainname */
 
@@ -910,72 +845,6 @@ static sal_Char* _osl_getFullQualifiedDomainName (const sal_Char *pHostName)
     }
 
 #endif /* NEW */
-#if 0  /* OBSOLETE */
-#ifdef SCO
-
-    /* call 'domainname > /usr/tmp/some-tmp-file', since
-       popen read pclose do block or core-dump,
-       (even the pipe-stuff that comes with pthreads) */
-    if (nLengthOfDomainName == 0)
-    {
-        sal_Char  tmp_name[ L_tmpnam ];
-        FILE 	 *tmp_file;
-        sal_Char  domain_call [ L_tmpnam + 16 ] = "domainname > ";
-
-        tmp_name[0] = '\0';
-
-        tmpnam ( tmp_name );
-        strcat ( domain_call, tmp_name );
-        if (   (system ( domain_call ) == 0)
-            && ((tmp_file = fopen( tmp_name, "r" )) != NULL ) )
-        {
-            sal_Char  pDomainNameBuffer[ DOMAINNAME_LENGTH ];
-
-            pDomainNameBuffer[0] = '\0';
-
-            if ( fgets ( pDomainNameBuffer, DOMAINNAME_LENGTH, tmp_file ) )
-            {
-                pDomainName = strdup( pDomainNameBuffer );
-                nLengthOfDomainName = strlen( pDomainName );
-                if (   ( nLengthOfDomainName > 0 )
-                    && ( pDomainName[ nLengthOfDomainName - 1] == '\n' ) )
-                    pDomainName[ --nLengthOfDomainName ] = '\0';
-            }
-            fclose ( tmp_file );
-        }
-        unlink( tmp_name );
-    }
-
-#else /* !SCO */
-
-    /* read the domainname from pipe to the program domainname */
-    if (   (nLengthOfDomainName == 0)
-        && (pPipeToDomainnameExe = popen( "domainname", "r")) )
-    {
-        sal_Char  c;
-        sal_Char  pDomainNameBuffer[ DOMAINNAME_LENGTH ];
-        sal_Char *pDomainNamePointer;
-
-        pDomainNameBuffer[0] = '\0';
-
-        pDomainNamePointer = pDomainNameBuffer;
-        while (    ((c = getc( pPipeToDomainnameExe )) != EOF)
-                && (nLengthOfDomainName < (DOMAINNAME_LENGTH - 1)) )
-        {
-            if (! isspace(c))
-            {
-                 nLengthOfDomainName++ ;
-                   *pDomainNamePointer++ = (sal_Char)c;
-            }
-        }
-        *pDomainNamePointer = '\0';
-        pDomainName = strdup( pDomainNameBuffer );
-
-        pclose( pPipeToDomainnameExe );
-    }
-
-#endif /* !SCO */
-#endif /* OBSOLETE */
 
     /* compose hostname and domainname */
     nLengthOfHostName = strlen( pHostName );
@@ -1100,25 +969,6 @@ static oslHostAddr _osl_hostentToHostAddr (const struct hostent *he)
 
     strcpy(cn, he->h_name);
 
-#if 0 // YD 17/04/06 win32 doesn't it.
-    if (_osl_isFullQualifiedDomainName(he->h_name))
-    {
-        cn= (sal_Char *)malloc(strlen (he->h_name) + 1);
-        OSL_ASSERT(cn);
-        if (cn == NULL)
-            return ((oslHostAddr)NULL);
-
-        strcpy(cn, he->h_name);
-    }
-    else
-    {
-        cn =_osl_getFullQualifiedDomainName (he->h_name);
-        OSL_ASSERT(cn);
-        if (cn == NULL)
-            return ((oslHostAddr)NULL);
-    }
-#endif
-
     pSockAddr = __osl_createSocketAddr();
     OSL_ASSERT(pSockAddr);
     if (pSockAddr == NULL)
@@ -1424,43 +1274,7 @@ oslSocketResult SAL_CALL osl_psz_getLocalHostname (
 
             if (Addr && (pStr = osl_psz_getHostnameOfHostAddr(Addr)) != NULL)
             {
-#if 0  /* OBSOLETE */
-                sal_Char* pChr;
-#endif /* OBSOLETE */
                 strcpy(LocalHostname, pStr);
-
-#if 0  /* OBSOLETE */
-                /* already done by _osl_getFullQualifiedDomainName() with
-                   much better heuristics, so this may be contraproductive */
-
-                /* no FQDN, last try append domain name */
-                if ((pChr = strchr(LocalHostname, '.')) == NULL)
-                {
-                    FILE *fp;
-
-                    pChr = &LocalHostname[strlen(LocalHostname)];
-
-                    if ( (fp = popen("domainname", "r")) != 0 )
-                    {
-                        int c;
-
-                        *pChr++ = '.';
-
-                        while ((c = getc(fp)) != EOF)
-                        {
-                            if (! isspace(c))
-                                *pChr++ = (sal_Char)c;
-                        }
-
-                        *pChr = '\0';
-
-                        fclose(fp);
-                    }
-                    else
-                        LocalHostname[0] = '\0';
-                }
-#endif /* OBSOLETE */
-
             }
             if (Addr)
                 osl_destroyHostAddr(Addr);
@@ -1720,71 +1534,6 @@ oslSocketResult	SAL_CALL osl_psz_getDottedInetAddrOfSocketAddr(oslSocketAddr pAd
     return osl_Socket_Error;
 }
 
-#if 0  /* OBSOLETE */
-/*****************************************************************************/
-/* osl_getIpxNetNumber  */
-/*****************************************************************************/
-oslSocketResult SAL_CALL osl_getIpxNetNumber(oslSocketAddr Addr,
-                                    oslSocketIpxNetNumber NetNumber)
-
-{
-    struct sockaddr_ipx* pAddr;
-
-    pAddr= (struct sockaddr_ipx*)Addr;
-
-    OSL_ASSERT(pAddr);
-
-    if (pAddr && (pAddr->sa_family == FAMILY_TO_NATIVE(osl_Socket_FamilyIpx)))
-     {
-         memcpy(NetNumber, pAddr->sa_netnum, sizeof(NetNumber));
-
-          return osl_Socket_Ok;
-      }
-      else
-          return osl_Socket_Error;
-}
-
-
-/*****************************************************************************/
-/* osl_getIpxNodeNumber  */
-/*****************************************************************************/
-oslSocketResult SAL_CALL osl_getIpxNodeNumber(oslSocketAddr Addr,
-                                     oslSocketIpxNodeNumber NodeNumber)
-
-{
-      struct sockaddr_ipx* pAddr;
-
-      pAddr= (struct sockaddr_ipx*)Addr;
-
-      OSL_ASSERT(pAddr);
-
-      if (pAddr && (pAddr->sa_family == FAMILY_TO_NATIVE(osl_Socket_FamilyIpx)))
-      {
-          memcpy(NodeNumber, pAddr->sa_nodenum, sizeof(NodeNumber));
-
-          return osl_Socket_Ok;
-      }
-      else
-          return osl_Socket_Error;
-}
-
-
-/*****************************************************************************/
-/* osl_getIpxSocketNumber  */
-/*****************************************************************************/
-sal_Int32 SAL_CALL osl_getIpxSocketNumber(oslSocketAddr Addr)
-{
-    struct sockaddr_ipx* pAddr= (struct sockaddr_ipx*)Addr;
-    OSL_ASSERT(pAddr);
-
-     if (pAddr && (pAddr->sa_family == FAMILY_TO_NATIVE(osl_Socket_FamilyIpx)))
-          return pAddr->sa_socket;
-      else
-          return OSL_INVALID_IPX_SOCKET_NO;
-}
-
-#endif /* OBSOLETE */
-
 /*****************************************************************************/
 /* osl_createSocket  */
 /*****************************************************************************/
diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx
index da47964..f942ed4 100644
--- a/sal/osl/unx/file_misc.cxx
+++ b/sal/osl/unx/file_misc.cxx
@@ -71,16 +71,6 @@ typedef struct
     DIR*         pDirStruct;
 } oslDirectoryImpl;
 
-#if 0
-/* FIXME: reintroducing this may save some extra bytes per Item */
-typedef struct
-{
-    rtl_uString* ustrFileName;       /* holds native file name */
-    rtl_uString* ustrDirPath;        /* holds native dir path */
-    sal_uInt32   RefCount;
-} oslDirectoryItemImpl;
-#endif
-
 DirectoryItem_Impl::DirectoryItem_Impl(
     rtl_uString * ustrFilePath, unsigned char DType)
     : m_RefCount     (1),
diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c
index 847f3dc..badc118 100644
--- a/sal/osl/unx/socket.c
+++ b/sal/osl/unx/socket.c
@@ -465,19 +465,6 @@ static sal_uInt32 g_nSocketImpl = 0;
 static sal_uInt32 g_nSocketAddr = 0;
 
 /* sorry, must be implemented otherwise */
-#if 0
-struct LeakWarning
-{
-    ~LeakWarning()
-    {
-        if( g_nSocketImpl )
-            OSL_TRACE( "sal_socket: %d socket instances leak\n" , g_nSocketImpl );
-        if( g_nSocketAddr )
-            OSL_TRACE( "sal_socket: %d socket address instances leak\n" , g_nSocketAddr );
-    }
-};
-LeakWarning socketWarning;
-#endif
 
 #endif /* OSL_DEBUG_LEVEL */
 
@@ -871,9 +858,6 @@ static sal_Char* _osl_getFullQualifiedDomainName (const sal_Char *pHostName)
     static sal_Char    *pDomainName = NULL;
 
     sal_Char  *pFullQualifiedName;
-#if 0  /* OBSOLETE */
-    FILE      *pPipeToDomainnameExe;
-#endif /* OBSOLETE */
 
     /* get a '\0' terminated domainname */
 
@@ -890,7 +874,6 @@ static sal_Char* _osl_getFullQualifiedDomainName (const sal_Char *pHostName)
         }
     }
 
-#if 1  /* NEW */
     if (nLengthOfDomainName == 0)
     {
         sal_Char pDomainNameBuffer[ DOMAINNAME_LENGTH ];
@@ -904,74 +887,6 @@ static sal_Char* _osl_getFullQualifiedDomainName (const sal_Char *pHostName)
         }
     }
 
-#endif /* NEW */
-#if 0  /* OBSOLETE */
-#ifdef SCO
-
-    /* call 'domainname > /usr/tmp/some-tmp-file', since
-       popen read pclose do block or core-dump,
-       (even the pipe-stuff that comes with pthreads) */
-    if (nLengthOfDomainName == 0)
-    {
-        sal_Char  tmp_name[ L_tmpnam ];
-        FILE 	 *tmp_file;
-        sal_Char  domain_call [ L_tmpnam + 16 ] = "domainname > ";
-
-        tmp_name[0] = '\0';
-
-        tmpnam ( tmp_name );
-        strcat ( domain_call, tmp_name );
-        if (   (system ( domain_call ) == 0)
-            && ((tmp_file = fopen( tmp_name, "r" )) != NULL ) )
-        {
-            sal_Char  pDomainNameBuffer[ DOMAINNAME_LENGTH ];
-
-            pDomainNameBuffer[0] = '\0';
-
-            if ( fgets ( pDomainNameBuffer, DOMAINNAME_LENGTH, tmp_file ) )
-            {
-                pDomainName = strdup( pDomainNameBuffer );
-                nLengthOfDomainName = strlen( pDomainName );
-                if (   ( nLengthOfDomainName > 0 )
-                    && ( pDomainName[ nLengthOfDomainName - 1] == '\n' ) )
-                    pDomainName[ --nLengthOfDomainName ] = '\0';
-            }
-            fclose ( tmp_file );
-        }
-        unlink( tmp_name );
-    }
-
-#else /* !SCO */
-
-    /* read the domainname from pipe to the program domainname */
-    if (   (nLengthOfDomainName == 0)
-        && (pPipeToDomainnameExe = popen( "domainname", "r")) )
-    {
-        sal_Char  c;
-        sal_Char  pDomainNameBuffer[ DOMAINNAME_LENGTH ];
-        sal_Char *pDomainNamePointer;
-
-        pDomainNameBuffer[0] = '\0';
-
-        pDomainNamePointer = pDomainNameBuffer;
-        while (    ((c = getc( pPipeToDomainnameExe )) != EOF)
-                && (nLengthOfDomainName < (DOMAINNAME_LENGTH - 1)) )
-        {
-            if (! isspace(c))
-            {
-                 nLengthOfDomainName++ ;
-                   *pDomainNamePointer++ = (sal_Char)c;
-            }
-        }
-        *pDomainNamePointer = '\0';
-        pDomainName = strdup( pDomainNameBuffer );
-
-        pclose( pPipeToDomainnameExe );
-    }
-
-#endif /* !SCO */
-#endif /* OBSOLETE */
-
     /* compose hostname and domainname */
     nLengthOfHostName = strlen( pHostName );
     pFullQualifiedName = (sal_Char*) malloc( (nLengthOfHostName + 1
@@ -1409,43 +1324,7 @@ oslSocketResult SAL_CALL osl_psz_getLocalHostname (
 
             if ((pStr = osl_psz_getHostnameOfHostAddr(Addr)) != NULL)
             {
-#if 0  /* OBSOLETE */
-                sal_Char* pChr;
-#endif /* OBSOLETE */
                 strcpy(LocalHostname, pStr);
-
-#if 0  /* OBSOLETE */
-                /* already done by _osl_getFullQualifiedDomainName() with
-                   much better heuristics, so this may be contraproductive */
-
-                /* no FQDN, last try append domain name */
-                if ((pChr = strchr(LocalHostname, '.')) == NULL)
-                {
-                    FILE *fp;
-
-                    pChr = &LocalHostname[strlen(LocalHostname)];
-
-                    if ( (fp = popen("domainname", "r")) != 0 )
-                    {
-                        int c;
-
-                        *pChr++ = '.';
-
-                        while ((c = getc(fp)) != EOF)
-                        {
-                            if (! isspace(c))
-                                *pChr++ = (sal_Char)c;
-                        }
-
-                        *pChr = '\0';
-
-                        fclose(fp);
-                    }
-                    else
-                        LocalHostname[0] = '\0';
-                }
-#endif /* OBSOLETE */
-
             }
             osl_destroyHostAddr(Addr);
         }
@@ -1704,71 +1583,6 @@ oslSocketResult	SAL_CALL osl_psz_getDottedInetAddrOfSocketAddr(oslSocketAddr pAd
     return osl_Socket_Error;
 }
 
-#if 0  /* OBSOLETE */
-/*****************************************************************************/
-/* osl_getIpxNetNumber  */
-/*****************************************************************************/
-oslSocketResult SAL_CALL osl_getIpxNetNumber(oslSocketAddr Addr,
-                                    oslSocketIpxNetNumber NetNumber)
-
-{
-    struct sockaddr_ipx* pAddr;
-
-    pAddr= (struct sockaddr_ipx*)Addr;
-
-    OSL_ASSERT(pAddr);
-
-    if (pAddr && (pAddr->sa_family == FAMILY_TO_NATIVE(osl_Socket_FamilyIpx)))
-     {
-         memcpy(NetNumber, pAddr->sa_netnum, sizeof(NetNumber));
-
-          return osl_Socket_Ok;
-      }
-      else
-          return osl_Socket_Error;
-}
-
-
-/*****************************************************************************/
-/* osl_getIpxNodeNumber  */
-/*****************************************************************************/
-oslSocketResult SAL_CALL osl_getIpxNodeNumber(oslSocketAddr Addr,
-                                     oslSocketIpxNodeNumber NodeNumber)
-
-{
-      struct sockaddr_ipx* pAddr;
-
-      pAddr= (struct sockaddr_ipx*)Addr;
-
-      OSL_ASSERT(pAddr);
-
-      if (pAddr && (pAddr->sa_family == FAMILY_TO_NATIVE(osl_Socket_FamilyIpx)))
-      {
-          memcpy(NodeNumber, pAddr->sa_nodenum, sizeof(NodeNumber));
-
-          return osl_Socket_Ok;
-      }
-      else
-          return osl_Socket_Error;
-}
-
-
-/*****************************************************************************/
-/* osl_getIpxSocketNumber  */
-/*****************************************************************************/
-sal_Int32 SAL_CALL osl_getIpxSocketNumber(oslSocketAddr Addr)
-{
-    struct sockaddr_ipx* pAddr= (struct sockaddr_ipx*)Addr;
-    OSL_ASSERT(pAddr);
-
-     if (pAddr && (pAddr->sa_family == FAMILY_TO_NATIVE(osl_Socket_FamilyIpx)))
-          return pAddr->sa_socket;
-      else
-          return OSL_INVALID_IPX_SOCKET_NO;
-}
-
-#endif /* OBSOLETE */
-
 /*****************************************************************************/
 /* osl_createSocket  */
 /*****************************************************************************/
diff --git a/sal/osl/w32/file_url.cxx b/sal/osl/w32/file_url.cxx
index 4dc1e64..f045705 100644
--- a/sal/osl/w32/file_url.cxx
+++ b/sal/osl/w32/file_url.cxx
@@ -303,14 +303,7 @@ DWORD IsValidFilePath(rtl_uString *path, LPCTSTR *lppError, DWORD dwFlags, rtl_u
                 
                 if ( !lpComponent )
                 {
-    #if 0
-                    /* We only have a Server specification what is invalid */
-
-                    lpComponent = lpszPath;
-                    fValid = FALSE;
-    #else
                     dwPathType |= PATHTYPE_IS_SERVER;
-    #endif
                 }
                 else
                 {
diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx
index 2e0b310..17640fe 100644
--- a/sal/osl/w32/profile.cxx
+++ b/sal/osl/w32/profile.cxx
@@ -1275,11 +1275,6 @@ static osl_TFile* openFileImpl(rtl_uString * strFileName, oslProfileOption Profi
 
     if (! bWriteable)
     {
-#if 0
-//#ifdef DEBUG_OSL_PROFILE
-        OSL_TRACE("opening '%s' read only\n",pszFilename);
-#endif
-
         pFile->m_Handle = CreateFileW( reinterpret_cast<LPCWSTR>(rtl_uString_getStr( strFileName )), GENERIC_READ,
                                           FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
                                           OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
diff --git a/sal/osl/w32/socket.cxx b/sal/osl/w32/socket.cxx
index 38e059b..86fa5c0 100644
--- a/sal/osl/w32/socket.cxx
+++ b/sal/osl/w32/socket.cxx
@@ -290,25 +290,6 @@ static oslSocketError osl_SocketErrorFromNative(int nativeType)
 /*****************************************************************************/
 static oslSocketDialupImpl *pDialupImpl = NULL;
 
-#if 0  /* INTERNAL DEBUG ONLY */
-BOOL WINAPI __osl_autodial_Impl (DWORD dwFlags, DWORD dwReserved)
-{
-    return 0;
-}
-
-BOOL WINAPI __osl_autodialHangup_Impl (DWORD dwReserved)
-{
-    return 1;
-}
-
-BOOL WINAPI __osl_getConnectedState_Impl (LPDWORD lpdwFlags, DWORD dwReserved)
-{
-    if (lpdwFlags)
-        *lpdwFlags = 0;
-    return 0;
-}
-#endif /* INTERNAL DEBUG ONLY */
-
 /*
  * __osl_createSocketDialupImpl.
  */
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 15f741f..902fd54 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -719,59 +719,6 @@ inline ::rtl::OUString getCurrentPID( void );
 namespace osl_FileBase
 {
 
-#if 0  //~ this function has been deprecated
-    //---------------------------------------------------------------------
-    // testing the method
-    // static inline RC getCanonicalName( const ::rtl::OUString& ustrRequestedURL, ::rtl::OUString& ustrValidURL )
-    //
-    // The illegal characters are ;+=[]',\"*\\<>/?:|.
-    // because getCanonicalName method is not implemented yet and will be deprecated in the future, this test is not necessary.
-    //---------------------------------------------------------------------
-
-    class getCanonicalName:public CppUnit::TestFixture
-    {
-
-        public:
-        ::osl::FileBase::RC	nError;
-
-        void getCanonicalName_001( )
-        {
-            ::rtl::OUString aUStr_ValidURL;
-            nError = ::osl::FileBase::getCanonicalName( aCanURL1, aUStr_ValidURL );
-
-            CPPUNIT_ASSERT_MESSAGE("test for getCanonicalName function: check valid and unused file name",
-                                     ( osl::FileBase::E_None == nError ) && aUStr_ValidURL.equalsIgnoreAsciiCase( aCanURL1 ) );
-        }
-
-        void getCanonicalName_002( )
-        {
-            ::rtl::OUString		aUStr_ValidURL;
-
-            createTestFile( aCanURL1 );
-            nError = ::osl::FileBase::getCanonicalName( aCanURL1, aUStr_ValidURL );
-            deleteTestFile( aCanURL1 );
-
-            CPPUNIT_ASSERT_MESSAGE( " test for getCanonicalName function: an existed file name, should different from the request, it did not passed(W32)(UNX)",
-                                    ( osl::FileBase::E_None == nError ) && aUStr_ValidURL.equalsIgnoreAsciiCase( aCanURL1 ) );
-        }
-
-        void getCanonicalName_003( )
-        {
-            ::rtl::OUString aUStr_ValidURL;
-            nError = ::osl::FileBase::getCanonicalName ( aCanURL2,  aUStr_ValidURL );
-
-            CPPUNIT_ASSERT_MESSAGE( " test for getCanonicalName function: invalid file name, should different from the request,  it did not passed(W32)(UNX)",
-                ( osl::FileBase::E_None == nError ) && aUStr_ValidURL.equalsIgnoreAsciiCase( aCanURL2 ) );
-        }
-
-        CPPUNIT_TEST_SUITE( getCanonicalName );
-        CPPUNIT_TEST( getCanonicalName_001 );
-        CPPUNIT_TEST( getCanonicalName_002 );
-        CPPUNIT_TEST( getCanonicalName_003 );
-        CPPUNIT_TEST_SUITE_END( );
-    };// class getCanonicalName
-#endif
-
     //---------------------------------------------------------------------
     // testing the method
     // static inline RC getAbsoluteFileURL( const ::rtl::OUString& ustrBaseDirectoryURL,
@@ -818,161 +765,6 @@ namespace osl_FileBase
 
         }; //class getAbsoluteFileURL
 
-/* use coding format as same as getSystemPathFromFileURL
-        // initialization
-        void setUp( )
-        {
-            sal_Char pResultURL1[]  = "/relative/file1";
-            sal_Char pResultURL2[]  = "/relative/file2";
-            sal_Char pResultURL3[]  = "/file3";
-            sal_Char pResultURL4[]  = "/file4";
-            sal_Char pResultURL5[]  = "/canonical.name";
-            sal_Char pResultURL6[]  = "/relative/";
-            aResultURL1 = aUserDirectoryURL.concat( rtl::OUString::createFromAscii( pResultURL1 ) );
-            aResultURL2 = aUserDirectoryURL.concat( rtl::OUString::createFromAscii( pResultURL2 ) );
-            aResultURL3 = aUserDirectoryURL.concat( rtl::OUString::createFromAscii( pResultURL3 ) );
-            aResultURL4 = aUserDirectoryURL.concat( rtl::OUString::createFromAscii( pResultURL4 ) );
-            aResultURL5 = aUserDirectoryURL.concat( rtl::OUString::createFromAscii( pResultURL5 ) );
-            aResultURL6 = aUserDirectoryURL.concat( rtl::OUString::createFromAscii( pResultURL6 ) );
-        }
-
-        void tearDown( )
-        {
-        }
-
-        // test code
-        void getAbsoluteFileURL_001( )
-        {
-            ::rtl::OUString aUStr_AbsURL;
-
-            ::osl::FileBase::RC nError11 = aFileBase.getAbsoluteFileURL( aUserDirectoryURL,  aRelURL1, aUStr_AbsURL );
-            ::rtl::OUString suError = ::rtl::OUString::createFromAscii("test for getAbsoluteFileURL(' ");
-            suError += aUserDirectoryURL;
-            suError += ::rtl::OUString::createFromAscii("', '");
-            suError += aRelURL1;
-            suError += ::rtl::OUString::createFromAscii("', '");
-            suError += aUStr_AbsURL;
-            suError += outputError( aUStr_AbsURL, aResultURL1, "' ),");
-
-            sal_Bool nError12 = aUStr_AbsURL.equals( aResultURL1 );
-            ::osl::FileBase::RC nError21 = aFileBase.getAbsoluteFileURL( aUserDirectoryURL,  aRelURL2, aUStr_AbsURL );
-            sal_Bool nError22 = aUStr_AbsURL.equals( aResultURL2 );
-            ::osl::FileBase::RC nError31 = aFileBase.getAbsoluteFileURL( aUserDirectoryURL,  aRelURL3, aUStr_AbsURL );
-            sal_Bool nError32 = aUStr_AbsURL.equals( aResultURL3 );
-            ::osl::FileBase::RC nError41 = aFileBase.getAbsoluteFileURL( aUserDirectoryURL,  aRelURL4, aUStr_AbsURL );
-            sal_Bool nError42 = aUStr_AbsURL.equals( aResultURL4 );
-            ::osl::FileBase::RC nError61 = aFileBase.getAbsoluteFileURL( aUserDirectoryURL,  aRelURL6, aUStr_AbsURL );
-            sal_Bool nError62 = aUStr_AbsURL.equals( aResultURL6 );
-            printFileName( aUStr_AbsURL );
-            printFileName( aResultURL6 );
-
-            CPPUNIT_ASSERT_MESSAGE("test for getAbsoluteFileURL function: valid file name with valid directory",
-                                     ( ::osl::FileBase::E_None == nError11 ) && ( sal_True == nError12 ) &&
-                                     ( ::osl::FileBase::E_None == nError21 ) && ( sal_True == nError22 ) &&
-                                     ( ::osl::FileBase::E_None == nError31 ) && ( sal_True == nError32 ) &&
-                                     ( ::osl::FileBase::E_None == nError41 ) && ( sal_True == nError42 ) &&
-                                     ( ::osl::FileBase::E_None == nError61 ) && ( sal_True == nError62 ) );
-        }
-
-
-#if ( defined UNX ) || ( defined OS2 )	//Link is not defined in Windows
-        void getAbsoluteFileURL_002( )
-        {
-            ::rtl::OUString aUStr_AbsURL, aUStr_LnkFileSys( aTempDirectorySys ), aUStr_SrcFileSys( aTempDirectorySys );
-            ( ( aUStr_LnkFileSys += aSlashURL ) += getCurrentPID( ) ) += ::rtl::OUString::createFromAscii("/link.file");
-            ( ( aUStr_SrcFileSys += aSlashURL ) += getCurrentPID( ) ) += ::rtl::OUString::createFromAscii("/canonical.name");
-
-                rtl::OString strLinkFileName, strSrcFileName;
-                strLinkFileName = OUStringToOString( aUStr_LnkFileSys, RTL_TEXTENCODING_ASCII_US );
-                strSrcFileName =  OUStringToOString( aUStr_SrcFileSys, RTL_TEXTENCODING_ASCII_US );
-
-            createTestFile( aCanURL1 );
-                sal_Int32 fd = symlink( strSrcFileName.getStr(), strLinkFileName.getStr() );
-            CPPUNIT_ASSERT( fd == 0 );
-
-            nError = aFileBase.getAbsoluteFileURL( aUserDirectoryURL, aLnkURL1, aUStr_AbsURL );
-            bOk = aUStr_AbsURL.equals( aResultURL5 );
-
-            ::rtl::OUString suError = ::rtl::OUString::createFromAscii("test for getAbsoluteFileURL(' ");
-            suError += aUserDirectoryURL;
-            suError += ::rtl::OUString::createFromAscii("', '");
-            suError += aLnkURL1;
-            suError += ::rtl::OUString::createFromAscii("', '");
-            suError += aUStr_AbsURL;
-            suError += outputError( aUStr_AbsURL, aResultURL5, "' ),");
-            //printFileName(suError);
-
-            deleteTestFile( aCanURL1 );
-                fd = remove( strLinkFileName.getStr() );
-            CPPUNIT_ASSERT( fd == 0 );
-
-            CPPUNIT_ASSERT_MESSAGE("test for getAbsoluteFileURL function: URL contain link( Solaris version )",
-                                     ( ::osl::FileBase::E_None == nError ) && ( sal_True == bOk ) );
-        }
-#else		//Windows version
-        void getAbsoluteFileURL_002( )
-        {
-            CPPUNIT_ASSERT_MESSAGE("test for getAbsoluteFileURL function: URL contain link( Windows version )",
-                    1 );
-        }
-#endif
-
-        void getAbsoluteFileURL_003( )
-        {
-// LLA: may be a wrong test, aTmpName1 not a real URL
-#if 0
-            ::rtl::OUString aUStr_AbsURL;
-
-            nError = aFileBase.getAbsoluteFileURL( aTmpName1,  aRelURL1, aUStr_AbsURL );    //base dir invalid error
-            ::rtl::OUString suError = ::rtl::OUString::createFromAscii("test for getAbsoluteFileURL('");
-            suError += aTmpName1;
-            suError += ::rtl::OUString::createFromAscii("', '");
-            suError += aRelURL1;
-            suError += ::rtl::OUString::createFromAscii("', '");
-            suError += aUStr_AbsURL;
-            suError += ::rtl::OUString::createFromAscii("' ),Parameter is invalid. it ignore the invalid base in Windows, did not pass in (W32), the reason maybe caused by the similar bug with getSystemPathFromFileURL() ");
-
-            CPPUNIT_ASSERT_MESSAGE( suError, ( ::osl::FileBase::E_INVAL == nError ) );
-#endif
-        }
-
-        //use ".." in relartive path, the BasePath must exist on the file system
-        void getAbsoluteFileURL_004( )
-        {
-            //create two level directories under $Temp/PID/
-            ::rtl::OUString	aUStrUpBase = aUserDirectoryURL + ::rtl::OUString::createFromAscii("/test1");
-            createTestDirectory( aUStrUpBase );
-            ::rtl::OUString	aUStrBase = aUserDirectoryURL + ::rtl::OUString::createFromAscii("/test1/dir1");
-            createTestDirectory( aUStrBase );
-
-            ::rtl::OUString	aUStrRelar = ::rtl::OUString::createFromAscii("../../mytestfile");
-            ::rtl::OUString	aUStr_AbsURL;
-            ::rtl::OUString aResultURL6 = aUserDirectoryURL + ::rtl::OUString::createFromAscii("/mytestfile");
-
-            nError = aFileBase.getAbsoluteFileURL( aUStrBase,  aUStrRelar, aUStr_AbsURL );
-            bOk = aUStr_AbsURL.equals( aResultURL6 );
-            ::rtl::OUString suError = ::rtl::OUString::createFromAscii("test for getAbsoluteFileURL('");
-            suError += aUStrBase;
-            suError += ::rtl::OUString::createFromAscii("', '");
-            suError += aUStrRelar;
-            suError += ::rtl::OUString::createFromAscii("', '");
-            suError += aUStr_AbsURL;
-            suError += outputError( aUStr_AbsURL, aResultURL6, "' ), did not pass on Win32 ");
-
-            deleteTestDirectory( aUStrBase );
-            deleteTestDirectory( aUStrUpBase );
-
-            CPPUNIT_ASSERT_MESSAGE( suError, ( ::osl::FileBase::E_None == nError ) && ( sal_True == bOk ) );
-        }
-
-        CPPUNIT_TEST_SUITE( getAbsoluteFileURL );
-        CPPUNIT_TEST( getAbsoluteFileURL_001 );
-        CPPUNIT_TEST( getAbsoluteFileURL_002 );
-        CPPUNIT_TEST( getAbsoluteFileURL_003 );
-        CPPUNIT_TEST( getAbsoluteFileURL_004 );
-        CPPUNIT_TEST_SUITE_END( );
-    };// class getAbsoluteFileURL*/
-
     void getAbsoluteFileURL::check_getAbsoluteFileURL( rtl::OUString const& _suBaseURL,  rtl::OString const& _sRelativeURL, ::osl::FileBase::RC _nAssumeError, rtl::OUString const& _suAssumeResultStr )
     {
         rtl::OUString suRelativeURL = rtl::OStringToOUString(_sRelativeURL, RTL_TEXTENCODING_UTF8);
@@ -1427,26 +1219,6 @@ namespace osl_FileBase
         checkWNTBehaviour_getSystemPathFromFileURL(sURL, osl::FileBase::E_INVAL, "");
     }
 
-#if 0
-    void SystemPath_FileURL::getSystemPathFromFileURL_003( )
-        {
-// LLA: ???
-//!! seams to be, that the directories do not pass together
-            ::rtl::OUString aUStr;
-            ::rtl::OUString aRelativeURL = ::rtl::OUString::createFromAscii("../../relartive/file3");
-            ::rtl::OUString aResultURL ( aSysPath4 );
-            ::osl::FileBase::RC nError = osl::FileBase::getSystemPathFromFileURL( aRelativeURL, aUStr );
-
-            sal_Bool bOk = compareFileName( aUStr, aResultURL );
-
-            ::rtl::OUString suError = ::rtl::OUString::createFromAscii("test for getSystemPathFromFileURL(");
-            suError += aRelativeURL;
-            suError += ::rtl::OUString::createFromAscii(") function:use a relative file URL, did not pass in(W32), it did not specified in method declaration of relative path issue, ");
-            suError += outputError(aUStr, aResultURL);
-            CPPUNIT_ASSERT_MESSAGE( suError, ( osl::FileBase::E_None == nError ) && ( sal_True == bOk ) );
-        }
-#endif
-
         //normal legal case
     void SystemPath_FileURL::getSystemPathFromFileURL_004( )
         {
@@ -1772,9 +1544,6 @@ namespace osl_FileBase
     };// class createTempFile
 
     // -----------------------------------------------------------------------------
-#if 0     //~ this function has been deprecated.
-    CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_FileBase::getCanonicalName, "osl_FileBase" );
-#endif
     CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_FileBase::getAbsoluteFileURL, "osl_FileBase" );
     CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_FileBase::SystemPath_FileURL, "osl_FileBase" );
   //        CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_FileBase::getFileURLFromSystemPath, "osl_FileBase" );
@@ -1785,135 +1554,6 @@ namespace osl_FileBase
 
 
 //------------------------------------------------------------------------
-// Beginning of the test cases for VolumeDevice class
-//------------------------------------------------------------------------
-
-#if 0  //~ this Class has been deprecated
-namespace osl_VolumeDevice
-{
-
-    //---------------------------------------------------------------------
-    // 	testing the method
-    // 	VolumeDevice() : _aHandle( NULL )
-    //---------------------------------------------------------------------
-    class  ctors : public CppUnit::TestFixture
-    {
-        ::osl::VolumeDevice aVolumeDevice;
-        ::rtl::OUString aUStr;
-        ::osl::FileBase::RC nError1, nError2;
-
-        public:
-        // initialization
-        void setUp( )
-        {
-        }
-
-        void tearDown( )
-        {
-        }
-
-        // test code.
-        void ctors_001( )
-        {
-            ::osl::VolumeDevice aVolumeDevice1;
-
-            CPPUNIT_ASSERT_MESSAGE( "test for ctors function: Constructor for VolumeDevice with no args.",
-                                     ( osl::FileBase::E_None !=  aVolumeDevice1.automount( ) ) &&
-                                    ( osl::FileBase::E_None !=  aVolumeDevice1.unmount( ) )   &&
-                                    ( aNullURL.equals( aVolumeDevice1.getMountPath( ) ) ) );
-        }
-
-         void ctors_002( )
-        {
-            ::osl::VolumeInfo   aVolumeInfo( VolumeInfoMask_Attributes );
-            nError1 = ::osl::Directory::getVolumeInfo( aRootURL, aVolumeInfo );
-            CPPUNIT_ASSERT( osl::FileBase::E_None == nError1 );
-
-            ::osl::VolumeDevice aVolumeDevice1( aVolumeInfo.getDeviceHandle( ) );
-            sal_Bool bOk = compareFileName( aNullURL, aVolumeDevice1.getMountPath( ) );
-            CPPUNIT_ASSERT_MESSAGE( "test for ctors function: Copy constructor for VolumeDevice, the copied VolumeDevice should have a mount path file:///, but it returned an empty OUString, it also may be the error from getDeviceHandle(), it did not pass in (UNX), (W32).",
-                                    sal_False == bOk );
-        }
-
-         void ctors_003( )
-        {
-            ::osl::VolumeInfo   aVolumeInfo( VolumeInfoMask_Attributes );
-            nError1 = ::osl::Directory::getVolumeInfo( aRootURL, aVolumeInfo );
-            CPPUNIT_ASSERT( osl::FileBase::E_None == nError1 );
-
-            ::osl::VolumeDevice aVolumeDevice1 = aVolumeInfo.getDeviceHandle( );
-            sal_Bool bOk = compareFileName( aNullURL, aVolumeDevice1.getMountPath( ) );
-            CPPUNIT_ASSERT_MESSAGE( "test for ctors function: Assigned operator for VolumeDevice, the assigned VolumeDevice should have a mount path file:///, but it returned an empty OUString, it also may be the error from getDeviceHandle(),it did not pass in (UNX), (W32).",
-                                    sal_False == bOk );
-        }
-
-        CPPUNIT_TEST_SUITE( ctors );
-        CPPUNIT_TEST( ctors_001 );
-        CPPUNIT_TEST( ctors_002 );
-        CPPUNIT_TEST( ctors_003 );
-        CPPUNIT_TEST_SUITE_END( );
-    };// class ctors
-
-
-    //---------------------------------------------------------------------
-    // 	testing the method
-    // 	inline RC automount()
-    //---------------------------------------------------------------------
-    class  automount : public CppUnit::TestFixture
-    {
-        ::osl::VolumeDevice aVolumeDevice;
-        ::rtl::OUString aUStr;
-        ::osl::FileBase::RC nError1, nError2;
-
-        public:
-        // initialization
-        void setUp( )
-        {
-        }
-
-        void tearDown( )
-        {
-
-        }
-
-        // test code.
-        void automount_001( )
-        {
-            ::osl::VolumeDevice aVolumeDevice1;
-            nError1 = aVolumeDevice1.automount( );
-
-            CPPUNIT_ASSERT_MESSAGE( "test for automount function: invalid parameter.",
-                                     ( osl::FileBase::E_INVAL == nError1 ) );
-        }
-
-          void automount_002( )
-        {
-            ::osl::VolumeInfo   aVolumeInfo( VolumeInfoMask_Attributes );
-            nError1 = ::osl::Directory::getVolumeInfo( aVolURL2, aVolumeInfo );
-            CPPUNIT_ASSERT( osl::FileBase::E_None == nError1 );
-
-            ::osl::VolumeDevice aVolumeDevice1( aVolumeInfo.getDeviceHandle( ) );
-              nError1 = aVolumeDevice1.unmount( );
-              nError1 = aVolumeDevice1.automount( );
-            CPPUNIT_ASSERT_MESSAGE( "test for automount function: this test is not implemented yet, it did not pass in (UNX), (W32).",
-                                    ( osl::FileBase::E_None == nError1 ) );
-        }
-
-        CPPUNIT_TEST_SUITE( automount );
-        CPPUNIT_TEST( automount_001 );
-        CPPUNIT_TEST( automount_002 );
-        CPPUNIT_TEST_SUITE_END( );
-    };// class automount
-
-
-    // -----------------------------------------------------------------------------
-    CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_VolumeDevice::ctors, "osl_VolumeDevice" );
-    CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( osl_VolumeDevice::automount, "osl_VolumeDevice" );
-}// namespace osl_VolumeDevice
-#endif
-
-
-//------------------------------------------------------------------------
 // Beginning of the test cases for VolumeInfo class
 //------------------------------------------------------------------------
 namespace osl_VolumeInfo
@@ -3189,56 +2829,6 @@ namespace osl_FileStatus
 
         void getFileType_003( )
         {
-#if 0
-// LLA: this have to be discussed.
-             ::osl::FileStatus   rFileStatus( FileStatusMask_Type );
-                nError1 = m_aVolumeItem.getFileStatus( rFileStatus );
-            CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 );
-
-                if (rFileStatus.isValid(FileStatusMask_Type))
-                {
-                    osl::FileStatus::Type eType = rFileStatus.getFileType( );
-
-            CPPUNIT_ASSERT_MESSAGE( "test for getFileType function: Volume, it seems the volume part of the field is not implemented, it did not pass in (W32)(UNX).",
-                                            ( eType == ::osl::FileStatus::Volume ) );
-                }
-#endif
-        }
-
-
-        void getFileType_004( )
-        {
-#if ( defined UNX ) || ( defined OS2 )	//Fifo creation is differ in Windows
-
-            //create a fifo in $ROOT/tmp/tmpdir, get its DirectoryItem.
-          rtl::OString strFifoSys;
-          strFifoSys = OUStringToOString( aFifoSys, RTL_TEXTENCODING_ASCII_US );
-          ::rtl::OUString aFifoURL;
-
-                  int fd = mkfifo( strFifoSys.getStr(), O_RDWR | O_CREAT );
-          CPPUNIT_ASSERT_MESSAGE("mkfifo failed!", fd == 0 );
-            ::osl::FileBase::getFileURLFromSystemPath( aFifoSys, aFifoURL );
-
-                nError1 = ::osl::DirectoryItem::get( aFifoURL, m_aFifoItem );
-            CPPUNIT_ASSERT_MESSAGE("get item failed!", ::osl::FileBase::E_None == nError1 );
-
-            //check for File type
-             ::osl::FileStatus   rFileStatus( FileStatusMask_Type );
-                nError1 = m_aFifoItem.getFileStatus( rFileStatus );
-            CPPUNIT_ASSERT_MESSAGE("get Status failed!", ::osl::FileBase::E_None == nError1 );
-
-            //delete fifo
-            nError1 = ::osl::File::remove( aFifoURL );
-            CPPUNIT_ASSERT_MESSAGE("remove file failed!", ::osl::FileBase::E_None == nError1 );
-
-                if (rFileStatus.isValid(FileStatusMask_Type))
-                {
-                    osl::FileStatus::Type eType = rFileStatus.getFileType( );
-
-            CPPUNIT_ASSERT_MESSAGE( "test for getFileType function: Fifo, Solaris version ",
-                                            ( eType == ::osl::FileStatus::Fifo ) );
-        }
-#endif
         }
 
 /*
diff --git a/sal/qa/osl/mutex/osl_Mutex.cxx b/sal/qa/osl/mutex/osl_Mutex.cxx
index 8be8516..c7aedce 100644
--- a/sal/qa/osl/mutex/osl_Mutex.cxx
+++ b/sal/qa/osl/mutex/osl_Mutex.cxx
@@ -513,15 +513,6 @@ namespace osl_Mutex
         // how about release twice?
         void release_002()
         {
-// LLA: is this a real test?
-#if 0
-            Mutex aMutex;
-            sal_Bool bRes1 = aMutex.release( );
-            sal_Bool bRes2 = aMutex.release( );
-        
-            CPPUNIT_ASSERT_MESSAGE( "release Mutex: mutex should not be released without aquire, should not release twice. although the behaviour is still under discussion, this test is passed on (LINUX), not passed on (SOLARIS)&(WINDOWS)", 
-                bRes1 == sal_False && bRes2 == sal_False );
-#endif
         }
     
         CPPUNIT_TEST_SUITE( release );
diff --git a/sal/qa/osl/socket/osl_AcceptorSocket.cxx b/sal/qa/osl/socket/osl_AcceptorSocket.cxx
index ce9b3e9..0a1e581 100644
--- a/sal/qa/osl/socket/osl_AcceptorSocket.cxx
+++ b/sal/qa/osl/socket/osl_AcceptorSocket.cxx
@@ -158,47 +158,6 @@ namespace osl_AcceptorSocket
 
     }; // class ctors
 
-#if 0  /* OBSOLETE */
-    class operator_assign : public CppUnit::TestFixture
-    {
-    public:
-
-        void assign_001()
-        {
-#if defined(LINUX)
-            ::osl::AcceptorSocket asSocket( osl_Socket_FamilyInet, osl_Socket_ProtocolIp, osl_Socket_TypeStream );
-            ::osl::AcceptorSocket asSocketAssign( osl_Socket_FamilyInet, osl_Socket_ProtocolIp, osl_Socket_TypeStream );
-            asSocket.setOption( osl_Socket_OptionReuseAddr, 1);
-            ::osl::SocketAddr saSocketAddr( rtl::OUString::createFromAscii("127.0.0.1"), IP_PORT_MYPORT4 );
-            asSocket.bind( saSocketAddr );
-
-            AcceptorThread myAcceptorThread( asSocketAssign, rtl::OUString::createFromAscii("127.0.0.1") );
-            myAcceptorThread.create();
-
-            thread_sleep( 1 );
-            //when accepting, assign another socket to the socket, the thread will not be closed, so is blocking
-            asSocketAssign = asSocket;
-
-            t_print("#asSocketAssign port number is %d\n", asSocketAssign.getLocalPort() );
-
-            asSocketAssign.shutdown();
-            myAcceptorThread.join();
-
-            CPPUNIT_ASSERT_MESSAGE( "test for close when is accepting: the socket will quit accepting status.",
-                                myAcceptorThread.isOK()	== sal_True );
-
-
-#endif /* LINUX */
-        }
-
-
-        CPPUNIT_TEST_SUITE( operator_assign  );
-        CPPUNIT_TEST( assign_001 );
-        CPPUNIT_TEST_SUITE_END();
-
-    }; // class operator_assign
-#endif /* OBSOLETE */
-
     /** testing the method:
         inline sal_Bool SAL_CALL listen(sal_Int32 MaxPendingConnections= -1);
         inline oslSocketResult SAL_CALL acceptConnection( StreamSocket& Connection);
diff --git a/sal/qa/osl/socket/osl_Socket.cxx b/sal/qa/osl/socket/osl_Socket.cxx
index 7864745..23a5114 100644
--- a/sal/qa/osl/socket/osl_Socket.cxx
+++ b/sal/qa/osl/socket/osl_Socket.cxx
@@ -767,16 +767,7 @@ namespace osl_SocketAddr
 
         void ctors_copy_no_001()
         {
-#if 0
-            ::osl::SocketAddr saSocketAddr( aHostName1, IP_PORT_HTTP1 );
-            oslSocketAddr psaOSLSocketAddr = saSocketAddr.getHandle( );
-
-            ::osl::SocketAddr saSocketAddrCopy( psaOSLSocketAddr, SAL_NO_COPY );
-            saSocketAddrCopy.setPort( IP_PORT_HTTP2 );
 
-            CPPUNIT_ASSERT_MESSAGE("test for SocketAddr no copy constructor function: do a no copy constructor on a given SocketAddr instance, modify the new instance's port, check the original one.",
-                                    saSocketAddr.getPort( ) == IP_PORT_HTTP2 );
-#endif
             ::osl::SocketAddr* pSocketAddr = new ::osl::SocketAddr( aHostName1, IP_PORT_HTTP1 );
             CPPUNIT_ASSERT_MESSAGE("check for new SocketAddr", pSocketAddr != NULL);
 
@@ -3366,47 +3357,6 @@ namespace osl_AcceptorSocket
 
     }; // class ctors
 
-#if 0
-    class operator_assign : public CppUnit::TestFixture
-    {
-    public:
-
-        void assign_001()
-        {
-#if defined(LINUX)
-            ::osl::AcceptorSocket asSocket( osl_Socket_FamilyInet, osl_Socket_ProtocolIp, osl_Socket_TypeStream );
-            ::osl::AcceptorSocket asSocketAssign( osl_Socket_FamilyInet, osl_Socket_ProtocolIp, osl_Socket_TypeStream );
-            asSocket.setOption( osl_Socket_OptionReuseAddr, 1);
-            ::osl::SocketAddr saSocketAddr( aHostIp1, IP_PORT_MYPORT4 );
-            asSocket.bind( saSocketAddr );
-
-            AcceptorThread myAcceptorThread( asSocketAssign, aHostIp1 );
-            myAcceptorThread.create();
-
-            thread_sleep( 1 );

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list