summaryrefslogtreecommitdiff
path: root/library/qlibrary_unix.cpp
Unidiff
Diffstat (limited to 'library/qlibrary_unix.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qlibrary_unix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/qlibrary_unix.cpp b/library/qlibrary_unix.cpp
index fee73c2..f4d60cb 100644
--- a/library/qlibrary_unix.cpp
+++ b/library/qlibrary_unix.cpp
@@ -177,62 +177,62 @@ void* QLibraryPrivate::resolveSymbol( const char* symbol )
177 DyldLibDesc* desc = (DyldLibDesc*) pHnd; 177 DyldLibDesc* desc = (DyldLibDesc*) pHnd;
178 NSSymbol sym = NSLookupSymbolInModule(desc->mod, symbol); 178 NSSymbol sym = NSLookupSymbolInModule(desc->mod, symbol);
179 void* address = 0; 179 void* address = 0;
180 if (sym != 0) { 180 if (sym != 0) {
181 address = NSAddressOfSymbol(sym); 181 address = NSAddressOfSymbol(sym);
182 } 182 }
183#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) 183#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
184 if ( address == 0 ) 184 if ( address == 0 )
185 qWarning( "Cannot find symbol: %s", symbol ); 185 qWarning( "Cannot find symbol: %s", symbol );
186#endif 186#endif
187 return address; 187 return address;
188} 188}
189 189
190#else 190#else
191// Something else, assuming POSIX 191// Something else, assuming POSIX
192#include <dlfcn.h> 192#include <dlfcn.h>
193 193
194bool QLibraryPrivate::loadLibrary() 194bool QLibraryPrivate::loadLibrary()
195{ 195{
196 if ( pHnd ) 196 if ( pHnd )
197 return TRUE; 197 return TRUE;
198 198
199 QString filename = library->library(); 199 QString filename = library->library();
200 200
201 pHnd = dlopen( filename.latin1() , RTLD_LAZY ); 201 pHnd = ::dlopen( filename.latin1() , RTLD_LAZY );
202// #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) 202// #if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
203 if ( !pHnd ) 203 if ( !pHnd )
204 qWarning( "%s", dlerror() ); 204 qWarning( "%s", dlerror() );
205// #endif 205// #endif
206 return pHnd != 0; 206 return pHnd != 0;
207} 207}
208 208
209bool QLibraryPrivate::freeLibrary() 209bool QLibraryPrivate::freeLibrary()
210{ 210{
211 if ( !pHnd ) 211 if ( !pHnd )
212 return TRUE; 212 return TRUE;
213 213
214 int ec = dlclose( pHnd ); 214 int ec = ::dlclose( pHnd );
215 if ( !ec ) 215 if ( !ec )
216 pHnd = 0; 216 pHnd = 0;
217#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) 217#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
218 else { 218 else {
219 const char* error = dlerror(); 219 const char* error = dlerror();
220 if ( error ) 220 if ( error )
221 qWarning( "%s", error ); 221 qWarning( "%s", error );
222 } 222 }
223#endif 223#endif
224 return pHnd == 0; 224 return pHnd == 0;
225} 225}
226 226
227void* QLibraryPrivate::resolveSymbol( const char* f ) 227void* QLibraryPrivate::resolveSymbol( const char* f )
228{ 228{
229 if ( !pHnd ) 229 if ( !pHnd )
230 return 0; 230 return 0;
231 231
232 void* address = dlsym( pHnd, f ); 232 void* address = dlsym( pHnd, f );
233#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT) 233#if defined(QT_DEBUG) || defined(QT_DEBUG_COMPONENT)
234 const char* error = dlerror(); 234 const char* error = dlerror();
235 if ( error ) 235 if ( error )
236 qWarning( "%s", error ); 236 qWarning( "%s", error );
237#endif 237#endif
238 return address; 238 return address;