[Libreoffice-commits] .: 2 commits - desktop/unx extensions/source

Michael Meeks michael at kemper.freedesktop.org
Tue Nov 8 04:35:39 PST 2011


 desktop/unx/source/file_image_unx.c           |   12 ------------
 desktop/unx/source/start.c                    |    6 ------
 extensions/source/nsplugin/source/npshell.cxx |    8 ++++----
 extensions/source/plugin/base/nfuncs.cxx      |   10 +++++-----
 extensions/source/plugin/unx/npnapi.cxx       |   10 +++++-----
 5 files changed, 14 insertions(+), 32 deletions(-)

New commits:
commit d448b59e4b808b2074cd733bb15ed55f851da5ed
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Tue Nov 8 12:33:13 2011 +0000

    fix build against new npapi.h (some more)

diff --git a/extensions/source/nsplugin/source/npshell.cxx b/extensions/source/nsplugin/source/npshell.cxx
index 7fb1d52..731d5ab 100644
--- a/extensions/source/nsplugin/source/npshell.cxx
+++ b/extensions/source/nsplugin/source/npshell.cxx
@@ -666,20 +666,20 @@ NPP_NewStream(NPP instance,
 }
 
 
-int32 STREAMBUFSIZE = 0X0FFFFFFF;
+int32_t STREAMBUFSIZE = 0X0FFFFFFF;
 /* If we are reading from a file in NPAsFile
  * mode so we can take any size stream in our
  * write call (since we ignore it) */
 
-int32
+int32_t
 NPP_WriteReady(NPP /*instance*/, NPStream* /*stream*/)
 {
     return STREAMBUFSIZE;
 }
 
 
-int32
-NPP_Write(NPP /*instance*/, NPStream* /*stream*/, int32 /*offset*/, int32 len, void* /*buffer*/)
+int32_t
+NPP_Write(NPP /*instance*/, NPStream* /*stream*/, int32_t /*offset*/, int32_t len, void* /*buffer*/)
 {
     return len;     /* The number of bytes accepted */
 }
