Re: MSYS patch

"Gary Setter" <[email protected]>
Newsgroups gmane.comp.gnu.aspell.devel
Message-ID <001101c50c5e$c46d8c60$84144a0c@pavilion>
----- Original Message ----- 
From: "Kevin Tew" <[email protected]>
To: <[email protected]>
Sent: Friday, February 04, 2005 3:43 PM
Subject: Re: [aspell-devel] MSYS patch


> *diff -ur aspell-orig/Makefile.am aspell-new/Makefile.am
> --- aspell-orig/Makefile.am    Thu Jan 27 11:17:53 2005
> +++ aspell-new/Makefile.am    Fri Feb  4 11:16:17 2005
> @@ -95,7 +95,7 @@
>    lib/document_checker-c.cpp\
>    lib/convert-c.cpp
>
> -libaspell_la_LIBADD =  $(LIBINTL) $(PTHREAD_LIB)
> +libaspell_la_LIBADD =  $(LIBINTL) $(PTHREAD_LIB) $(WIN32_LIBS)
>
>  if INCREMENTED_SONAME
>  libaspell_la_LDFLAGS = -version-info 17:0:1 -no-undefined
> @@ -204,14 +204,7 @@
>  ### Add your filter sources here,
>  ### starting with file containing filter class definition
followed by
>  ### file containing filter member implementation.
> -libaspell_la_SOURCES +=\
> -  modules/filter/email.cpp\
> -  modules/filter/tex.cpp\
> -  modules/filter/sgml.cpp\
> -  modules/filter/context.cpp\
> -  modules/filter/nroff.cpp\
> -  modules/filter/texinfo.cpp\
> -  modules/filter/genconv.cpp
> +libaspell_la_SOURCES += modules/filter/email.cpp
modules/filter/tex.cpp
> modules/filter/sgml.cpp modules/filter/context.cpp
> modules/filter/nroff.cpp modules/filter/texinfo.cpp
>
>  else # not COMPILE_IN_FILTERS
>
> diff -ur aspell-orig/common/config.cpp
aspell-new/common/config.cpp
> --- aspell-orig/common/config.cpp    Mon Dec 27 20:42:23 2004
> +++ aspell-new/common/config.cpp    Fri Feb  4 11:15:32 2005
> @@ -9,12 +9,12 @@
>  #include <string.h>
>  #include <stdlib.h>
>  #include <assert.h>
> +#include "settings.h"
>  #ifdef WIN32PORT
>  #include <windows.h>// GetModuleFilename
>  #include <shlobj.h> // SHGetSpecialFolderLocation
>  extern void * get_module_handle();
>  #endif
> -#include "settings.h"
>  #include "dirs.h"
>
>  #ifdef USE_LOCALE
> @@ -618,7 +618,7 @@
>        else if (strcmp(i, "prefix") == 0) {
>
>          char * buff = new char [MAX_PATH];
> -        HMODULE hand = reinterpret_cast<HMODULE>
(get_module_handle());
> +        HMODULE hand = GetModuleHandle("libaspell.dll");
>          if (GetModuleFileName(hand, buff, MAX_PATH)) {
>            //convert all \ chars to /
>            for (char *ptr = buff; *ptr; ++ptr)
> diff -ur aspell-orig/common/lock.hpp aspell-new/common/lock.hpp
> --- aspell-orig/common/lock.hpp    Thu Sep 23 07:25:24 2004
> +++ aspell-new/common/lock.hpp    Fri Feb  4 11:42:57 2005
> @@ -18,6 +18,9 @@
>  #include "settings.h"
>
>  #ifdef USE_POSIX_MUTEX
> +#ifdef WIN32PORT
> +#  include "minwin.h"
> +#endif
>  #  include <pthread.h>
>  #endif
>
> diff -ur aspell-orig/configure.ac aspell-new/configure.ac
> --- aspell-orig/configure.ac    Sat Jan  1 18:12:26 2005
> +++ aspell-new/configure.ac    Fri Feb  4 11:34:43 2005
> @@ -146,6 +146,21 @@
>    AC_DEFINE(ENABLE_WIN32_RELOCATABLE, 1, [Defined if win32
relocation
> should be used])
>  fi
>
> +
> +
> +WIN32_LIBS=
> +AC_SUBST(WIN32_LIBS)
> +
> +case $host in
> +  *-*-mingw32* | *-*-windows*)
> +    AC_DEFINE(WIN32PORT, 1, [Defined if host platform is
WIN32])
> +    LDFLAGS="$OLDLDFLAGS -Wl,--enable-runtime-pseudo-reloc"
> +    WIN32_LIBS=-lole32
> +    #pthreadGC1 looks for config.h
> +    touch config.h
> +  ;;
> +esac
> +
>  # DL stuff
>  AC_CHECK_HEADERS(dlfcn.h)
>  AC_CHECK_LIB(dl, dlopen)
> @@ -243,7 +258,7 @@
>
>  ORIG_LIBS="$LIBS"
>
> -for l in '' '-lpthread'
> +for l in '' '-lpthread' '-lpthreadGC1' '-lpthreadVC1'
>  do
>    if test -z "$use_posix_mutex"
>    then
> *
>

Hi Kevin,

Whould you consider saving the the handle of the aspell lib at
the time you do your LoadLibrary and define get_module_handle()
to return that handle?

What types of things are you exporting from your version of the
dll? The 0.5 version exported a lot of class methods and whole
classes. I thought the project was moving in the direction of a c
only interface. Are we there yet?
Best regards,
Gary
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.