Mercurial > mxe-octave
view src/graphicsmagick-2-dynamicpath.patch @ 6335:0825abaf61a7
mingw-w64: Special case for large input for complex inverse trigonometric functions (bug #49091).
* src/mingw-w64-complex-inverse-trig.patch: Add patch for mingw-w64 CRT that
implements a special case for large input for complex inverse trigonometric
functions cacosh and casinh (and therefore functions that are derived from it,
like cacos and casin).
* dist-files.mk: Add new patch to list.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sat, 23 Jul 2022 19:00:09 +0200 |
parents | 7ac858194666 |
children |
line wrap: on
line source
diff -ur GraphicsMagick-1.3.37.orig/magick/blob.c GraphicsMagick-1.3.37/magick/blob.c --- GraphicsMagick-1.3.37.orig/magick/blob.c 2021-12-14 12:59:54.946462559 -0500 +++ GraphicsMagick-1.3.37/magick/blob.c 2021-12-14 13:05:57.022604525 -0500 @@ -1975,6 +1975,29 @@ AddConfigurePath(path_map,&path_index,MagickLibConfigPath,exception); # endif /* defined(MagickLibConfigPath) */ +#if defined(MSWINDOWS) + { + char buf[FILENAME_MAX+100]; + if (GetModuleFileName(NULL, buf, FILENAME_MAX + 1)) + { + char *ptr = strrchr(buf, '\\'); + if(ptr) { + *(ptr+1) = 0; + strcat(buf, "..\\lib\\"); + strcat(buf, MagickShareConfigSubDir); + strcat(buf, "\\"); + AddConfigurePath(path_map,&path_index,buf,exception); + + *(ptr+1) = 0; + strcat(buf, "..\\share\\"); + strcat(buf, MagickLibConfigSubDir); + strcat(buf, "\\"); + AddConfigurePath(path_map,&path_index,buf,exception); + } + } + } +#endif + # if defined(MSWINDOWS) && !(defined(MagickLibConfigPath) || defined(MagickShareConfigPath)) { char diff -ur GraphicsMagick-1.3.37.orig/magick/module.c GraphicsMagick-1.3.37/magick/module.c --- GraphicsMagick-1.3.37.orig/magick/module.c 2021-12-14 12:59:54.935462099 -0500 +++ GraphicsMagick-1.3.37/magick/module.c 2021-12-14 13:08:20.667611735 -0500 @@ -1036,6 +1036,33 @@ } } +#if defined(MSWINDOWS) + { + char buf[FILENAME_MAX+100]; + if (GetModuleFileName(NULL, buf, FILENAME_MAX + 1)) + { + char *ptr = strrchr(buf, '\\'); + if(ptr) + { + *(ptr+1) = 0; + strcat(buf, "..\\lib\\"); + switch (module_type) + { + case MagickCoderModule: + default: + strcat(buf, MagickCoderModulesSubdir); + break; + case MagickFilterModule: + strcat(buf, MagickFilterModulesSubdir); + break; + } + strcat(buf, "\\"); + AddModulePath(path_map,&path_index,buf,exception); + } + } + } +#endif + #if defined(UseInstalledMagick) # if defined(MagickCoderModulesPath) {