diff --git a/extensions/source/plugin/base/nfuncs.cxx b/extensions/source/plugin/base/nfuncs.cxx
index 113aee5..2f72d93 100644
--- a/extensions/source/plugin/base/nfuncs.cxx
+++ b/extensions/source/plugin/base/nfuncs.cxx
@@ -213,7 +213,7 @@ IMPL_LINK( AsynchronousGetURL, getURL, XPlugin_Impl*, pImpl )
 
 extern "C" {
 
-    void* SAL_CALL NP_LOADDS  NPN_MemAlloc( uint32 nBytes )
+    void* SAL_CALL NP_LOADDS  NPN_MemAlloc( uint32_t nBytes )
     {
         TRACE( "NPN_MemAlloc" );
         void* pMem = malloc( nBytes );
@@ -226,7 +226,7 @@ extern "C" {
         free( pMem );
     }
 
-    uint32 SAL_CALL NP_LOADDS  NPN_MemFlush( uint32 /*nSize*/ )
+    uint32_t SAL_CALL NP_LOADDS  NPN_MemFlush( uint32_t /*nSize*/ )
     {
         TRACE( "NPN_MemFlush" );
         return 0;
@@ -334,7 +334,7 @@ extern "C" {
         return NPERR_NO_ERROR;
     }
 
-    NPError SAL_CALL NP_LOADDS  NPN_PostURLNotify( NPP instance, const char* url, const char* target, uint32 len, const char* buf, NPBool file, void* notifyData )
+    NPError SAL_CALL NP_LOADDS  NPN_PostURLNotify( NPP instance, const char* url, const char* target, uint32_t len, const char* buf, NPBool file, void* notifyData )
     {
         TRACE( "NPN_PostURLNotify" );
         XPlugin_Impl* pImpl = XPluginManager_Impl::getXPluginFromNPP( instance );
@@ -376,7 +376,7 @@ extern "C" {
         return NPERR_NO_ERROR;
     }
 
-    NPError SAL_CALL NP_LOADDS  NPN_PostURL( NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file )
+    NPError SAL_CALL NP_LOADDS  NPN_PostURL( NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file )
     {
         TRACE( "NPN_PostURL" );
         XPlugin_Impl* pImpl = XPluginManager_Impl::getXPluginFromNPP( instance );
@@ -526,7 +526,7 @@ void SAL_CALL NP_LOADDS  NPN_Version( int* major, int* minor, int* net_major, in
     *net_minor = 5;
 }
 
-int32 SAL_CALL NP_LOADDS  NPN_Write( NPP instance, NPStream* stream, int32 len,
+int32_t SAL_CALL NP_LOADDS  NPN_Write( NPP instance, NPStream* stream, int32_t len,
                  void* buffer )
 {
     TRACE( "NPN_Write" );
diff --git a/extensions/source/plugin/unx/npnapi.cxx b/extensions/source/plugin/unx/npnapi.cxx
index 837a1f2..ceb79cc 100644
--- a/extensions/source/plugin/unx/npnapi.cxx
+++ b/extensions/source/plugin/unx/npnapi.cxx
@@ -56,7 +56,7 @@ void* CreateNewShell( void**, XLIB_Window );
 // begin Netscape plugin api calls
 extern "C" {
 
-static void* l_NPN_MemAlloc( uint32 nBytes )
+static void* l_NPN_MemAlloc( uint32_t nBytes )
 {
     void* pMem = new char[nBytes];
     return pMem;
@@ -67,7 +67,7 @@ static void l_NPN_MemFree( void* pMem )
     delete [] (char*)pMem;
 }
 
-static uint32 l_NPN_MemFlush( uint32 /*nSize*/ )
+static uint32_t l_NPN_MemFlush( uint32_t /*nSize*/ )
 {
     return 0;
 }
@@ -209,7 +209,7 @@ static NPError l_NPN_NewStream( NPP instance, NPMIMEType type, const char* targe
     return aRet;
 }
 
-static NPError l_NPN_PostURLNotify( NPP instance, const char* url, const char* target, uint32 len, const char* buf, NPBool file, void* notifyData )
+static NPError l_NPN_PostURLNotify( NPP instance, const char* url, const char* target, uint32_t len, const char* buf, NPBool file, void* notifyData )
 {
     sal_uInt32 nInstance = pConnector->GetNPPID( instance );
     if( nInstance == PluginConnector::UnknownNPPID )
@@ -234,7 +234,7 @@ static NPError l_NPN_PostURLNotify( NPP instance, const char* url, const char* t
     return aRet;
 }
 
-static NPError l_NPN_PostURL( NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file )
+static NPError l_NPN_PostURL( NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file )
 {
     sal_uInt32 nInstance = pConnector->GetNPPID( instance );
     if( nInstance == PluginConnector::UnknownNPPID )
@@ -340,7 +340,7 @@ static const char* l_NPN_UserAgent( NPP instance )
     return pAgent;
 }
 
-static int32 l_NPN_Write( NPP instance, NPStream* stream, int32 len, void* buffer )
+static int32_t l_NPN_Write( NPP instance, NPStream* stream, int32_t len, void* buffer )
 {
     sal_uInt32 nFileID = pConnector->GetStreamID( stream );
     if( nFileID == PluginConnector::UnknownStreamID )
commit 3f40276194c9dc06739d7aaae3a3dc64bfe18bc5
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Tue Nov 8 11:33:30 2011 +0000

    oosplash: remove redundant mac conditionals - we don't build on OS/X

diff --git a/desktop/unx/source/file_image_unx.c b/desktop/unx/source/file_image_unx.c
index fa1af92..078585f 100644
--- a/desktop/unx/source/file_image_unx.c
+++ b/desktop/unx/source/file_image_unx.c
@@ -101,22 +101,10 @@ int file_image_pagein (file_image * image)
         return (0);
 
     if (madvise (w.m_base, w.m_size, MADV_WILLNEED) == -1)
-    {
-#ifndef MACOSX
         return (errno);
-#else
-        /* madvise MADV_WILLNEED need not succeed here */
-        /* but that is fine */
-#endif
-    }
-
 
-#ifndef MACOSX
     if ((s = sysconf (_SC_PAGESIZE)) == -1)
         s = 0x1000;
-#else
-    s = getpagesize();
-#endif
 
     k = (size_t)(s);
     while (w.m_size > k)
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index b22f10f..29cda81 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -624,7 +624,6 @@ system_checks( void )
 /* re-use the pagein code */
 extern int pagein_execute (int argc, char **argv);
 
-#ifndef MACOSX
 static char *build_pagein_path (Args *args, const char *pagein_name)
 {
     char *path;
@@ -642,15 +641,11 @@ static char *build_pagein_path (Args *args, const char *pagein_name)
 
     return path;
 }
-#endif
 
 void
 exec_pagein (Args *args)
 {
 // no pagein for the while on OSX
-#ifdef MACOSX
-    (void)args;
-#else
     char *argv[3];
 
     /* don't use -L - since that does a chdir that breaks relative paths */
@@ -666,7 +661,6 @@ exec_pagein (Args *args)
     if (argv[2])
         free (argv[2]);
     free (argv[1]);
-#endif
 }
 
 static void extend_library_path (const char *new_element)


More information about the Libreoffice-commits mailing list