rpms/scim/devel scim-1.4.8-fix-dlopen.patch, NONE, 1.1 scim.spec, 1.141, 1.142
Huang Peng
phuang at fedoraproject.org
Wed Mar 25 07:24:54 UTC 2009
Author: phuang
Update of /cvs/pkgs/rpms/scim/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19131
Modified Files:
scim.spec
Added Files:
scim-1.4.8-fix-dlopen.patch
Log Message:
Use lt_dlopenadvise replace lt_dlopenext to fix bug 491841
scim-1.4.8-fix-dlopen.patch:
--- NEW FILE scim-1.4.8-fix-dlopen.patch ---
diff -up scim-1.4.8/src/ltdl.cpp.fix-dlopen scim-1.4.8/src/ltdl.cpp
--- scim-1.4.8/src/ltdl.cpp.fix-dlopen 2008-11-02 14:42:40.000000000 +0800
+++ scim-1.4.8/src/ltdl.cpp 2009-03-25 15:12:45.733010053 +0800
@@ -1,4414 +0,0 @@
-/* ltdl.c -- system independent dlopen wrapper
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
- Originally by Thomas Tanner <tanner at ffii.org>
- This file is part of GNU Libtool.
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-As a special exception to the GNU Lesser General Public License,
-if you distribute this file as part of a program or library that
-is built using GNU libtool, you may include it under the same
-distribution terms that you use for the rest of that program.
-
-This library 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 for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA
-
-*/
-
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_STDIO_H
-# include <stdio.h>
-#endif
-
-/* Include the header defining malloc. On K&R C compilers,
- that's <malloc.h>, on ANSI C and ISO C compilers, that's <stdlib.h>. */
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-# if HAVE_MALLOC_H
-# include <malloc.h>
-# endif
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#else
-# if HAVE_STRINGS_H
-# include <strings.h>
-# endif
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_MEMORY_H
-# include <memory.h>
-#endif
-
-#if HAVE_ERRNO_H
-# include <errno.h>
-#endif
-
-
-#ifndef __WINDOWS__
-# ifdef __WIN32__
-# define __WINDOWS__
-# endif
-#endif
-
-
-#undef LT_USE_POSIX_DIRENT
-#ifdef HAVE_CLOSEDIR
-# ifdef HAVE_OPENDIR
-# ifdef HAVE_READDIR
-# ifdef HAVE_DIRENT_H
-# define LT_USE_POSIX_DIRENT
-# endif /* HAVE_DIRENT_H */
-# endif /* HAVE_READDIR */
-# endif /* HAVE_OPENDIR */
-#endif /* HAVE_CLOSEDIR */
-
-
-#undef LT_USE_WINDOWS_DIRENT_EMULATION
-#ifndef LT_USE_POSIX_DIRENT
-# ifdef __WINDOWS__
-# define LT_USE_WINDOWS_DIRENT_EMULATION
-# endif /* __WINDOWS__ */
-#endif /* LT_USE_POSIX_DIRENT */
-
-
-#ifdef LT_USE_POSIX_DIRENT
-# include <dirent.h>
-# define LT_D_NAMLEN(dirent) (strlen((dirent)->d_name))
-#else
-# ifdef LT_USE_WINDOWS_DIRENT_EMULATION
-# define LT_D_NAMLEN(dirent) (strlen((dirent)->d_name))
-# else
-# define dirent direct
-# define LT_D_NAMLEN(dirent) ((dirent)->d_namlen)
-# if HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif
-# if HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif
-# if HAVE_NDIR_H
-# include <ndir.h>
-# endif
-# endif
-#endif
-
-#if HAVE_ARGZ_H
-# include <argz.h>
-#endif
-
-#if HAVE_ASSERT_H
-# include <assert.h>
-#else
-# define assert(arg) ((void) 0)
-#endif
-
-#include "ltdl.h"
-
-#if WITH_DMALLOC
-# include <dmalloc.h>
-#endif
-
-
-
-
-/* --- WINDOWS SUPPORT --- */
-
-
-#ifdef DLL_EXPORT
-# define LT_GLOBAL_DATA __declspec(dllexport)
-#else
-# define LT_GLOBAL_DATA
-#endif
-
-/* fopen() mode flags for reading a text file */
-#undef LT_READTEXT_MODE
-#ifdef __WINDOWS__
-# define LT_READTEXT_MODE "rt"
-#else
-# define LT_READTEXT_MODE "r"
-#endif
-
-#ifdef LT_USE_WINDOWS_DIRENT_EMULATION
-
-#include <windows.h>
-
-#define dirent lt_dirent
-#define DIR lt_DIR
-
-struct dirent
-{
- char d_name[2048];
- int d_namlen;
-};
-
-typedef struct _DIR
-{
- HANDLE hSearch;
- WIN32_FIND_DATA Win32FindData;
- BOOL firsttime;
- struct dirent file_info;
-} DIR;
-
-#endif /* LT_USE_WINDOWS_DIRENT_EMULATION */
-
-namespace scim {
-
-
-/* --- MANIFEST CONSTANTS --- */
-
-
-/* Standard libltdl search path environment variable name */
-#undef LTDL_SEARCHPATH_VAR
-#define LTDL_SEARCHPATH_VAR "LTDL_LIBRARY_PATH"
-
-/* Standard libtool archive file extension. */
-#undef LTDL_ARCHIVE_EXT
-#define LTDL_ARCHIVE_EXT ".la"
-
-/* max. filename length */
-#ifndef LT_FILENAME_MAX
-# define LT_FILENAME_MAX 1024
-#endif
[...4444 lines suppressed...]
-typedef struct {
- const char *name;
- lt_ptr address;
-} lt_dlsymlist;
-
-LT_SCOPE int lt_dlpreload LT_PARAMS((const lt_dlsymlist *preloaded));
-LT_SCOPE int lt_dlpreload_default
- LT_PARAMS((const lt_dlsymlist *preloaded));
-
-#define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \
- extern const lt_dlsymlist lt_preloaded_symbols[]; \
- lt_dlpreload_default(lt_preloaded_symbols); \
- }LT_STMT_END
-
-
-
-
-/* --- MODULE INFORMATION --- */
-
-
-/* Read only information pertaining to a loaded module. */
-typedef struct {
- char *filename; /* file name */
- char *name; /* module name */
- int ref_count; /* number of times lt_dlopened minus
- number of times lt_dlclosed. */
-} lt_dlinfo;
-
-LT_SCOPE const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle));
-LT_SCOPE lt_dlhandle lt_dlhandle_next LT_PARAMS((lt_dlhandle place));
-LT_SCOPE int lt_dlforeach LT_PARAMS((
- int (*func) (lt_dlhandle handle, lt_ptr data),
- lt_ptr data));
-
-/* Associating user data with loaded modules. */
-typedef unsigned lt_dlcaller_id;
-
-LT_SCOPE lt_dlcaller_id lt_dlcaller_register LT_PARAMS((void));
-LT_SCOPE lt_ptr lt_dlcaller_set_data LT_PARAMS((lt_dlcaller_id key,
- lt_dlhandle handle,
- lt_ptr data));
-LT_SCOPE lt_ptr lt_dlcaller_get_data LT_PARAMS((lt_dlcaller_id key,
- lt_dlhandle handle));
-
-
-
-/* --- USER MODULE LOADER API --- */
-
-
-typedef struct lt_dlloader lt_dlloader;
-typedef lt_ptr lt_user_data;
-typedef lt_ptr lt_module;
-
-/* Function pointer types for creating user defined module loaders. */
-typedef lt_module lt_module_open LT_PARAMS((lt_user_data loader_data,
- const char *filename));
-typedef int lt_module_close LT_PARAMS((lt_user_data loader_data,
- lt_module handle));
-typedef lt_ptr lt_find_sym LT_PARAMS((lt_user_data loader_data,
- lt_module handle,
- const char *symbol));
-typedef int lt_dlloader_exit LT_PARAMS((lt_user_data loader_data));
-
-struct lt_user_dlloader {
- const char *sym_prefix;
- lt_module_open *module_open;
- lt_module_close *module_close;
- lt_find_sym *find_sym;
- lt_dlloader_exit *dlloader_exit;
- lt_user_data dlloader_data;
-};
-
-LT_SCOPE lt_dlloader *lt_dlloader_next LT_PARAMS((lt_dlloader *place));
-LT_SCOPE lt_dlloader *lt_dlloader_find LT_PARAMS((
- const char *loader_name));
-LT_SCOPE const char *lt_dlloader_name LT_PARAMS((lt_dlloader *place));
-LT_SCOPE lt_user_data *lt_dlloader_data LT_PARAMS((lt_dlloader *place));
-LT_SCOPE int lt_dlloader_add LT_PARAMS((lt_dlloader *place,
- const struct lt_user_dlloader *dlloader,
- const char *loader_name));
-LT_SCOPE int lt_dlloader_remove LT_PARAMS((
- const char *loader_name));
-
-
-
-/* --- ERROR MESSAGE HANDLING --- */
-
-
-/* Defining error strings alongside their symbolic names in a macro in
- this way allows us to expand the macro in different contexts with
- confidence that the enumeration of symbolic names will map correctly
- onto the table of error strings. */
-#define lt_dlerror_table \
- LT_ERROR(UNKNOWN, "unknown error") \
- LT_ERROR(DLOPEN_NOT_SUPPORTED, "dlopen support not available") \
- LT_ERROR(INVALID_LOADER, "invalid loader") \
- LT_ERROR(INIT_LOADER, "loader initialization failed") \
- LT_ERROR(REMOVE_LOADER, "loader removal failed") \
- LT_ERROR(FILE_NOT_FOUND, "file not found") \
- LT_ERROR(DEPLIB_NOT_FOUND, "dependency library not found") \
- LT_ERROR(NO_SYMBOLS, "no symbols defined") \
- LT_ERROR(CANNOT_OPEN, "can't open the module") \
- LT_ERROR(CANNOT_CLOSE, "can't close the module") \
- LT_ERROR(SYMBOL_NOT_FOUND, "symbol not found") \
- LT_ERROR(NO_MEMORY, "not enough memory") \
- LT_ERROR(INVALID_HANDLE, "invalid module handle") \
- LT_ERROR(BUFFER_OVERFLOW, "internal buffer overflow") \
- LT_ERROR(INVALID_ERRORCODE, "invalid errorcode") \
- LT_ERROR(SHUTDOWN, "library already shutdown") \
- LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module") \
- LT_ERROR(INVALID_MUTEX_ARGS, "invalid mutex handler registration") \
- LT_ERROR(INVALID_POSITION, "invalid search path insert position")
-
-/* Enumerate the symbolic error names. */
-enum {
-#define LT_ERROR(name, diagnostic) LT_CONC(LT_ERROR_, name),
- lt_dlerror_table
-#undef LT_ERROR
-
- LT_ERROR_MAX
-};
-
-/* These functions are only useful from inside custom module loaders. */
-LT_SCOPE int lt_dladderror LT_PARAMS((const char *diagnostic));
-LT_SCOPE int lt_dlseterror LT_PARAMS((int errorcode));
-
-
-
-
-/* --- SOURCE COMPATIBILITY WITH OLD LIBLTDL --- */
-
-
-#ifdef LT_NON_POSIX_NAMESPACE
-# define lt_ptr_t lt_ptr
-# define lt_module_t lt_module
-# define lt_module_open_t lt_module_open
-# define lt_module_close_t lt_module_close
-# define lt_find_sym_t lt_find_sym
-# define lt_dlloader_exit_t lt_dlloader_exit
-# define lt_dlloader_t lt_dlloader
-# define lt_dlloader_data_t lt_user_data
-#endif
-
-//LT_END_C_DECLS
-
-} // namespace scim
-
-#endif /* !LTDL_H */
diff -up scim-1.4.8/src/scim_module.cpp.fix-dlopen scim-1.4.8/src/scim_module.cpp
--- scim-1.4.8/src/scim_module.cpp.fix-dlopen 2009-03-25 15:11:42.223072366 +0800
+++ scim-1.4.8/src/scim_module.cpp 2009-03-25 15:11:42.250015385 +0800
@@ -42,6 +42,7 @@ typedef void (*ModuleExitFunc) (void);
struct Module::ModuleImpl
{
+ lt_dladvise advise;
lt_dlhandle handle;
ModuleInitFunc init;
ModuleExitFunc exit;
@@ -120,18 +121,23 @@ Module::Module ()
: m_impl (new ModuleImpl)
{
lt_dlinit ();
+ lt_dladvise_init (&(m_impl->advise));
+ lt_dladvise_ext (&(m_impl->advise));
+ lt_dladvise_global (&(m_impl->advise));
}
Module::Module (const String &name, const String &type)
: m_impl (new ModuleImpl)
{
- lt_dlinit ();
+ Module();
+
load (name, type);
}
Module::~Module ()
{
unload ();
+ lt_dladvise_destroy (&(m_impl->advise));
lt_dlexit ();
delete m_impl;
}
@@ -169,13 +175,13 @@ Module::load (const String &name, const
for (it = paths.begin (); it != paths.end (); ++it) {
module_path = *it + String (SCIM_PATH_DELIM_STRING) + name;
- new_handle = lt_dlopenext (module_path.c_str ());
+ new_handle = lt_dlopenadvise (module_path.c_str (), m_impl->advise);
if (new_handle)
break;
}
if (!new_handle) {
- new_handle = lt_dlopenext (name.c_str ());
+ new_handle = lt_dlopenadvise (name.c_str (), m_impl->advise);
}
if (!new_handle)
Index: scim.spec
===================================================================
RCS file: /cvs/pkgs/rpms/scim/devel/scim.spec,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -r1.141 -r1.142
--- scim.spec 25 Feb 2009 22:58:29 -0000 1.141
+++ scim.spec 25 Mar 2009 07:24:24 -0000 1.142
@@ -3,7 +3,7 @@
Name: scim
Version: 1.4.8
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Smart Common Input Method platform
License: LGPLv2+
@@ -51,6 +51,7 @@
Patch29: scim-1.4.7-bz462820.patch
Patch30: scim-1.4.7-imdkit-read-property-properly.patch
Patch31: scim-1.4.7-syslibltdl.patch
+Patch32: scim-1.4.8-fix-dlopen.patch
%description
SCIM is a user friendly and full featured input method user interface and
@@ -185,6 +186,7 @@
%patch29 -p1 -b .29-bz462820
%patch30 -p1 -b .30-bz466657
%patch31 -p1 -b .31-sysltdl
+%patch32 -E -p1 -b .fix-dlopen
# patch17, patch24 touch configure.ac and Makefile.am
./bootstrap
@@ -315,6 +317,9 @@
%changelog
+* Wed Mar 25 2009 Huang Peng <phuang at redhat.com> - 1.4.8-3
+- Use lt_dlopenadvise to replace lt_dlopenext to fix bug 491841
+
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
More information about the scm-commits
mailing list